| [CDO] Convert EObject to CDOObject *or* load ecore file as dynamic/native CDO object [message #1015861] |
Sun, 03 March 2013 17:39  |
Kirsten M. Z. Messages: 106 Registered: July 2010 |
Senior Member |
|
|
Hi there,
I am trying to figuring out more about the conjunction of regular EMF object (e.g. as loaded from files) and CDO objects. I understand the differences and can already work in both worlds, but I have no idea how these worlds can be connected (conversion/import/export). Either this is not supported well, or I haven't found the correct documentation/tutorial yet. In general, I want to work with dynamic/reflective (DynamicCDOObject) as much as possible (no GenModel).
What I am trying to do right now: loading an ecore file and save the structure within a CDO resource. I am failing, because I want to avoid the legacy mode (no legacy mode). Of course, if I load the Ecore file the regular way, I have EPackages (etc) which are not derived from CDOObject (would require legacy mode then). How is storing in the CDO repository possible then? I tried injecting in order to get DynamicCDOObjects:
EcorePackage.eINSTANCE.setEFactoryInstance(new CDOFactoryImpl(EcorePackage.eINSTANCE));
This does not work (still investigating why). I also tried changing the resource factory, but I think this is the wrong way...
Then I thought about converting, and I also found CDOUtil.getCDOObject(...). However, this method does not work recursivly, right?
Are there some import/export mechanisms?
I have many ideas... each idea means several hours of investigation Could someone help and tell me how this is intended to work? Is there a tutorial/manual about that topic?
Thanks in advance!
[Updated on: Sun, 03 March 2013 17:42] Report message to a moderator
|
|
|