public class XmlWrapper extends DelegatingParser implements XmlNode
XML_TYPE_ATTRIBUTE, XML_TYPE_ELEMENT, XML_TYPE_NONE, XML_TYPE_TEXT| Constructor and Description |
|---|
XmlWrapper()
Constructs a new XmlWrapper.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getLocalName()
Returns the XML local name for this node.
|
String |
getNamespace()
Returns the namespace of this node.
|
String |
getPrefix()
Returns the namespace prefix for marshaling this node, or null
if the namespace should override the default namespace.
|
int |
getType()
Returns the XML node type.
|
boolean |
isNamespaceAware()
Returns true if a namespace was configured for this node, and is
therefore used to unmarshal and marshal the node.
|
boolean |
isNillable()
Returns whether this node is nillable.
|
boolean |
isOptional()
Returns whether this node must exist during unmarshalling.
|
boolean |
isRepeating()
Returns whether this node may repeat in the context of its immediate parent.
|
boolean |
marshal(MarshallingContext context)
Marshals a record.
|
boolean |
matches(UnmarshallingContext context)
Returns whether this parser and its children match a record
being unmarshalled.
|
void |
setLazy(boolean lazy) |
void |
setLocalName(String localName) |
void |
setNamespace(String namespace) |
void |
setNamespaceAware(boolean namespaceAware) |
void |
setNillable(boolean nillable) |
void |
setPrefix(String prefix) |
void |
setRepeating(boolean repeating) |
protected void |
toParamString(StringBuilder s)
Called by
TreeNode.toString() to append node parameters to the output. |
boolean |
unmarshal(UnmarshallingContext context)
Unmarshals a record.
|
clearValue, getParser, getSize, getValue, hasContent, isIdentifier, setValueisSupportedChildregisterLocalsadd, clone, find, getChildren, getFirst, getName, isDescendant, iterator, print, print, setName, size, sort, toString, updateReferencesequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic boolean matches(UnmarshallingContext context)
Parsermatches in interface Parsermatches in class DelegatingParsercontext - the UnmarshallingContextpublic boolean unmarshal(UnmarshallingContext context)
Parserunmarshal in interface Parserunmarshal in class DelegatingParsercontext - the UnmarshallingContextpublic boolean marshal(MarshallingContext context) throws IOException
Parsermarshal in interface Parsermarshal in class DelegatingParsercontext - the MarshallingContextIOException - if an I/O error occurspublic String getLocalName()
XmlNodegetLocalName in interface XmlNodepublic void setLocalName(String localName)
public String getPrefix()
XmlNodepublic void setPrefix(String prefix)
public String getNamespace()
XmlNodegetNamespace in interface XmlNodepublic void setNamespace(String namespace)
public boolean isNamespaceAware()
XmlNodeisNamespaceAware in interface XmlNodepublic void setNamespaceAware(boolean namespaceAware)
public boolean isNillable()
XmlNodeisNillable in interface XmlNodepublic void setNillable(boolean nillable)
public int getType()
XmlNodegetType in interface XmlNodeXmlNode.XML_TYPE_NONE,
XmlNode.XML_TYPE_ELEMENT,
XmlNode.XML_TYPE_ATTRIBUTE, or
XmlNode.XML_TYPE_TEXTpublic boolean isRepeating()
XmlNodeisRepeating in interface XmlNodepublic void setRepeating(boolean repeating)
public boolean isOptional()
ParserisOptional in interface ParserisOptional in class DelegatingParserpublic void setLazy(boolean lazy)
protected void toParamString(StringBuilder s)
TreeNodeTreeNode.toString() to append node parameters to the output.toParamString in class TreeNode<Component>s - the output to append