Using OCL to query; how to integrate in my metamodel [message #808693] |
Mon, 27 February 2012 21:46  |
Eclipse User |
|
|
|
Hi guys,
Hope you guys can understand and help me.
I am building a metamodel in which the main element, called ActiveStructureAssigment, has an EReference (which is 1..1 and let´s supposed it´s named 'has') to an Eclass called ActiveStructureElement, which is the main element of another metamodel and is further specialized in other classes.
What I want to do is: when instatiating the metamodel, I want to be able to define the EReference aforementioned using OCL. For example:
has: ActiveStructureElementX.allInstances()->any();
Is there any way to do something like this? I tried to look up for examples or resources but couldnt found.
Any help is appreciated!
Thanks!
[Updated on: Mon, 27 February 2012 21:47] by Moderator
|
|
|
Re: Using OCL to query; how to integrate in my metamodel [message #808810 is a reply to message #808693] |
Tue, 28 February 2012 01:51  |
Eclipse User |
|
|
|
Hi
Look at the OCLinEcore Tutorial in the Help Contents->OCL Documentation.
Regards
Ed Willink
On 28/02/2012 02:46, Rômulo rpini wrote:
> Hi guys,
>
> Hope you guys can understand and help me.
>
> I am building a metamodel in which the main element, called
> ActiveStructureAssigment. This element, has an EReference (which is
> 1..1 and let´s supposed it´s named 'has') to an Eclass called
> ActiveStructureElement, which is the main element of another metamodel
> and is further specialized in other classes.
>
> What I want to do is: when instatiating the metamodel, I want to be
> able to define the EReference aforementioned using OCL. For example:
> has: ActiveStructureElementX.allInstances()->any();
>
> Is there any way to do something like this? I tried to look up for
> examples or resources but couldnt found.
>
> Any help is appreciated!
>
> Thanks!
|
|
|
Powered by
FUDForum. Page generated in 0.04508 seconds