org.jscience.ml.tigerxml.theories.hobbs78
Class MotherAndPath

java.lang.Object
  extended by org.jscience.ml.tigerxml.theories.hobbs78.MotherAndPath

public class MotherAndPath
extends java.lang.Object

This class is a helper class for Hobbs78.

A MotherAndPath object consists of an NT, the mother, and one of its daughters, the path.


Constructor Summary
MotherAndPath()
           
 
Method Summary
static MotherAndPath getFirstNpOrSLike(GraphNode my_node)
          This static method returns a MotherAndPath Object that corresponds to the first np or s-like node above my_node.
 NT getMother()
           
 java.util.ArrayList getOneSide(boolean left)
          This method returns the daughters of mother that are located either to the right hand side or to the left hand side of path.
 GraphNode getPath()
           
 void setMother(NT node)
           
 void setPath(GraphNode node)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MotherAndPath

public MotherAndPath()
Method Detail

setMother

public void setMother(NT node)

getMother

public NT getMother()

getPath

public GraphNode getPath()

setPath

public void setPath(GraphNode node)

getOneSide

public java.util.ArrayList getOneSide(boolean left)
This method returns the daughters of mother that are located either to the right hand side or to the left hand side of path. If the parameter left is set to true it returns the left hand side daughters.

Parameters:
left - If true: return the left hand side daughters, otherwise the right hand side daughters.
Returns:
The daughters of this MotherAndPath that are on the right/left hand side of the path.

getFirstNpOrSLike

public static final MotherAndPath getFirstNpOrSLike(GraphNode my_node)
This static method returns a MotherAndPath Object that corresponds to the first np or s-like node above my_node. The mother node corresponds to the np or s-like node in question and the path node corresponds to the path that leads from my_node to mother.

Parameters:
my_node - The node for which to find a corresponding MotherAndPath.
Returns:
The MotherAndPath that corresponds to the first np or s-like node above my_node.