de.dfki.lt.hog.container
Class GraphNode

java.lang.Object
  extended by de.dfki.lt.hog.container.GraphNode

public class GraphNode
extends java.lang.Object

Represents a graph node as in syntactic parse trees. Each graph node has daughters which can be graph nodes themselves.


Field Summary
protected static org.apache.log4j.Logger log
          A logger for Modules
 
Constructor Summary
GraphNode()
          Creates an empty node.
GraphNode(JToken token)
          Creates a node of type "w" using the given JToken.
 
Method Summary
 void addDaughter(GraphNode daughter)
           
 java.util.ArrayList getDaughters()
          Returns a copy of the daughters of this node.
 int getEnd()
           
 java.lang.String getId()
           
 JToken getJToken()
           
 java.lang.String getLabel()
           
 java.lang.String getPoscat()
           
 int getStart()
           
 java.lang.String getType()
           
 java.util.ArrayList getWords()
           
 boolean isTerminal()
           
 void setId(java.lang.String id)
           
 void setJToken(JToken token)
           
 void setLabel(java.lang.String label)
           
 void setPoscat(java.lang.String poscat)
           
 void setType(java.lang.String type)
           
 java.lang.String toString()
           
 java.lang.String toTreeString()
          Returns the tree structure of this GraphNode as a string.
 java.lang.String toXML()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static org.apache.log4j.Logger log
A logger for Modules

Constructor Detail

GraphNode

public GraphNode()
Creates an empty node.


GraphNode

public GraphNode(JToken token)
Creates a node of type "w" using the given JToken.

Parameters:
token -
Method Detail

setType

public void setType(java.lang.String type)

getType

public java.lang.String getType()

setJToken

public void setJToken(JToken token)

getJToken

public JToken getJToken()

setPoscat

public void setPoscat(java.lang.String poscat)

getPoscat

public java.lang.String getPoscat()

setLabel

public void setLabel(java.lang.String label)

getLabel

public java.lang.String getLabel()

setId

public void setId(java.lang.String id)

getId

public java.lang.String getId()

addDaughter

public void addDaughter(GraphNode daughter)

getDaughters

public java.util.ArrayList getDaughters()
Returns a copy of the daughters of this node.

Returns:
A copy of the daughters of this node.

isTerminal

public boolean isTerminal()

getStart

public int getStart()

getEnd

public int getEnd()

getWords

public java.util.ArrayList getWords()

toXML

public java.lang.String toXML()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toTreeString

public java.lang.String toTreeString()
Returns the tree structure of this GraphNode as a string.

Returns:
The tree structure of this GraphNode as a string.