public class XmlObject extends java.lang.Object implements XMLizable
| Constructor and Description |
|---|
XmlObject() |
XmlObject(javax.xml.namespace.QName name) |
XmlObject(javax.xml.namespace.QName name,
java.lang.Object value) |
| Modifier and Type | Method and Description |
|---|---|
XmlObject |
addField(java.lang.String name,
java.lang.Object value) |
XMLizable |
asTyped()
Because we create complex types as subclasses of XMLizable instead of
XmlObject (and we don't want to change interfaces), this method will
return this as the complex type subclass of XMLizable, if this represents
a complex type.
|
protected void |
cloneFrom(XmlObject source) |
java.util.Iterator<XmlObject> |
evaluate(java.lang.String xpath)
evaluate the given xpath like expression.
|
XmlObject |
getChild(java.lang.String name) |
java.util.Iterator<XmlObject> |
getChildren() |
java.util.Iterator<XmlObject> |
getChildren(java.lang.String name) |
java.lang.Object |
getField(java.lang.String name) |
javax.xml.namespace.QName |
getName() |
java.util.Iterator<XMLizable> |
getTypedChildren()
Similar to
asTyped(), this will return this object's children
as the proper complex type subclass of XMLizable, if they are complex
types. |
java.lang.Object |
getValue() |
javax.xml.namespace.QName |
getXmlType() |
boolean |
hasChildren() |
void |
load(XmlInputStream in,
TypeMapper typeMapper)
load the fileds/children from the specified xml stream
|
protected void |
loadAfterStartTag(XmlInputStream in,
TypeMapper typeMapper) |
protected void |
loadStartTag(XmlInputStream in,
TypeMapper typeMapper) |
boolean |
removeField(java.lang.String name) |
void |
setDefaultNamespace(java.lang.String namespace) |
XmlObject |
setField(java.lang.String name,
java.lang.Object value) |
void |
setName(javax.xml.namespace.QName name) |
void |
setValue(java.lang.Object value) |
java.lang.String |
toString() |
void |
write(javax.xml.namespace.QName element,
XmlOutputStream out,
TypeMapper typeMapper)
write this instace as xml.
|
public XmlObject()
public XmlObject(javax.xml.namespace.QName name)
public XmlObject(javax.xml.namespace.QName name,
java.lang.Object value)
public javax.xml.namespace.QName getName()
public void setName(javax.xml.namespace.QName name)
public void setDefaultNamespace(java.lang.String namespace)
public javax.xml.namespace.QName getXmlType()
public java.lang.Object getValue()
public void setValue(java.lang.Object value)
public boolean hasChildren()
public XmlObject addField(java.lang.String name, java.lang.Object value)
public XmlObject setField(java.lang.String name, java.lang.Object value)
public XMLizable asTyped()
public java.util.Iterator<XmlObject> evaluate(java.lang.String xpath)
xpath - public boolean removeField(java.lang.String name)
public java.lang.Object getField(java.lang.String name)
public XmlObject getChild(java.lang.String name)
public java.util.Iterator<XmlObject> getChildren()
public java.util.Iterator<XmlObject> getChildren(java.lang.String name)
public java.util.Iterator<XMLizable> getTypedChildren()
asTyped(), this will return this object's children
as the proper complex type subclass of XMLizable, if they are complex
types. If a child is not a complex type, it will be returned as-is,
as an XmlObject.public java.lang.String toString()
toString in class java.lang.Objectpublic void write(javax.xml.namespace.QName element,
XmlOutputStream out,
TypeMapper typeMapper)
throws java.io.IOException
XMLizablepublic void load(XmlInputStream in, TypeMapper typeMapper) throws java.io.IOException, ConnectionException
XMLizableload in interface XMLizablein - xml input stream from which the data is readtypeMapper - type mapper to be usedjava.io.IOException - failed to read xmlConnectionException - failed to read/parser/bind xmlprotected void loadStartTag(XmlInputStream in, TypeMapper typeMapper)
protected void loadAfterStartTag(XmlInputStream in, TypeMapper typeMapper) throws java.io.IOException, ConnectionException
java.io.IOExceptionConnectionExceptionprotected void cloneFrom(XmlObject source)
Copyright © 2020. All Rights Reserved.