Package org.geotools.xsd.impl
Class ElementHandlerImpl
- Object
-
- HandlerImpl
-
- ElementHandlerImpl
-
- All Implemented Interfaces:
ElementHandler
,Handler
public class ElementHandlerImpl extends HandlerImpl implements ElementHandler
-
-
Constructor Summary
Constructors Constructor Description ElementHandlerImpl(XSDElementDeclaration content, Handler parent, ParserHandler parser)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
characters(char[] ch, int start, int length)
Callback when characters of an element are encountered.Handler
createChildHandler(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
endElement(QName qName)
Callback on trailing edge of element.InstanceComponent
getComponent()
XSDElementDeclaration
getElementDeclaration()
Handler
getParentHandler()
Node
getParseNode()
XSDSchemaContent
getSchemaContent()
Object
getValue()
void
setComponent(ElementImpl element)
void
startChildHandler(Handler child)
Called when a child handler is started, on the leading edge of the child element.void
startElement(QName qName, Attributes attributes)
Callback on leading edge of an element.String
toString()
-
Methods inherited from class HandlerImpl
endPrefixMapping, getContext, setContext, startPrefixMapping
-
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface Handler
endPrefixMapping, getContext, setContext, startPrefixMapping
-
-
-
-
Constructor Detail
-
ElementHandlerImpl
public ElementHandlerImpl(XSDElementDeclaration content, Handler parent, ParserHandler parser)
-
-
Method Detail
-
startElement
public void startElement(QName qName, Attributes attributes) throws SAXException
Description copied from interface:ElementHandler
Callback on leading edge of an element.- Specified by:
startElement
in interfaceElementHandler
- Parameters:
qName
- 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 SAXException
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:
ContentHandler.characters(char[], int, int)
-
endElement
public void endElement(QName qName) throws SAXException
Description copied from interface:ElementHandler
Callback on trailing edge of element.- Specified by:
endElement
in interfaceElementHandler
- Parameters:
qName
- 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)
-
createChildHandler
public Handler createChildHandler(QName qName)
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:
qName
- 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: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
public void endChildHandler(Handler child)
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.
-
getParentHandler
public Handler getParentHandler()
- Specified by:
getParentHandler
in interfaceHandler
- Returns:
- The parent handler.
- See Also:
Handler#getChildHandler(QName, SchemaBuilder)
-
getSchemaContent
public XSDSchemaContent getSchemaContent()
- Specified by:
getSchemaContent
in interfaceHandler
- Returns:
- The entity of the schema that corresponds to the handler.
-
getParseNode
public Node getParseNode()
- Specified by:
getParseNode
in interfaceHandler
- Returns:
- The parse tree for the handler.
-
getElementDeclaration
public XSDElementDeclaration getElementDeclaration()
- Specified by:
getElementDeclaration
in interfaceElementHandler
- Returns:
- The declaration of hte element being handled.
-
getComponent
public InstanceComponent getComponent()
- Specified by:
getComponent
in interfaceHandler
- Returns:
- The instance of the schema content that is currently being handled.
-
setComponent
public void setComponent(ElementImpl element)
-
getValue
public Object getValue()
-
-