com.waveset.util
Class XmlObjectWrapper
java.lang.Object
com.waveset.util.AbstractXmlObject
com.waveset.util.XmlObjectWrapper
- All Implemented Interfaces:
- javax.naming.Referenceable, XmlObject
- public abstract class XmlObjectWrapper
- extends AbstractXmlObject
Convenient base class for XmlObjects which just introduce a new element
to wrap some other XmlObject as the payload. A class just needs to
subclass this class and override the getElement, getPayload, and setPayload methods.
toXml and parseXml are already handled.
Method Summary |
protected abstract java.lang.Object |
getPayload()
Subclass must override to return the arbitrary XmlObject payload. |
protected abstract void |
setPayload(java.lang.Object payload)
Subclass must override to receive the arbitrary XmlObject payload. |
void |
toXml(java.lang.StringBuffer b,
int indent)
Serialize into a buffer with optional indentation. |
Methods inherited from class com.waveset.util.AbstractXmlObject |
addXmlHeader, cloneObject, dump, dumpFile, getElementName, getReference, println, setTrace, toIdentityString, toVerboseString, toVerboseString, toXml, toXml, toXml |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XmlObjectWrapper
public XmlObjectWrapper()
XmlObjectWrapper
public XmlObjectWrapper(org.w3c.dom.Element element)
throws WavesetException
getPayload
protected abstract java.lang.Object getPayload()
- Subclass must override to return the arbitrary XmlObject payload.
This is called upon serialization.
setPayload
protected abstract void setPayload(java.lang.Object payload)
- Subclass must override to receive the arbitrary XmlObject payload.
This is called upon serialization.
toXml
public final void toXml(java.lang.StringBuffer b,
int indent)
- Description copied from class:
AbstractXmlObject
- Serialize into a buffer with optional indentation.
This must be implemented by the subclass.
- Specified by:
toXml
in interface XmlObject
- Specified by:
toXml
in class AbstractXmlObject