Serializable, Cloneable, Branch, Element, Nodepublic class IndexedElement extends DefaultElement
IndexedElement is an implementation of Elementwhich
maintains an index of the attributes and elements it contains to optimise
lookups via name.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 |
|---|---|
IndexedElement(String name) |
|
IndexedElement(QName qname) |
|
IndexedElement(QName qname,
int attributeCount) |
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
addNode(Node node) |
|
protected void |
addToAttributeIndex(Object key,
Attribute value) |
|
protected void |
addToAttributeIndex(Attribute attribute) |
|
protected void |
addToElementIndex(Object key,
Element value) |
|
protected void |
addToElementIndex(Element element) |
|
protected Element |
asElement(Object object) |
|
protected Iterator<Element> |
asElementIterator(Object object) |
Deprecated.
WILL BE REMOVED IN dom4j-1.6 !!
|
protected List<Element> |
asElementList(Object object) |
|
Attribute |
attribute(String name) |
Returns the attribute with the given name
|
Attribute |
attribute(QName qName) |
DOCUMENT ME!
|
protected Map<Object,Attribute> |
attributeIndex() |
|
protected Map<Object,Attribute> |
createAttributeIndex() |
A Factory Method to create the index for attributes
|
protected Map<Object,Object> |
createElementIndex() |
A Factory Method to create the index for elements
|
protected <T> Map<Object,T> |
createIndex() |
Factory method to return a new map implementation for indices
|
protected <T extends Node> |
createList() |
Factory method to return a list implementation for indices
|
Element |
element(String name) |
Returns the first element for the given local name and any namespace.
|
Element |
element(QName qName) |
Returns the first element for the given fully qualified name.
|
protected Map<Object,Object> |
elementIndex() |
|
List<Element> |
elements(String name) |
Returns the elements contained in this element with the given local name
and any namespace.
|
List<Element> |
elements(QName qName) |
Returns the elements contained in this element with the given fully
qualified name.
|
protected void |
removeFromAttributeIndex(Object key,
Attribute value) |
|
protected void |
removeFromAttributeIndex(Attribute attribute) |
|
protected void |
removeFromElementIndex(Object key,
Element value) |
|
protected void |
removeFromElementIndex(Element element) |
|
protected boolean |
removeNode(Node node) |
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, addAttribute, addAttribute, addCDATA, addComment, addElement, addEntity, addNamespace, addNewNode, addNode, addProcessingInstruction, addProcessingInstruction, addText, appendAttributes, asXML, attributeValue, attributeValue, attributeValue, attributeValue, childAdded, childRemoved, createAttributeList, createAttributeList, createCopy, createCopy, createCopy, createElement, createElement, createSingleIterator, elementIterator, elementIterator, elementIterator, elementIterator, elements, elements, elementText, elementText, elementTextTrim, elementTextTrim, ensureAttributesCapacity, getData, getName, getNamespace, getNamespacePrefix, getNamespacesForURI, getNamespaceURI, getNodeType, getPath, getQName, getQualifiedName, getUniquePath, getXPathNameStep, getXPathResult, hasMixedContent, isRootElement, isTextOnly, normalize, remove, remove, remove, remove, remove, remove, remove, remove, setAttributes, setAttributeValue, setAttributeValue, setData, 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, getDocument, getDocumentFactory, getNamespaceForPrefix, getNamespaceForURI, getParent, getQName, getStringValue, getText, indexOf, node, nodeCount, nodeIterator, processingInstruction, processingInstructions, processingInstructions, remove, removeProcessingInstruction, setAttributeList, setAttributes, setContent, setDocument, setParent, setQName, supportsParentgetTextTrimasXPathResult, createXPath, detach, getNodeTypeName, getPath, getUniquePath, hasContent, isReadOnly, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, valueOfpublic IndexedElement(String name)
public IndexedElement(QName qname)
public IndexedElement(QName qname, int attributeCount)
public Attribute attribute(String name)
Elementattribute in interface Elementattribute in class DefaultElementname - DOCUMENT ME!public Attribute attribute(QName qName)
Elementattribute in interface Elementattribute in class DefaultElementqName - is the fully qualified namepublic Element element(String name)
Elementelement in interface Elementelement in class DefaultElementname - DOCUMENT ME!public Element element(QName qName)
Elementelement in interface Elementelement in class DefaultElementqName - is the fully qualified name to search forpublic List<Element> elements(String name)
Elementelements in interface Elementelements in class AbstractElementname - DOCUMENT ME!public List<Element> elements(QName qName)
Elementelements in interface Elementelements in class AbstractElementqName - is the fully qualified name to search forprotected Iterator<Element> asElementIterator(Object object)
object - DOCUMENT ME!protected void addNode(Node node)
addNode in class AbstractElementprotected boolean removeNode(Node node)
removeNode in class DefaultElementprotected Map<Object,Attribute> createAttributeIndex()
protected Map<Object,Object> createElementIndex()
protected void addToElementIndex(Element element)
protected void removeFromElementIndex(Element element)
protected void addToAttributeIndex(Attribute attribute)
protected void removeFromAttributeIndex(Attribute attribute)
protected <T> Map<Object,T> createIndex()
T - DOCUMENT ME!