org.dom4j.tree
public abstract class AbstractBranch extends AbstractNode implements Branch
AbstractBranch
is an abstract base class for tree implementors
to use for implementation inheritence.
Version: $Revision: 1.44 $
Field Summary | |
---|---|
protected static int | DEFAULT_CONTENT_LIST_SIZE |
Constructor Summary | |
---|---|
AbstractBranch() |
Method Summary | |
---|---|
void | add(Node node) |
void | add(Comment comment) |
void | add(Element element) |
void | add(ProcessingInstruction pi) |
Element | addElement(String name) |
Element | addElement(String qualifiedName, String namespaceURI) |
Element | addElement(QName qname) |
Element | addElement(String name, String prefix, String uri) |
protected abstract void | addNode(Node node) |
protected abstract void | addNode(int index, Node node) |
void | appendContent(Branch branch) |
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.
|
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.
|
List | content() |
protected abstract List | contentList()
DOCUMENT ME!
|
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 | createContentList()
A Factory Method pattern which creates a List implementation used to
store content
|
protected List | createContentList(int size)
A Factory Method pattern which creates a List implementation used to
store content
|
protected List | createEmptyList()
A Factory Method pattern which creates an empty a BackedList
implementation
|
protected BackedList | createResultList()
A Factory Method pattern which creates a BackedList implementation used
to store results of a filtered content query.
|
protected List | createSingleResultList(Object result)
A Factory Method pattern which creates a BackedList implementation which
contains a single result
|
Element | elementByID(String elementID) |
protected String | elementID(Element element)
DOCUMENT ME!
|
protected String | getContentAsStringValue(Object content)
DOCUMENT ME!
|
protected String | getContentAsText(Object content)
DOCUMENT ME!
|
String | getText() |
String | getTextTrim() |
boolean | hasContent() |
int | indexOf(Node node) |
protected void | invalidNodeTypeAddException(Node node)
Called when an invalid node has been added. |
boolean | isReadOnly() |
Node | node(int index) |
int | nodeCount() |
Iterator | nodeIterator() |
boolean | remove(Node node) |
boolean | remove(Comment comment) |
boolean | remove(Element element) |
boolean | remove(ProcessingInstruction pi) |
protected abstract boolean | removeNode(Node node) |
void | setProcessingInstructions(List listOfPIs) |
Parameters: node DOCUMENT ME!
Parameters: node DOCUMENT ME!
Returns: the internal List used to manage the content
Returns: DOCUMENT ME!
Parameters: size DOCUMENT ME!
Returns: DOCUMENT ME!
Returns: DOCUMENT ME!
Returns: DOCUMENT ME!
Parameters: result DOCUMENT ME!
Returns: DOCUMENT ME!
Parameters: element DOCUMENT ME!
Returns: the ID of the given Element
Parameters: content DOCUMENT ME!
Returns: the XPath defined string-value of the given content object
Parameters: content DOCUMENT ME!
Returns: the text value of the given content object as text which returns the text value of CDATA, Entity or Text nodes
Parameters: node DOCUMENT ME!
Throws: IllegalAddException DOCUMENT ME!