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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidendElement(String name) Override this method marking the end of some element.protected ObjectImplement to return the XML schema source for the document.voidParse the given file, which may be a directory, in which case it will be scanned recursively for metadata files.voidParse the given resource.protected voidreset()Override this method to clear any state and ready the parser for a new document.protected booleanstartElement(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, startEntityMethods 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:MetaDataParserParse the given resource.- Specified by:
parsein interfaceMetaDataParser- Overrides:
parsein classXMLMetaDataParser- Throws:
IOException
-
parse
Description copied from interface:MetaDataParserParse the given file, which may be a directory, in which case it will be scanned recursively for metadata files.- Specified by:
parsein interfaceMetaDataParser- Overrides:
parsein classXMLMetaDataParser- Throws:
IOException
-
getSchemaSource
Description copied from class:XMLMetaDataParserImplement to return the XML schema source for the document. Returns null by default. May return:Stringpointing to schema URI.InputStreamcontaining schema contents.InputSourcecontaining schema contents.Filecontaining schema contents.- Array of any of the above elements.
- Overrides:
getSchemaSourcein classXMLMetaDataParser
-
reset
protected void reset()Description copied from class:XMLMetaDataParserOverride this method to clear any state and ready the parser for a new document. Subclasses should callsuper.reset()to clear superclass state.- Overrides:
resetin classXMLMetaDataParser
-
startElement
Description copied from class:XMLMetaDataParserOverride 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:
startElementin classXMLMetaDataParser- Throws:
SAXException
-
endElement
Description copied from class:XMLMetaDataParserOverride this method marking the end of some element.- Specified by:
endElementin classXMLMetaDataParser- Throws:
SAXException
-