|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--net.xineo.xml.handler.ObjectHandler
|
+--net.xineo.xml.handler.RootHandler
Convenience class defining a root handler (which can be seen as the handler that handles the document itself). Any object handler system should include a root handler, and this class can be used to easily create one, just passing the main element handler as a pareter to the constructor.
ObjectHandler,
Parser| Constructor Summary | |
RootHandler(ObjectHandler mainHandler)
Creates a new root handler given the main object handler (the handler that will handle the main element of the XML document). |
|
RootHandler(ObjectHandler mainHandler,
java.lang.Object userContext)
Creates a new root handler given the main object handler (the handler that will handle the main element of the XML document), and the user context that will be passes along object handlers during the document parsing. |
|
| Method Summary | |
void |
endElement(ElementName elementName,
java.lang.String characters)
This method is called when an element which is not handled by a sub-handler ends. |
boolean |
handlesElement(ElementName elementName)
Must return true if and only if this handler is able to handle elements designed by the given name. |
void |
initialize(org.xml.sax.Attributes attributes)
Called when a handled element starts. |
void |
startElement(ElementName elementName,
org.xml.sax.Attributes attributes)
This method is called when an element which is not handled by a sub-handler starts. |
void |
subHandlerInitialized(ObjectHandler subHandler)
Called when a sub-handler is about to be initialized |
void |
subHandlerTerminated(ObjectHandler subHandler)
Called when a sub-handler is about to be terminated |
void |
terminate(java.lang.String text)
Called when a handled element ends. |
void |
text(java.lang.String text)
Called when text is found (a la SAX). |
| Methods inherited from class net.xineo.xml.handler.ObjectHandler |
addSubHandler, findHandlerByElementName, getAsContentHandler, getContext, getName, getParents, getUserContext, setUserContext, toString, transmitContext |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public RootHandler(ObjectHandler mainHandler)
mainHandler - The main object handler
public RootHandler(ObjectHandler mainHandler,
java.lang.Object userContext)
mainHandler - Tha main object handleruserContext - The user context| Method Detail |
public boolean handlesElement(ElementName elementName)
ObjectHandlerInterface
elementName - The name of the element to handle.
public void startElement(ElementName elementName,
org.xml.sax.Attributes attributes)
throws HandlerException
ObjectHandlerInterface
elementName - The name of the element that startsattributes - The attributes of the element that starts
HandlerException - If any error occurs
public void endElement(ElementName elementName,
java.lang.String characters)
throws HandlerException
ObjectHandlerInterface
elementName - The name of the element that endscharacters - Concatenation of all text contained in this element
HandlerException - If any error occurs
public void initialize(org.xml.sax.Attributes attributes)
throws HandlerException
ObjectHandlerInterface
attributes - The attributes of the element that starts
HandlerException - If any error occurs
public void terminate(java.lang.String text)
throws HandlerException
ObjectHandlerInterface
text - Concatenation of all text contained in this element
HandlerException - If any error occurs
public void subHandlerInitialized(ObjectHandler subHandler)
throws HandlerException
ObjectHandlerInterface
subHandler - The initialized sub-handler
HandlerException - In any error occurs
public void subHandlerTerminated(ObjectHandler subHandler)
throws HandlerException
ObjectHandlerInterface
subHandler - The terminated sub-handler
HandlerException - If any error occurs
public void text(java.lang.String text)
throws HandlerException
ObjectHandlerInterface
HandlerException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||