Class UserDataAttribute
java.lang.Object
org.dom4j.tree.AbstractNode
org.dom4j.tree.AbstractAttribute
org.dom4j.tree.FlyweightAttribute
org.dom4j.tree.DefaultAttribute
org.dom4j.util.UserDataAttribute
- All Implemented Interfaces:
Serializable, Cloneable, Attribute, Node
UserDataAttribute support the adornment of a user data object
on an Element or Attribute instance such that the methods getData()
setData(Object)will get and set the values of a user data object.
This can be useful for developers wishing to create XML trees and adorn the
trees with user defined objects.
- Version:
- $Revision: 1.8 $
- See Also:
-
Field Summary
FieldsFields inherited from class FlyweightAttribute
valueFields inherited from class AbstractNode
NODE_TYPE_NAMESFields inherited from interface Node
ANY_NODE, ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, MAX_NODE_TYPE, NAMESPACE_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE, UNKNOWN_NODE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetData()Accesses the data of this attribute which may implement data typing bindings such asXML SchemaorJava Beanbindings or will return the same value asNode.getText().voidSets the data value of this attribute if this element supports data binding or callsNode.setText(String)if it doesn't.Methods inherited from class DefaultAttribute
getParent, isReadOnly, setParent, setValue, supportsParentMethods inherited from class FlyweightAttribute
getQName, getValueMethods inherited from class AbstractAttribute
accept, asXML, createXPathResult, getName, getNamespace, getNamespacePrefix, getNamespaceURI, getNodeType, getPath, getQualifiedName, getText, getUniquePath, setNamespace, setText, toString, writeMethods inherited from class AbstractNode
asXPathResult, clone, createPattern, createXPath, createXPathFilter, detach, getDocument, getDocumentFactory, getNodeTypeName, getPath, getStringValue, getUniquePath, hasContent, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, setDocument, setName, valueOfMethods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Node
asXPathResult, clone, createXPath, detach, getDocument, getNodeTypeName, getPath, getStringValue, getUniquePath, hasContent, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, setDocument, setName, valueOf
-
Field Details
-
data
The user data object
-
-
Constructor Details
-
UserDataAttribute
-
UserDataAttribute
-
-
Method Details
-
getData
Description copied from interface:AttributeAccesses the data of this attribute which may implement data typing bindings such asXML SchemaorJava Beanbindings or will return the same value asNode.getText().- Specified by:
getDatain interfaceAttribute- Overrides:
getDatain classAbstractAttribute- Returns:
- the attribute data
-
setData
Description copied from interface:AttributeSets the data value of this attribute if this element supports data binding or callsNode.setText(String)if it doesn't.- Specified by:
setDatain interfaceAttribute- Overrides:
setDatain classAbstractAttribute- Parameters:
data- the attribute data
-