|
Re: OCL expression [message #1196499 is a reply to message #1196290] |
Tue, 19 November 2013 07:53   |
Eclipse User |
|
|
|
Hi
My first reaction was to use reflection which the Pivot-based OCL
supports, although OMG OCL does not (yet).
However a cleaner solution may occur at the metalevel by applying the
UniqueAttributeNames stereotype to Actors.
context UniqueAttributeNames
inv AttributeNamesAreUnique: Property.allInstances()->select(type =
base_Class)->isUnique(name)
(The above is untested)
Regards
Ed Willink
On 19/11/2013 10:44, dodo babab wrote:
> Hi,
>
> Please, can anyone help me with this problem.
> I have to classes in my meta model, each of them has an attribute (e.g., trustorRole and trusteeRole) The date type (eTupe) for both is the enumeration class (e.e.g, serviceRequester, serviceProvider). I want to create and OCL expression which defines that the attribute name of these two classes should not be the same in the instance of the meta model. To be more clear, my meta model look like in the picture below.
>
> Best Regards
|
|
|
|
|
Re: OCL expression [message #1198155 is a reply to message #1196290] |
Wed, 20 November 2013 02:07  |
Eclipse User |
|
|
|
Thanks for your answer. The fact that I need this for my thesis doesn't implies that I will don't understand it. Becaouse I have to explain it and not just only create it in the meta model. It is better to say that I don't want to help you or I don't know how to do it (the truth).
Regards
|
|
|
Powered by
FUDForum. Page generated in 0.13380 seconds