public class BaseElement extends AbstractElement
 BaseElement is a useful base class for implemementation
 inheritence of an XML element.
 
| Modifier and Type | Field and Description | 
|---|---|
protected java.util.List<Attribute> | 
attributes
list of attributes 
 | 
protected java.util.List<Node> | 
content
List of content nodes. 
 | 
USE_STRINGVALUE_SEPARATOR, VERBOSE_TOSTRINGDEFAULT_CONTENT_LIST_SIZENODE_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 and Description | 
|---|
BaseElement(QName qname)  | 
BaseElement(java.lang.String name)  | 
BaseElement(java.lang.String name,
           Namespace namespace)  | 
| Modifier and Type | Method and Description | 
|---|---|
protected java.util.List<Attribute> | 
attributeList()
DOCUMENT ME! 
 | 
protected java.util.List<Attribute> | 
attributeList(int size)
DOCUMENT ME! 
 | 
void | 
clearContent()
Clears the content for this branch, removing any  
Node
 instances this branch may contain. | 
protected java.util.List<Node> | 
contentList()
DOCUMENT ME! 
 | 
Document | 
getDocument()
getDocument returns the Document that this
 Node is part of if this node supports the parent
 relationship. | 
Element | 
getParent()
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. | 
QName | 
getQName()
Returns the  
QName of this element which represents the
 local name, the qualified name and the Namespace. | 
protected void | 
setAttributeList(java.util.List<Attribute> attributeList)  | 
void | 
setAttributes(java.util.List<Attribute> attributes)
Sets the attributes that this element contains 
 | 
void | 
setContent(java.util.List<Node> content)
Sets the contents of this branch as a  
List of
 Node instances. | 
void | 
setDocument(Document document)
setDocument sets 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)
setParent sets 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  
QName of this element which represents the local
 name, the qualified name and the Namespace. | 
boolean | 
supportsParent()
supportsParent returns true if this node supports the
 parent relationship. | 
accept, add, add, add, add, add, add, add, add, add, addAttribute, addAttribute, addCDATA, addComment, addElement, addEntity, additionalNamespaces, additionalNamespaces, addNamespace, addNewNode, addNewNode, addNode, addNode, addProcessingInstruction, addProcessingInstruction, addText, appendAttributes, asXML, attribute, attribute, attribute, attribute, attributeCount, attributeIterator, attributes, attributeValue, attributeValue, attributeValue, attributeValue, createAttributeList, createAttributeList, createCopy, createCopy, createCopy, createElement, createElement, createSingleIterator, declaredNamespaces, element, element, element, elementIterator, elementIterator, elementIterator, elementIterator, elements, elements, elements, elements, elementText, elementText, elementTextTrim, elementTextTrim, ensureAttributesCapacity, getData, getDocumentFactory, getName, getNamespace, getNamespaceForPrefix, getNamespaceForURI, getNamespacePrefix, getNamespacesForURI, getNamespaceURI, getNodeType, getPath, getQName, getQualifiedName, getStringValue, getUniquePath, getXPathNameStep, getXPathResult, hasMixedContent, childAdded, childRemoved, indexOf, isRootElement, isTextOnly, node, nodeCount, nodeIterator, normalize, processingInstruction, processingInstructions, processingInstructions, remove, remove, remove, remove, remove, remove, remove, remove, remove, removeNode, removeProcessingInstruction, setAttributes, setAttributeValue, setAttributeValue, setData, setName, setNamespace, setText, toString, writeaddElement, addElement, addElement, appendContent, content, contentRemoved, createContentList, createContentList, createEmptyList, createResultList, createSingleResultList, elementByID, elementID, getContentAsStringValue, getContentAsText, getText, getTextTrim, hasContent, invalidNodeTypeAddException, isReadOnly, setProcessingInstructionsasXPathResult, clone, createPattern, createXPath, createXPathFilter, createXPathResult, detach, getNodeTypeName, getPath, getUniquePath, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, valueOfequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetText, getTextTrimaddElement, addElement, appendContent, content, elementByID, setProcessingInstructionsasXPathResult, clone, createXPath, detach, getNodeTypeName, getPath, getUniquePath, hasContent, isReadOnly, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, valueOfprotected java.util.List<Node> content
protected java.util.List<Attribute> attributes
public BaseElement(java.lang.String name)
public BaseElement(QName qname)
public BaseElement(java.lang.String name,
                   Namespace namespace)
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 AbstractNodeparent - is the new parent of this node.public 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 AbstractNodeDocumentpublic 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 AbstractNodedocument - is the new document of this node.public 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()
ElementQName of this element which represents the
 local name, the qualified name and the Namespace.QName associated with this elementpublic void setQName(QName name)
ElementQName 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(java.util.List<Node> content)
BranchList of
 Node instances.content - is the list of nodes to use as the content for this branch.public void setAttributes(java.util.List<Attribute> attributes)
Elementattributes - DOCUMENT ME!protected java.util.List<Node> contentList()
AbstractBranchcontentList in class AbstractBranchprotected java.util.List<Attribute> attributeList()
AbstractElementattributeList in class AbstractElementprotected java.util.List<Attribute> attributeList(int size)
AbstractElementattributeList in class AbstractElementsize - DOCUMENT ME!protected void setAttributeList(java.util.List<Attribute> attributeList)