Package adams.gui.visualization.nlp
Class StanfordNode
- java.lang.Object
-
- javax.swing.tree.DefaultMutableTreeNode
-
- adams.gui.core.BaseTreeNode
-
- adams.gui.visualization.nlp.StanfordNode
-
- All Implemented Interfaces:
Transferable
,Serializable
,Cloneable
,MutableTreeNode
,TreeNode
public class StanfordNode extends adams.gui.core.BaseTreeNode
Specialized tree node.- Version:
- $Revision: 8629 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected edu.stanford.nlp.trees.Tree
m_Value
the underlying value.static String
ROOT
the label for the root node in case of multiple hierarchies.-
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
-
-
Constructor Summary
Constructors Constructor Description StanfordNode(String label, edu.stanford.nlp.trees.Tree value)
Initializes the node with the specified label.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getLabel()
Returns the label for this node.edu.stanford.nlp.trees.Tree
getValue()
Returns the value for this node.boolean
hasValue()
Checks whether there is any JSON object attached.-
Methods inherited from class adams.gui.core.BaseTreeNode
getChildren, getTransferData, getTransferDataFlavors, isDataFlavorSupported, toPlainText, toTransferable
-
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, 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
-
-
-
-
Field Detail
-
ROOT
public static final String ROOT
the label for the root node in case of multiple hierarchies.- See Also:
- Constant Field Values
-
m_Value
protected edu.stanford.nlp.trees.Tree m_Value
the underlying value.
-
-
Constructor Detail
-
StanfordNode
public StanfordNode(String label, edu.stanford.nlp.trees.Tree value)
Initializes the node with the specified label.- Parameters:
label
- the label for this nodevalue
- the parse sub-tree to attach, can be null
-
-
Method Detail
-
getLabel
public String getLabel()
Returns the label for this node.- Returns:
- the label
-
hasValue
public boolean hasValue()
Checks whether there is any JSON object attached.- Returns:
- true if a value is attached
-
getValue
public edu.stanford.nlp.trees.Tree getValue()
Returns the value for this node.- Returns:
- the value
-
-