Package com.sodius.mdw.metamodel.uml21
Interface Constraint
-
- All Superinterfaces:
Comparable<Object>,Element,org.eclipse.emf.ecore.EModelElement,org.eclipse.emf.ecore.EObject,MDWEObject,MDWObject,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.The following features are supported:
- See Also:
UMLPackage.getConstraint()
-
-
Field Summary
-
Fields inherited from interface com.sodius.mdw.metamodel.uml21.NamedElement
SEPARATOR
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ValueSpecificationcreateSpecification(String name, Type type, org.eclipse.emf.ecore.EClass eClass)Creates a newValueSpecification, with the specified 'Name', and 'Type', and sets the 'Specification' containment reference.MDWEList<Element>getConstrainedElements()Returns the value of the 'Constrained Element' reference list.NamespacegetContext()Returns the value of the 'Context' container reference.ValueSpecificationgetSpecification()Returns the value of the 'Specification' containment reference.voidsetContext(Namespace value)Sets the value of the 'Context' container reference.voidsetSpecification(ValueSpecification value)Sets the value of the 'Specification' containment reference.booleanvalidateBooleanValue(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)The value specification for a constraint must evaluate to a Boolean value.booleanvalidateNoSideEffects(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)Evaluating the value specification for a constraint must not have side effects.booleanvalidateNotAppliedToSelf(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)A constraint cannot be applied to itself.booleanvalidateNotApplyToSelf(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)A constraint cannot be applied to itself.booleanvalidateValueSpecificationBoolean(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)The value specification for a constraint must evaluate to a Boolean value.-
Methods inherited from interface com.sodius.mdw.metamodel.uml21.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 com.sodius.mdw.core.model.MDWObject
compareTo, eExtendedClass, eIsInstanceOf, eIsInstanceOf, eIsProfiled, eIsRemoved, eMetamodel, eMetaTypeName, eModel, eRemove, eSetUniqueID, eUniqueID, superScript, superScript, toBoolean, toBoolean, toByte, toByte, toChar, toChar, toDouble, toDouble, toFloat, toFloat, toInt, toInt, toList, toList, toList, toList, toList, toLong, toLong, toObject, toObject, toSet, toSet, toShort, toShort, toString, toString
-
Methods inherited from interface com.sodius.mdw.metamodel.uml21.NamedElement
allNamespaces, allOwningPackages, createDependency, createNameExpression, 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.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
-
Methods inherited from interface com.sodius.mdw.metamodel.uml21.ParameterableElement
getOwningTemplateParameter, getTemplateParameter, isCompatibleWith, isTemplateParameter, setOwningTemplateParameter, setTemplateParameter
-
-
-
-
Method Detail
-
getConstrainedElements
MDWEList<Element> getConstrainedElements()
Returns the value of the 'Constrained Element' reference list. The list contents are of typeElement. The ordered set of Elements referenced by this Constraint.- 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. A condition that must be true when evaluated in order for the constraint to be satisfied.- 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(String name, Type type, org.eclipse.emf.ecore.EClass eClass)
Creates a newValueSpecification, with the specified 'Name', and 'Type', and sets the 'Specification' containment reference.- Parameters:
name- The 'Name' for the newValueSpecification, ornull.type- The 'Type' for the newValueSpecification, ornull.eClass- The Ecore class of theValueSpecificationto 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'. Specifies the namespace that owns the NamedElement.- 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, Map context)A constraint cannot be applied to itself. not constrainedElement->includes(self)
-
validateValueSpecificationBoolean
boolean validateValueSpecificationBoolean(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)The value specification for a constraint must evaluate to a Boolean value. self.specification().booleanValue().isOclKindOf(Boolean)
-
validateBooleanValue
boolean validateBooleanValue(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)The value specification for a constraint must evaluate to a Boolean value. true
-
validateNoSideEffects
boolean validateNoSideEffects(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)Evaluating the value specification for a constraint must not have side effects. true
-
validateNotAppliedToSelf
boolean validateNotAppliedToSelf(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)A constraint cannot be applied to itself. not constrainedElement->includes(self)
-
-