Package org.apache.uima.cas.text
Interface AnnotationTreeNode<T extends AnnotationFS>
- All Known Implementing Classes:
- AnnotationTreeNodeImpl
public interface AnnotationTreeNode<T extends AnnotationFS>
Represents a node in an annotation tree.
- 
Method SummaryModifier and TypeMethodDescriptionget()Return the annotation for this node.getChild(int i) Get the i-th child of this node.intGet the number of children this node has.Get all children of this node as an ArrayList.Get the next sibling (to the right) of this node.Get the parent of this node.Get the previous sibling (to the left) of this node.
- 
Method Details- 
getParentAnnotationTreeNode<T> getParent()Get the parent of this node.- Returns:
- The parent of this node, or nullif this node has no parent (root).
 
- 
getChildCountint getChildCount()Get the number of children this node has.- Returns:
- The number of children.
 
- 
getChildGet the i-th child of this node.- Parameters:
- i- The index of the child.
- Returns:
- The i-th child.
- Throws:
- CASRuntimeException- If- i < 0or- i >= getChildCount().
 
- 
getNextSiblingAnnotationTreeNode<T> getNextSibling()Get the next sibling (to the right) of this node.- Returns:
- The right sibling of this node, or nullif no such sibling exists.
 
- 
getPreviousSiblingAnnotationTreeNode<T> getPreviousSibling()Get the previous sibling (to the left) of this node.- Returns:
- The left sibling of this node, or nullif no such sibling exists.
 
- 
getChildrenArrayList<AnnotationTreeNode<T>> getChildren()Get all children of this node as an ArrayList.- Returns:
- An ArrayList of the children.
 
- 
getT get()Return the annotation for this node.- Returns:
- The annotation for this node.
 
 
-