Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » [ATL] Load the genmodel instead of the Ecore file?
[ATL] Load the genmodel instead of the Ecore file? [message #1219863] Fri, 06 December 2013 10:42 Go to next message
Gunnar Arndt is currently offline Gunnar ArndtFriend
Messages: 57
Registered: June 2012
Member
Is there a way to load the model's genmodel file to an ATL transformation instead of the model's Ecore file?

The models used have been generated from several XML schema definitions (XSD files), with a top-level one that imports the other ones. A seperate Ecore file is created for each of the XSDs, but there is only a single genmodel for all of them.

I would prefer to load that single genmodel to the ATL transformation instead of several Ecore models, especially because I encounter problems when trying to put child model elements to the top-level model (described in earlier threads: 'containment references cannot span across models').
Of course, I have tested loading the genmodel, but it does not work:
Package with uri 'http://com.customer.dat/modeltransformation/1.0' not found.

Anything I should change to get that done? Thanks for any idea.
Re: [ATL] Load the genmodel instead of the Ecore file? [message #1219913 is a reply to message #1219863] Fri, 06 December 2013 16:53 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 612
Registered: July 2009
Senior Member
Hello,

Have you set the launching option "Allow inter-model references" to true?

Concerning the loading of metamodel(s): if you load an Ecore model referencing other ones, they should be loaded too by ATL.
If not working on the genmodel for any reason, a workaround would be to create artificially a new Ecore model simply referencing all your Ecore models generated from the XSDs.


------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
Re: [ATL] Load the genmodel instead of the Ecore file? [message #1220031 is a reply to message #1219863] Mon, 09 December 2013 09:05 Go to previous message
Gunnar Arndt is currently offline Gunnar ArndtFriend
Messages: 57
Registered: June 2012
Member
Hugo,

that seems to be exactly the solution I have finally found Friday evening.

I had imported the Ecore model from an XSD which imports several other XSDs. Eclipse created several Ecore models from that, and a genmodel which imports all the Ecore models. When I looked closer at the Ecore models, I noticed that they do not have any knowledge of each other, so I copied the packages from the extending Ecore packages into the package of the root Ecore model.
Now, ATL loads everything I need from a single Ecore model (i.e., that model and all its extensions).

I am curious about the other members opinions on that fact: Would you consider that behavior a bug of EMF's XSD importer?
I think that a relationship of several imported XSDs should be represented not only in the genmodel, but in the Ecore, too.
Previous Topic:[ATL] Library in EMFTVM launch config?
Next Topic:[ATL] Containment references cannot span across models
Goto Forum:
  


Current Time: Wed Nov 26 16:32:07 GMT 2014

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

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