Package org.apache.openjpa.lib.meta
Class XMLVersionParser
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.apache.openjpa.lib.meta.XMLMetaDataParser
org.apache.openjpa.lib.meta.XMLVersionParser
- All Implemented Interfaces:
MetaDataParser
,ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
,LexicalHandler
Custom non-validating SAX parser which can be used to get the version and
schema location attributes from the root node.
- Author:
- Jeremy Bauer
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
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.Get the string value of the schema location attribute on the root elementGet the string value of the version attribute on the root elementprotected 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, getSchemaSource, getSourceFile, getSourceIsSystemId, getSourceName, getSuffix, ignoreContent, isCaching, isParsing, isValidating, parse, parse, parse, parse, parse, parse, parsed, parseNewResource, reset, 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
-
Field Details
-
VERSION_1_0
- See Also:
-
VERSION_2_0
- See Also:
-
VERSION_2_1
- See Also:
-
VERSION_2_2
- See Also:
-
-
Constructor Details
-
XMLVersionParser
-
-
Method Details
-
endElement
Description copied from class:XMLMetaDataParser
Override this method marking the end of some element.- Specified by:
endElement
in classXMLMetaDataParser
- Throws:
SAXException
-
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
-
getVersion
Get the string value of the version attribute on the root element- Returns:
- doc version
-
getSchemaLocation
Get the string value of the schema location attribute on the root element- Returns:
- doc schema location
-