Java Reference
In-Depth Information
Element
Property
Value
Feature Value Spec
Feature
NamedElement.name : String
Body
self.opposite.owner.name.toLower()
Language
ocl
Feature Label Mapping
Diagram Label
Diagram Label LinkTarget
Editor Pattern
{0}..{1}
Edit Pattern
{0}..{1}
Features
TypedElement.lowerBound : EInt,
TypedElement.upperBound : EInt
View Pattern
{0}..{1}
Link Constraints
Target End Constraint
Body
*
Language
ocl
* Here's the sad truth about creating a constraint to prevent aggregation
links from targeting types other than the sourceā€”or, in the case of moment inter-
vals, other than moment intervals or moment interval details. OCL gives us no
simple solution, such as oppositeEnd.oclIsTypeOf(self) . The reason is
that the argument to oclIsTypeOf() must be a type literal, leaving us with this
rather large expression:
(oppositeEnd.oclIsTypeOf(dnc::MomentInterval) and
self.oclIsTypeOf(dnc::MomentInterval))
or
(oppositeEnd.oclIsTypeOf(dnc::MomentInterval) and
self.oclIsTypeOf(dnc::MIDetail))
or
(oppositeEnd.oclIsTypeOf(dnc::Role) and self.oclIsTypeOf(dnc::Role))
or
(oppositeEnd.oclIsTypeOf(dnc::Party) and self.oclIsTypeOf(dnc::Party))
or
(oppositeEnd.oclIsTypeOf(dnc::Place) and self.oclIsTypeOf(dnc::Place))
or
(oppositeEnd.oclIsTypeOf(dnc::Thing) and self.oclIsTypeOf(dnc::Thing))
or
(oppositeEnd.oclIsTypeOf(dnc::Description) and
self.oclIsTypeOf(dnc::Description))
 
Search WWH ::




Custom Search