Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » OCL link constraint queries
OCL link constraint queries [message #68358] Fri, 19 January 2007 13:48 Go to next message
Joana M. F. Trindade is currently offline Joana M. F. TrindadeFriend
Messages: 7
Registered: July 2009
Junior Member
Hello, everyone.

I'm trying to use the EMFT Query framework to check for OCL link
constraints in the ecore model. For instance, given a definition of a OCL
Link Constraint, I would like to check if the correspondent objects in the
ecore model are according to it. Furthermore, I would like to specify
which specific objects should be in conformance with the OCL "rule" (for
instance, if object A is connected only to object B). My question is: is
this kind of operation supported by the current API? If not, any hints on
what I should extend?

Thanks for your attention,
Joana Trindade
Re: OCL link constraint queries [message #68377 is a reply to message #68358] Fri, 19 January 2007 14:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Joana,

It's best to ask this question in the OCL newsgroup. I've added it to
the CC list.


Joana M. F. Trindade wrote:
> Hello, everyone.
>
> I'm trying to use the EMFT Query framework to check for OCL link
> constraints in the ecore model. For instance, given a definition of a
> OCL Link Constraint, I would like to check if the correspondent
> objects in the ecore model are according to it. Furthermore, I would
> like to specify which specific objects should be in conformance with
> the OCL "rule" (for instance, if object A is connected only to object
> B). My question is: is this kind of operation supported by the current
> API? If not, any hints on what I should extend?
>
> Thanks for your attention,
> Joana Trindade
>
Re: OCL link constraint queries [message #68405 is a reply to message #68377] Fri, 19 January 2007 21:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Ed,

Actually, this is the correct newsgroup for Query questions (even those
involving OCL).

Joana,

By "link constraint", do you mean perchance constraints defined in a GMF
model?

To execute an OCL query on your model, you need only to create a SELECT
statement on the appropriate input objects (probably your resource's
contents list) and supply a WHERE clause with one or more
OCLConstraintCondition object, each of which has an OCL constraint
specification. The OCLConstraintCondition allows context-free queries
(which are evaluated on any model element to which they are applicable;
i.e., on which they parse) and context-ful queries (in which you indicate
specifically the model element type).

Have a look at the example plug-in, installed via the

"Examples / EMFT Query / OCL Example"

entry in the "New Project" or "New Example" wizard. Also, the tutorial in
the EMFT Query on-line help has an "Advanced" section near the bottom of
the page that explains how to use the OCLConstraintCondition (the other
sections of this tutorial are out of date, to be overhauled soon).

HTH,

Christian


Ed Merks wrote:

> Joana,
>
> It's best to ask this question in the OCL newsgroup. I've added it to
> the CC list.
>
>
> Joana M. F. Trindade wrote:
>> Hello, everyone.
>>
>> I'm trying to use the EMFT Query framework to check for OCL link
>> constraints in the ecore model. For instance, given a definition of a
>> OCL Link Constraint, I would like to check if the correspondent
>> objects in the ecore model are according to it. Furthermore, I would
>> like to specify which specific objects should be in conformance with
>> the OCL "rule" (for instance, if object A is connected only to object
>> B). My question is: is this kind of operation supported by the current
>> API? If not, any hints on what I should extend?
>>
>> Thanks for your attention,
>> Joana Trindade
>>
Re: OCL link constraint queries [message #68498 is a reply to message #68405] Mon, 22 January 2007 14:45 Go to previous message
Joana M. F. Trindade is currently offline Joana M. F. TrindadeFriend
Messages: 7
Registered: July 2009
Junior Member
Ed and Christian,

Thank you for the quick replies. I am following the tutorials now ;-)
Re: OCL link constraint queries [message #601401 is a reply to message #68358] Fri, 19 January 2007 14:28 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Joana,

It's best to ask this question in the OCL newsgroup. I've added it to
the CC list.


Joana M. F. Trindade wrote:
> Hello, everyone.
>
> I'm trying to use the EMFT Query framework to check for OCL link
> constraints in the ecore model. For instance, given a definition of a
> OCL Link Constraint, I would like to check if the correspondent
> objects in the ecore model are according to it. Furthermore, I would
> like to specify which specific objects should be in conformance with
> the OCL "rule" (for instance, if object A is connected only to object
> B). My question is: is this kind of operation supported by the current
> API? If not, any hints on what I should extend?
>
> Thanks for your attention,
> Joana Trindade
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: OCL link constraint queries [message #601418 is a reply to message #68377] Fri, 19 January 2007 21:39 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Ed,

Actually, this is the correct newsgroup for Query questions (even those
involving OCL).

Joana,

By "link constraint", do you mean perchance constraints defined in a GMF
model?

To execute an OCL query on your model, you need only to create a SELECT
statement on the appropriate input objects (probably your resource's
contents list) and supply a WHERE clause with one or more
OCLConstraintCondition object, each of which has an OCL constraint
specification. The OCLConstraintCondition allows context-free queries
(which are evaluated on any model element to which they are applicable;
i.e., on which they parse) and context-ful queries (in which you indicate
specifically the model element type).

Have a look at the example plug-in, installed via the

"Examples / EMFT Query / OCL Example"

entry in the "New Project" or "New Example" wizard. Also, the tutorial in
the EMFT Query on-line help has an "Advanced" section near the bottom of
the page that explains how to use the OCLConstraintCondition (the other
sections of this tutorial are out of date, to be overhauled soon).

HTH,

Christian


Ed Merks wrote:

> Joana,
>
> It's best to ask this question in the OCL newsgroup. I've added it to
> the CC list.
>
>
> Joana M. F. Trindade wrote:
>> Hello, everyone.
>>
>> I'm trying to use the EMFT Query framework to check for OCL link
>> constraints in the ecore model. For instance, given a definition of a
>> OCL Link Constraint, I would like to check if the correspondent
>> objects in the ecore model are according to it. Furthermore, I would
>> like to specify which specific objects should be in conformance with
>> the OCL "rule" (for instance, if object A is connected only to object
>> B). My question is: is this kind of operation supported by the current
>> API? If not, any hints on what I should extend?
>>
>> Thanks for your attention,
>> Joana Trindade
>>
Re: OCL link constraint queries [message #601479 is a reply to message #68405] Mon, 22 January 2007 14:45 Go to previous message
Joana M. F. Trindade is currently offline Joana M. F. TrindadeFriend
Messages: 7
Registered: July 2009
Junior Member
Ed and Christian,

Thank you for the quick replies. I am following the tutorials now ;-)
Previous Topic:Live Validation after saving the model
Next Topic:Problem with Interactive OCL Console used with Sample Ecore Editor
Goto Forum:
  


Current Time: Thu Mar 28 20:28:28 GMT 2024

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

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

Back to the top