Skip to main content



      Home
Home » Modeling » MoDisco » EMF api - constructing XMI from XMI
EMF api - constructing XMI from XMI [message #850486] Fri, 20 April 2012 00:36 Go to next message
Eclipse UserFriend
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:
EClass s;

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 417 times)
  • Attachment: XMI_two.jpg
    (Size: 33.25KB, Downloaded 446 times)
  • Attachment: XMI_three.jpg
    (Size: 65.22KB, Downloaded 394 times)
Re: EMF api - constructing XMI from XMI [message #850867 is a reply to message #850486] Fri, 20 April 2012 08:08 Go to previous messageGo to next message
Eclipse UserFriend
Hello Juan,

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/

Best regards,

Hugo
Re: EMF api - constructing XMI from XMI [message #851462 is a reply to message #850867] Fri, 20 April 2012 21:37 Go to previous messageGo to next message
Eclipse UserFriend
Thank you so much, Hugo, I'll keep this thread posted.
Re: EMF api - constructing XMI from XMI [message #854363 is a reply to message #851462] Mon, 23 April 2012 18:53 Go to previous message
Eclipse UserFriend
Hugo, it seems that a message I wrote on friday did not get posted, I can't find it; I wrote this question in another forum but I just cannot find it.

Thank you.
Previous Topic:reverse engineering source code with method body
Next Topic:JSP MoDisco discoverer with JSP files from Struts Project
Goto Forum:
  


Current Time: Mon May 12 15:16:43 EDT 2025

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

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

Back to the top