|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.stax.StAXContentHandlerBase
net.sf.stax.DispatchOnElement
public abstract class DispatchOnElement
On-element dispatch.
Select from one of the concrete subclasses ByNsURI, ByLocalName, or ByQName.
DispatchOnElement.ByNsURI,
DispatchOnElement.ByLocalName,
DispatchOnElement.ByQName| Nested Class Summary | |
|---|---|
static class |
DispatchOnElement.ByLocalName
On-element dispatch that chooses handlers by local name. |
static class |
DispatchOnElement.ByNsURI
On-element dispatch that chooses handlers by namespace URI. |
static class |
DispatchOnElement.ByQName
On-element dispatch that chooses handlers by qualified XML name. |
| Field Summary |
|---|
| Fields inherited from interface net.sf.stax.StAXContentHandler |
|---|
IGNORE |
| Constructor Summary | |
|---|---|
protected |
DispatchOnElement()
Create a new on-element dispatch. |
| Method Summary | |
|---|---|
protected abstract StAXContentHandler |
chooseHandler(String nsURI,
String localName,
String qName)
Choose a handler for the specified namespace URI, local name, and qualified XML name. |
void |
endElement(String nsURI,
String localName,
String qName,
Object retVal,
StAXContext ctx)
Receive notification of the end of an element. |
Object |
endTree(StAXContext ctx)
Receive notification of the end of a sub-tree of a document. |
StAXContentHandler |
getDefaultHandler()
Return the default handler for this on-element dispatch. |
StAXContentHandler |
getHandler(String name)
Return the handler associated with the specified name. |
void |
setDefaultHandler(StAXContentHandler handler)
Set the default handler for this on-element dispatch to handler. |
void |
setHandler(String name,
StAXContentHandler handler)
Add the specified named handler. |
void |
startElement(String nsURI,
String localName,
String qName,
Attributes attrs,
StAXDelegationContext dctx)
Receive notification of the beginning of an element. |
| Methods inherited from class net.sf.stax.StAXContentHandlerBase |
|---|
characters, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startPrefixMapping, startTree |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected DispatchOnElement()
| Method Detail |
|---|
protected abstract StAXContentHandler chooseHandler(String nsURI,
String localName,
String qName)
throws SAXException
nsURI - namespace URIlocalName - local name (without prefix)qName - qualified XML name (with prefix)
SAXException - any SAX exception, possibly wrapping another exception
public final void startElement(String nsURI,
String localName,
String qName,
Attributes attrs,
StAXDelegationContext dctx)
throws SAXException
StAXContentHandler
startElement in interface StAXContentHandlerstartElement in class StAXContentHandlerBasensURI - namespace URIlocalName - local name (without prefix)qName - qualified XML name (with prefix)attrs - attributes attached to the elementdctx - StAX delegation context
SAXException - any SAX exception, possibly wrapping another exceptionStAXContentHandlerBase
public final void endElement(String nsURI,
String localName,
String qName,
Object retVal,
StAXContext ctx)
throws SAXException
StAXContentHandler
endElement in interface StAXContentHandlerendElement in class StAXContentHandlerBasensURI - namespace URIlocalName - local name (without prefix)qName - qualified XML name (with prefix)retVal - resultctx - StAX context
SAXException - any SAX exception, possibly wrapping another exceptionStAXContentHandlerBasepublic final Object endTree(StAXContext ctx)
StAXContentHandler
endTree in interface StAXContentHandlerendTree in class StAXContentHandlerBasectx - StAX context
StAXContentHandlerBase
public final void setHandler(String name,
StAXContentHandler handler)
name - namehandler - handlerpublic final void setDefaultHandler(StAXContentHandler handler)
handler.
handler - default handlerpublic final StAXContentHandler getDefaultHandler()
public final StAXContentHandler getHandler(String name)
name - name
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||