org.eclipse.ocl.examples.pivot
Interface Constraint

All Superinterfaces:
Element, org.eclipse.emf.ecore.EObject, MonikeredElement, Nameable, NamedElement, org.eclipse.emf.common.notify.Notifier, PivotObject, Visitable
All Known Implementing Classes:
ConstraintImpl

public interface Constraint
extends NamedElement

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:
PivotPackage.getConstraint()
Generated
Model

Method Summary
 ValueSpecification createSpecification(org.eclipse.emf.ecore.EClass eClass)
          Creates a new ValueSpecification and sets the 'Specification' containment reference.
 org.eclipse.emf.common.util.EList<Element> getConstrainedElements()
          Returns the value of the 'Constrained Element' reference list.
 NamedElement getContext()
          Returns the value of the 'Context' reference.
 ValueSpecification getSpecification()
          Returns the value of the 'Specification' containment reference.
 java.lang.String getStereotype()
          Returns the value of the 'Stereotype' attribute.
 boolean isCallable()
          Returns the value of the 'Is Callable' attribute.
 void setContext(NamedElement value)
          Sets the value of the 'Context' reference.
 void setIsCallable(boolean value)
          Sets the value of the 'Is Callable' attribute.
 void setSpecification(ValueSpecification value)
          Sets the value of the 'Specification' containment reference.
 void setStereotype(java.lang.String value)
          Sets the value of the 'Stereotype' attribute.
 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.
 boolean validateValueSpecificationBoolean(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          The value specification for a constraint must evaluate to a Boolean value.
 
Methods inherited from interface org.eclipse.ocl.examples.pivot.NamedElement
createOwnedAnnotation, createOwnedRule, getName, getOwnedAnnotations, getOwnedRules, isStatic, setIsStatic, setName
 
Methods inherited from interface org.eclipse.ocl.examples.pivot.MonikeredElement
getMoniker, hasMoniker, setMoniker
 
Methods inherited from interface org.eclipse.ocl.examples.pivot.Element
createOwnedComment, getETarget, getOwnedComments
 
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
 
Methods inherited from interface org.eclipse.ocl.examples.pivot.util.Visitable
accept, eClass
 

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.

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

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), PivotPackage.getConstraint_Specification()
Generated
Model
containment="true" required="true" ordered="false"

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()
Generated

createSpecification

ValueSpecification createSpecification(org.eclipse.emf.ecore.EClass eClass)
Creates a new ValueSpecification and sets the 'Specification' containment reference.

Parameters:
eClass - The Ecore class of the ValueSpecification to create.
Returns:
The new ValueSpecification.
See Also:
getSpecification()
Generated

getContext

NamedElement getContext()
Returns the value of the 'Context' reference.

If the meaning of the 'Context' reference isn't clear, there really should be more of a description here...

Returns:
the value of the 'Context' reference.
See Also:
setContext(NamedElement), PivotPackage.getConstraint_Context()
Generated
Model
ordered="false"

setContext

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

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

getStereotype

java.lang.String getStereotype()
Returns the value of the 'Stereotype' attribute.

If the meaning of the 'Stereotype' attribute isn't clear, there really should be more of a description here...

Returns:
the value of the 'Stereotype' attribute.
See Also:
setStereotype(String), PivotPackage.getConstraint_Stereotype()
Generated
Model
dataType="org.eclipse.ocl.examples.pivot.String" ordered="false"

setStereotype

void setStereotype(java.lang.String value)
Sets the value of the 'Stereotype' attribute.

Parameters:
value - the new value of the 'Stereotype' attribute.
See Also:
getStereotype()
Generated

isCallable

boolean isCallable()
Returns the value of the 'Is Callable' attribute. The default value is "false".

If the meaning of the 'Is Callable' attribute isn't clear, there really should be more of a description here...

Returns:
the value of the 'Is Callable' attribute.
See Also:
setIsCallable(boolean), PivotPackage.getConstraint_IsCallable()
Generated
Model
default="false" dataType="org.eclipse.ocl.examples.pivot.Boolean" required="true" ordered="false"

setIsCallable

void setIsCallable(boolean value)
Sets the value of the 'Is Callable' attribute.

Parameters:
value - the new value of the 'Is Callable' attribute.
See Also:
isCallable()
Generated

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.
Generated
Model

validateValueSpecificationBoolean

boolean validateValueSpecificationBoolean(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                          java.util.Map<java.lang.Object,java.lang.Object> context)
The value specification for a constraint must evaluate to a Boolean value. self.specification().booleanValue().isOclKindOf(Boolean)

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