public class TreeGraphNodeFactory extends java.lang.Object implements TreeFactory
TreeGraphNodeFactory acts as a factory for creating
tree nodes of type TreeGraphNode. Unless
another LabelFactory is supplied, it will use a CoreLabelFactory
by default.| Constructor and Description |
|---|
TreeGraphNodeFactory()
Make a
TreeFactory that produces
TreeGraphNodes. |
TreeGraphNodeFactory(LabelFactory mlf)
Make a
TreeFactory that produces
TreeGraphNodes. |
| Modifier and Type | Method and Description |
|---|---|
Tree |
newLeaf(Label label)
Create a new tree leaf node, with the given label.
|
Tree |
newLeaf(java.lang.String word)
Create a new tree leaf node, where the label is formed from
the
String passed in. |
Tree |
newTreeNode(Label parentLabel,
java.util.List<Tree> children)
Create a new tree non-leaf node, with the given label.
|
Tree |
newTreeNode(java.lang.String parent,
java.util.List<Tree> children)
Create a new tree non-leaf node, where the label is formed from
the
String passed in. |
public TreeGraphNodeFactory()
TreeFactory that produces
TreeGraphNodes. The labels are of class
CoreLabel.public TreeGraphNodeFactory(LabelFactory mlf)
TreeFactory that produces
TreeGraphNodes. The labels depend on the
LabelFactory.mlf - The LabelFactory to use for node labelspublic Tree newLeaf(java.lang.String word)
String passed in.newLeaf in interface TreeFactoryword - The word that will go into the tree label.public Tree newLeaf(Label label)
newLeaf in interface TreeFactorylabel - The label for the leaf nodepublic Tree newTreeNode(java.lang.String parent, java.util.List<Tree> children)
String passed in.newTreeNode in interface TreeFactoryparent - The string that will go into the parent tree label.children - The list of daughters of this tree. The children
may be a (possibly empty) List of children or
nullpublic Tree newTreeNode(Label parentLabel, java.util.List<Tree> children)
newTreeNode in interface TreeFactoryparentLabel - The label for the parent tree node.children - The list of daughters of this tree. The children
may be a (possibly empty) List of children or
null