[CDO] Dealing with extended meta model [message #1006478] |
Thu, 31 January 2013 07:52  |
Eclipse User |
|
|
|
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?
thank you
Christophe
|
|
|
Re: [CDO] Dealing with extended meta model [message #1006497 is a reply to message #1006478] |
Thu, 31 January 2013 09:00  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.07807 seconds