Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » OCL expression (attributes of different should not have the same name)
OCL expression [message #1196290] Tue, 19 November 2013 10:44 Go to next message
dodo babab is currently offline dodo bababFriend
Messages: 6
Registered: January 2013
Junior Member
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
  • Attachment: forum.png
    (Size: 15.57KB, Downloaded 140 times)
Re: OCL expression [message #1196499 is a reply to message #1196290] Tue, 19 November 2013 12:53 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 4187
Registered: July 2009
Senior Member
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 #1197118 is a reply to message #1196499] Tue, 19 November 2013 19:16 Go to previous messageGo to next message
dodo babab is currently offline dodo bababFriend
Messages: 6
Registered: January 2013
Junior Member
Hi,


Thanks a lot for your answer, but I couldn't solve the problem.
Pleaseeee, if you have time can you have a look in my meta model.
Or, do you have any other idea. I need this result for my master thesis.

Thanks again. Regards
Dorina

  • Attachment: forum2.png
    (Size: 10.35KB, Downloaded 128 times)

[Updated on: Tue, 19 November 2013 21:01]

Report message to a moderator

Re: OCL expression [message #1197313 is a reply to message #1197118] Tue, 19 November 2013 21:25 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 4187
Registered: July 2009
Senior Member
Hi

Sorry. "I need this result for my master thesis." guarantees that I will
not help. Your thesis should represent your own work and research.

Regards

Ed Willink

On 19/11/2013 19:16, dodo babab wrote:
> Hi,
>
>
> Thanks a lot for your answer, but I couldn't solve the problem.
> Pleaseeee, if you have time can you have a look in my meta model.
> Or, do you have any other idea. I need this result for my master thesis.
>
> Thanks again. Regards
> Dorina
>
>
Re: OCL expression [message #1198155 is a reply to message #1196290] Wed, 20 November 2013 07:07 Go to previous message
dodo babab is currently offline dodo bababFriend
Messages: 6
Registered: January 2013
Junior Member
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
Previous Topic:Binary serialization broken with UML2 Kepler ?
Next Topic:update attributes of class programmatically
Goto Forum:
  


Current Time: Fri Dec 19 20:17:41 GMT 2014

Powered by FUDForum. Page generated in 0.01623 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software