|EMF api - constructing XMI from XMI [message #850486]
||Fri, 20 April 2012 00:36
| Juan Castel
Registered: April 2012
I'm so glad to find this forum, this topic is very interesting.
Now, I need to construct an XMI model from three other ones: one is java model from java project from MoDisco and the other one is a XMI file exported from Enterprise Architect 7.5, from a SOMF diagram with three components, three atomic services and three consumers and some arrows between them; the third one is the target model to create according to what I find from the other two.
I need to programmatically load all XMI files, query them and find the classes and methods annotated with personalized annotations and then construct a third XMI file with elements from the third XMI file. The third XMI file is actually any XMI model which conforms to an ECORE metamodel already defined.
First, can I do this? It would be something like:
XMIResource.save(thirdModel); //And this line writes a XMI model conforming to the third metamodel
Also, I cannot find the API for doing something as simple as:
in Eclipse Indigo; the compiler cannot resolve it. I have a EMF empty project but cannot add any libraries for accessing those EMF objects.
Where can I find the jars necessary to work with Ecore elements?
I'm attaching screenshots of both XMI files (java model and Enterprise Architect XMI) and the third one which is the package CandidateArchitecture in archivol.ecore.
Thank very, very much.
(Size: 80.70KB, Downloaded 76 times)
(Size: 33.25KB, Downloaded 80 times)
(Size: 65.22KB, Downloaded 72 times)
|Re: EMF api - constructing XMI from XMI [message #850867 is a reply to message #850486]
||Fri, 20 April 2012 08:08
| Hugo Bruneliere
Registered: July 2009
Your current problem seems more related to the use of EMF for model handling than to MoDisco and its components themselves.
I think you should rather post your question onto the EMF forum.
Also, looking to what you are intending to do, it really sounds like a model-to-model transformation. I encourage you to take a look to the ATL model transformation language and toolkit as provided by Eclipse Modeling: http://www.eclipse.org/atl/
Hugo Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
Powered by FUDForum
. Page generated in 0.01816 seconds