Skip to main content


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 12:52 Go to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
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 14:00 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
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: Fri Apr 19 09:23:05 GMT 2024

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

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

Back to the top