|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A representation of the model object 'Constraint'. Constraint contains a ValueSpecification that specifies additional semantics for one or more elements. Certain kinds of constraints (such as an association �xor� constraint) are predefined in UML, others may be user-defined. A user-defined Constraint is described using a specified language, whose syntax and interpretation is a tool responsibility. One predefined language for writing constraints is OCL. In some situations, a programming language such as Java may be appropriate for expressing a constraint. In other situations natural language may be used. Constraint is a condition (a Boolean expression) that restricts the extension of the associated element beyond what is imposed by the other language constructs applied to that element. Constraint contains an optional name, although they are commonly unnamed.
The following features are supported:
UML2Package.getConstraint()
Field Summary | |
static String |
copyright
|
Fields inherited from interface org.eclipse.uml2.NamedElement |
SEPARATOR |
Method Summary | |
ValueSpecification |
createSpecification(EClass eClass)
Creates a ValueSpecification and sets the 'Specification' containment reference |
EList |
getConstrainedElements()
Returns the value of the 'Constrained Element' reference list. |
Namespace |
getContext()
Returns the value of the 'Context' reference |
Namespace |
getNamespace()
Returns the value of the 'Namespace' container reference. |
EList |
getOwnedElements()
|
ValueSpecification |
getSpecification()
Returns the value of the 'Specification' containment reference |
void |
setNamespace(Namespace value)
Sets the value of the ' Namespace ' container reference |
void |
setSpecification(ValueSpecification value)
Sets the value of the ' Specification ' containment reference |
boolean |
validateNotApplyToSelf(DiagnosticChain diagnostics,
Map context)
An invariant constraint based on the following OCL expression:
not constrainedElement->includes(self)
|
Methods inherited from interface org.eclipse.uml2.PackageableElement |
getPackageableElement_visibility, getVisibility, setPackageableElement_visibility, setVisibility |
Methods inherited from interface org.eclipse.uml2.NamedElement |
allNamespaces, createNameExpression, getClientDependencies, getClientDependency, getName, getNameExpression, getOwner, getQualifiedName, isDistinguishableFrom, qualifiedName, separator, setName, setNameExpression, validateNoName, validateQualifiedName, validateVisibilityNeedsOwnership |
Methods inherited from interface org.eclipse.uml2.TemplateableElement |
createOwnedTemplateSignature, createTemplateBinding, getOwnedTemplateSignature, getTemplateBindings, parameterableElements, setOwnedTemplateSignature |
Methods inherited from interface org.eclipse.uml2.Element |
addKeyword, allOwnedElements, apply, createEAnnotation, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedVersion, getKeywords, getModel, getNearestPackage, getOwnedComments, getValue, hasKeyword, isApplied, isRequired, mustBeOwned, removeKeyword, setValue, unapply, 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, 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.uml2.ParameterableElement |
getOwner, getOwningParameter, getTemplateParameter, setOwningParameter, setTemplateParameter |
Field Detail |
public static final String copyright
Method Detail |
public Namespace getContext()
If the meaning of the 'Context' reference isn't clear, there really should be more of a description here...
Specifies the Namespace that is the context for evaluating this constraint. This is a derived union.
UML2Package.getConstraint_Context()
public Namespace getNamespace()
Owned Rule
'.
If the meaning of the 'Namespace' container reference isn't clear, there really should be more of a description here...
getNamespace
in interface NamedElement
setNamespace(Namespace)
,
UML2Package.getConstraint_Namespace()
,
Namespace.getOwnedRules()
public void setNamespace(Namespace value)
Namespace
' container reference.
value
- the new value of the 'Namespace' container reference.getNamespace()
public ValueSpecification getSpecification()
If the meaning of the 'Specification' containment reference list isn't clear, there really should be more of a description here...
A condition that must be true when evaluated in order for the constraint to be satisfied. Subsets Element::ownedElement.
setSpecification(ValueSpecification)
,
UML2Package.getConstraint_Specification()
public void setSpecification(ValueSpecification value)
Specification
' containment reference.
value
- the new value of the 'Specification' containment reference.getSpecification()
public ValueSpecification createSpecification(EClass eClass)
ValueSpecification
and sets the 'Specification' containment reference.
eClass
- The Ecore class of the ValueSpecification
to create.
ValueSpecification
.getSpecification()
public EList getConstrainedElements()
Element
.
If the meaning of the 'Constrained Element' reference list isn't clear, there really should be more of a description here...
ordered set of Elements referenced by this Constraint.
UML2Package.getConstraint_ConstrainedElement()
public boolean validateNotApplyToSelf(DiagnosticChain diagnostics, Map context)
not constrainedElement->includes(self)
public EList getOwnedElements()
getOwnedElements
in interface NamedElement
|
Copyright 2003, 2004 IBM Corporation and others. All Rights Reserved. |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |