Package org.geotools.xsd.impl
Interface Handler
- All Known Subinterfaces:
AttributeHandler
,DocumentHandler
,ElementHandler
- All Known Implementing Classes:
DelegatingHandler
,DocumentHandlerImpl
,ElementHandlerImpl
,HandlerImpl
public interface Handler
Class implementing this interface serve has handlers for content of an instance document as it is parsed.
A handler is repsonsible for parsing and validating content. Upon a successful parse and validation, the handler
must return the "parsed" content from a call to #getValue
.
A handler corresponds to a specific component in a schema. Processing is delegated to the handler when an instance of the component is encountered in an instance document.
- Author:
- Justin Deoliveira,Refractions Research Inc.,jdeolive@refractions.net
-
Method Summary
Modifier and TypeMethodDescriptioncreateChildHandler
(QName qName) 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
endPrefixMapping
(String prefix) Called when a prefix mapping is de-registred with ParserHandler.MutablePicoContainer
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
startPrefixMapping
(String prefix, String uri) Called when a prefix mapping is registred with ParserHandler.
-
Method Details
-
getSchemaContent
XSDSchemaContent getSchemaContent()- Returns:
- The entity of the schema that corresponds to the handler.
-
getComponent
InstanceComponent getComponent()- Returns:
- The instance of the schema content that is currently being handled.
-
getParseNode
Node getParseNode()- Returns:
- The parse tree for the handler.
-
getContext
MutablePicoContainer getContext()- Returns:
- The context or container in which the instance is to be parsed in.
-
setContext
void setContext(MutablePicoContainer context) - Parameters:
context
- The context in which the the instance is to be parsed in.
-
getParentHandler
Handler getParentHandler()- Returns:
- The parent handler.
- See Also:
-
Handler#getChildHandler(QName, SchemaBuilder)
-
createChildHandler
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.
- Parameters:
qName
- The qualified name of the schema component.- Returns:
- A new handler, or null if one cannot be created.
-
startChildHandler
Called when a child handler is started, on the leading edge of the child element.- Parameters:
child
- The executing child handler.
-
endChildHandler
Called when a child handler is finished, on the trailing edge of the child element.- Parameters:
child
- The executing child handler.
-
startPrefixMapping
Called when a prefix mapping is registred with ParserHandler.- Parameters:
prefix
- Namespace prefix.uri
- Namespace uri.- Throws:
SAXException
-
endPrefixMapping
Called when a prefix mapping is de-registred with ParserHandler.- Parameters:
prefix
- Namespace prefix.- Throws:
SAXException
-