Package org.apache.uima.tools.cvd
Class FSTreeModel
java.lang.Object
org.apache.uima.tools.cvd.FSTreeModel
- All Implemented Interfaces:
TreeModel
Swing Tree Model for Feature Structures.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate CASImplThe cas.private static final StringThe Constant defaultRootString.The fss.private FSTreeNodeThe root.private StringThe root string.private List<TreeModelListener> The tree model listeners. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the tree model listener.(package private) static List<FSTreeNode> createArrayChildren(int start, int end, List<FSNode> array, FSTreeModel model) Creates the array children.(package private) CASImplgetCas()Gets the cas.Gets the child.intgetChildCount(Object parent) Gets the child count.getFSs()Gets the f ss.intgetIndexOfChild(Object parent, Object child) Gets the index of child.(package private) intgetNodeType(Type type) Gets the node type.private voidgetPathToNode(int n, List<FSTreeNode> dtrs, List<FSTreeNode> path) Gets the path to node.getRoot()Gets the root.(package private) StringGets the root string.booleanChecks if is leaf.pathToNode(int fsNum) Path to node.voidRemoves the tree model listener.voidreset()Reset.voidUpdate.voidvalueForPathChanged(TreePath path, Object newValue) Value for path changed.
-
Field Details
-
root
The root. -
cas
The cas. -
treeModelListeners
The tree model listeners. -
fss
The fss. -
defaultRootString
The Constant defaultRootString.- See Also:
-
rootString
The root string.
-
-
Constructor Details
-
FSTreeModel
public FSTreeModel()Constructor for FSTreeModel.
-
-
Method Details
-
update
Update.- Parameters:
indexName- the index nameindex- the indexcas1- the cas 1
-
reset
public void reset()Reset. -
getFSs
Gets the f ss.- Returns:
- the f ss
-
getRoot
Gets the root. -
getChild
Gets the child. -
getNodeType
Gets the node type.- Parameters:
type- the type- Returns:
- the node type
-
getChildCount
Gets the child count.- Specified by:
getChildCountin interfaceTreeModel- Parameters:
parent- the parent- Returns:
- the child count
- See Also:
-
isLeaf
Checks if is leaf. -
valueForPathChanged
Value for path changed.- Specified by:
valueForPathChangedin interfaceTreeModel- Parameters:
path- the pathnewValue- the new value- See Also:
-
getIndexOfChild
Gets the index of child.- Specified by:
getIndexOfChildin interfaceTreeModel- Parameters:
parent- the parentchild- the child- Returns:
- the index of child
- See Also:
-
addTreeModelListener
Adds the tree model listener.- Specified by:
addTreeModelListenerin interfaceTreeModel- Parameters:
arg0- the arg 0- See Also:
-
removeTreeModelListener
Removes the tree model listener.- Specified by:
removeTreeModelListenerin interfaceTreeModel- Parameters:
arg0- the arg 0- See Also:
-
getCas
CASImpl getCas()Gets the cas.- Returns:
- CASImpl
-
getRootString
String getRootString()Gets the root string.- Returns:
- String
-
createArrayChildren
static List<FSTreeNode> createArrayChildren(int start, int end, List<FSNode> array, FSTreeModel model) Creates the array children.- Parameters:
start- the startend- the endarray- the arraymodel- the model- Returns:
- the list
-
pathToNode
Path to node.- Parameters:
fsNum- the fs num- Returns:
- the tree path
-
getPathToNode
Gets the path to node.- Parameters:
n- the ndtrs- the dtrspath- the path
-