Package org.geotools.xml
Class XSISAXHandler
- Object
-
- DefaultHandler
-
- XSISAXHandler
-
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
public class XSISAXHandler extends DefaultHandler
This is a schema handler. Code here has been modified from code written by Ian Schneider.This class contains one stack used to store part of the parse tree. The ElementHandlers found on the stack have direct next handlers placed on the stack. So here's the warning, be careful to read how you may be affecting (or forgetting to affect) the stack.
- Author:
- dzwiers, Refractions Research, Inc. http://www.refractions.net, $Author:$ (last modification)
- See Also:
XSIElementHandler
-
-
Field Summary
Fields Modifier and Type Field Description protected static Logger
logger
protected RootHandler
rootHandler
-
Constructor Summary
Constructors Constructor Description XSISAXHandler(URI uri)
Stores the uri being parsed to help resolve relative uris within the document.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
characters(char[] ch, int start, int length)
Implementation of characters. push Stringvoid
endDocument()
Implementation of endDocument.void
endElement(String namespaceURI, String localName, String qName)
Implementation of endElement. push NS,Namevoid
error(SAXParseException exception)
Implementation of error.void
fatalError(SAXParseException exception)
Implementation of fatalError.Schema
getSchema()
getSchema purpose.void
setDocumentLocator(Locator locator)
static void
setLogLevel(Level l)
Sets the logging level for all the XSISAXHandlers.void
startDocument()
Implementation of startDocument.void
startElement(String namespaceURI, String localName, String qName, Attributes atts)
Implementation of startElement.void
startPrefixMapping(String arg0, String arg1)
void
warning(SAXParseException exception)
Implementation of warning.-
Methods inherited from class DefaultHandler
endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, unparsedEntityDecl
-
-
-
-
Field Detail
-
logger
protected static final Logger logger
-
rootHandler
protected RootHandler rootHandler
-
-
Constructor Detail
-
XSISAXHandler
public XSISAXHandler(URI uri)
Stores the uri being parsed to help resolve relative uris within the document.
-
-
Method Detail
-
startPrefixMapping
public void startPrefixMapping(String arg0, String arg1)
- Specified by:
startPrefixMapping
in interfaceContentHandler
- Overrides:
startPrefixMapping
in classDefaultHandler
- See Also:
ContentHandler.startPrefixMapping(java.lang.String, java.lang.String)
-
endDocument
public void endDocument()
Implementation of endDocument.- Specified by:
endDocument
in interfaceContentHandler
- Overrides:
endDocument
in classDefaultHandler
- See Also:
ContentHandler.endDocument()
-
startDocument
public void startDocument()
Implementation of startDocument.- Specified by:
startDocument
in interfaceContentHandler
- Overrides:
startDocument
in classDefaultHandler
- See Also:
ContentHandler.startDocument()
-
characters
public void characters(char[] ch, int start, int length) throws SAXException
Implementation of characters. push String- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classDefaultHandler
- Throws:
SAXException
- See Also:
ContentHandler.characters(char[], int, int)
-
endElement
public void endElement(String namespaceURI, String localName, String qName) throws SAXException
Implementation of endElement. push NS,Name- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
- Throws:
SAXException
- See Also:
ContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String)
-
startElement
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException
Implementation of startElement.- Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
- Throws:
SAXException
- See Also:
ContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
-
setLogLevel
public static void setLogLevel(Level l)
Sets the logging level for all the XSISAXHandlers.
-
getSchema
public Schema getSchema() throws SAXException
getSchema purpose.This method should be called only after the parse has been completed. This method will then return a compressed schema instance.
- Returns:
- schema
- Throws:
SAXException
-
error
public void error(SAXParseException exception)
Implementation of error.- Specified by:
error
in interfaceErrorHandler
- Overrides:
error
in classDefaultHandler
- See Also:
ErrorHandler.error(org.xml.sax.SAXParseException)
-
fatalError
public void fatalError(SAXParseException exception) throws SAXException
Implementation of fatalError.- Specified by:
fatalError
in interfaceErrorHandler
- Overrides:
fatalError
in classDefaultHandler
- Throws:
SAXException
- See Also:
ErrorHandler.fatalError(org.xml.sax.SAXParseException)
-
warning
public void warning(SAXParseException exception)
Implementation of warning.- Specified by:
warning
in interfaceErrorHandler
- Overrides:
warning
in classDefaultHandler
- See Also:
ErrorHandler.warning(org.xml.sax.SAXParseException)
-
setDocumentLocator
public void setDocumentLocator(Locator locator)
- Specified by:
setDocumentLocator
in interfaceContentHandler
- Overrides:
setDocumentLocator
in classDefaultHandler
- See Also:
ContentHandler.setDocumentLocator(org.xml.sax.Locator)
-
-