public class NonTerminal extends GraphNode implements PhraseStructureNode, NonTerminalNode
| Modifier and Type | Field and Description |
|---|---|
protected java.util.SortedSet<PhraseStructureNode> |
children |
protected int |
index |
static int |
INDEX_OFFSET |
protected PhraseStructureNode |
parent |
incomingEdges, outgoingEdges| Constructor and Description |
|---|
NonTerminal() |
getIncomingEdgeIterator, getIncomingSecondaryEdges, getInDegree, getLeftmostDescendantIndex, getLeftmostProperDescendantIndex, getOutDegree, getOutgoingEdgeIterator, getOutgoingSecondaryEdges, getRightmostDescendantIndex, getRightmostProperDescendantIndexaddLabel, addLabel, addLabel, compareTo, getBelongsToGraph, getLabelCode, getLabelSet, getLabelSymbol, getLabelTypes, hasLabel, isLabeled, nLabels, removeLabel, removeLabels, setBelongsToGraphaddObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChangedclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetIncomingSecondaryEdges, getInDegree, getLeftmostDescendantIndex, getLeftmostProperDescendantIndex, getOutDegree, getOutgoingSecondaryEdges, getRightmostDescendantIndex, getRightmostProperDescendantIndexaddLabel, addLabel, addLabel, getBelongsToGraph, getLabelCode, getLabelSet, getLabelSymbol, getLabelTypes, hasLabel, isLabeled, nLabels, removeLabel, removeLabels, setBelongsToGraphpublic static final int INDEX_OFFSET
protected final java.util.SortedSet<PhraseStructureNode> children
protected PhraseStructureNode parent
protected int index
public NonTerminal() throws MaltChainedException
MaltChainedExceptionpublic void addIncomingEdge(Edge in) throws MaltChainedException
addIncomingEdge in interface NodeaddIncomingEdge in class GraphNodeMaltChainedExceptionpublic void removeIncomingEdge(Edge in) throws MaltChainedException
removeIncomingEdge in interface NoderemoveIncomingEdge in class GraphNodeMaltChainedExceptionpublic void addOutgoingEdge(Edge out) throws MaltChainedException
addOutgoingEdge in interface NodeaddOutgoingEdge in class GraphNodeMaltChainedExceptionpublic void removeOutgoingEdge(Edge out) throws MaltChainedException
removeOutgoingEdge in interface NoderemoveOutgoingEdge in class GraphNodeMaltChainedExceptionpublic PhraseStructureNode getParent()
getParent in interface PhraseStructureNodepublic Edge getParentEdge() throws MaltChainedException
getParentEdge in interface PhraseStructureNodeMaltChainedExceptionpublic java.lang.String getParentEdgeLabelSymbol(SymbolTable table) throws MaltChainedException
getParentEdgeLabelSymbol in interface PhraseStructureNodeMaltChainedExceptionpublic int getParentEdgeLabelCode(SymbolTable table) throws MaltChainedException
getParentEdgeLabelCode in interface PhraseStructureNodeMaltChainedExceptionpublic boolean hasParentEdgeLabel(SymbolTable table) throws MaltChainedException
hasParentEdgeLabel in interface PhraseStructureNodeMaltChainedExceptionpublic int getHeight()
getHeight in interface NonTerminalNodepublic java.util.SortedSet<PhraseStructureNode> getChildren()
getChildren in interface NonTerminalNodepublic PhraseStructureNode getChild(int index)
getChild in interface NonTerminalNodepublic PhraseStructureNode getLeftChild()
getLeftChild in interface NonTerminalNodepublic PhraseStructureNode getRightChild()
getRightChild in interface NonTerminalNodepublic int nChildren()
nChildren in interface NonTerminalNodepublic boolean hasNonTerminalChildren()
hasNonTerminalChildren in interface NonTerminalNodepublic boolean hasTerminalChildren()
hasTerminalChildren in interface NonTerminalNodepublic TokenNode getLexicalHead(HeadRules headRules) throws MaltChainedException
getLexicalHead in interface NonTerminalNodeMaltChainedExceptionpublic PhraseStructureNode getHeadChild(HeadRules headRules) throws MaltChainedException
getHeadChild in interface NonTerminalNodeMaltChainedExceptionpublic TokenNode getLexicalHead() throws MaltChainedException
getLexicalHead in interface NonTerminalNodeMaltChainedExceptionpublic PhraseStructureNode getHeadChild() throws MaltChainedException
getHeadChild in interface NonTerminalNodeMaltChainedExceptionpublic TokenNode identifyHead(HeadRules headRules) throws MaltChainedException
identifyHead in interface NonTerminalNodeMaltChainedExceptionpublic int getIndex()
ComparableNodegetIndex in interface ComparableNodegetIndex in class GraphNodepublic int getCompareToIndex()
ComparableNodegetCompareToIndex in interface ComparableNodepublic boolean isContinuous()
isContinuous in interface NonTerminalNodepublic boolean isContinuousExcludeTerminalsAttachToRoot()
isContinuousExcludeTerminalsAttachToRoot in interface NonTerminalNodepublic boolean isRoot()
ComparableNodeisRoot in interface ComparableNodeisRoot in class GraphNodepublic ComparableNode getLeftmostProperDescendant()
ComparableNodegetLeftmostProperDescendant in interface ComparableNodepublic ComparableNode getRightmostProperDescendant()
ComparableNodegetRightmostProperDescendant in interface ComparableNodepublic ComparableNode getLeftmostDescendant() throws MaltChainedException
ComparableNodegetLeftmostDescendant in interface ComparableNodeMaltChainedExceptionpublic ComparableNode getRightmostDescendant() throws MaltChainedException
ComparableNodegetRightmostDescendant in interface ComparableNodeMaltChainedExceptionpublic void setIndex(int index) throws MaltChainedException
setIndex in interface NodesetIndex in class GraphNodeMaltChainedExceptionpublic void clear() throws MaltChainedException
GraphElementclear in interface Elementclear in class GraphNodeMaltChainedExceptionpublic int compareTo(ComparableNode o)
compareTo in interface java.lang.Comparable<ComparableNode>compareTo in class GraphNodeCopyright 2007-2017 Johan Hall, Jens Nilsson and Joakim Nivre.