EMF api - constructing XMI from XMI [message #850486] |
Fri, 20 April 2012 04:36 |
Juan Castel Messages: 20 Registered: April 2012 |
Junior Member |
|
|
Hi, all.
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:
if(elementsXMI_one.get(i).getName().equals(XMI_element_two_name))
createThirdXMIObject(elementsXMI_one.get(i),XMI_element_two);
.
.
.
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.
-
Attachment: XMI_one.jpg
(Size: 80.70KB, Downloaded 376 times) -
Attachment: XMI_two.jpg
(Size: 33.25KB, Downloaded 411 times) -
Attachment: XMI_three.jpg
(Size: 65.22KB, Downloaded 346 times)
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03143 seconds