Package org.geotools.xml.handlers
Class DocumentHandler
Object
XMLElementHandler
DocumentHandler
- All Implemented Interfaces:
Serializable
Represents the start of an XML document ... serves up elements wrapped in handlers for a specified schema.
- Author:
- dzwiers www.refractions.net
- See Also:
-
Field Summary
FieldsFields inherited from class XMLElementHandler
logger -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new DocumentHandler object. -
Method Summary
Modifier and TypeMethodDescriptionvoidhandles SAX end Element events.This returns the Element specified.This will find an appropriate XMLElementHandler for the specified child if appropriate.getName()This returns the name of the element being represented by this handler.getValue()This method will get the value of the element depending on it's type.voidstartElement(URI namespaceURI, String localName, Attributes attr) handles SAX start Element events.Methods inherited from class XMLElementHandler
characters, setLogLevel
-
Field Details
-
DEFAULT_NAMESPACE_HINT_KEY
SuppliedSchemafor parsing and validation- See Also:
-
-
Constructor Details
-
DocumentHandler
Creates a new DocumentHandler object.- Parameters:
ehf- ElementHandlerFactory
-
-
Method Details
-
getElement
Description copied from class:XMLElementHandlerThis returns the Element specified.- Specified by:
getElementin classXMLElementHandler- Returns:
- Element (may not be null)
- See Also:
-
endElement
Description copied from class:XMLElementHandlerhandles SAX end Element events. This matches the end of the element declaration in the document ... and responds to the event generated by the SAX parser. This is an opportunity to complete some post-processing.- Specified by:
endElementin classXMLElementHandler- See Also:
-
org.geotools.xml.XMLElementHandler#endElement(java.lang.String, java.lang.String)
-
getHandler
public XMLElementHandler getHandler(URI namespaceURI, String localName, Map<String, Object> hints) throws SAXExceptionDescription copied from class:XMLElementHandlerThis will find an appropriate XMLElementHandler for the specified child if appropriate. This method may return or throw an exception, depending on the severity, if an error occurs. This method should be used to complete a SAX parse of a document for which the Schema is known, and parsed.- Specified by:
getHandlerin classXMLElementHandler- Returns:
- XMLElementHandler, or null
- Throws:
SAXException- See Also:
-
org.geotools.xml.XMLElementHandler#getHandler(java.lang.String, java.lang.String)
-
startElement
Description copied from class:XMLElementHandlerhandles SAX start Element events. This matches the start of the element declaration in the document ... and responds to the event generated by the SAX parser. This is an opportunity to complete some pre-processing.- Specified by:
startElementin classXMLElementHandler- See Also:
-
org.geotools.xml.XMLElementHandler#startElement(java.lang.String, java.lang.String, org.xml.sax.Attributes)
-
getValue
Description copied from class:XMLElementHandlerThis method will get the value of the element depending on it's type.- Specified by:
getValuein classXMLElementHandler- Returns:
- Object (may be null)
- Throws:
SAXException- See Also:
-
getName
Description copied from class:XMLElementHandlerThis returns the name of the element being represented by this handler. This name matches the name specified in the Schema.- Specified by:
getNamein classXMLElementHandler- Returns:
- The Name (may not be null)
- See Also:
-