TerminalNode< T > Class Reference

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

List of all members.

Public Methods

Annotation<?extends ITokengetToken ()
 TerminalNode ()
 TerminalNode (SyntaxTree< T > main, T child, NonTerminalNode< T > parent, Annotation< IToken > token)
boolean isTerminalNode ()
List< ITreeConstituentgetConstituents ()
String toString ()
boolean dominates (ISyntaxNode other)
boolean isPhrasal ()
String getLabel ()
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)

Protected Attributes

SyntaxTree< T > sentenceTree


TerminalNode ( )
TerminalNode ( SyntaxTree< T >  main,
NonTerminalNode< T >  parent,
Annotation< IToken token 

Method Details

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

Implements ISyntaxNode.

boolean dominates ( ISyntaxNode  other)

As a terminal node cannot dominate another node, this method always returns false.

Reimplemented from SyntaxNode< T >.

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

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


Implements ISyntaxNode.

long getId ( ) [inherited]

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


Implements DataObject.

String getLabel ( )

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.

Implements ILabeledElement.

INonTerminalNode getParent ( ) [inherited]

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


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.


Implements ISyntaxNode.

T getRoot ( ) [inherited]

Returns the root of the subtree

Annotation<? extends IToken> getToken ( )

Implements ITerminalNode.

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

Implements SyntaxNode< T >.

boolean isTerminalNode ( )

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


Implements ISyntaxNode.

void setId ( long  id) [inherited]

Set the Id of this DataObject.


Implements DataObject.

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

Implements ISyntaxNode.

Field Details

SyntaxTree<T> sentenceTree [protected, inherited]