|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.ml.tigerxml.Path
public class Path
Represents a path leading through the syntax tree that connects two
nodes. To instantiate this class use #getPathToTop(GraphNodenode)
or #makePath(GraphNodestart_node,GraphNodeend_node).
| Field Summary | |
|---|---|
protected boolean |
end_below_start
DOCUMENT ME! |
protected boolean |
start_below_end
DOCUMENT ME! |
protected java.util.ArrayList |
steps
DOCUMENT ME! |
protected int |
verbosity
The higher this value the more process and debug information will written to stderr. |
| Method Summary | |
|---|---|
GraphNode |
getFirst()
Returns the first GraphNode in this Path. |
GraphNode |
getLast()
Returns the last GraphNode in this Path. |
GraphNode |
getNext()
Returns the next GraphNode in this Path relative to the current position of this Path (iteration based method). |
static Path |
getPathToTop(GraphNode node)
This static method creates a path leading from the input node to the root node of the sentence. |
static Path |
getPathToTop(GraphNode node,
int verbosity)
This static method creates a path leading from the input node to the root node of the sentence. |
GraphNode |
getPrev()
Returns the previous GraphNode in this Path relative to the current position of this Path (iteration based method). |
int |
getVerbosity()
Gets the currently set level of verbosity of this instance. |
boolean |
hasNext()
Checks if there are more GraphNodes available on this path after the current cursor position of this instance. |
boolean |
hasPrev()
Checks if there are more GraphNodes available on this path before the current cursor position of this instance. |
void |
invert()
Inverts this path by reversing the order of the nodes and re-setting their directions (UP --> DOWN; DOWN --> UP). |
static Path |
makePath(GraphNode start_node,
GraphNode end_node)
This static method returns the shortest path that connects the two nodes. |
protected boolean |
oneArgumentDomain()
DOCUMENT ME! |
void |
removeFirst()
DOCUMENT ME! |
void |
removeLast()
DOCUMENT ME! |
void |
setVerbosity(int verbosity)
Sets the currently set level of verbosity of this instance. |
java.lang.String |
toGildeaStyleString()
Returns a string representation of this Path similar to that used by Daniel Gildea. |
java.lang.String |
toString()
Returns a string representation of this Path. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.util.ArrayList steps
protected boolean start_below_end
protected boolean end_below_start
protected int verbosity
| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toGildeaStyleString()
protected boolean oneArgumentDomain()
public static final Path getPathToTop(GraphNode node)
#makePath(GraphNodestart_node,GraphNodeend_node) to instantiate this
class.
node - The GraphNode to start the path from.
public static final Path getPathToTop(GraphNode node,
int verbosity)
#makePath(GraphNodestart_node,GraphNodeend_node) to instantiate this
class.
node - The GraphNode to start the path from.verbosity - DOCUMENT ME!
public static final Path makePath(GraphNode start_node,
GraphNode end_node)
start_node - The first GraphNode to connect.end_node - The second GraphNode to connect.
public void invert()
public GraphNode getPrev()
public boolean hasPrev()
public GraphNode getNext()
public boolean hasNext()
public GraphNode getFirst()
public GraphNode getLast()
public void removeFirst()
public void removeLast()
public int getVerbosity()
public void setVerbosity(int verbosity)
verbosity - The level of verbosity.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||