All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class edu.vt.marian.common.InfoDesc

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

public class InfoDesc
extends Object
A Information Description is a description of a digital information object in context. In MARIAN representation terms, we will understand this as a node within a web of links.

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:

See Also:
LinkDesc, ClassManager

Variable Index

 o BAD_PARAMS
 o debug
Just for debugging
 o linkDescs
 o nodeDesc
 o OK
return values for methods of this class

Constructor Index

 o InfoDesc(Debug)
Create a new null InfoDesc.
 o InfoDesc(Object, Debug)
Create an InfoDesc from a specific nodeDesc.
 o InfoDesc(Object, Vector, Debug)
Create an InfoDesc from a specific nodeDesc.

Method Index

 o addLinkDesc(Object)
Add another link description to the set of links.
 o enumLinkDescs()
Return an enumeration through the link description set.
 o getNodeDesc()
Get the node description part.
 o isValid()
Either the nodeDesc or the linkDescs (or both) must be valid, although either can also be null (but not both!).
 o numLinkDescs()
 o setNodeDesc(Object)
Set the node description part.

Variables

 o debug
 protected Debug debug
Just for debugging

 o nodeDesc
 protected Object nodeDesc
 o linkDescs
 protected Vector linkDescs
 o OK
 public static final int OK
return values for methods of this class

 o BAD_PARAMS
 public static final int BAD_PARAMS

Constructors

 o InfoDesc
 public InfoDesc(Debug d)
Create a new null InfoDesc.

Parameters:
d - the eternal Debug object.
 o InfoDesc
 public InfoDesc(Object node,
                 Debug d)
Create an InfoDesc from a specific nodeDesc.

Parameters:
node - A node description: either classID, FullID, or Function.
d - the eternal Debug object.
 o InfoDesc
 public InfoDesc(Object node,
                 Vector links,
                 Debug d)
Create an InfoDesc from a specific nodeDesc.

Parameters:
node - A node description: either ClassID, FullID, or Function.
d - the eternal Debug object.

Methods

 o isValid
 public boolean isValid()
Either the nodeDesc or the linkDescs (or both) must be valid, although either can also be null (but not both!).

 o setNodeDesc
 public int setNodeDesc(Object node)
Set the node description part.

Parameters:
node - A node description: either ClassID, FullID, or Function.
 o getNodeDesc
 public Object getNodeDesc()
Get the node description part.

 o addLinkDesc
 public int addLinkDesc(Object ld)
Add another link description to the set of links.

Parameters:
link - A link description: currently, only LinkDesc allowed.
 o numLinkDescs
 public int numLinkDescs()
 o enumLinkDescs
 public Enumeration enumLinkDescs()
Return an enumeration through the link description set.


All Packages  Class Hierarchy  This Package  Previous  Next  Index