NonTerminalNode< T > Class Reference

Inheritance diagram for NonTerminalNode< T >:
Collaboration diagram for NonTerminalNode< T >:

List of all members.

Public Methods

 NonTerminalNode (SyntaxTree< T > main, T root, NonTerminalNode< T > parent)
 NonTerminalNode ()
abstract int annotate (int currentWord, List< Annotation< IToken >> terminals)
boolean isTerminalNode ()
List< ITerminalNodegetDirectTerminalChildren ()
List< ITerminalNodegetAllTerminalChildren ()
List< INonTerminalNodegetDirectNonTerminalChildren ()
Collection< ISyntaxNodegetAllChildren ()
List< ISyntaxNodegetDirectChildren ()
boolean isPhrasal ()
int hashCode ()
getRoot ()
long getId ()
void setId (long id)
getTree ()
INonTerminalNode getParent ()
List< ISyntaxNodegetPathTo (INonTerminalNode nodeOnParentPath)
boolean equals (Object obj)
void visit (ISyntaxTreeVisitor visitor)
boolean cCommands (ISyntaxNode other)
boolean dominates (ISyntaxNode other)
List< ITreeConstituentgetConstituents ()
String getLabel ()

Protected Attributes

List< ISyntaxNodechildren = new ArrayList<ISyntaxNode>()
SyntaxTree< T > sentenceTree

Constructors

NonTerminalNode ( SyntaxTree< T >  main,
root,
NonTerminalNode< T >  parent 
)
NonTerminalNode ( )

Method Details

abstract int annotate ( int  currentWord,
List< Annotation< IToken >>  terminals 
) [pure virtual]
boolean cCommands ( ISyntaxNode< T >  other) [inherited]

Implements ISyntaxNode.

boolean dominates ( ISyntaxNode< T >  other) [inherited]

Implements ISyntaxNode.

Reimplemented in TerminalNode< T >.

boolean equals ( Object  obj) [inherited]
Collection<ISyntaxNode> getAllChildren ( )

Returns all nodes in the subtree, excluding the root of the subtree.

Returns:

Implements INonTerminalNode.

List<ITerminalNode> getAllTerminalChildren ( )

Returns all terminal nodes of the tree

Returns:

Implements INonTerminalNode.

List<ITreeConstituent> getConstituents ( ) [inherited]

Returns the list of ITreeConstituent of this node. Never returns null.

Returns:

Implemented in TerminalNode< T >.

List<ISyntaxNode> getDirectChildren ( )

Returns all direct children of the node.

Returns:

Implements INonTerminalNode.

List<INonTerminalNode> getDirectNonTerminalChildren ( )

Returns all direct nonterminal child nodes of the tree.

Returns:

Implements INonTerminalNode.

List<ITerminalNode> getDirectTerminalChildren ( )

Returns all direct terminal child nodes of the tree

Returns:

Implements INonTerminalNode.

long getId ( ) [inherited]

Returns the Id of this DataObject. Might return 0, if the object hasn't been inserted into database yet.

Returns:
id

Implements DataObject.

String getLabel ( ) [inherited]

Returns the label of this token, which can be any kind of string (except null), mainly used for display-reasons only. Note: Components MUST NOT assume that any kind of label (like 'word' or else) is returned by this method.

Implemented in LabeledAnnotation, TerminalNode< T >, TEIDramaSpeaker, TEIDramaSpeechAct, TEIDramaStage, JodaDateTime, JodaInterval, JodaPeriod, Timex, Tweet, and TwitterEntity.

INonTerminalNode getParent ( ) [inherited]

Returns the parent node of this node, which is either a INonTerminalNode, or null (in case of the root node).

Returns:

Implements ISyntaxNode.

List<ISyntaxNode> getPathTo ( INonTerminalNode  nodeOnParentPath) [inherited]

Returns the path from the current node to the given node. The current node is not included in the path, but the referenced nodeOnParentPath is. If this method is called on the root node, the list is empty. If the method is called on a node with the node itself as argument, or with an argument which is not a node on the path to the root, the list is empty. If parameter nodeOnParentPath is null, the path to the root node will be returned.

Parameters:
nodeOnParentPath
Returns:

Implements ISyntaxNode.

T getRoot ( ) [inherited]

Returns the root of the subtree

Returns:
T getTree ( ) [inherited]
int hashCode ( ) [inherited]
boolean isPhrasal ( ) [virtual]

Implements SyntaxNode< T >.

boolean isTerminalNode ( )

Returns true if the node is a ITerminalNode, false otherwise.

Returns:

Implements ISyntaxNode.

void setId ( long  id) [inherited]

Set the Id of this DataObject.

Parameters:
id

Implements DataObject.

void visit ( ISyntaxTreeVisitor  visitor) [inherited]

To traverse the tree structure from the given node on, use an ISyntaxTreeVisitor on the current node.

See also:
ISyntaxTreeVisitor for details
Parameters:
visitor

Implements ISyntaxNode.


Field Details

List<ISyntaxNode> children = new ArrayList<ISyntaxNode>() [protected]
SyntaxTree<T> sentenceTree [protected, inherited]