Package org.geotools.xsd.impl
Class ParserHandler
Object
DefaultHandler
DefaultHandler2
ParserHandler
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
,DeclHandler
,EntityResolver2
,LexicalHandler
- Direct Known Subclasses:
StreamingParserHandler
The main sax event handler used for parsing the input document. This handler maintains a stack of
Handler
objects. A handler is purshed onto the stack when a startElement event is processed, and popped off the stack when
the corresponding endElement event is processed.- Author:
- Justin Deoliveira,Refractions Research Inc.,jdeolive@refractions.net
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
Customize the context, after the configuration has set up the context before the document is parsed. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
characters
(char[] ch, int start, int length) protected void
configure
(Configuration config) void
endCDATA()
void
void
endElement
(String uri, String localName, String qName) protected void
endElementInternal
(ElementHandler handler) void
endPrefixMapping
(String prefix) void
protected XSDSchemaLocationResolver[]
protected XSDSchemaLocator[]
XSDSchema[]
List<URIHandler>
getValue()
boolean
isCDATA()
Check if the current text is inside a CDATA block.boolean
boolean
boolean
boolean
boolean
isStrict()
boolean
resolveEntity
(String publicId, String systemId) resolveEntity
(String name, String publicId, String baseURI, String systemId) void
setCDATA
(boolean b) Inform the parser that it is inside a CDATA block.void
setContextCustomizer
(ParserHandler.ContextCustomizer contextCustomizer) void
setEntityResolver
(EntityResolver entityResolver) void
setFailOnValidationError
(boolean failOnValidationError) void
setForceParserDelegate
(boolean forceParserDelegate) void
setHandleMixedContent
(boolean handleMixedContent) void
setRootElementType
(QName rootElementType) void
setStrict
(boolean strict) void
setValidating
(boolean validating) void
void
void
startElement
(String uri, String localName, String qName, Attributes attributes) void
startPrefixMapping
(String prefix, String uri) void
Methods inherited from class DefaultHandler2
attributeDecl, comment, elementDecl, endDTD, endEntity, externalEntityDecl, getExternalSubset, internalEntityDecl, startDTD, startEntity
Methods inherited from class DefaultHandler
fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, unparsedEntityDecl
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ContentHandler
declaration
-
Field Details
-
handlers
execution stack *
-
-
Constructor Details
-
ParserHandler
-
-
Method Details
-
setContextCustomizer
-
getConfiguration
-
setStrict
public void setStrict(boolean strict) -
isStrict
public boolean isStrict() -
isValidating
public boolean isValidating() -
setValidating
public void setValidating(boolean validating) -
setFailOnValidationError
public void setFailOnValidationError(boolean failOnValidationError) -
isFailOnValidationError
public boolean isFailOnValidationError() -
setHandleMixedContent
public void setHandleMixedContent(boolean handleMixedContent) -
isHandleMixedContent
public boolean isHandleMixedContent() -
setForceParserDelegate
public void setForceParserDelegate(boolean forceParserDelegate) -
isForceParserDelegate
public boolean isForceParserDelegate() -
setRootElementType
-
getRootElementType
-
getValidationErrors
-
getValidator
-
getHandlerFactory
-
getBindingLoader
-
getBindingWalker
-
getBindingFactory
-
getSchemas
public XSDSchema[] getSchemas() -
getSchemaIndex
-
getLogger
-
getNamespaceSupport
-
getURIHandlers
-
setEntityResolver
-
getEntityResolver
-
resolveEntity
- Specified by:
resolveEntity
in interfaceEntityResolver
- Overrides:
resolveEntity
in classDefaultHandler2
- Throws:
IOException
SAXException
-
resolveEntity
public InputSource resolveEntity(String name, String publicId, String baseURI, String systemId) throws SAXException, IOException - Specified by:
resolveEntity
in interfaceEntityResolver2
- Overrides:
resolveEntity
in classDefaultHandler2
- Throws:
SAXException
IOException
-
startPrefixMapping
- Specified by:
startPrefixMapping
in interfaceContentHandler
- Overrides:
startPrefixMapping
in classDefaultHandler
- Throws:
SAXException
-
startDocument
- Specified by:
startDocument
in interfaceContentHandler
- Overrides:
startDocument
in classDefaultHandler
- Throws:
SAXException
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException - Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
- Throws:
SAXException
-
characters
- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classDefaultHandler
- Throws:
SAXException
-
endElement
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
- Throws:
SAXException
-
endElementInternal
-
endPrefixMapping
- Specified by:
endPrefixMapping
in interfaceContentHandler
- Overrides:
endPrefixMapping
in classDefaultHandler
- Throws:
SAXException
-
endDocument
- Specified by:
endDocument
in interfaceContentHandler
- Overrides:
endDocument
in classDefaultHandler
- Throws:
SAXException
-
warning
- Specified by:
warning
in interfaceErrorHandler
- Overrides:
warning
in classDefaultHandler
- Throws:
SAXException
-
error
- Specified by:
error
in interfaceErrorHandler
- Overrides:
error
in classDefaultHandler
- Throws:
SAXException
-
getValue
-
configure
-
findSchemaLocators
protected XSDSchemaLocator[] findSchemaLocators() -
findSchemaLocationResolvers
protected XSDSchemaLocationResolver[] findSchemaLocationResolvers() -
startCDATA
- Specified by:
startCDATA
in interfaceLexicalHandler
- Overrides:
startCDATA
in classDefaultHandler2
- Throws:
SAXException
-
endCDATA
- Specified by:
endCDATA
in interfaceLexicalHandler
- Overrides:
endCDATA
in classDefaultHandler2
- Throws:
SAXException
-
isCDATAEnding
public boolean isCDATAEnding()- Returns:
- the cDATAEnding
-
setCDATA
public void setCDATA(boolean b) Inform the parser that it is inside a CDATA block. -
isCDATA
public boolean isCDATA()Check if the current text is inside a CDATA block.
-