Release Planner v1.0

rp.util.dom
Class DOMRelation.Instance

java.lang.Object
  |
  +--rp.util.TwoList
        |
        +--rp.util.dom.DOMObject
              |
              +--rp.util.dom.DOMRelation.Instance
Direct Known Subclasses:
DevelopsSoftware, HasFeatureReleases, HasUsers
Enclosing class:
DOMRelation

public abstract static class DOMRelation.Instance
extends DOMObject

Baseclass for relationship instances. Each instance represents a link between two DOMObjects. Note that a relationship instance is itself a DOMOBject (and hence can pariticpate in relations). This is how ternary and higher-order relationships are implemented in the framework.


Nested Class Summary
static interface DOMRelation.Instance.Iterator
          Used to iterate across the instances of a relationship.
 
Nested classes inherited from class rp.util.dom.DOMObject
DOMObject.Iterator
 
Nested classes inherited from class rp.util.TwoList
TwoList.IteratorA, TwoList.IteratorB
 
Field Summary
static int MANY
          represents an infinite maximum numericity
 
Fields inherited from class rp.util.TwoList
headA, headB, nextA, nextB, numsA, numsB, prevA, prevB
 
Constructor Summary
protected DOMRelation.Instance(DOMRelation.Left left, DOMRelation.Right right)
          Create a new relationship instance between the two object end-points.
 
Method Summary
 DOMRelation.Left getLeftEndpoint()
          Get the left endpoint of this relationship instance.
 DOMObject getLeftObject()
          Get the object on the left of this relationship instance.
abstract  DOMRelation getRelation()
          Return the meta-object representing the relationship of which this instance is a part.
 DOMRelation.Right getRightEndpoint()
          Get the right endpoint of this relationship instance.
 DOMObject getRightObject()
          Get the object on the right of this relationship instance.
 void rm()
          Remove the relationship between the two objects.
 
Methods inherited from class rp.util.TwoList
addA, addB, countA, countB, decommissionAsHeadA, decommissionAsHeadB, firstA, firstB, headA, headB, initAsHeadA, initAsHeadB, isElementA, isElementB, isHeadA, isHeadB, rmA, rmB
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MANY

public static final int MANY
represents an infinite maximum numericity

See Also:
Constant Field Values
Constructor Detail

DOMRelation.Instance

protected DOMRelation.Instance(DOMRelation.Left left,
                               DOMRelation.Right right)
Create a new relationship instance between the two object end-points.

Parameters:
left - the relationship end-point of the object on the left of the relationship
right - the relationship end-point of the object on the right of the relationship
Method Detail

rm

public void rm()
Remove the relationship between the two objects.


getLeftEndpoint

public DOMRelation.Left getLeftEndpoint()
Get the left endpoint of this relationship instance.

Returns:
the left endpoint of this relationship instance

getLeftObject

public DOMObject getLeftObject()
Get the object on the left of this relationship instance.

Returns:
the object on the left of this relationship instance

getRightEndpoint

public DOMRelation.Right getRightEndpoint()
Get the right endpoint of this relationship instance.

Returns:
the right endpoint of this relationship instance

getRightObject

public DOMObject getRightObject()
Get the object on the right of this relationship instance.

Returns:
the object on the right of this relationship instance

getRelation

public abstract DOMRelation getRelation()
Return the meta-object representing the relationship of which this instance is a part. Users of the DOMRelation framework must declare and initialize a (typically) static DOMRelation meta-object. They must then derive a relationship class from this class, and implement this method to return the meta-relation object.


Release Planner v1.0