edu.vt.marian.common
Class LinkDesc

java.lang.Object
  |
  +--edu.vt.marian.common.LinkDesc

public class LinkDesc
extends java.lang.Object

At the moment, we are only allowing a link description to consist of an exact description of a single link. Future implementations may allow link variables and link operators. A single link is fully described by specifying its type and describing the nodes at source end and sink end. In the current context, we know the description of the node at one end (the "target" end): that is the node described in the node portion of some InfoDesc. The node at the other end (the "key" end) is described by a further InfoDesc. Thus each member of the linkDesc Vector is composed of three elements:

See Also:
InfoDesc

Field Summary
static int ANY_DIRECTION
           
protected  int classID
           
protected  Debug debug
          Just for debugging
protected  int direction
           
static int INVALID_DIRECTION
          The possible directions.
protected  InfoDesc keyDesc
           
static int SINK_TO_SOURCE
           
static int SOURCE_TO_SINK
           
 
Constructor Summary
LinkDesc(Debug d)
          Create a new null LinkDesc.
LinkDesc(int linkClID, int dir, InfoDesc key, Debug d)
          Create a new LinkDesc from full specifications.
 
Method Summary
 int getClassID()
           
 int getDirection()
           
 InfoDesc getKeyDesc()
           
 boolean isValid()
           
static boolean isValidDirection(int dir)
          A little utility.
 void setClassID(int linkClID)
           
 void setDirection(int dir)
           
 void setKeyDesc(InfoDesc key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

protected Debug debug
Just for debugging

classID

protected int classID

direction

protected int direction

keyDesc

protected InfoDesc keyDesc

INVALID_DIRECTION

public static final int INVALID_DIRECTION
The possible directions.

SOURCE_TO_SINK

public static final int SOURCE_TO_SINK

SINK_TO_SOURCE

public static final int SINK_TO_SOURCE

ANY_DIRECTION

public static final int ANY_DIRECTION
Constructor Detail

LinkDesc

public LinkDesc(Debug d)
Create a new null LinkDesc.
Parameters:
d - -- the eternal Debug object.

LinkDesc

public LinkDesc(int linkClID,
                int dir,
                InfoDesc key,
                Debug d)
Create a new LinkDesc from full specifications.
Parameters:
linkClID - (possibly super-) class for matching links.
dir - direction for links to run.
key - InfoDesc for node at other end of link.
d - the eternal Debug object.
Method Detail

isValid

public boolean isValid()

isValidDirection

public static boolean isValidDirection(int dir)
A little utility.

setClassID

public void setClassID(int linkClID)

getClassID

public int getClassID()

setDirection

public void setDirection(int dir)

getDirection

public int getDirection()

setKeyDesc

public void setKeyDesc(InfoDesc key)

getKeyDesc

public InfoDesc getKeyDesc()