|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.dom4j.tree.AbstractNode
|
+--org.dom4j.tree.AbstractBranch
|
+--org.dom4j.tree.AbstractElement
|
+--org.dom4j.tree.DefaultElement
|
+--org.dom4j.bean.BeanElement
BeanElement uses a Java Bean to store its attributes.
| Field Summary |
| Fields inherited from class org.dom4j.tree.AbstractElement |
EMPTY_ITERATOR, EMPTY_LIST, USE_STRINGVALUE_SEPARATOR, VERBOSE_TOSTRING |
| Fields inherited from class org.dom4j.tree.AbstractBranch |
DEFAULT_CONTENT_LIST_SIZE, outputFormat |
| Fields inherited from class org.dom4j.tree.AbstractNode |
NODE_TYPE_NAMES |
| 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 |
| Constructor Summary | |
BeanElement(QName qname)
|
|
BeanElement(QName qname,
Object bean)
|
|
BeanElement(String name,
Namespace namespace,
Object bean)
|
|
BeanElement(String name,
Object bean)
|
|
| Method Summary | |
Element |
addAttribute(QName qName,
String value)
Adds the attribute value of the given fully qualified name. |
Element |
addAttribute(String name,
String value)
Adds the attribute value of the given local name. |
Attribute |
attribute(QName qname)
|
Attribute |
attribute(String name)
Returns the attribute with the given name |
protected List |
createAttributeList()
A Factory Method pattern which lazily creates a List implementation used to store content |
protected BeanAttributeList |
getBeanAttributeList()
|
Object |
getData()
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 DefaultElement.getText() |
protected DocumentFactory |
getDocumentFactory()
|
void |
setAttributes(List attributes)
Sets the attributes that this element contains |
void |
setData(Object bean)
Sets the data value of this element if this element supports data binding or calls AbstractElement.setText(java.lang.String) if it doesn't |
| 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 class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.dom4j.Element |
getTextTrim |
| Methods inherited from interface org.dom4j.Branch |
addElement, addElement, appendContent, content, elementByID, setProcessingInstructions |
| Methods inherited from interface org.dom4j.Node |
asXPathResult, createXPath, detach, getNodeTypeName, getPath, getUniquePath, hasContent, isReadOnly, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, valueOf |
| Constructor Detail |
public BeanElement(String name,
Object bean)
public BeanElement(String name,
Namespace namespace,
Object bean)
public BeanElement(QName qname,
Object bean)
public BeanElement(QName qname)
| Method Detail |
public Object getData()
ElementElement.getText()
getData in interface ElementgetData in class AbstractElementpublic void setData(Object bean)
ElementNode.setText(java.lang.String) if it doesn't
setData in interface ElementsetData in class AbstractElementpublic Attribute attribute(String name)
Element
attribute in interface Elementattribute in class DefaultElementpublic Attribute attribute(QName qname)
attribute in interface Elementattribute in class DefaultElement
public Element addAttribute(String name,
String value)
ElementAdds the attribute value of the given local name. If an attribute already exists for the given name it will be replaced. Attributes with null values are silently ignored. If the value of the attribute is null then this method call will remove any attributes with the given name.
addAttribute in interface ElementaddAttribute in class AbstractElementname - is the name of the attribute whose value is to be added
or updatedvalue - is the attribute's value
Element instance.
public Element addAttribute(QName qName,
String value)
ElementAdds the attribute value of the given fully qualified name. If an attribute already exists for the given name it will be replaced. Attributes with null values are silently ignored. If the value of the attribute is null then this method call will remove any attributes with the given name.
addAttribute in interface ElementaddAttribute in class AbstractElementqName - is the fully qualified name of the attribute
whose value is to be added or updatedvalue - is the attribute's value
Element instance.public void setAttributes(List attributes)
Element
setAttributes in interface ElementsetAttributes in class DefaultElementprotected DocumentFactory getDocumentFactory()
getDocumentFactory in class DefaultElementprotected BeanAttributeList getBeanAttributeList()
protected List createAttributeList()
createAttributeList in class AbstractElement
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||