org.eclipse.uml2.uml
Interface Constraint

All Superinterfaces:
Element, org.eclipse.emf.ecore.EModelElement, org.eclipse.emf.ecore.EObject, NamedElement, org.eclipse.emf.common.notify.Notifier, PackageableElement, ParameterableElement
All Known Subinterfaces:
DurationConstraint, InteractionConstraint, IntervalConstraint, TimeConstraint

public interface Constraint
extends PackageableElement

A representation of the model object 'Constraint'. 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 or set of Elements.

From package UML::CommonStructure.

The following features are supported:

See Also:
UMLPackage.getConstraint()

Field Summary
 
Fields inherited from interface org.eclipse.uml2.uml.NamedElement
SEPARATOR
 
Method Summary
 ValueSpecification createSpecification(java.lang.String name, Type type, org.eclipse.emf.ecore.EClass eClass)
          Creates a new ValueSpecification, with the specified 'Name', and 'Type', and sets the 'Specification' containment reference
 org.eclipse.emf.common.util.EList<Element> getConstrainedElements()
          Returns the value of the 'Constrained Element' reference list.
 Namespace getContext()
          Returns the value of the 'Context' container reference.
 ValueSpecification getSpecification()
          Returns the value of the 'Specification' containment reference.
 void setContext(Namespace value)
          Sets the value of the 'Context' container reference
 void setSpecification(ValueSpecification value)
          Sets the value of the 'Specification' containment reference
 boolean validateBooleanValue(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          The ValueSpecification for a Constraint must evaluate to a Boolean value.
 boolean validateNoSideEffects(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Evaluating the ValueSpecification for a Constraint must not have side effects.
 boolean validateNotApplyToSelf(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          A Constraint cannot be applied to itself.
 
Methods inherited from interface org.eclipse.uml2.uml.PackageableElement
validateNamespaceNeedsVisibility
 
Methods inherited from interface org.eclipse.uml2.uml.NamedElement
allNamespaces, allOwningPackages, createDependency, createNameExpression, createUsage, getClientDependencies, getClientDependency, getClientDependency, getLabel, getLabel, getName, getNameExpression, getNamespace, getQualifiedName, getVisibility, isDistinguishableFrom, isSetName, isSetVisibility, separator, setName, setNameExpression, setVisibility, unsetName, unsetVisibility, validateHasNoQualifiedName, validateHasQualifiedName, validateVisibilityNeedsOwnership
 
Methods inherited from interface org.eclipse.uml2.uml.ParameterableElement
getOwningTemplateParameter, getTemplateParameter, isCompatibleWith, isTemplateParameter, setOwningTemplateParameter, setTemplateParameter
 
Methods inherited from interface org.eclipse.uml2.uml.Element
addKeyword, allOwnedElements, applyStereotype, createEAnnotation, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedSubstereotype, getAppliedSubstereotypes, getKeywords, getModel, getNearestPackage, getOwnedComments, getOwnedElements, getOwner, getRelationships, getRelationships, getRequiredStereotype, getRequiredStereotypes, getSourceDirectedRelationships, getSourceDirectedRelationships, getStereotypeApplication, getStereotypeApplications, getTargetDirectedRelationships, getTargetDirectedRelationships, getValue, hasKeyword, hasValue, isStereotypeApplicable, isStereotypeApplied, isStereotypeRequired, mustBeOwned, removeKeyword, setValue, unapplyStereotype, validateHasOwner, validateNotOwnSelf
 
Methods inherited from interface org.eclipse.emf.ecore.EModelElement
getEAnnotation, getEAnnotations
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 

Method Detail

getConstrainedElements

org.eclipse.emf.common.util.EList<Element> getConstrainedElements()
Returns the value of the 'Constrained Element' reference list. The list contents are of type Element. The ordered set of Elements referenced by this Constraint.

From package UML::CommonStructure.

Returns:
the value of the 'Constrained Element' reference list.
See Also:
UMLPackage.getConstraint_ConstrainedElement()

getSpecification

ValueSpecification getSpecification()
Returns the value of the 'Specification' containment reference.

This feature subsets the following features:

A condition that must be true when evaluated in order for the Constraint to be satisfied.

From package UML::CommonStructure.

Returns:
the value of the 'Specification' containment reference.
See Also:
setSpecification(ValueSpecification), UMLPackage.getConstraint_Specification()

setSpecification

void setSpecification(ValueSpecification value)
Sets the value of the 'Specification' containment reference.

Parameters:
value - the new value of the 'Specification' containment reference.
See Also:
getSpecification()

createSpecification

ValueSpecification createSpecification(java.lang.String name,
                                       Type type,
                                       org.eclipse.emf.ecore.EClass eClass)
Creates a new ValueSpecification, with the specified 'Name', and 'Type', and sets the 'Specification' containment reference.

Parameters:
name - The 'Name' for the new ValueSpecification, or null.
type - The 'Type' for the new ValueSpecification, or null.
eClass - The Ecore class of the ValueSpecification to create.
Returns:
The new ValueSpecification.
See Also:
getSpecification()

getContext

Namespace getContext()
Returns the value of the 'Context' container reference. It is bidirectional and its opposite is 'Owned Rule'.

This feature subsets the following features:

Specifies the Namespace that owns the Constraint.

From package UML::CommonStructure.

Returns:
the value of the 'Context' container reference.
See Also:
setContext(Namespace), UMLPackage.getConstraint_Context(), Namespace.getOwnedRules()

setContext

void setContext(Namespace value)
Sets the value of the 'Context' container reference.

Parameters:
value - the new value of the 'Context' container reference.
See Also:
getContext()

validateNotApplyToSelf

boolean validateNotApplyToSelf(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                               java.util.Map<java.lang.Object,java.lang.Object> context)
A Constraint cannot be applied to itself. not constrainedElement->includes(self)

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateBooleanValue

boolean validateBooleanValue(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                             java.util.Map<java.lang.Object,java.lang.Object> context)
The ValueSpecification for a Constraint must evaluate to a Boolean value.

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateNoSideEffects

boolean validateNoSideEffects(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                              java.util.Map<java.lang.Object,java.lang.Object> context)
Evaluating the ValueSpecification for a Constraint must not have side effects.

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

Copyright 2003, 2014 IBM Corporation, CEA, and others.
All Rights Reserved.