de.tuberlin.cs.cis.ocl.model.uml
Class UmlClassifier

java.lang.Object
  |
  +--de.tuberlin.cs.cis.ocl.model.mofbridge.MofClassifier
        |
        +--de.tuberlin.cs.cis.ocl.model.uml.UmlClassifier
All Implemented Interfaces:
ClassifierDescriptor

public class UmlClassifier
extends MofClassifier

Represents a refined UML Classifier description. Attributes are handled as associations, in order to circumvent multiplicities unequal to one.

Author:
fchabar

Constructor Summary
UmlClassifier(javax.jmi.model.Classifier cl, ConceptFactory oclMapper)
          Constructs a UML Classifier description.
 
Method Summary
 TypedAssociation getAssociation(java.lang.String assocName, Type[] qualifiers)
          Resolves and returns the specified association qualifiable by the specified qualifier parameters on this type.
 TypedProperty getAttribute(java.lang.String attrName, boolean classScoped)
          The method is redefined to declare an attribute as an association for the validator.
 
Methods inherited from class de.tuberlin.cs.cis.ocl.model.mofbridge.MofClassifier
equals, getClassifier, getName, getOclSupertype, getOperation, hashCode, isStateDefined, isSubtypeOf, supertype, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UmlClassifier

public UmlClassifier(javax.jmi.model.Classifier cl,
                     ConceptFactory oclMapper)
Constructs a UML Classifier description.

Parameters:
cl - a classifier.
oclMapper - a conceptual binding.
Method Detail

getAssociation

public TypedAssociation getAssociation(java.lang.String assocName,
                                       Type[] qualifiers)
                                throws UndefinedFeatureException
Description copied from interface: ClassifierDescriptor
Resolves and returns the specified association qualifiable by the specified qualifier parameters on this type. The association is specified via its role-name. The qualifiers can be used denotationally so that the type can also be predefined (for example an integer). If the qualifier is a model type the qualifiers will be instances of de.tuberlin.cs.cis.ocl.type.ModelType.

Specified by:
getAssociation in interface ClassifierDescriptor
Overrides:
getAssociation in class MofClassifier
Parameters:
assocName - the role-name of the association/navigation.
Returns:
the specified association
UndefinedFeatureException
See Also:
ModelType.isDescribedBy(ClassifierDescriptor)

getAttribute

public TypedProperty getAttribute(java.lang.String attrName,
                                  boolean classScoped)
                           throws UndefinedFeatureException
The method is redefined to declare an attribute as an association for the validator.

Specified by:
getAttribute in interface ClassifierDescriptor
Overrides:
getAttribute in class MofClassifier
Parameters:
attrName - the name of the attribute
classScoped - true if the attribute is called on the classifier itself.
Returns:
the attribute on this type.
Throws:
UndefinedFeatureException - if the attribute is not defined on this type.