Class ProjectHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.apache.cayenne.project.xml.SAXNestedTagHandler
org.apache.cayenne.project.xml.NamespaceAwareNestedTagHandler
org.apache.cayenne.project.xml.VersionAwareHandler
org.apache.cayenne.project.xml.ProjectHandler
- All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler
- Since:
- 4.1
-
Field Summary
Fields inherited from class VersionAwareHandler
rootTagFields inherited from class NamespaceAwareNestedTagHandler
allowAllNamespaces, targetNamespaceFields inherited from class SAXNestedTagHandler
loaderContext, locator, parentHandler -
Constructor Summary
ConstructorsConstructorDescriptionProjectHandler(Project project, LoaderContext loaderContext, ConfigurationNameMapper nameMapper, DataMapLoader dataMapLoader) -
Method Summary
Modifier and TypeMethodDescriptionprotected ContentHandlercreateChildTagHandler(String namespaceURI, String localName, String name, Attributes attributes) This method should be used to create nested handlers to process children elements.protected booleanprocessElement(String namespaceURI, String localName, Attributes attributes) Main method to process XML content.Methods inherited from class VersionAwareHandler
validateNamespace, validateVersionMethods inherited from class NamespaceAwareNestedTagHandler
characters, endElement, processCharData, setAllowAllNamespaces, setTargetNamespace, startElementMethods inherited from class SAXNestedTagHandler
beforeScopeEnd, getParentHandler, setDocumentLocator, stop, unexpectedTagMessageMethods inherited from class DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warningMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ContentHandler
declaration
-
Constructor Details
-
ProjectHandler
public ProjectHandler(Project project, LoaderContext loaderContext, ConfigurationNameMapper nameMapper, DataMapLoader dataMapLoader)
-
-
Method Details
-
processElement
protected boolean processElement(String namespaceURI, String localName, Attributes attributes) throws SAXException Description copied from class:SAXNestedTagHandlerMain method to process XML content. Should be override in subclasses, by default do nothing. Return value should be true if tag was fully processed and shouldn't be passed down to child handler.- Overrides:
processElementin classVersionAwareHandler- Parameters:
namespaceURI- namespace for taglocalName- tag local name (i.e. w/o namespace prefix)attributes- tag attributes- Returns:
- true if tag was processed
- Throws:
SAXException- can be thrown to abort parsing- See Also:
-
createChildTagHandler
protected ContentHandler createChildTagHandler(String namespaceURI, String localName, String name, Attributes attributes) Description copied from class:SAXNestedTagHandlerThis method should be used to create nested handlers to process children elements. This method should never returnnull.- Overrides:
createChildTagHandlerin classNamespaceAwareNestedTagHandler- Parameters:
namespaceURI- namespace for taglocalName- tag local name (i.e. w/o namespace prefix)name- tag full name (i.e. with namespace prefix)attributes- tag attributes- Returns:
- new handler to process child tag
-