org.geotools.xml
Class XSISAXHandler

java.lang.Object
  extended byorg.xml.sax.helpers.DefaultHandler
      extended byorg.geotools.xml.XSISAXHandler
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
Direct Known Subclasses:
WFSSchemaFactory.WFSXSISAXHandler

public class XSISAXHandler
extends org.xml.sax.helpers.DefaultHandler

XSISAXHandler purpose.

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.

Version:
$Id: XSISAXHandler.java 17701 2006-01-23 00:00:51Z desruisseaux $
Author:
dzwiers, Refractions Research, Inc. http://www.refractions.net, $Author:$ (last modification)
See Also:
XSIElementHandler

Field Summary
protected static java.util.logging.Logger logger
           
protected  RootHandler rootHandler
           
 
Constructor Summary
XSISAXHandler(java.net.URI uri)
          Stores the uri being parsed to help resolve relative uris within the document.
 
Method Summary
 void characters(char[] ch, int start, int length)
          Implementation of characters. push String
 void endDocument()
          Implementation of endDocument.
 void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName)
          Implementation of endElement. push NS,Name
 void error(org.xml.sax.SAXParseException exception)
          Implementation of error.
 void fatalError(org.xml.sax.SAXParseException exception)
          Implementation of fatalError.
 Schema getSchema()
          getSchema purpose.
 void setDocumentLocator(org.xml.sax.Locator locator)
           
static void setLogLevel(java.util.logging.Level l)
           Sets the logging level for all the XSISAXHandlers.
 void startDocument()
          Implementation of startDocument.
 void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
          Implementation of startElement.
 void startPrefixMapping(java.lang.String arg0, java.lang.String arg1)
           
 void warning(org.xml.sax.SAXParseException exception)
          Implementation of warning.
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, unparsedEntityDecl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final java.util.logging.Logger logger

rootHandler

protected RootHandler rootHandler
Constructor Detail

XSISAXHandler

public XSISAXHandler(java.net.URI uri)
Stores the uri being parsed to help resolve relative uris within the document.

Parameters:
uri -
Method Detail

startPrefixMapping

public void startPrefixMapping(java.lang.String arg0,
                               java.lang.String arg1)
See Also:
ContentHandler.startPrefixMapping(java.lang.String, java.lang.String)

endDocument

public void endDocument()
Implementation of endDocument.

See Also:
ContentHandler.endDocument()

startDocument

public void startDocument()
Implementation of startDocument.

See Also:
ContentHandler.startDocument()

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
Implementation of characters. push String

Parameters:
ch -
start -
length -
Throws:
org.xml.sax.SAXException
See Also:
ContentHandler.characters(char[], int, int)

endElement

public void endElement(java.lang.String namespaceURI,
                       java.lang.String localName,
                       java.lang.String qName)
                throws org.xml.sax.SAXException
Implementation of endElement. push NS,Name

Parameters:
namespaceURI -
localName -
qName -
Throws:
org.xml.sax.SAXException
See Also:
ContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String)

startElement

public void startElement(java.lang.String namespaceURI,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes atts)
                  throws org.xml.sax.SAXException
Implementation of startElement.

Parameters:
namespaceURI -
localName -
qName -
atts -
Throws:
org.xml.sax.SAXException
See Also:
ContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)

setLogLevel

public static void setLogLevel(java.util.logging.Level l)

Sets the logging level for all the XSISAXHandlers.

Parameters:
l -

getSchema

public Schema getSchema()
                 throws org.xml.sax.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:
org.xml.sax.SAXException

error

public void error(org.xml.sax.SAXParseException exception)
Implementation of error.

Parameters:
exception -
See Also:
ErrorHandler.error(org.xml.sax.SAXParseException)

fatalError

public void fatalError(org.xml.sax.SAXParseException exception)
                throws org.xml.sax.SAXException
Implementation of fatalError.

Parameters:
exception -
Throws:
org.xml.sax.SAXException
See Also:
ErrorHandler.fatalError(org.xml.sax.SAXParseException)

warning

public void warning(org.xml.sax.SAXParseException exception)
Implementation of warning.

Parameters:
exception -
See Also:
ErrorHandler.warning(org.xml.sax.SAXParseException)

setDocumentLocator

public void setDocumentLocator(org.xml.sax.Locator locator)
See Also:
ContentHandler.setDocumentLocator(org.xml.sax.Locator)


Copyright © GeoTools. All Rights Reserved.