Class UML 2.4.1::Constraint
Description:
A constraint is a condition or restriction expressed in natural language
text or in a machine readable language for the purpose of declaring some
of the semantics of an element.
Direct Superclasses: PackageableElementDirect Subclasses: IntervalConstraint,
InteractionConstraintClass Precedence List: Constraint,
PackageableElement,
ParameterableElement,
NamedElement,
ElementProperties:
![](/se-interop/image/down-arrow.png?hunchentoot-session=157860%3AA583C74F733FAADD8378E1C34A4B7F9D)
constrainedElement :
Element (0 *); -- source
Constraint![](/se-interop/image/down-arrow.png?hunchentoot-session=157860%3AA583C74F733FAADD8378E1C34A4B7F9D)
context :
Namespace (0 1); -- source
Constraint![](/se-interop/image/down-arrow.png?hunchentoot-session=157860%3AA583C74F733FAADD8378E1C34A4B7F9D)
specification :
ValueSpecification (1 1); -- source
Constraint![](/se-interop/image/down-arrow.png?hunchentoot-session=157860%3AA583C74F733FAADD8378E1C34A4B7F9D)
visibility :
VisibilityKind (1 1); -- source
PackageableElement![](/se-interop/image/down-arrow.png?hunchentoot-session=157860%3AA583C74F733FAADD8378E1C34A4B7F9D)
owningTemplateParameter :
TemplateParameter (0 1); -- source
ParameterableElement![](/se-interop/image/down-arrow.png?hunchentoot-session=157860%3AA583C74F733FAADD8378E1C34A4B7F9D)
templateParameter :
TemplateParameter (0 1); -- source
ParameterableElement![](/se-interop/image/down-arrow.png?hunchentoot-session=157860%3AA583C74F733FAADD8378E1C34A4B7F9D)
clientDependency :
Dependency (0 *); -- source
NamedElement![](/se-interop/image/down-arrow.png?hunchentoot-session=157860%3AA583C74F733FAADD8378E1C34A4B7F9D)
name : String (0 1); -- source
NamedElement![](/se-interop/image/down-arrow.png?hunchentoot-session=157860%3AA583C74F733FAADD8378E1C34A4B7F9D)
nameExpression :
StringExpression (0 1); -- source
NamedElement![](/se-interop/image/down-arrow.png?hunchentoot-session=157860%3AA583C74F733FAADD8378E1C34A4B7F9D)
namespace :
Namespace (0 1); -- source
NamedElement![](/se-interop/image/down-arrow.png?hunchentoot-session=157860%3AA583C74F733FAADD8378E1C34A4B7F9D)
qualifiedName : String (0 1); -- source
NamedElement![](/se-interop/image/down-arrow.png?hunchentoot-session=157860%3AA583C74F733FAADD8378E1C34A4B7F9D)
ownedComment :
Comment (0 *); -- source
Element![](/se-interop/image/down-arrow.png?hunchentoot-session=157860%3AA583C74F733FAADD8378E1C34A4B7F9D)
ownedElement :
Element (0 *); -- source
Element![](/se-interop/image/down-arrow.png?hunchentoot-session=157860%3AA583C74F733FAADD8378E1C34A4B7F9D)
owner :
Element (0 1); -- source
ElementConstraints:
Signature: CMOF_14_3_30() : Boolean;
Description: 14.3 [30] A Constraint must constrain at least one element and must be specified via an OpaqueExpression.
see also: https://sites.google.com/site/metamodelingantipatterns/catalog/mof/constraint-specification-is-not-opaque-expression
Expression: constrainedElement->notEmpty() and specification.oclIsKindOf(OpaqueExpression)
Signature: value_specification_boolean() : Boolean;
Description: The value specification for a constraint must evaluate to a Boolean value.
The OCL used here is not normative.Editor's notes: No () on specification. oclIsKindOf not isOclKindOf. More generally,
it looks like this intends to perform runtime evaluation of the OCL string in the specification
property (which should more accurately be specification.body, anyway). There is no way to
describe this in OCL. Carried Over from UML 2.1.1
Expression: true
Original: self.specification().booleanValue().isOclKindOf(Boolean)
Signature: not_apply_to_self() : Boolean;
Description: A constraint cannot be applied to itself.
Expression: not constrainedElement->includes(self)
Signature: no_side_effects() : Boolean;
Description: Evaluating the value specification for a constraint must not have side
effects.
Expression: true
Signature: boolean_value() : Boolean;
Description: The value specification for a constraint must evaluate to a Boolean value.
Expression: true
Operations:
No additional operations.
Send questions or comments to
[email protected].