org.geotools.xml.impl
Class ParserHandler

Object
  extended by DefaultHandler
      extended by ParserHandler
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler
Direct Known Subclasses:
StreamingParserHandler

public class ParserHandler
extends DefaultHandler

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

Field Summary
protected  Stack handlers
          execution stack
 
Constructor Summary
ParserHandler(Configuration config)
           
 
Method Summary
 void characters(char[] ch, int start, int length)
           
protected  void configure(Configuration config)
           
 void endDocument()
           
 void endElement(String uri, String localName, String qName)
           
protected  void endElementInternal(ElementHandler handler)
           
 void error(SAXParseException e)
           
protected  XSDSchemaLocationResolver[] findSchemaLocationResolvers()
           
protected  XSDSchemaLocator[] findSchemaLocators()
           
 BindingFactory getBindingFactory()
           
 BindingLoader getBindingLoader()
           
 BindingWalker getBindingWalker()
           
 Configuration getConfiguration()
           
 HandlerFactory getHandlerFactory()
           
 Logger getLogger()
           
 NamespaceSupport getNamespaceSupport()
           
 SchemaIndex getSchemaIndex()
           
 XSDSchema[] getSchemas()
           
 List getValidationErrors()
           
 Object getValue()
           
 boolean isFailOnValidationError()
           
 boolean isStrict()
           
 boolean isValidating()
           
 void setFailOnValidationError(boolean failOnValidationError)
           
 void setStrict(boolean strict)
           
 void setValidating(boolean validating)
           
 void startDocument()
           
 void startElement(String uri, String localName, String qName, Attributes attributes)
           
 void startPrefixMapping(String prefix, String uri)
           
 void warning(SAXParseException e)
           
 
Methods inherited from class DefaultHandler
endPrefixMapping, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, unparsedEntityDecl
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

handlers

protected Stack handlers
execution stack

Constructor Detail

ParserHandler

public ParserHandler(Configuration config)
Method Detail

getConfiguration

public Configuration 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()

getValidationErrors

public List getValidationErrors()

getHandlerFactory

public HandlerFactory getHandlerFactory()

getBindingLoader

public BindingLoader getBindingLoader()

getBindingWalker

public BindingWalker getBindingWalker()

getBindingFactory

public BindingFactory getBindingFactory()

getSchemas

public XSDSchema[] getSchemas()

getSchemaIndex

public SchemaIndex getSchemaIndex()

getLogger

public Logger getLogger()

getNamespaceSupport

public NamespaceSupport getNamespaceSupport()

startPrefixMapping

public void startPrefixMapping(String prefix,
                               String uri)
                        throws SAXException
Specified by:
startPrefixMapping in interface ContentHandler
Overrides:
startPrefixMapping in class DefaultHandler
Throws:
SAXException

startDocument

public void startDocument()
                   throws SAXException
Specified by:
startDocument in interface ContentHandler
Overrides:
startDocument in class DefaultHandler
Throws:
SAXException

startElement

public void startElement(String uri,
                         String localName,
                         String qName,
                         Attributes attributes)
                  throws SAXException
Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class DefaultHandler
Throws:
SAXException

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws SAXException
Specified by:
characters in interface ContentHandler
Overrides:
characters in class DefaultHandler
Throws:
SAXException

endElement

public void endElement(String uri,
                       String localName,
                       String qName)
                throws SAXException
Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class DefaultHandler
Throws:
SAXException

endElementInternal

protected void endElementInternal(ElementHandler handler)

endDocument

public void endDocument()
                 throws SAXException
Specified by:
endDocument in interface ContentHandler
Overrides:
endDocument in class DefaultHandler
Throws:
SAXException

warning

public void warning(SAXParseException e)
             throws SAXException
Specified by:
warning in interface ErrorHandler
Overrides:
warning in class DefaultHandler
Throws:
SAXException

error

public void error(SAXParseException e)
           throws SAXException
Specified by:
error in interface ErrorHandler
Overrides:
error in class DefaultHandler
Throws:
SAXException

getValue

public Object getValue()

configure

protected void configure(Configuration config)

findSchemaLocators

protected XSDSchemaLocator[] findSchemaLocators()

findSchemaLocationResolvers

protected XSDSchemaLocationResolver[] findSchemaLocationResolvers()


Copyright © 1996-2009 Geotools. All Rights Reserved.