|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.vt.marian.common.InfoDesc
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:
LinkDesc
,
ClassManager
Field Summary | |
static int |
BAD_PARAMS
|
protected Debug |
debug
Just for debugging |
protected java.util.Vector |
linkDescs
|
protected java.lang.Object |
nodeDesc
|
static int |
OK
return values for methods of this class |
Constructor Summary | |
InfoDesc(Debug d)
Create a new null InfoDesc. |
|
InfoDesc(java.lang.Object node,
Debug d)
Create an InfoDesc from a specific nodeDesc. |
|
InfoDesc(java.lang.Object node,
java.util.Vector links,
Debug d)
Create an InfoDesc from a specific nodeDesc. |
Method Summary | |
int |
addLinkDesc(java.lang.Object ld)
Add another link description to the set of links. |
java.util.Enumeration |
enumLinkDescs()
Return an enumeration through the link description set. |
boolean |
isValid()
Either the nodeDesc or the linkDescs (or both) must be valid, although either can also be null (but not both!). |
int |
numLinkDescs()
|
int |
setNodeDesc(java.lang.Object node)
Set the node description part. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected Debug debug
protected java.lang.Object nodeDesc
protected java.util.Vector linkDescs
public static final int OK
public static final int BAD_PARAMS
Constructor Detail |
public InfoDesc(Debug d)
d
- the eternal Debug object.public InfoDesc(java.lang.Object node, Debug d)
node
- A node description: either classID, FullID, or Function.d
- the eternal Debug object.public InfoDesc(java.lang.Object node, java.util.Vector links, Debug d)
node
- A node description: either ClassID, FullID, or Function.d
- the eternal Debug object.Method Detail |
public boolean isValid()
public int setNodeDesc(java.lang.Object node)
node
- A node description: either ClassID, FullID, or Function.public int addLinkDesc(java.lang.Object ld)
link
- A link description: currently, only LinkDesc allowed.public int numLinkDescs()
public java.util.Enumeration enumLinkDescs()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |