Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc) » OCL or QUERY and CDO
|
Re: OCL or QUERY and CDO [message #38195 is a reply to message #38127] |
Tue, 20 June 2006 18:00 |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Chris,
Unfortunately, yes, OCL assumes a classic document-like EMF resource, in
which all of its content is loaded when the resource is loaded. Moreover,
the default implementation of the "extent" of an OCL type is all of the
instances of the corresponding EClass in the context Resource, including
cross-resource-contained objects. That is, in gathering the extent of an
EClass, OCL will resolve containment proxies.
For most typical constraints, I think probably you shouldn't have much
issue, because constraints tend to be localized to local containment and
cross-references. Expressions such as allInstances() and closure() are
what will get you into trouble.
Cheers,
Christian
Chris Lenz wrote:
> 1)
> Am I right that OCL requieres that the whole emf instance must be in the
> heap to make the query evaluation.
>
> 2) If I use CDO to persistence EMF instances, and I need something like
> OCL have I to load the complete EMF model to the heap.
>
> Thanx Chris
|
|
|
Re: OCL or QUERY and CDO [message #38392 is a reply to message #38195] |
Thu, 22 June 2006 11:04 |
Eclipse User |
|
|
|
Originally posted by: stepper.sympedia.com
Chris, Christian,
From a CDO point of view OCL is just an ordinary client, sorry Christian
;-)
Maybe it's even more like an intermediary layer right between CDO and the
client that triggers an OCL evaluation. Since CDO generally employs lazy
loading, even for the containment case, it mainly depends on the nature of
the concrete OCL expressions. As Christian already noted, there are some
constructs in OCL that are hardly to implement other than simply
traversing whole resources, thus making CDO to load all the contents.
Cheers
/Eike
Christian W. Damus wrote:
> Hi, Chris,
> Unfortunately, yes, OCL assumes a classic document-like EMF resource, in
> which all of its content is loaded when the resource is loaded. Moreover,
> the default implementation of the "extent" of an OCL type is all of the
> instances of the corresponding EClass in the context Resource, including
> cross-resource-contained objects. That is, in gathering the extent of an
> EClass, OCL will resolve containment proxies.
> For most typical constraints, I think probably you shouldn't have much
> issue, because constraints tend to be localized to local containment and
> cross-references. Expressions such as allInstances() and closure() are
> what will get you into trouble.
> Cheers,
> Christian
> Chris Lenz wrote:
>> 1)
>> Am I right that OCL requieres that the whole emf instance must be in the
>> heap to make the query evaluation.
>>
>> 2) If I use CDO to persistence EMF instances, and I need something like
>> OCL have I to load the complete EMF model to the heap.
>>
>> Thanx Chris
|
|
|
Re: OCL or QUERY and CDO [message #46587 is a reply to message #38127] |
Thu, 24 August 2006 12:56 |
Eclipse User |
|
|
|
Originally posted by: stepper.sympedia.de
Chris,
Regarding 2) I've just added OCL support for CDO. It works with lazy remote extents so you don't have to manually load the whole model to the heap before evaluating OCL expressions. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=151560 for details and examples.
Cheers
/Eike
Chris Lenz schrieb:
> 1)
> Am I right that OCL requieres that the whole emf instance must be in the
> heap to make the query evaluation.
>
> 2) If I use CDO to persistence EMF instances, and I need something like
> OCL have I to load the complete EMF model to the heap.
>
> Thanx Chris
|
|
|
Re: OCL or QUERY and CDO [message #47530 is a reply to message #46587] |
Tue, 29 August 2006 13:59 |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Very cool! Nice work, Eike!
Christian
Eike Stepper wrote:
> Chris,
>
> Regarding 2) I've just added OCL support for CDO. It works with lazy
> remote extents so you don't have to manually load the whole model to the
> heap before evaluating OCL expressions. See
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=151560 for details and
> examples.
>
> Cheers
> /Eike
>
>
> Chris Lenz schrieb:
>> 1)
>> Am I right that OCL requieres that the whole emf instance must be in the
>> heap to make the query evaluation.
>>
>> 2) If I use CDO to persistence EMF instances, and I need something like
>> OCL have I to load the complete EMF model to the heap.
>>
>> Thanx Chris
|
|
|
Re: OCL or QUERY and CDO [message #47747 is a reply to message #47530] |
Tue, 29 August 2006 16:54 |
Eclipse User |
|
|
|
Originally posted by: stepper.sympedia.de
Christian W. Damus schrieb:
> Very cool! Nice work, Eike!
Thank you Chris.
It was rather easy due to the good architecture of your OCL implementation ;-)
Cheers
/Eike
>
> Christian
>
>
> Eike Stepper wrote:
>
>> Chris,
>>
>> Regarding 2) I've just added OCL support for CDO. It works with lazy
>> remote extents so you don't have to manually load the whole model to the
>> heap before evaluating OCL expressions. See
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=151560 for details and
>> examples.
>>
>> Cheers
>> /Eike
>>
>>
>> Chris Lenz schrieb:
>>> 1)
>>> Am I right that OCL requieres that the whole emf instance must be in the
>>> heap to make the query evaluation.
>>>
>>> 2) If I use CDO to persistence EMF instances, and I need something like
>>> OCL have I to load the complete EMF model to the heap.
>>>
>>> Thanx Chris
>
|
|
|
Re: OCL or QUERY and CDO [message #581269 is a reply to message #38127] |
Tue, 20 June 2006 18:00 |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Chris,
Unfortunately, yes, OCL assumes a classic document-like EMF resource, in
which all of its content is loaded when the resource is loaded. Moreover,
the default implementation of the "extent" of an OCL type is all of the
instances of the corresponding EClass in the context Resource, including
cross-resource-contained objects. That is, in gathering the extent of an
EClass, OCL will resolve containment proxies.
For most typical constraints, I think probably you shouldn't have much
issue, because constraints tend to be localized to local containment and
cross-references. Expressions such as allInstances() and closure() are
what will get you into trouble.
Cheers,
Christian
Chris Lenz wrote:
> 1)
> Am I right that OCL requieres that the whole emf instance must be in the
> heap to make the query evaluation.
>
> 2) If I use CDO to persistence EMF instances, and I need something like
> OCL have I to load the complete EMF model to the heap.
>
> Thanx Chris
|
|
|
Re: OCL or QUERY and CDO [message #581375 is a reply to message #38195] |
Thu, 22 June 2006 11:04 |
|
Chris, Christian,
From a CDO point of view OCL is just an ordinary client, sorry Christian
;-)
Maybe it's even more like an intermediary layer right between CDO and the
client that triggers an OCL evaluation. Since CDO generally employs lazy
loading, even for the containment case, it mainly depends on the nature of
the concrete OCL expressions. As Christian already noted, there are some
constructs in OCL that are hardly to implement other than simply
traversing whole resources, thus making CDO to load all the contents.
Cheers
/Eike
Christian W. Damus wrote:
> Hi, Chris,
> Unfortunately, yes, OCL assumes a classic document-like EMF resource, in
> which all of its content is loaded when the resource is loaded. Moreover,
> the default implementation of the "extent" of an OCL type is all of the
> instances of the corresponding EClass in the context Resource, including
> cross-resource-contained objects. That is, in gathering the extent of an
> EClass, OCL will resolve containment proxies.
> For most typical constraints, I think probably you shouldn't have much
> issue, because constraints tend to be localized to local containment and
> cross-references. Expressions such as allInstances() and closure() are
> what will get you into trouble.
> Cheers,
> Christian
> Chris Lenz wrote:
>> 1)
>> Am I right that OCL requieres that the whole emf instance must be in the
>> heap to make the query evaluation.
>>
>> 2) If I use CDO to persistence EMF instances, and I need something like
>> OCL have I to load the complete EMF model to the heap.
>>
>> Thanx Chris
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
| |
Re: OCL or QUERY and CDO [message #586726 is a reply to message #46587] |
Tue, 29 August 2006 13:59 |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Very cool! Nice work, Eike!
Christian
Eike Stepper wrote:
> Chris,
>
> Regarding 2) I've just added OCL support for CDO. It works with lazy
> remote extents so you don't have to manually load the whole model to the
> heap before evaluating OCL expressions. See
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=151560 for details and
> examples.
>
> Cheers
> /Eike
>
>
> Chris Lenz schrieb:
>> 1)
>> Am I right that OCL requieres that the whole emf instance must be in the
>> heap to make the query evaluation.
>>
>> 2) If I use CDO to persistence EMF instances, and I need something like
>> OCL have I to load the complete EMF model to the heap.
>>
>> Thanx Chris
|
|
|
Re: OCL or QUERY and CDO [message #586835 is a reply to message #47530] |
Tue, 29 August 2006 16:54 |
|
Christian W. Damus schrieb:
> Very cool! Nice work, Eike!
Thank you Chris.
It was rather easy due to the good architecture of your OCL implementation ;-)
Cheers
/Eike
>
> Christian
>
>
> Eike Stepper wrote:
>
>> Chris,
>>
>> Regarding 2) I've just added OCL support for CDO. It works with lazy
>> remote extents so you don't have to manually load the whole model to the
>> heap before evaluating OCL expressions. See
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=151560 for details and
>> examples.
>>
>> Cheers
>> /Eike
>>
>>
>> Chris Lenz schrieb:
>>> 1)
>>> Am I right that OCL requieres that the whole emf instance must be in the
>>> heap to make the query evaluation.
>>>
>>> 2) If I use CDO to persistence EMF instances, and I need something like
>>> OCL have I to load the complete EMF model to the heap.
>>>
>>> Thanx Chris
>
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Goto Forum:
Current Time: Fri Mar 29 11:27:20 GMT 2024
Powered by FUDForum. Page generated in 0.04242 seconds
|