uk.ac.ucl.cs.uml.jmi.Foundation.Core
Interface Constraint

All Superinterfaces:
Element, ExtObject, ModelElement, javax.jmi.reflect.RefBaseObject, javax.jmi.reflect.RefFeatured, javax.jmi.reflect.RefObject
All Known Implementing Classes:
Constraint_Impl

public interface Constraint
extends ModelElement

A constraint is a semantic condition or restriction expressed in text. In the metamodel, a Constraint is a BooleanExpression on an associated ModelElement(s), which must be true for the model to be well formed. This restriction can be stated in natural language, or in different kinds of languages with a well defined semantics. Certain Constraints are predefined in the UML, others may be user defined. Note that a Constraint is an assertion, not an executable mechanism. It indicates a restriction that must be enforced by correct design of a system.


Method Summary
 BooleanExpression getBody()
          A BooleanExpression that must be true when evaluated for an instance of a system to be well formed.
 List getConstrainedElement()
          A ModelElement or list of ModelElements affected by the Constraint.
 Stereotype getConstrainedStereotype()
          Not documented in spec!
 void setBody(BooleanExpression body)
          Setter for atomic property body)
 void setConstrainedStereotype(Stereotype constrainedStereotype)
          Setter for atomic property constrainedStereotype)
 
Methods inherited from interface uk.ac.ucl.cs.uml.jmi.Foundation.Core.ModelElement
getAsArgument, getBehavior, getClientDependency, getComment, getConstraint, getContainer, getDefaultElement, getIsSpecification, getName, getNamespace, getPackage, getPresentation, getReferenceTag, getSourceFlow, getStereotype, getSupplierDependency, getTaggedValue, getTargetFlow, getTemplate, getTemplateArgument, getTemplateParameter, getVisibility, setDefaultElement, setIsSpecification, setName, setNamespace, setTemplate, setVisibility
 
Methods inherited from interface uk.ac.ucl.cs.emofocl.jmi.reflect.extended.ExtObject
extAddObjectListener, extDeepCopy, extDeepCopy, extEquals, extRemoveObjectListener, extValueHash, extVisit
 
Methods inherited from interface javax.jmi.reflect.RefObject
refClass, refDelete, refImmediateComposite, refIsInstanceOf, refOutermostComposite
 
Methods inherited from interface javax.jmi.reflect.RefFeatured
refGetValue, refGetValue, refInvokeOperation, refInvokeOperation, refSetValue, refSetValue
 
Methods inherited from interface javax.jmi.reflect.RefBaseObject
equals, hashCode, refImmediatePackage, refMetaObject, refMofId, refOutermostPackage, refVerifyConstraints
 

Method Detail

getBody

BooleanExpression getBody()
                          throws javax.jmi.reflect.JmiException
A BooleanExpression that must be true when evaluated for an instance of a system to be well formed.

Throws:
javax.jmi.reflect.JmiException

setBody

void setBody(BooleanExpression body)
             throws javax.jmi.reflect.JmiException
Setter for atomic property body)

Throws:
javax.jmi.reflect.JmiException

getConstrainedElement

List getConstrainedElement()
                           throws javax.jmi.reflect.JmiException
A ModelElement or list of ModelElements affected by the Constraint. If the constrained element is a Stereotype, then the constraint applies to all ModelElements that use the stereotype.

Throws:
javax.jmi.reflect.JmiException

getConstrainedStereotype

Stereotype getConstrainedStereotype()
                                    throws javax.jmi.reflect.JmiException
Not documented in spec!

Throws:
javax.jmi.reflect.JmiException

setConstrainedStereotype

void setConstrainedStereotype(Stereotype constrainedStereotype)
                              throws javax.jmi.reflect.JmiException
Setter for atomic property constrainedStereotype)

Throws:
javax.jmi.reflect.JmiException