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 CASImpl
The cas.private static final String
The Constant defaultRootString.The fss.private FSTreeNode
The root.private String
The root string.private List
<TreeModelListener> The tree model listeners. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds 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) CASImpl
getCas()
Gets the cas.Gets the child.int
getChildCount
(Object parent) Gets the child count.getFSs()
Gets the f ss.int
getIndexOfChild
(Object parent, Object child) Gets the index of child.(package private) int
getNodeType
(Type type) Gets the node type.private void
getPathToNode
(int n, List<FSTreeNode> dtrs, List<FSTreeNode> path) Gets the path to node.getRoot()
Gets the root.(package private) String
Gets the root string.boolean
Checks if is leaf.pathToNode
(int fsNum) Path to node.void
Removes the tree model listener.void
reset()
Reset.void
Update.void
valueForPathChanged
(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:
getChildCount
in interfaceTreeModel
- Parameters:
parent
- the parent- Returns:
- the child count
- See Also:
-
isLeaf
Checks if is leaf. -
valueForPathChanged
Value for path changed.- Specified by:
valueForPathChanged
in interfaceTreeModel
- Parameters:
path
- the pathnewValue
- the new value- See Also:
-
getIndexOfChild
Gets the index of child.- Specified by:
getIndexOfChild
in interfaceTreeModel
- Parameters:
parent
- the parentchild
- the child- Returns:
- the index of child
- See Also:
-
addTreeModelListener
Adds the tree model listener.- Specified by:
addTreeModelListener
in interfaceTreeModel
- Parameters:
arg0
- the arg 0- See Also:
-
removeTreeModelListener
Removes the tree model listener.- Specified by:
removeTreeModelListener
in 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
-