Skip to main content



      Home
Home » Modeling » OCL » Using OCL to query; how to integrate in my metamodel
Using OCL to query; how to integrate in my metamodel [message #808693] Mon, 27 February 2012 21:46 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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!
Previous Topic:CompleteOCL errors against UML model.
Next Topic:OCL for Extended ECORE model
Goto Forum:
  


Current Time: Sat Jun 21 04:09:28 EDT 2025

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

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

Back to the top