org.eigenbase.jmi
Class JmiAssocEdge

java.lang.Object
  extended by org.jgrapht.graph.DefaultEdge
      extended by org.eigenbase.jmi.JmiAssocEdge
All Implemented Interfaces:
Serializable, Cloneable

public class JmiAssocEdge
extends org.jgrapht.graph.DefaultEdge

JmiAssocEdge represents an association in a JMI model. The source vertex is the class for the source end and the target vertex is the class for the target end, where

Version:
$Id: //open/dev/farrago/src/org/eigenbase/jmi/JmiAssocEdge.java#9 $
Author:
John V. Sichi
See Also:
Serialized Form

Field Summary
private  Association mofAssoc
           
private  AssociationEnd[] mofAssocEnds
           
(package private)  RefAssociation refAssoc
           
 
Constructor Summary
JmiAssocEdge(Association mofAssoc, AssociationEnd[] mofAssocEnds)
           
 
Method Summary
 Object clone()
           
 AssociationEnd getEnd(int iEnd)
          Retrieves an end of the association.
 Association getMofAssoc()
           
 RefAssociation getRefAssoc()
           
 AssociationEnd getSourceEnd()
           
 AssociationEnd getTargetEnd()
           
 boolean matchesMofDirection()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mofAssoc

private final Association mofAssoc

mofAssocEnds

private final AssociationEnd[] mofAssocEnds

refAssoc

RefAssociation refAssoc
Constructor Detail

JmiAssocEdge

JmiAssocEdge(Association mofAssoc,
             AssociationEnd[] mofAssocEnds)
Method Detail

getMofAssoc

public Association getMofAssoc()
Returns:
the MOF association represented by this edge

getRefAssoc

public RefAssociation getRefAssoc()
Returns:
the RefAssociation represented by this edge

getSourceEnd

public AssociationEnd getSourceEnd()
Returns:
the AssociationEnd for the source end

getTargetEnd

public AssociationEnd getTargetEnd()
Returns:
the AssociationEnd for the target end

matchesMofDirection

public boolean matchesMofDirection()
Returns:
true iff source end is MOF "first end"

getEnd

public AssociationEnd getEnd(int iEnd)
Retrieves an end of the association.

Parameters:
iEnd - ordinal of end to get (0 for source, 1 for target)
Returns:
the requested AssociationEnd

toString

public String toString()
Overrides:
toString in class org.jgrapht.graph.DefaultEdge

clone

public Object clone()
Overrides:
clone in class Object