public class STreeNode extends DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
Constructor and Description |
---|
STreeNode() |
STreeNode(Annotation annot) |
STreeNode(long start,
long end) |
Modifier and Type | Method and Description |
---|---|
boolean |
createAnnotation(Document doc,
String type,
String text,
long utteranceOffset)
Creates an annotation of the given type.
|
void |
disconnectChildren() |
Annotation |
getAnnotation() |
long |
getEnd() |
int |
getID() |
int |
getLevel() |
long |
getStart() |
void |
removeAnnotation(Document doc)
Store the annotation in the deleted list so it can retrieved later
|
void |
setAnnotation(Annotation annot)
This also sets the span to match the annotation span!
|
void |
setEnd(long end) |
void |
setLevel(int level) |
void |
setLevel(long level) |
void |
setStart(long start) |
static boolean |
transferAnnotations(Document doc,
AnnotationSet targetAS)
Transfers the annotations from added to the given annotation set
Also, for each annotation in removed, removes it from the given annotation set
Called by OkAction() in the treeViewer to finalise the changes.
|
static void |
undo(Document doc) |
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject, toString
public STreeNode(Annotation annot)
public STreeNode(long start, long end)
public STreeNode()
public int getLevel()
getLevel
in class DefaultMutableTreeNode
public void setLevel(long level)
public void setLevel(int level)
public int getID()
public long getStart()
public void setStart(long start)
public long getEnd()
public void setEnd(long end)
public void setAnnotation(Annotation annot)
public Annotation getAnnotation()
public void disconnectChildren()
public boolean createAnnotation(Document doc, String type, String text, long utteranceOffset)
public static boolean transferAnnotations(Document doc, AnnotationSet targetAS)
public void removeAnnotation(Document doc)