de.tuberlin.cs.cis.ocl.model.mofbridge
Class MofAssociationEnd

java.lang.Object
  |
  +--de.tuberlin.cs.cis.ocl.model.mofbridge.MofFeature
        |
        +--de.tuberlin.cs.cis.ocl.model.mofbridge.MofAssociationEnd
All Implemented Interfaces:
TypedAssociation, TypedProperty

public class MofAssociationEnd
extends MofFeature
implements TypedAssociation

The MOF Collection is an ocl collection type that is constructable from a MOF Multiplicity Type.

Author:
fchabar

Field Summary
 
Fields inherited from interface de.tuberlin.cs.cis.ocl.model.check.TypedAssociation
UNBOUNDED
 
Constructor Summary
MofAssociationEnd(javax.jmi.model.AssociationEnd assocEnd, ConceptFactory oclMapper)
          Constructs a ocl collection type from a MOF multiplicity.
MofAssociationEnd(javax.jmi.model.StructuralFeature feature, ConceptFactory oclMapper)
           
 
Method Summary
 int getUpperMultiplicity()
          Returns the upper multiplicity of this association's association end (obtained by navigating the association).
 boolean isOrdered()
          Returns true if the navigation of this association should result in an ordered collection.
 
Methods inherited from class de.tuberlin.cs.cis.ocl.model.mofbridge.MofFeature
equals, getBehaviour, getType, toString
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.tuberlin.cs.cis.ocl.model.check.TypedProperty
getType
 

Constructor Detail

MofAssociationEnd

public MofAssociationEnd(javax.jmi.model.AssociationEnd assocEnd,
                         ConceptFactory oclMapper)
Constructs a ocl collection type from a MOF multiplicity. The result is either a Sequence, a Set or a Bag of type oclType, depending on if the multiplicity is ordered and/or unique. The upper and lower bound of the Multiplicity Type isn't considered at all, but can be checked with MofCollectionType#unbounded.


MofAssociationEnd

public MofAssociationEnd(javax.jmi.model.StructuralFeature feature,
                         ConceptFactory oclMapper)
Method Detail

getUpperMultiplicity

public int getUpperMultiplicity()
Description copied from interface: TypedAssociation
Returns the upper multiplicity of this association's association end (obtained by navigating the association). In OCL the multiplicities are classified into the multiplicities zero, one and others. These multiplicity-classes will be used to determine the result of the navigation over this association.

Specified by:
getUpperMultiplicity in interface TypedAssociation
Returns:
the upper multiplicity obtained by navigating this association.
See Also:
TypedAssociation.UNBOUNDED

isOrdered

public boolean isOrdered()
Description copied from interface: TypedAssociation
Returns true if the navigation of this association should result in an ordered collection. If that is the case the collection result of this navigation will be a Sequence.

Specified by:
isOrdered in interface TypedAssociation
Returns:
true if the association is adorned with {ordered}, otherwise false.