Class UserDataElement

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, Branch, Element, Node

    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.

    See Also:
    Serialized Form
    • Constructor Detail

      • UserDataElement

        public UserDataElement(java.lang.String name)
      • UserDataElement

        public UserDataElement(QName qname)
    • Method Detail

      • getData

        public java.lang.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
        Returns:
        DOCUMENT ME!
      • clone

        public java.lang.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
        Returns:
        a deep clone of myself or myself if I am read only.
      • getCopyOfUserData

        protected java.lang.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
        Returns:
        DOCUMENT ME!