Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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] Tue, 28 February 2012 02:46 Go to next message
Rômulo  rpini is currently offline Rômulo rpiniFriend
Messages: 36
Registered: July 2009
Member
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: Tue, 28 February 2012 02:47]

Report message to a moderator

Re: Using OCL to query; how to integrate in my metamodel [message #808810 is a reply to message #808693] Tue, 28 February 2012 06:51 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
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: Thu Apr 18 11:16:31 GMT 2024

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

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

Back to the top