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, setValue
isSupportedChild
registerLocals
add, clone, find, getChildren, getFirst, getName, isDescendant, iterator, print, print, setName, size, sort, toString, updateReferences
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public boolean matches(UnmarshallingContext context)
Parser
matches
in interface Parser
matches
in class DelegatingParser
context
- the UnmarshallingContext
public boolean unmarshal(UnmarshallingContext context)
Parser
unmarshal
in interface Parser
unmarshal
in class DelegatingParser
context
- the UnmarshallingContext
public boolean marshal(MarshallingContext context) throws IOException
Parser
marshal
in interface Parser
marshal
in class DelegatingParser
context
- the MarshallingContext
IOException
- if an I/O error occurspublic String getLocalName()
XmlNode
getLocalName
in interface XmlNode
public void setLocalName(String localName)
public String getPrefix()
XmlNode
public void setPrefix(String prefix)
public String getNamespace()
XmlNode
getNamespace
in interface XmlNode
public void setNamespace(String namespace)
public boolean isNamespaceAware()
XmlNode
isNamespaceAware
in interface XmlNode
public void setNamespaceAware(boolean namespaceAware)
public boolean isNillable()
XmlNode
isNillable
in interface XmlNode
public void setNillable(boolean nillable)
public int getType()
XmlNode
getType
in interface XmlNode
XmlNode.XML_TYPE_NONE
,
XmlNode.XML_TYPE_ELEMENT
,
XmlNode.XML_TYPE_ATTRIBUTE
, or
XmlNode.XML_TYPE_TEXT
public boolean isRepeating()
XmlNode
isRepeating
in interface XmlNode
public void setRepeating(boolean repeating)
public boolean isOptional()
Parser
isOptional
in interface Parser
isOptional
in class DelegatingParser
public void setLazy(boolean lazy)
protected void toParamString(StringBuilder s)
TreeNode
TreeNode.toString()
to append node parameters to the output.toParamString
in class TreeNode<Component>
s
- the output to append