BaseElement is a useful base class for implemementation
inheritence of an XML element.
| Modifier and Type | Field and Description |
|---|---|
| protected List | attributes
list of attributes |
| protected List | content
List of content nodes. |
| private Branch | parentBranch
Stores the parent branch of this node which is either a Document if this element is the root element in a document, or another Element if it is a child of the root document, or null if it has not been added to a document yet. |
| private QName | qname
The |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected List | |
| protected List | attributeList(int
DOCUMENT ME! size)Implements abstract org. |
| public void | clearContent()
Implements org. Node
instances this branch may contain.
|
| protected List | |
| public Document | getDocument()
Overrides org. Implements org.
|
| public Element | getParent()
Overrides org. Implements org.
|
| public QName | getQName()
Implements org. QName of this element which represents the
local name, the qualified name and the Namespace.
|
| protected void | |
| public void | setAttributes(List<Attribute>
DOCUMENT ME! attributes)Implements org. |
| public void | setContent(List<Node>
is the list of nodes to use as the content for this branch. content)Implements org. List of
Node instances.
|
| public void | setDocument(Document
is the new document of this node. document)Overrides org. Implements org.
|
| public void | setParent(Element
is the new parent of this node. parent)Overrides org. Implements org.
|
| public void | setQName(QName
is the name)QName to be associated with this elementImplements org. QName of this element which represents the local
name, the qualified name and the Namespace.
|
| public boolean | supportsParent()
Overrides org. Implements org.
|
| attributes | back to summary |
|---|---|
| protected List<Attribute> attributes list of attributes | |
| content | back to summary |
|---|---|
| protected List<Node> content List of content nodes. | |
| parentBranch | back to summary |
|---|---|
| private Branch parentBranch Stores the parent branch of this node which is either a Document if this element is the root element in a document, or another Element if it is a child of the root document, or null if it has not been added to a document yet. | |
| qname | back to summary |
|---|---|
| private QName qname The | |
| BaseElement | back to summary |
|---|---|
| public BaseElement(String name) | |
| BaseElement | back to summary |
|---|---|
| public BaseElement(QName qname) | |
| BaseElement | back to summary |
|---|---|
| public BaseElement(String name, Namespace namespace) | |
| attributeList | back to summary |
|---|---|
| protected List Implements abstract org. Doc from org. DOCUMENT ME! | |
| attributeList | back to summary |
|---|---|
| protected List Implements abstract org. Doc from org. DOCUMENT ME! | |
| clearContent | back to summary |
|---|---|
| public void clearContent() Implements org. Doc from org. Clears the content for this branch, removing any | |
| contentList | back to summary |
|---|---|
| protected List Implements abstract org. Doc from org. DOCUMENT ME! | |
| getDocument | back to summary |
|---|---|
| public Document getDocument() Overrides org. Implements org. Doc from org.
This method is an optional feature and may not be supported for all
| |
| getParent | back to summary |
|---|---|
| public Element getParent() Overrides org. Implements org. Doc from org.
This method is an optional feature and may not be supported for all
| |
| getQName | back to summary |
|---|---|
| public QName getQName() Implements org. Doc from org. Returns the
| |
| setAttributeList | back to summary |
|---|---|
| protected void setAttributeList(List<Attribute> attributeList) | |
| setAttributes | back to summary |
|---|---|
| public void setAttributes(List<Attribute> attributes) Implements org. Doc from org. Sets the attributes that this element contains | |
| setContent | back to summary |
|---|---|
| public void setContent(List<Node> content) Implements org. Doc from org. Sets the contents of this branch as a | |
| setDocument | back to summary |
|---|---|
| public void setDocument(Document document) Overrides org. Implements org. Doc from org.
This method should only be called from inside a
| |
| setParent | back to summary |
|---|---|
| public void setParent(Element parent) Overrides org. Implements org. Doc from org.
This method should only be called from inside an
| |
| setQName | back to summary |
|---|---|
| public void setQName(QName name) Implements org. Doc from org. Sets the
| |
| supportsParent | back to summary |
|---|---|
| public boolean supportsParent() Overrides org. Implements org. Doc from org.
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.
| |