net.sf.farrago.cwm.core
Interface CwmConstraint

All Superinterfaces:
CwmElement, CwmModelElement, RefBaseObject, RefFeatured, RefObject
All Known Subinterfaces:
CwmCheckConstraint
All Known Implementing Classes:
CwmCheckConstraint$Hib, CwmConstraint$Hib

public interface CwmConstraint
extends CwmModelElement

Constraint object instance interface. 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 well-defined semantics. Certain Constraints are predefined, others may be user defined. Note that a Constraint is an assertion, not an executable mechanism. The specification is written as an expression in a designated constraint language. The language can be specially designed for writing constraints (such as OCL), a programming language, mathematical notation, or natural language. If constraints are to be enforced by a model editor tool, then the tool must understand the syntax and semantics of the constraint language. Because the choice of language is arbitrary, constraints can be used as an extension mechanism. The constraint concept allows new semantics to be specified linguistically for a model element. In the metamodel a Constraint directly attached to a ModelElement describes semantic restrictions that this ModelElement must obey.

Note: This type should not be subclassed, implemented or directly instantiated by clients. It is generated from a MOF metamodel and implemented by Enki or MDR.


Method Summary
 CwmBooleanExpression getBody()
          Returns the value of attribute body.
 List<CwmModelElement> getConstrainedElement()
          Returns the value of reference constrainedElement.
 void setBody(CwmBooleanExpression newValue)
          Sets the value of body attribute.
 
Methods inherited from interface net.sf.farrago.cwm.core.CwmModelElement
getClientDependency, getConstraint, getImporter, getName, getNamespace, getVisibility, setName, setNamespace, setVisibility
 
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

CwmBooleanExpression getBody()
Returns the value of attribute body. A BooleanExpression that must be true when evaluated for an instance of a system to be well-formed. A boolean expression defining the constraint. Expressions are written as strings in a designated language. For the model to be well formed, the expression must always yield a true value when evaluated for instances of the constrained elements at any time when the system is stable (i.e., not during the execution of an atomic operation).

Returns:
Value of attribute body.

setBody

void setBody(CwmBooleanExpression newValue)
Sets the value of body attribute. See getBody() for description on the attribute.

Parameters:
newValue - New value to be set.

getConstrainedElement

List<CwmModelElement> getConstrainedElement()
Returns the value of reference constrainedElement.

Returns:
Value of reference constrainedElement. Element type: CwmModelElement