All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----edu.vt.marian.common.InfoDesc
Specifically, an InfoDesc is composed of a node description plus any number of link descriptions. For the purposes of Java, we are declaring both node and link descriptions to be of class Object, so that several disparate types of descriptions can be accomodated. Only certain kinds of Objects will actually do in either case, whence the if-else if-else statements in setNodeDesc() and addLinkDesc(). These statements are deliberately designed to be extensible, so that other description types can be added in future.
The function of a node description is to describe a (subset) of nodes within some class. Any class of nodes can define one or more matching functions. In addition, all node classes support match by classID, (including subclass ID) and by exact FullID. Most also support match by exact object. Any further match is to be specified by an encoded function, which the class manager will apply to its collection of instances.
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 this 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:
protected Debug debug
protected Object nodeDesclinkDescs
protected Vector linkDescsOK
public static final int OK
public static final int BAD_PARAMS
public InfoDesc(Debug d)
public InfoDesc(Object node, Debug d)
public InfoDesc(Object node, Vector links, Debug d)
public boolean isValid()
public int setNodeDesc(Object node)
public Object getNodeDesc()
public int addLinkDesc(Object ld)
public int numLinkDescs()enumLinkDescs
public Enumeration enumLinkDescs()
All Packages Class Hierarchy This Package Previous Next Index