Package org.geotools.xml.handlers
Class ComplexElementHandler
Object
XMLElementHandler
ComplexElementHandler
- All Implemented Interfaces:
Serializable
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:
-
Field Summary
Fields inherited from class XMLElementHandler
logger -
Constructor Summary
ConstructorsConstructorDescriptionComplexElementHandler(ElementHandlerFactory ehf, Element elem) Creates a new ComplexElementHandler object for Element elem using ElementHandlerFactory ehf. -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(String text1) This method throws a SAXNotSupportedException if it is called and not overwritten.voidhandles SAX end Element events.This returns the Element specified.TODO summary sentence for getHandler ...getName()This returns the name of the element being represented by this handler.getType()returns the Type of the ElementhandlergetValue()TODO summary sentence for getValue ...voidremoveElement(XMLElementHandler handler) Remove the given XMLElementHandler from the Child-ListvoidstartElement(URI namespaceURI, String localName, Attributes attr1) TODO summary sentence for startElement ...Methods inherited from class XMLElementHandler
setLogLevel
-
Constructor Details
-
ComplexElementHandler
Creates a new ComplexElementHandler object for Element elem using ElementHandlerFactory ehf.- Parameters:
ehf- ElementHandlerFactoryelem- Element- Throws:
SAXException
-
-
Method Details
-
getElement
Description copied from class:XMLElementHandlerThis returns the Element specified.- Specified by:
getElementin classXMLElementHandler- Returns:
- Element (may not be null)
- See Also:
-
characters
Description copied from class:XMLElementHandlerThis 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:
charactersin classXMLElementHandler- Throws:
SAXException- See Also:
-
endElement
public void endElement(URI namespaceURI, String localName, Map<String, Object> hints) throws OperationNotSupportedException, SAXExceptionDescription 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- Throws:
OperationNotSupportedExceptionSAXException- See Also:
-
SchemaContentHandler#endElement
-
startElement
TODO summary sentence for startElement ...- Specified by:
startElementin classXMLElementHandler- See Also:
-
getHandler
public XMLElementHandler getHandler(URI namespaceURI, String localName, Map<String, Object> hints) throws SAXExceptionTODO summary sentence for getHandler ...- Specified by:
getHandlerin classXMLElementHandler- Returns:
- XMLElementHandler
- Throws:
SAXException- See Also:
-
getValue
TODO summary sentence for getValue ...- Specified by:
getValuein classXMLElementHandler- Returns:
- Object
- 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:
-
removeElement
Remove the given XMLElementHandler from the Child-List -
getType
returns the Type of the Elementhandler- Returns:
- type
-