Package org.geotools.xsd.impl
Class DelegatingHandler
Object
DelegatingHandler
- All Implemented Interfaces:
DocumentHandler
,ElementHandler
,Handler
-
Method Summary
Modifier and TypeMethodDescriptionvoid
characters
(char[] ch, int start, int length) Callback when characters of an element are encountered.createChildHandler
(QName name) Returns a handler for a component in the schema which is a child of this component.void
endChildHandler
(Handler child) Called when a child handler is finished, on the trailing edge of the child element.void
void
endElement
(QName name) Callback on trailing edge of element.void
endPrefixMapping
(String prefix) Called when a prefix mapping is de-registred with ParserHandler.MutablePicoContainer
XSDElementDeclaration
XSDSchemaContent
void
setContext
(MutablePicoContainer context) void
startChildHandler
(Handler child) Called when a child handler is started, on the leading edge of the child element.void
void
startElement
(QName name, Attributes attributes) Callback on leading edge of an element.void
startPrefixMapping
(String prefix, String uri) Called when a prefix mapping is registred with ParserHandler.
-
Method Details
-
setContext
public void setContext(MutablePicoContainer context) - Specified by:
setContext
in interfaceHandler
- Parameters:
context
- The context in which the the instance is to be parsed in.
-
getContext
public MutablePicoContainer getContext()- Specified by:
getContext
in interfaceHandler
- Returns:
- The context or container in which the instance is to be parsed in.
-
getElementDeclaration
public XSDElementDeclaration getElementDeclaration()- Specified by:
getElementDeclaration
in interfaceElementHandler
- Returns:
- The declaration of hte element being handled.
-
getParentHandler
- Specified by:
getParentHandler
in interfaceHandler
- Returns:
- The parent handler.
- See Also:
-
Handler#getChildHandler(QName, SchemaBuilder)
-
createChildHandler
Description copied from interface:Handler
Returns 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:
createChildHandler
in interfaceHandler
- Parameters:
name
- The qualified name of the schema component.- Returns:
- A new handler, or null if one cannot be created.
-
startChildHandler
Description copied from interface:Handler
Called when a child handler is started, on the leading edge of the child element.- Specified by:
startChildHandler
in interfaceHandler
- Parameters:
child
- The executing child handler.
-
endChildHandler
Description copied from interface:Handler
Called when a child handler is finished, on the trailing edge of the child element.- Specified by:
endChildHandler
in interfaceHandler
- Parameters:
child
- The executing child handler.
-
getComponent
- Specified by:
getComponent
in interfaceHandler
- Returns:
- The instance of the schema content that is currently being handled.
-
getParseNode
- Specified by:
getParseNode
in interfaceHandler
- Returns:
- The parse tree for the handler.
-
getSchemaContent
public XSDSchemaContent getSchemaContent()- Specified by:
getSchemaContent
in interfaceHandler
- Returns:
- The entity of the schema that corresponds to the handler.
-
startDocument
- Specified by:
startDocument
in interfaceDocumentHandler
- Throws:
SAXException
-
endDocument
- Specified by:
endDocument
in interfaceDocumentHandler
- Throws:
SAXException
-
startPrefixMapping
Description copied from interface:Handler
Called when a prefix mapping is registred with ParserHandler.- Specified by:
startPrefixMapping
in interfaceHandler
- Parameters:
prefix
- Namespace prefix.uri
- Namespace uri.- Throws:
SAXException
-
startElement
Description copied from interface:ElementHandler
Callback on leading edge of an element.- Specified by:
startElement
in 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:
-
characters
Description copied from interface:ElementHandler
Callback when characters of an element are encountered.- Specified by:
characters
in 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:
-
endElement
Description copied from interface:ElementHandler
Callback on trailing edge of element.- Specified by:
endElement
in interfaceElementHandler
- Parameters:
name
- The qualified name of the element being handled.- Throws:
SAXException
- Any xml errors.- See Also:
-
endPrefixMapping
Description copied from interface:Handler
Called when a prefix mapping is de-registred with ParserHandler.- Specified by:
endPrefixMapping
in interfaceHandler
- Parameters:
prefix
- Namespace prefix.- Throws:
SAXException
-