Re: OCL link constraint queries [message #866] |
Fri, 19 January 2007 14:28 |
Eclipse User |
|
|
|
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 #892 is a reply to message #866] |
Fri, 19 January 2007 21:39 |
Eclipse User |
|
|
|
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
>>
|
|
|
Powered by
FUDForum. Page generated in 0.03193 seconds