Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Dealing with extended meta model
[CDO] Dealing with extended meta model [message #1006478] Thu, 31 January 2013 07:52 Go to next message
Christophe Bouhier is currently offline Christophe Bouhier
Messages: 895
Registered: July 2009
Senior Member
EMF since some time supports code generation of derived features, invariants etc...
In my original model, I defined these things, starting from .XSD. Here is an example:

<!-- Derived attributes -->
<xs:attribute ecore:derived="true" ecore:transient="true"
ecore:volatile="true" name="Count" type="xs:int">
<xs:annotation>
<xs:documentation>OCL derived feature: Count all equipments.
</xs:documentation>
<xs:appinfo ecore:key="derivation"
source="http://www.eclipse.org/emf/2002/Ecore/OCL">self.equipments-&gt;size()
</xs:appinfo>
</xs:annotation>
</xs:attribute>


Now I wonder, how does CDO deal with this? I see in the generated Class for this attribute delegates
to eGet(). Does the eStore pass it on to the OCL Query handler? How is this supposed to work?

thank you
Christophe





Re: [CDO] Dealing with extended meta model [message #1006497 is a reply to message #1006478] Thu, 31 January 2013 09:00 Go to previous message
Eike Stepper is currently offline Eike Stepper
Messages: 5481
Registered: July 2009
Senior Member
Am 31.01.2013 13:52, schrieb Christophe Bouhier:
> EMF since some time supports code generation of derived features, invariants etc... In my original model, I defined
> these things, starting from .XSD. Here is an example:
> <!-- Derived attributes -->
> <xs:attribute ecore:derived="true" ecore:transient="true"
> ecore:volatile="true" name="Count" type="xs:int">
> <xs:annotation>
> <xs:documentation>OCL derived feature: Count all equipments.
> </xs:documentation>
> <xs:appinfo ecore:key="derivation"
> source="http://www.eclipse.org/emf/2002/Ecore/OCL">self.equipments->size()
> </xs:appinfo>
> </xs:annotation>
> </xs:attribute>
>
>
> Now I wonder, how does CDO deal with this? I see in the generated Class for this attribute delegates
> to eGet(). Does the eStore pass it on to the OCL Query handler? How is this supposed to work?
I've never used this functionality myself, but I suspect that annotated OCL expressions get evaluated on the client side.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Previous Topic:[CDO] Setting Security : Authentication & Access control
Next Topic:[CDO] CDO/GMF compatibility
Goto Forum:
  


Current Time: Thu Jul 24 02:42:29 EDT 2014

Powered by FUDForum. Page generated in 0.01509 seconds