Validation & OCL [message #33700] |
Tue, 09 May 2006 08:25 |
Eclipse User |
|
|
|
Originally posted by: asha_rajbhoj.yahoo.com
Hi,
One Constraint from UML 1.3 spec : "No Attributes may have the same name
within a Classifier."
Various model update scenario could be adding attribute for classifier ,
modifying attribute name , deletion of attribute.
When I specify constraint as follows it can address adding attribute
scenario
<constraint lang="OCL" ...>
<target class="Classifier">
<event name="Set">
<feature name="attribute" />
</event>
</target>
self.feature->select ( a | a.oclIsKindOf (Attribute) )->forAll
( p, q |
p.name = q.name implies p = q )
</constraint>
But it does not address modifying of attribute name. How to specify such
indirect event for the target classes using validation framework?
Thanks and Regards,
Asha.
|
|
|
|
Re: Validation & OCL [message #33771 is a reply to message #33738] |
Wed, 10 May 2006 04:17 |
Eclipse User |
|
|
|
Originally posted by: asha.rajbhoj.yahoo.com
Hi Chris,
Yes , we can write multiple OCL for such indirect events.
But, semantically constraint is only for Class and not for Attribute. But
we end up in writing constraint even for Attribute to implement Class
level constraint for handling indirect event.
Does Validation framework has some feature to avoid writing such multiple
OCL for indirect event?
Thanks and Regards,
Asha.
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03934 seconds