org.dom4j.util
Class UserDataElement
java.lang.Object
|
+--org.dom4j.tree.AbstractNode
|
+--org.dom4j.tree.AbstractBranch
|
+--org.dom4j.tree.AbstractElement
|
+--org.dom4j.tree.DefaultElement
|
+--org.dom4j.util.UserDataElement
- All Implemented Interfaces:
- Branch, Cloneable, Element, Node, Serializable
- public class UserDataElement
- extends DefaultElement
UserDataElement 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.6 $
- Author:
- James Strachan
- See Also:
- Serialized Form
| Fields inherited from interface org.dom4j.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 |
| Methods inherited from class org.dom4j.tree.DefaultElement |
add, additionalNamespaces, additionalNamespaces, addNewNode, attribute, attribute, attribute, attribute, attributeCount, attributeIterator, attributeList, attributeList, attributes, clearContent, contentList, declaredNamespaces, element, element, element, elementIterator, elementIterator, elementIterator, elementIterator, elements, elements, elements, elements, getDocument, getDocumentFactory, getNamespaceForPrefix, getNamespaceForURI, getParent, getQName, getStringValue, getText, indexOf, node, nodeCount, nodeIterator, processingInstruction, processingInstructions, processingInstructions, remove, removeNode, removeProcessingInstruction, setAttributeList, setAttributes, setContent, setDocument, setParent, setQName, supportsParent |
| Methods inherited from class org.dom4j.tree.AbstractElement |
accept, add, add, add, add, add, add, add, add, addAttribute, addAttribute, addCDATA, addComment, addElement, addEntity, addNamespace, addNode, addProcessingInstruction, addProcessingInstruction, addText, appendAttributes, asXML, attributeValue, attributeValue, attributeValue, attributeValue, childAdded, childRemoved, createAttributeList, createAttributeList, createCopy, createCopy, createCopy, createSingleIterator, elementText, elementText, elementTextTrim, elementTextTrim, ensureAttributesCapacity, getName, getNamespace, getNamespacePrefix, getNamespaceURI, getNodeType, getPath, getQName, getQualifiedName, getUniquePath, getXPathNameStep, getXPathResult, hasMixedContent, isRootElement, isTextOnly, normalize, remove, remove, remove, remove, remove, remove, remove, remove, setAttributes, setAttributeValue, setAttributeValue, setName, setNamespace, setText, write |
| Methods inherited from class org.dom4j.tree.AbstractBranch |
addElement, addElement, addElement, appendContent, content, contentRemoved, createContentList, createContentList, createEmptyList, createResultList, createSingleResultList, elementByID, elementID, getContentAsStringValue, getContentAsText, getTextTrim, hasContent, invalidNodeTypeAddException, isReadOnly, setProcessingInstructions |
| Methods inherited from class org.dom4j.tree.AbstractNode |
asXPathResult, createPattern, createXPath, createXPathFilter, createXPathResult, detach, getNodeTypeName, getPath, getUniquePath, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, valueOf |
| Methods inherited from interface org.dom4j.Node |
asXPathResult, createXPath, detach, getNodeTypeName, getPath, getUniquePath, hasContent, isReadOnly, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, valueOf |
UserDataElement
public UserDataElement(String name)
UserDataElement
public UserDataElement(QName qname)
getData
public Object getData()
- Description copied from interface:
Element
- Accesses the data of this element which may implement data typing
bindings such as XML Schema or
Java Bean bindings or will return the same value as
Element.getText()
- Specified by:
getData in interface Element- Overrides:
getData in class AbstractElement
setData
public void setData(Object data)
- Description copied from interface:
Element
- Sets the data value of this element if this element supports data
binding or calls
Node.setText(java.lang.String) if it doesn't
- Specified by:
setData in interface Element- Overrides:
setData in class AbstractElement
toString
public String toString()
- Overrides:
toString in class AbstractElement
clone
public Object clone()
- Description copied from interface:
Node
clone will return a deep clone or if this node is
read-only then clone will return the same instance.
- Specified by:
clone in interface Node- Overrides:
clone in class DefaultElement
getCopyOfUserData
protected Object getCopyOfUserData()
- If a deep copy of user data is required whenever the clone() or createCopy()
methods are called on this element then this method should return a clone
of the user data
createElement
protected Element createElement(String name)
- Overrides:
createElement in class AbstractElement
createElement
protected Element createElement(QName qName)
- Overrides:
createElement in class AbstractElement
Copyright © 2002-2003 MetaStuff Ltd.. All Rights Reserved.