org.geotools.xml.handlers
Class ComplexElementHandler

java.lang.Object
  extended byorg.geotools.xml.XMLElementHandler
      extended byorg.geotools.xml.handlers.ComplexElementHandler
All Implemented Interfaces:
java.io.Serializable

public class ComplexElementHandler
extends XMLElementHandler

This class is intended to handle parsing an xml element from an instance document for elements who's type is both known and complex. This handler is used within the XMLSAXHandler to handle sax events generated by the SAX parser.

Author:
dzwiers www.refractions.net
See Also:
ComplexType, Serialized Form

Field Summary
 
Fields inherited from class org.geotools.xml.XMLElementHandler
logger
 
Constructor Summary
ComplexElementHandler(ElementHandlerFactory ehf, Element elem)
          Creates a new ComplexElementHandler object for Element elem using ElementHandlerFactory ehf.
 
Method Summary
 void characters(java.lang.String text1)
          This method throws a SAXNotSupportedException if it is called and not overwritten.
 void endElement(java.net.URI namespaceURI, java.lang.String localName, java.util.Map hints)
          handles SAX end Element events.
 Element getElement()
          This returns the Element specified.
 XMLElementHandler getHandler(java.net.URI namespaceURI, java.lang.String localName, java.util.Map hints)
          TODO summary sentence for getHandler ...
 java.lang.String getName()
          This returns the name of the element being represented by this handler.
 java.lang.Object getValue()
          TODO summary sentence for getValue ...
 void startElement(java.net.URI namespaceURI, java.lang.String localName, org.xml.sax.Attributes attr1)
          TODO summary sentence for startElement ...
 
Methods inherited from class org.geotools.xml.XMLElementHandler
setLogLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComplexElementHandler

public ComplexElementHandler(ElementHandlerFactory ehf,
                             Element elem)
                      throws org.xml.sax.SAXException
Creates a new ComplexElementHandler object for Element elem using ElementHandlerFactory ehf.

Parameters:
ehf - ElementHandlerFactory
elem - Element
Throws:
org.xml.sax.SAXException
Method Detail

getElement

public Element getElement()
Description copied from class: XMLElementHandler
This returns the Element specified.

Specified by:
getElement in class XMLElementHandler
Returns:
Element (may not be null)
See Also:
XMLElementHandler.getElement()

characters

public void characters(java.lang.String text1)
                throws org.xml.sax.SAXException
Description copied from class: XMLElementHandler
This method throws a SAXNotSupportedException if it is called and not overwritten. When overridding this method, you should be careful to understand that it may be called more than once per element. Therefore it would be advisable to log the text and handle the text's interpretation at a later time (

Overrides:
characters in class XMLElementHandler
Parameters:
text1 -
Throws:
org.xml.sax.SAXException
See Also:
XMLElementHandler.characters(java.lang.String)

endElement

public void endElement(java.net.URI namespaceURI,
                       java.lang.String localName,
                       java.util.Map hints)
                throws javax.naming.OperationNotSupportedException,
                       org.xml.sax.SAXException
Description copied from class: XMLElementHandler
handles 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:
endElement in class XMLElementHandler
Parameters:
namespaceURI -
localName -
hints -
Throws:
org.xml.sax.SAXException
javax.naming.OperationNotSupportedException
See Also:
SchemaContentHandler#endElement

startElement

public void startElement(java.net.URI namespaceURI,
                         java.lang.String localName,
                         org.xml.sax.Attributes attr1)
TODO summary sentence for startElement ...

Specified by:
startElement in class XMLElementHandler
Parameters:
namespaceURI -
localName -
attr1 -
See Also:
XMLElementHandler.startElement(java.net.URI, java.lang.String, org.xml.sax.Attributes)

getHandler

public XMLElementHandler getHandler(java.net.URI namespaceURI,
                                    java.lang.String localName,
                                    java.util.Map hints)
                             throws org.xml.sax.SAXException
TODO summary sentence for getHandler ...

Specified by:
getHandler in class XMLElementHandler
Parameters:
namespaceURI -
localName -
hints -
Returns:
XMLElementHandler
Throws:
org.xml.sax.SAXException
See Also:
XMLElementHandler.getHandler(java.net.URI, java.lang.String, java.util.Map)

getValue

public java.lang.Object getValue()
TODO summary sentence for getValue ...

Specified by:
getValue in class XMLElementHandler
Returns:
Object
See Also:
XMLElementHandler.getValue()

getName

public java.lang.String getName()
Description copied from class: XMLElementHandler
This returns the name of the element being represented by this handler. This name matches the name specified in the Schema.

Specified by:
getName in class XMLElementHandler
Returns:
The Name (may not be null)
See Also:
XMLElementHandler.getName()


Copyright © GeoTools. All Rights Reserved.