Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » MoDisco » EMF api - constructing XMI from XMI
EMF api - constructing XMI from XMI [message #850486] Fri, 20 April 2012 04:36 Go to next message
Juan Castel is currently offline Juan CastelFriend
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:
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 376 times)
  • Attachment: XMI_two.jpg
    (Size: 33.25KB, Downloaded 411 times)
  • Attachment: XMI_three.jpg
    (Size: 65.22KB, Downloaded 346 times)
Re: EMF api - constructing XMI from XMI [message #850867 is a reply to message #850486] Fri, 20 April 2012 12:08 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
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


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: EMF api - constructing XMI from XMI [message #851462 is a reply to message #850867] Sat, 21 April 2012 01:37 Go to previous messageGo to next message
Juan Castel is currently offline Juan CastelFriend
Messages: 20
Registered: April 2012
Junior Member
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 22:53 Go to previous message
Juan Castel is currently offline Juan CastelFriend
Messages: 20
Registered: April 2012
Junior Member
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: Fri Apr 26 08:14:31 GMT 2024

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

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

Back to the top