public class DelegatingElementHandler extends SAXAbstractElementHandler
ISAXElementHandler that delegates to another handler that is
explicitly mentioned in an attribute in an element attribute.
This allows the use of generic containers that do not necessarily know about
their content.
The default attribute to be used is "deserializer"| Constructor and Description |
|---|
DelegatingElementHandler() |
DelegatingElementHandler(String handlerAttribute) |
| Modifier and Type | Method and Description |
|---|---|
void |
characters(char[] ch,
int start,
int length)
this message is sent when characters are available to the receiver
|
void |
endChildElement(ISAXElementHandler element)
this message is sent when a child element has been terminated
|
void |
endElement(String pUri,
String local,
String name)
this message is sent when the receiver is about to end
|
String |
getHandlerAttribute() |
Object |
getResult()
An optional result object to be returned when this element is finished.
|
void |
initialize(String pUri,
String local,
String name,
Attributes attrs)
docme
|
void |
processAttributes(Attributes attrs)
this message is sent - after is is initialized()
|
void |
registerAlias(String alias,
String name) |
void |
startChildElement(ISAXElementHandler element)
this message is sent when a child element has been created
|
void |
started()
this message is sent - after all houskeeping with the element is done -
before any other SAX event can reach the receiver
|
ISAXElementHandler |
startElement(String pUri,
String local,
String name,
Attributes attrs)
this message is sent - when the receiver is requested to create a child
element
|
void |
unregisterAlias(String alias) |
endDocumentElement, getChars, getColumn, getContextHandler, getData, getEndColumn, getEndLine, getLine, getLocalName, getLocator, getNesting, getParameters, getParent, getPath, getURI, ignorableWhitespace, initializeDocumentElement, isCharacterDataAllowed, isDocumentHandler, isLeaf, isRootElementHandler, isWhitespaceAllowed, markEndLocation, markStartLocation, processAttribute, reset, setChars, setColumn, setContextHandler, setLine, setLocalName, setParent, setURIpublic DelegatingElementHandler()
public DelegatingElementHandler(String handlerAttribute)
public void characters(char[] ch,
int start,
int length)
throws SAXException
ISAXElementHandlercharacters in interface ISAXElementHandlercharacters in class SAXAbstractElementHandlerch - the array of charactersstart - start index of first char to readlength - number of chars to readSAXException - if errorpublic void endChildElement(ISAXElementHandler element) throws SAXException
ISAXElementHandlerendChildElement in interface ISAXElementHandlerendChildElement in class SAXAbstractElementHandlerelement - the child element previously created by the receiver that is
terminated nowSAXException - if errorpublic void endElement(String pUri, String local, String name) throws SAXException
ISAXElementHandlerendElement in interface ISAXElementHandlerendElement in class SAXAbstractElementHandlerpUri - the SAX namspace urilocal - the SAX local namename - the SAX qualified nameSAXException - if errororg.xml.saxpublic String getHandlerAttribute()
public Object getResult()
ISAXElementHandlergetResult in interface ISAXElementHandlergetResult in class SAXAbstractElementHandlerpublic void initialize(String pUri, String local, String name, Attributes attrs) throws SAXException
SAXAbstractElementHandlerinitialize in interface ISAXElementHandlerinitialize in class SAXAbstractElementHandlerlocal - docmename - docmeattrs - docmeSAXException - docmepublic void processAttributes(Attributes attrs) throws SAXException
ISAXElementHandlerprocessAttributes in interface ISAXElementHandlerprocessAttributes in class SAXAbstractElementHandlerSAXExceptionpublic void startChildElement(ISAXElementHandler element) throws SAXException
ISAXElementHandlerstartChildElement in interface ISAXElementHandlerstartChildElement in class SAXAbstractElementHandlerelement - the child element createdSAXException - if errorpublic void started()
throws SAXException
ISAXElementHandlerstarted in interface ISAXElementHandlerstarted in class SAXAbstractElementHandlerSAXExceptionpublic ISAXElementHandler startElement(String pUri, String local, String name, Attributes attrs) throws SAXException
ISAXElementHandlerstartElement in interface ISAXElementHandlerstartElement in class SAXAbstractElementHandlerSAXExceptionpublic void unregisterAlias(String alias)
Copyright © 2013 intarsys consulting GmbH. All Rights Reserved.