Package org.apache.openjpa.persistence
Class PersistenceProductDerivation.ConfigurationParser
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.apache.openjpa.lib.meta.XMLMetaDataParser
org.apache.openjpa.persistence.PersistenceProductDerivation.ConfigurationParser
- All Implemented Interfaces:
MetaDataParser
,ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
,LexicalHandler
- Enclosing class:
- PersistenceProductDerivation
SAX handler capable of parsing an JPA persistence.xml file.
Package-protected for testing.
-
Field Summary
Fields inherited from class org.apache.openjpa.lib.meta.XMLMetaDataParser
_extendedNamespace, _openjpaNamespace
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
endElement
(String name) Override this method marking the end of some element.protected Object
Implement to return the XML schema source for the document.void
Parse the given file, which may be a directory, in which case it will be scanned recursively for metadata files.void
Parse the given resource.protected void
reset()
Override this method to clear any state and ready the parser for a new document.protected boolean
startElement
(String name, Attributes attrs) Override this method marking the start of some element.Methods inherited from class org.apache.openjpa.lib.meta.XMLMetaDataParser
addComments, addResult, characters, clear, clearDeferredMetaData, comment, currentClassLoader, currentComments, currentDepth, currentLocation, currentText, endCDATA, endDTD, endElement, endEntity, error, fatalError, finish, getClassLoader, getDocType, getException, getException, getException, getLexicalHandler, getLocation, getLog, getOverrideContextClassloader, getParseComments, getParseText, getResults, getSourceFile, getSourceIsSystemId, getSourceName, getSuffix, ignoreContent, isCaching, isParsing, isValidating, parse, parse, parse, parse, parsed, parseNewResource, setCaching, setClassLoader, setDocumentLocator, setLexicalHandler, setLocation, setLog, setOverrideContextClassloader, setParseComments, setParseText, setParsing, setSourceIsSystemId, setSuffix, setValidating, startCDATA, startDTD, startElement, startEntity
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
-
Constructor Details
-
ConfigurationParser
-
-
Method Details
-
parse
Description copied from interface:MetaDataParser
Parse the given resource.- Specified by:
parse
in interfaceMetaDataParser
- Overrides:
parse
in classXMLMetaDataParser
- Throws:
IOException
-
parse
Description copied from interface:MetaDataParser
Parse the given file, which may be a directory, in which case it will be scanned recursively for metadata files.- Specified by:
parse
in interfaceMetaDataParser
- Overrides:
parse
in classXMLMetaDataParser
- Throws:
IOException
-
getSchemaSource
Description copied from class:XMLMetaDataParser
Implement to return the XML schema source for the document. Returns null by default. May return:String
pointing to schema URI.InputStream
containing schema contents.InputSource
containing schema contents.File
containing schema contents.- Array of any of the above elements.
- Overrides:
getSchemaSource
in classXMLMetaDataParser
-
reset
protected void reset()Description copied from class:XMLMetaDataParser
Override this method to clear any state and ready the parser for a new document. Subclasses should callsuper.reset()
to clear superclass state.- Overrides:
reset
in classXMLMetaDataParser
-
startElement
Description copied from class:XMLMetaDataParser
Override this method marking the start of some element. If this method returns false, the content of the element and the end element event will be ignored.- Specified by:
startElement
in classXMLMetaDataParser
- Throws:
SAXException
-
endElement
Description copied from class:XMLMetaDataParser
Override this method marking the end of some element.- Specified by:
endElement
in classXMLMetaDataParser
- Throws:
SAXException
-