net.sf.farrago.cwm.core
Interface CwmConstraintClass

All Superinterfaces:
RefBaseObject, RefClass, RefFeatured
All Known Implementing Classes:
CwmConstraintClass$Hib

public interface CwmConstraintClass
extends RefClass

Constraint class proxy 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
 CwmConstraint createCwmConstraint()
          The default factory operation used to create an instance object.
 CwmConstraint createCwmConstraint(String name, VisibilityKind visibility, CwmBooleanExpression body)
          Creates an instance object having attributes initialized by the passed values.
 
Methods inherited from interface javax.jmi.reflect.RefClass
refAllOfClass, refAllOfType, refCreateInstance, refCreateStruct, refCreateStruct, refGetEnum, refGetEnum
 
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

createCwmConstraint

CwmConstraint createCwmConstraint()
The default factory operation used to create an instance object.

Returns:
The created instance object.

createCwmConstraint

CwmConstraint createCwmConstraint(String name,
                                  VisibilityKind visibility,
                                  CwmBooleanExpression body)
Creates an instance object having attributes initialized by the passed values.

Parameters:
name - An identifier for the ModelElement within its containing Namespace.
visibility - Specifies extent of the visibility of the ModelElement within its owning Namespace.
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:
The created instance object.