Package org.geotools.xsd.impl
Class DelegatingHandler
- Object
-
- DelegatingHandler
-
- All Implemented Interfaces:
DocumentHandler,ElementHandler,Handler
public class DelegatingHandler extends Object implements DocumentHandler, ElementHandler
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcharacters(char[] ch, int start, int length)Callback when characters of an element are encountered.HandlercreateChildHandler(QName name)Returns a handler for a component in the schema which is a child of this component.voidendChildHandler(Handler child)Called when a child handler is finished, on the trailing edge of the child element.voidendDocument()voidendElement(QName name)Callback on trailing edge of element.voidendPrefixMapping(String prefix)Called when a prefix mapping is de-registred with ParserHandler.InstanceComponentgetComponent()MutablePicoContainergetContext()XSDElementDeclarationgetElementDeclaration()HandlergetParentHandler()NodegetParseNode()XSDSchemaContentgetSchemaContent()voidsetContext(MutablePicoContainer context)voidstartChildHandler(Handler child)Called when a child handler is started, on the leading edge of the child element.voidstartDocument()voidstartElement(QName name, Attributes attributes)Callback on leading edge of an element.voidstartPrefixMapping(String prefix, String uri)Called when a prefix mapping is registred with ParserHandler.
-
-
-
Method Detail
-
setContext
public void setContext(MutablePicoContainer context)
- Specified by:
setContextin interfaceHandler- Parameters:
context- The context in which the the instance is to be parsed in.
-
getContext
public MutablePicoContainer getContext()
- Specified by:
getContextin interfaceHandler- Returns:
- The context or container in which the instance is to be parsed in.
-
getElementDeclaration
public XSDElementDeclaration getElementDeclaration()
- Specified by:
getElementDeclarationin interfaceElementHandler- Returns:
- The declaration of hte element being handled.
-
getParentHandler
public Handler getParentHandler()
- Specified by:
getParentHandlerin interfaceHandler- Returns:
- The parent handler.
- See Also:
Handler#getChildHandler(QName, SchemaBuilder)
-
createChildHandler
public Handler createChildHandler(QName name)
Description copied from interface:HandlerReturns a handler for a component in the schema which is a child of this component.This method will return null in two situations:
- The schema component being handled does not support children (for example, an attribute).
- A child with the specified qName could not be found.
- Specified by:
createChildHandlerin interfaceHandler- Parameters:
name- The qualified name of the schema component.- Returns:
- A new handler, or null if one cannot be created.
-
startChildHandler
public void startChildHandler(Handler child)
Description copied from interface:HandlerCalled when a child handler is started, on the leading edge of the child element.- Specified by:
startChildHandlerin interfaceHandler- Parameters:
child- The executing child handler.
-
endChildHandler
public void endChildHandler(Handler child)
Description copied from interface:HandlerCalled when a child handler is finished, on the trailing edge of the child element.- Specified by:
endChildHandlerin interfaceHandler- Parameters:
child- The executing child handler.
-
getComponent
public InstanceComponent getComponent()
- Specified by:
getComponentin interfaceHandler- Returns:
- The instance of the schema content that is currently being handled.
-
getParseNode
public Node getParseNode()
- Specified by:
getParseNodein interfaceHandler- Returns:
- The parse tree for the handler.
-
getSchemaContent
public XSDSchemaContent getSchemaContent()
- Specified by:
getSchemaContentin interfaceHandler- Returns:
- The entity of the schema that corresponds to the handler.
-
startDocument
public void startDocument() throws SAXException- Specified by:
startDocumentin interfaceDocumentHandler- Throws:
SAXException
-
endDocument
public void endDocument() throws SAXException- Specified by:
endDocumentin interfaceDocumentHandler- Throws:
SAXException
-
startPrefixMapping
public void startPrefixMapping(String prefix, String uri) throws SAXException
Description copied from interface:HandlerCalled when a prefix mapping is registred with ParserHandler.- Specified by:
startPrefixMappingin interfaceHandler- Parameters:
prefix- Namespace prefix.uri- Namespace uri.- Throws:
SAXException
-
startElement
public void startElement(QName name, Attributes attributes) throws SAXException
Description copied from interface:ElementHandlerCallback on leading edge of an element.- Specified by:
startElementin interfaceElementHandler- Parameters:
name- The qualified name of the element being handled.attributes- The attributes of hte elmenent being handled.- Throws:
SAXException- Any xml errors that occur.- See Also:
ContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
-
characters
public void characters(char[] ch, int start, int length) throws SAXExceptionDescription copied from interface:ElementHandlerCallback when characters of an element are encountered.- Specified by:
charactersin interfaceElementHandler- Parameters:
ch- Array containing characters.start- The starting index of the characters.length- The number of characters.- Throws:
SAXException- Any xml errors.- See Also:
ContentHandler.characters(char[], int, int)
-
endElement
public void endElement(QName name) throws SAXException
Description copied from interface:ElementHandlerCallback on trailing edge of element.- Specified by:
endElementin interfaceElementHandler- Parameters:
name- The qualified name of the element being handled.- Throws:
SAXException- Any xml errors.- See Also:
ContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String)
-
endPrefixMapping
public void endPrefixMapping(String prefix) throws SAXException
Description copied from interface:HandlerCalled when a prefix mapping is de-registred with ParserHandler.- Specified by:
endPrefixMappingin interfaceHandler- Parameters:
prefix- Namespace prefix.- Throws:
SAXException
-
-