Top Description Fields Constructors Methods
org.dom4j.util

public Class UserDataAttribute

extends DefaultAttribute
Class Inheritance
Imports
org.dom4j.QName, org.dom4j.tree.DefaultAttribute

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.

Author
James Strachan
Version
$Revision: 1.8 $

Field Summary

Modifier and TypeField and Description
private Object
data

The user data object

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public Object
getData()

Overrides org.dom4j.tree.AbstractAttribute.getData.

Implements org.dom4j.Attribute.getData.

Accesses the data of this attribute which may implement data typing bindings such as XML Schema or Java Bean bindings or will return the same value as Node#getText().
public void
setData(Object
the attribute data
data
)

Overrides org.dom4j.tree.AbstractAttribute.setData.

Implements org.dom4j.Attribute.setData.

Sets the data value of this attribute if this element supports data binding or calls Node#setText(String)if it doesn't.
Inherited from org.dom4j.tree.DefaultAttribute:
getParentisReadOnlysetParentsetValuesupportsParent

Field Detail

databack to summary
private Object data

The user data object

Constructor Detail

UserDataAttributeback to summary
public UserDataAttribute(QName qname)
UserDataAttributeback to summary
public UserDataAttribute(QName qname, String text)

Method Detail

getDataback to summary
public Object getData()

Overrides org.dom4j.tree.AbstractAttribute.getData.

Implements org.dom4j.Attribute.getData.

Doc from org.dom4j.Attribute.getData.

Accesses the data of this attribute which may implement data typing bindings such as XML Schema or Java Bean bindings or will return the same value as Node#getText().

Returns:Object

the attribute data

setDataback to summary
public void setData(Object data)

Overrides org.dom4j.tree.AbstractAttribute.setData.

Implements org.dom4j.Attribute.setData.

Doc from org.dom4j.Attribute.setData.

Sets the data value of this attribute if this element supports data binding or calls Node#setText(String)if it doesn't.

Parameters
data:Object

the attribute data