AbstractBranch is an abstract base class for tree implementors
to use for implementation inheritence.
| Modifier and Type | Field and Description |
|---|---|
| protected static final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | add(Node
is the given node to add node)Implements org. Node or throws IllegalAddException
if the given node is not of a valid type.
|
| public void | add(Comment
is the comment to be added comment)Implements org. Comment to this branch.
|
| public void | add(Element
is the element to be added element)Implements org. Element to this branch.
|
| public void | add(ProcessingInstruction
is the processing instruction to be added pi)Implements org. ProcessingInstruction to this branch.
|
| public Element | addElement(String
is the name for the name)Element node.Implements org. Element node with the given name to this branch
and returns a reference to the new node.
|
| public Element | addElement(String
is the fully qualified name of the Element qualifiedName, String is the URI of the namespace to use namespaceURI)Implements org. Element node with the given qualified name and
namespace URI to this branch and returns a reference to the new node.
|
| public Element | addElement(QName
is the qualified name for the qname)Element node.Implements org. Element node with the given QNameto
this branch and returns a reference to the new node.
|
| public Element | |
| protected abstract void | |
| protected abstract void | |
| public void | appendContent(Branch
is the branch whose content will be added to me. branch)Implements org. |
| protected abstract void | childAdded(Node
DOCUMENT ME! node)Called when a new child node has been added to me to allow any parent relationships to be created or events to be fired. |
| protected abstract void | childRemoved(Node
DOCUMENT ME! node)Called when a child node has been removed to allow any parent relationships to be deleted or events to be fired. |
| public List | content()
Implements org. Listso that
the content of this branch may be modified directly using the
Listinterface.
|
| protected abstract List | |
| protected void | contentRemoved()
Called when the given List content has been removed so each node should have its parent and document relationships cleared |
| protected List | Returns: DOCUMENT ME!A Factory Method pattern which creates a List implementation used to store content |
| protected List | Returns: DOCUMENT ME!DOCUMENT ME! size)A Factory Method pattern which creates a List implementation used to store content |
| protected < DOCUMENT ME! T extends Node> List | Returns: DOCUMENT ME!A Factory Method pattern which creates an empty a BackedList implementation |
| protected < DOCUMENT ME! T extends Node> BackedList | Returns: DOCUMENT ME!A Factory Method pattern which creates a BackedList implementation used to store results of a filtered content query. |
| protected < DOCUMENT ME! T extends Node> List | Returns: DOCUMENT ME!DOCUMENT ME! result)A Factory Method pattern which creates a BackedList implementation which contains a single result |
| public Element | elementByID(String
DOCUMENT ME! elementID)Implements org. |
| protected String | |
| protected String | Returns: the XPath defined string-value of the given content objectDOCUMENT ME! content)DOCUMENT ME! |
| protected String | Returns: the text value of the given content object as text which returns the text value of CDATA, Entity or Text nodesDOCUMENT ME! content)DOCUMENT ME! |
| public String | getText()
Overrides org. Implements org. Returns the text of this node. |
| public String | |
| public boolean | hasContent()
Overrides org. Implements org.
|
| public int | indexOf(Node
the content child node to find. node)Implements org. |
| protected void | |
| public boolean | isReadOnly()
Overrides org. Implements org.
|
| public Node | node(int
the index of the node to return. index)Implements org. Node at the specified index position.
|
| public int | nodeCount()
Implements org. Node instances that this branch
contains.
|
| public Iterator | nodeIterator()
Implements org. |
| public boolean | remove(Node
is the given node to be removed node)Implements org. Node if the node is an immediate child
of this branch.
|
| public boolean | remove(Comment
is the comment to be removed comment)Implements org. Comment if the node is an immediate
child of this branch.
|
| public boolean | remove(Element
is the element to be removed element)Implements org. Element if the node is an immediate
child of this branch.
|
| public boolean | remove(ProcessingInstruction
is the processing instruction to be removed pi)Implements org. ProcessingInstruction if the node is an
immediate child of this branch.
|
| protected abstract boolean | |
| public void | setProcessingInstructions(List<ProcessingInstruction>
DOCUMENT ME! listOfPIs)Implements org. |
| DEFAULT_CONTENT_LIST_SIZE | back to summary |
|---|---|
| protected static final int DEFAULT_CONTENT_LIST_SIZE | |
| AbstractBranch | back to summary |
|---|---|
| public AbstractBranch() | |
| add | back to summary |
|---|---|
| public void add(Node node) Implements org. Doc from org. Adds the given
| |
| add | back to summary |
|---|---|
| public void add(Comment comment) Implements org. Doc from org. Adds the given
| |
| add | back to summary |
|---|---|
| public void add(Element element) Implements org. Doc from org. Adds the given
| |
| add | back to summary |
|---|---|
| public void add(ProcessingInstruction pi) Implements org. Doc from org. Adds the given
| |
| addElement | back to summary |
|---|---|
| public Element addElement(String name) Implements org. Doc from org. Adds a new | |
| addElement | back to summary |
|---|---|
| public Element addElement(String qualifiedName, String namespaceURI) Implements org. Doc from org. Adds a new | |
| addElement | back to summary |
|---|---|
| public Element addElement(QName qname) Implements org. Doc from org. Adds a new | |
| addElement | back to summary |
|---|---|
| public Element addElement(String name, String prefix, String uri) | |
| addNode | back to summary |
|---|---|
| protected abstract void addNode(Node node) | |
| addNode | back to summary |
|---|---|
| protected abstract void addNode(int index, Node node) | |
| appendContent | back to summary |
|---|---|
| public void appendContent(Branch branch) Implements org. Doc from org. Appends the content of the given branch to this branch instance. This
method behaves like the
| |
| childAdded | back to summary |
|---|---|
| protected abstract void childAdded(Node node) Called when a new child node has been added to me to allow any parent relationships to be created or events to be fired.
| |
| childRemoved | back to summary |
|---|---|
| protected abstract void childRemoved(Node node) Called when a child node has been removed to allow any parent relationships to be deleted or events to be fired.
| |
| content | back to summary |
|---|---|
| public List Implements org. Doc from org. Returns the content nodes of this branch as a backed | |
| contentList | back to summary |
|---|---|
| protected abstract List DOCUMENT ME! | |
| contentRemoved | back to summary |
|---|---|
| protected void contentRemoved() Called when the given List content has been removed so each node should have its parent and document relationships cleared | |
| createContentList | back to summary |
|---|---|
| protected List A Factory Method pattern which creates a List implementation used to store content | |
| createContentList | back to summary |
|---|---|
| protected List A Factory Method pattern which creates a List implementation used to store content | |
| createEmptyList | back to summary |
|---|---|
| protected <T extends Node> List A Factory Method pattern which creates an empty a BackedList implementation
| |
| createResultList | back to summary |
|---|---|
| protected <T extends Node> BackedList A Factory Method pattern which creates a BackedList implementation used to store results of a filtered content query.
| |
| createSingleResultList | back to summary |
|---|---|
| protected <T extends Node> List A Factory Method pattern which creates a BackedList implementation which contains a single result
| |
| elementByID | back to summary |
|---|---|
| public Element elementByID(String elementID) Implements org. Doc from org. Returns the element of the given ID attribute value. If this tree is capable of understanding which attribute value should be used for the ID then it should be used, otherwise this method should return null. | |
| elementID | back to summary |
|---|---|
| protected String elementID(Element element) DOCUMENT ME! | |
| getContentAsStringValue | back to summary |
|---|---|
| protected String getContentAsStringValue(Object content) DOCUMENT ME! | |
| getContentAsText | back to summary |
|---|---|
| protected String getContentAsText(Object content) DOCUMENT ME! | |
| getText | back to summary |
|---|---|
| public String getText() Overrides org. Implements org. Doc from org. Returns the text of this node.
| |
| getTextTrim | back to summary |
|---|---|
| public String getTextTrim() | |
| hasContent | back to summary |
|---|---|
| public boolean hasContent() Overrides org. Implements org. Doc from org.
| |
| indexOf | back to summary |
|---|---|
| public int indexOf(Node node) Implements org. Doc from org. Returns the index of the given node if it is a child node of this branch or -1 if the given node is not a child node.
| |
| invalidNodeTypeAddException | back to summary |
|---|---|
| protected void invalidNodeTypeAddException(Node node) Called when an invalid node has been added. Throws an
| |
| isReadOnly | back to summary |
|---|---|
| public boolean isReadOnly() Overrides org. Implements org. Doc from org.
| |
| node | back to summary |
|---|---|
| public Node node(int index) Implements org. Doc from org. Returns the
| |
| nodeCount | back to summary |
|---|---|
| public int nodeCount() Implements org. Doc from org. Returns the number of
| |
| nodeIterator | back to summary |
|---|---|
| public Iterator Implements org. Doc from org. Returns an iterator through the content nodes of this branch | |
| remove | back to summary |
|---|---|
| public boolean remove(Node node) Implements org. Doc from org. Removes the given
| |
| remove | back to summary |
|---|---|
| public boolean remove(Comment comment) Implements org. Doc from org. Removes the given
| |
| remove | back to summary |
|---|---|
| public boolean remove(Element element) Implements org. Doc from org. Removes the given
| |
| remove | back to summary |
|---|---|
| public boolean remove(ProcessingInstruction pi) Implements org. Doc from org. Removes the given
| |
| removeNode | back to summary |
|---|---|
| protected abstract boolean removeNode(Node node) | |
| setProcessingInstructions | back to summary |
|---|---|
| public void setProcessingInstructions(List<ProcessingInstruction> listOfPIs) Implements org. Doc from org. Sets all the processing instructions for this branch
| |