|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.xolite.utils.RootHolder
public class RootHolder
Utility class used when the root of a object tree parsed from XML is not known statically.
This class is used internally by XML event parsers to dynamically instantiate the tree root when there is a factory defined.
| Constructor Summary | |
|---|---|
RootHolder()
|
|
| Method Summary | |
|---|---|
void |
endElement(String uri,
String localName,
XMLEventParser parser)
Notification of the end tag of the root element. |
XMLSerializable |
getRoot()
|
void |
serialize(XMLSerializer serializer)
Serialize the inner root object. |
void |
startElement(String uri,
String localName,
XMLEventParser parser)
Instantiate the real root element from the parser factory and delegate parsing to it. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RootHolder()
| Method Detail |
|---|
public XMLSerializable getRoot()
public void startElement(String uri,
String localName,
XMLEventParser parser)
throws XMLParseException
startElement in interface XMLSerializableuri - The started element namespace URI.localName - The started element local name (= name without the namespace prefix) .parser - The current XML event parser. From this parser you can get the attributes of the started element, the SAX
Locator, the defined namespace prefix mappings.
NullPointerException - if the factory is not defined.
XMLParseException - if the object corresponding to the started element is not defined or cannot be instantiated.ContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
public void endElement(String uri,
String localName,
XMLEventParser parser)
throws XMLParseException
endElement in interface XMLSerializableuri - The ended element namespace URI.localName - The ended element local name (= name without the namespace prefix) .parser - The current XML event parser. From this parser you can get SAX Locator or the text content of the ended
element.
XMLParseException - Any SAX exception, possibly wrapping another exception.ContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String)
public void serialize(XMLSerializer serializer)
throws XMLSerializeException
serialize in interface XMLSerializableserializer - The object implementing the actual serialization.
XMLSerializeException - if something fails.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||