Serializable, Cloneable, Branch, Element, Nodepublic class BeanElement extends DefaultElement
BeanElement uses a Java Bean to store its attributes.
DEFAULT_CONTENT_LIST_SIZEUSE_STRINGVALUE_SEPARATOR, VERBOSE_TOSTRINGNODE_TYPE_NAMESANY_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 | Description |
|---|---|
BeanElement(String name,
Object bean) |
|
BeanElement(String name,
Namespace namespace,
Object bean) |
|
BeanElement(QName qname) |
|
BeanElement(QName qname,
Object bean) |
| Modifier and Type | Method | Description |
|---|---|---|
Element |
addAttribute(String name,
String value) |
Adds the attribute value of the given local name.
|
Element |
addAttribute(QName qName,
String value) |
Adds the attribute value of the given fully qualified name.
|
BeanAttribute |
attribute(String name) |
Returns the attribute with the given name
|
BeanAttribute |
attribute(QName qname) |
DOCUMENT ME!
|
protected List<Attribute> |
createAttributeList() |
A Factory Method pattern which lazily creates a List implementation used
to store content
|
protected List<Attribute> |
createAttributeList(int size) |
A Factory Method pattern which creates a List implementation used to
store attributes
|
protected BeanAttributeList |
getBeanAttributeList() |
|
Object |
getData() |
DOCUMENT ME!
|
protected DocumentFactory |
getDocumentFactory() |
|
void |
setAttributes(List<Attribute> attributes) |
Sets the attributes that this element contains
|
void |
setAttributes(Attributes attributes,
NamespaceStack namespaceStack,
boolean noNamespaceAttributes) |
This method provides a more optimal way of setting all the attributes on
an Element particularly for use in
SAXReader. |
void |
setData(Object data) |
Sets the data value of this element if this element supports data binding
or calls
Node.setText(java.lang.String)if it doesn't |
addElement, addElement, addElement, appendContent, content, contentRemoved, createContentList, createContentList, createEmptyList, createResultList, createSingleResultList, elementByID, elementID, getContentAsStringValue, getContentAsText, getTextTrim, hasContent, invalidNodeTypeAddException, isReadOnly, setProcessingInstructionsaccept, add, add, add, add, add, add, add, add, addCDATA, addComment, addElement, addEntity, addNamespace, addNewNode, addNode, addNode, addProcessingInstruction, addProcessingInstruction, addText, appendAttributes, asXML, attributeValue, attributeValue, attributeValue, attributeValue, childAdded, childRemoved, createCopy, createCopy, createCopy, createElement, createElement, createSingleIterator, elementIterator, elementIterator, elementIterator, elementIterator, elements, elements, elements, elements, elementText, elementText, elementTextTrim, elementTextTrim, ensureAttributesCapacity, getName, getNamespace, getNamespacePrefix, getNamespacesForURI, getNamespaceURI, getNodeType, getPath, getQName, getQualifiedName, getUniquePath, getXPathNameStep, getXPathResult, hasMixedContent, isRootElement, isTextOnly, normalize, remove, remove, remove, remove, remove, remove, remove, remove, setAttributeValue, setAttributeValue, setName, setNamespace, setText, toString, writeasXPathResult, createPattern, createXPath, createXPathFilter, createXPathResult, detach, getNodeTypeName, getPath, getUniquePath, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, valueOfaddElement, addElement, appendContent, content, elementByID, setProcessingInstructionsadd, additionalNamespaces, additionalNamespaces, addNewNode, attribute, attribute, attributeCount, attributeIterator, attributeList, attributeList, attributes, clearContent, clone, contentList, declaredNamespaces, element, element, element, getDocument, getNamespaceForPrefix, getNamespaceForURI, getParent, getQName, getStringValue, getText, indexOf, node, nodeCount, nodeIterator, processingInstruction, processingInstructions, processingInstructions, remove, removeNode, removeProcessingInstruction, setAttributeList, setContent, setDocument, setParent, setQName, supportsParentgetTextTrimasXPathResult, createXPath, detach, getNodeTypeName, getPath, getUniquePath, hasContent, isReadOnly, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, valueOfpublic BeanElement(QName qname)
public Object getData()
getData in interface ElementgetData in class AbstractElementpublic void setData(Object data)
ElementNode.setText(java.lang.String)if it doesn'tsetData in interface ElementsetData in class AbstractElementdata - DOCUMENT ME!public BeanAttribute attribute(String name)
Elementattribute in interface Elementattribute in class DefaultElementname - DOCUMENT ME!public BeanAttribute attribute(QName qname)
Elementattribute in interface Elementattribute in class DefaultElementqname - is the fully qualified namepublic Element addAttribute(String name, String value)
ElementaddAttribute in interface ElementaddAttribute in class AbstractElementname - is the name of the attribute whose value is to be added or
updatedvalue - is the attribute's valueElement instance.public Element addAttribute(QName qName, String value)
ElementaddAttribute 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 valueElement instance.public void setAttributes(List<Attribute> attributes)
ElementsetAttributes in interface ElementsetAttributes in class DefaultElementattributes - DOCUMENT ME!public void setAttributes(Attributes attributes, NamespaceStack namespaceStack, boolean noNamespaceAttributes)
AbstractElementSAXReader.setAttributes in class AbstractElementattributes - DOCUMENT ME!namespaceStack - DOCUMENT ME!noNamespaceAttributes - DOCUMENT ME!protected DocumentFactory getDocumentFactory()
getDocumentFactory in class DefaultElementprotected BeanAttributeList getBeanAttributeList()
protected List<Attribute> createAttributeList()
createAttributeList in class AbstractElementprotected List<Attribute> createAttributeList(int size)
AbstractElementcreateAttributeList in class AbstractElementsize - DOCUMENT ME!