SyntaxNode< T > Class Reference

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

List of all members.

Public Methods

 SyntaxNode (SyntaxTree< T > main, T subTree, NonTerminalNode< T > parent)
 SyntaxNode ()
getRoot ()
long getId ()
void setId (long id)
getTree ()
INonTerminalNode getParent ()
List< ISyntaxNodegetPathTo (INonTerminalNode nodeOnParentPath)
int hashCode ()
boolean equals (Object obj)
void visit (ISyntaxTreeVisitor visitor)
boolean cCommands (ISyntaxNode other)
boolean dominates (ISyntaxNode other)
abstract boolean isPhrasal ()
boolean isTerminalNode ()
List< ITreeConstituentgetConstituents ()
String getLabel ()

Protected Attributes

SyntaxTree< T > sentenceTree

Constructors

SyntaxNode ( SyntaxTree< T >  main,
subTree,
NonTerminalNode< T >  parent 
)
SyntaxNode ( )

Method Details

boolean cCommands ( ISyntaxNode< T >  other)

Implements ISyntaxNode.

boolean dominates ( ISyntaxNode< T >  other)

Implements ISyntaxNode.

Reimplemented in TerminalNode< T >.

boolean equals ( Object  obj)
List<ITreeConstituent> getConstituents ( ) [inherited]

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

Returns:

Implemented in TerminalNode< T >.

long getId ( )

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 ( )

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)

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 ( )

Returns the root of the subtree

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

Implements ISyntaxNode.

Implemented in NonTerminalNode< T >, and TerminalNode< T >.

boolean isTerminalNode ( ) [inherited]

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

Returns:

Implemented in NonTerminalNode< T >, and TerminalNode< T >.

void setId ( long  id)

Set the Id of this DataObject.

Parameters:
id

Implements DataObject.

void visit ( ISyntaxTreeVisitor  visitor)

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

SyntaxTree<T> sentenceTree [protected]