| 
 | |||||||||||
| 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.BaseElement
 BaseElement is a useful base class for implemementation
 inheritence of an XML element.
 
| Field Summary | |
| protected  List | attributeslist of attributes | 
| protected  List | contentList of content nodes. | 
| 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 | |
| BaseElement(QName qname) | |
| BaseElement(String name) | |
| BaseElement(String name,
            Namespace namespace) | |
| Method Summary | |
| protected  List | attributeList()DOCUMENT ME! | 
| protected  List | attributeList(int size)DOCUMENT ME! | 
|  void | clearContent()Clears the content for this branch, removing any Nodeinstances this branch may contain. | 
| protected  List | contentList()DOCUMENT ME! | 
|  Document | getDocument()getDocumentreturns theDocumentthat thisNodeis part of if this node supports the parent
 relationship. | 
|  Element | getParent()getParentreturns the parentElementif
 this node supports the parent relationship or null if it is the root
 element or does not support the parent relationship. | 
|  QName | getQName()Returns the QNameof this element which represents the
 local name, the qualified name and theNamespace. | 
| protected  void | setAttributeList(List attributeList) | 
|  void | setAttributes(List attributes)Sets the attributes that this element contains | 
|  void | setContent(List content)Sets the contents of this branch as a ListofNodeinstances. | 
|  void | setDocument(Document document)setDocumentsets the document of this node if the parent
 relationship is supported or does nothing if the parent relationship is
 not supported. | 
|  void | setParent(Element parent)setParentsets the parent relationship of this node if the
 parent relationship is supported or does nothing if the parent
 relationship is not supported. | 
|  void | setQName(QName name)Sets the QNameof this element which represents the local
 name, the qualified name and theNamespace. | 
|  boolean | supportsParent()supportsParentreturns true if this node supports the
 parent relationship. | 
| Methods inherited from class org.dom4j.tree.AbstractBranch | 
| addElement, addElement, addElement, appendContent, content, contentRemoved, createContentList, createContentList, createEmptyList, createResultList, createSingleResultList, elementByID, elementID, getContentAsStringValue, getContentAsText, getText, getTextTrim, hasContent, invalidNodeTypeAddException, isReadOnly, setProcessingInstructions | 
| Methods inherited from class org.dom4j.tree.AbstractNode | 
| asXPathResult, clone, 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 | 
| getText, getTextTrim | 
| Methods inherited from interface org.dom4j.Branch | 
| addElement, addElement, appendContent, content, elementByID, setProcessingInstructions | 
| Methods inherited from interface org.dom4j.Node | 
| asXPathResult, clone, createXPath, detach, getNodeTypeName, getPath, getUniquePath, hasContent, isReadOnly, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, valueOf | 
| Field Detail | 
protected List content
protected List attributes
| Constructor Detail | 
public BaseElement(String name)
public BaseElement(QName qname)
public BaseElement(String name,
                   Namespace namespace)
| Method Detail | 
public Element getParent()
Node
 getParent returns the parent Element if
 this node supports the parent relationship or null if it is the root
 element or does not support the parent relationship.
 
 This method is an optional feature and may not be supported for all
 Node implementations.
 
getParent in interface NodegetParent in class AbstractNodepublic void setParent(Element parent)
Node
 setParent sets the parent relationship of this node if the
 parent relationship is supported or does nothing if the parent
 relationship is not supported.
 
 This method should only be called from inside an Element
 implementation method and is not intended for general use.
 
setParent in interface NodesetParent in class AbstractNodepublic Document getDocument()
Node
 getDocument returns the Document that this
 Node is part of if this node supports the parent
 relationship.
 
 This method is an optional feature and may not be supported for all
 Node implementations.
 
getDocument in interface NodegetDocument in class AbstractNodepublic void setDocument(Document document)
Node
 setDocument sets the document of this node if the parent
 relationship is supported or does nothing if the parent relationship is
 not supported.
 
 This method should only be called from inside a Document
 implementation method and is not intended for general use.
 
setDocument in interface NodesetDocument in class AbstractNodepublic boolean supportsParent()
Node
 supportsParent returns true if this node supports the
 parent relationship.
 
Some XML tree implementations are singly linked and only support downward navigation through children relationships. The default case is that both parent and children relationships are supported though for memory and performance reasons the parent relationship may not be supported.
supportsParent in interface NodesupportsParent in class AbstractNodepublic QName getQName()
Element
 Returns the QName of this element which represents the
 local name, the qualified name and the Namespace.
 
QName associated with this elementpublic void setQName(QName name)
Element
 Sets the QName of this element which represents the local
 name, the qualified name and the Namespace.
 
name - is the QName to be associated with this elementpublic void clearContent()
BranchNode
 instances this branch may contain.
public void setContent(List content)
BranchList of
 Node instances.
content - is the list of nodes to use as the content for this branch.public void setAttributes(List attributes)
Element
attributes - DOCUMENT ME!protected List contentList()
AbstractBranch
contentList in class AbstractBranchprotected List attributeList()
AbstractElement
attributeList in class AbstractElementprotected List attributeList(int size)
AbstractElement
attributeList in class AbstractElementsize - DOCUMENT ME!
protected void setAttributeList(List attributeList)
| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||