org.eigenbase.jmi
Class JmiAssocEdge
java.lang.Object
  
org.jgrapht.graph.DefaultEdge
      
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
 
 - if an end is composite, it is the source end
 
 - else if an end has multiplicity > 1, it is the target end if the other
 end has multiplicity <= 1
 
 - else if an end is ordered, it is the target end
 
 - otherwise, the first end is the source end and the second end is the
 target end
 
 
- Version:
 
  - $Id: //open/dev/farrago/src/org/eigenbase/jmi/JmiAssocEdge.java#9 $
 
- Author:
 
  - John V. Sichi
 
- See Also:
 - Serialized Form
 
 
 
 
 
mofAssoc
private final Association mofAssoc
mofAssocEnds
private final AssociationEnd[] mofAssocEnds
refAssoc
RefAssociation refAssoc
JmiAssocEdge
JmiAssocEdge(Association mofAssoc,
             AssociationEnd[] mofAssocEnds)
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