|
BeanIO 1.2.3 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.beanio.parser.xml.XmlDefinition
public class XmlDefinition
Stores common attributes used to define a XML node.
Although not enforced, namespace and prefix should be set to null if this node is not namespace aware. Note that the document object model (DOM) does not support empty string namespaces to indicate xmlns="".
Field Summary | |
---|---|
static int |
XML_TYPE_ATTRIBUTE
Attribute XML node type |
static int |
XML_TYPE_ELEMENT
Element XML node type |
static int |
XML_TYPE_NONE
XML type indicating no node |
static int |
XML_TYPE_TEXT
Text XML node type |
Constructor Summary | |
---|---|
XmlDefinition()
Constructs a new XmlDefinition. |
Method Summary | |
---|---|
String |
getName()
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. |
XmlDefinition |
getWrapper()
Returns the XML element for wrapping this XML node. |
boolean |
isAttribute()
Returns true if the XML node type is attribute. |
boolean |
isElement()
Returns true if the XML node type is element. |
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 |
isNode()
Returns true if the XML node type is not none. |
boolean |
isWrapped()
Returns whether this XML node is wrapped by another element. |
void |
setName(String name)
Sets the XML local name for this node. |
void |
setNamespace(String namespace)
Sets the namespace of this node. |
void |
setNamespaceAware(boolean namespaceAware)
Sets whether this node is namespace aware. |
void |
setNillable(boolean nillable)
Sets whether this node is nillable. |
void |
setPrefix(String prefix)
Sets the namespace prefix for marshaling the node. |
void |
setType(int xmlType)
Sets the type of XML node. |
void |
setWrapper(XmlDefinition wrapper)
Sets the XML element for wrapping this XML node. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int XML_TYPE_TEXT
public static final int XML_TYPE_ELEMENT
public static final int XML_TYPE_ATTRIBUTE
public static final int XML_TYPE_NONE
Constructor Detail |
---|
public XmlDefinition()
Method Detail |
---|
public int getType()
XML_TYPE_NONE
,
XML_TYPE_ELEMENT
,
XML_TYPE_ATTRIBUTE
, or
XML_TYPE_TEXT
public void setType(int xmlType)
xmlType
- one of
XML_TYPE_NONE
,
XML_TYPE_ELEMENT
,
XML_TYPE_ATTRIBUTE
, or
XML_TYPE_TEXT
public String getName()
public void setName(String name)
name
- the XML local namepublic String getNamespace()
public void setNamespace(String namespace)
namespace
- the XML namespacepublic void setNamespaceAware(boolean namespaceAware)
namespaceAware
- true if this node uses a namespace for
unmarshaling and marshaling this nodepublic boolean isNamespaceAware()
public String getPrefix()
public void setPrefix(String prefix)
prefix
- the namespace prefixpublic boolean isNillable()
public void setNillable(boolean nillable)
nillable
- set to true if this node is nillablepublic boolean isNode()
public boolean isElement()
public boolean isAttribute()
public XmlDefinition getWrapper()
public void setWrapper(XmlDefinition wrapper)
wrapper
- the XML wrapper elementpublic boolean isWrapped()
public String toString()
toString
in class Object
|
BeanIO 1.2.3 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |