|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.dom4j.tree.AbstractNode
org.dom4j.tree.AbstractBranch
org.dom4j.tree.AbstractElement
org.dom4j.tree.DefaultElement
org.dom4j.util.IndexedElement
IndexedElement
is an implementation of Element
which
maintains an index of the attributes and elements it contains to optimise
lookups via name.
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 |
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 | |
IndexedElement(QName qname)
|
|
IndexedElement(QName qname,
int attributeCount)
|
|
IndexedElement(java.lang.String name)
|
Method Summary | |
protected void |
addNode(Node node)
|
protected void |
addToAttributeIndex(Attribute attribute)
|
protected void |
addToAttributeIndex(java.lang.Object key,
Attribute value)
|
protected void |
addToElementIndex(Element element)
|
protected void |
addToElementIndex(java.lang.Object key,
Element value)
|
protected Element |
asElement(java.lang.Object object)
|
protected java.util.Iterator |
asElementIterator(java.lang.Object object)
Deprecated. WILL BE REMOVED IN dom4j-1.6 !! |
protected java.util.List |
asElementList(java.lang.Object object)
|
Attribute |
attribute(QName qName)
DOCUMENT ME! |
Attribute |
attribute(java.lang.String name)
Returns the attribute with the given name |
protected java.util.Map |
attributeIndex()
|
protected java.util.Map |
createAttributeIndex()
A Factory Method to create the index for attributes |
protected java.util.Map |
createElementIndex()
A Factory Method to create the index for elements |
protected java.util.Map |
createIndex()
Factory method to return a new map implementation for indices |
protected java.util.List |
createList()
Factory method to return a list implementation for indices |
Element |
element(QName qName)
Returns the first element for the given fully qualified name. |
Element |
element(java.lang.String name)
Returns the first element for the given local name and any namespace. |
protected java.util.Map |
elementIndex()
|
java.util.List |
elements(QName qName)
Returns the elements contained in this element with the given fully qualified name. |
java.util.List |
elements(java.lang.String name)
Returns the elements contained in this element with the given local name and any namespace. |
protected void |
removeFromAttributeIndex(Attribute attribute)
|
protected void |
removeFromAttributeIndex(java.lang.Object key,
Attribute value)
|
protected void |
removeFromElementIndex(Element element)
|
protected void |
removeFromElementIndex(java.lang.Object key,
Element value)
|
protected boolean |
removeNode(Node node)
|
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 IndexedElement(java.lang.String name)
public IndexedElement(QName qname)
public IndexedElement(QName qname, int attributeCount)
Method Detail |
public Attribute attribute(java.lang.String name)
Element
attribute
in interface Element
attribute
in class DefaultElement
public Attribute attribute(QName qName)
Element
attribute
in interface Element
attribute
in class DefaultElement
public Element element(java.lang.String name)
Element
element
in interface Element
element
in class DefaultElement
public Element element(QName qName)
Element
element
in interface Element
element
in class DefaultElement
public java.util.List elements(java.lang.String name)
Element
Returns the elements contained in this element with the given local name and any namespace. If no elements are found then this method returns an empty list. The list is backed by the element such that changes to the list will be reflected in the element though the reverse is not the case.
elements
in interface Element
elements
in class AbstractElement
public java.util.List elements(QName qName)
Element
Returns the elements contained in this element with the given fully qualified name. If no elements are found then this method returns an empty list. The list is backed by the element such that changes to the list will be reflected in the element though the reverse is not the case.
elements
in interface Element
elements
in class AbstractElement
protected Element asElement(java.lang.Object object)
protected java.util.List asElementList(java.lang.Object object)
protected java.util.Iterator asElementIterator(java.lang.Object object)
object
- DOCUMENT ME!
protected void addNode(Node node)
addNode
in class AbstractElement
protected boolean removeNode(Node node)
removeNode
in class DefaultElement
protected java.util.Map attributeIndex()
protected java.util.Map elementIndex()
protected java.util.Map createAttributeIndex()
protected java.util.Map createElementIndex()
protected void addToElementIndex(Element element)
protected void addToElementIndex(java.lang.Object key, Element value)
protected void removeFromElementIndex(Element element)
protected void removeFromElementIndex(java.lang.Object key, Element value)
protected void addToAttributeIndex(Attribute attribute)
protected void addToAttributeIndex(java.lang.Object key, Attribute value)
protected void removeFromAttributeIndex(Attribute attribute)
protected void removeFromAttributeIndex(java.lang.Object key, Attribute value)
protected java.util.Map createIndex()
protected java.util.List createList()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |