| Running the Class2Relational examples from the zoo [message #993881] |
Tue, 25 December 2012 15:19  |
Teemu Kanstrén Messages: 4 Registered: September 2009 |
Junior Member |
|
|
Hello all,
I am trying to get some basic ATL examples running. Specifically, I am trying out the examples of transforming a class diagram definition to a relational database schema definition. This is the Class2Relational example from the ATL transformation zoo.
I got the ATL tutorial for transforming families to persons running fine and it produces the output as expected. So the basic setup should be ok.
But when I try to run the Class2Relational example, all I get is an empty file as output.
I tried to do this example first in the tutorial style by creating ecore models from the Class.xmi and Relational.xmi files, defining the configuration and running the Class2Relational.atl transformation. This produced the above empty file.
I then figured maybe I am just doing something wrong and re-tried with a new eclipse project where I just copied all the files (including directory structure) from the example as is. I figured maybe there is something I missed or changed wrong. Still it produces the same empty file.
Trying to run the example also complains about the "strings" library. It seemed to give a NumberFormatException, although couldn't figure out from where. There was a note in the Class2Relational.atl file to take the strings library out if there are problems. So I did that. Now, if I take the "strings" out as a library from the run configuration, and remove the "uses" import for it from the Class2Relational.atl file, but leave the calls to firstToLower() in the same file, it still gives me the same empty file when running the transformation. I was expecting a compile error or something as I though "firstToLower()" was in strings library. Unfortunately, I have no idea how to properly debug what happens in each step.
Anyway, this is where I am stuck at. Any ideas what is wrong? That is, how do I get the Class2Relational actually running..?
Thanks,
Teemu
|
|
|
|
|
| Re: Running the Class2Relational examples from the zoo [message #997548 is a reply to message #997522] |
Tue, 08 January 2013 04:14   |
Hugo Bruneliere Messages: 460 Registered: July 2009 |
Senior Member |
|
|
I've checked again the files provided in this example and they seem pretty "old".
Actually, Class.xmi and Relational.xmi are already the two metamodels defined in Ecore: they should be simply renamed as Class.ecore and Relational.ecore.
outClassXMI.ecore is in fact the input Class model (i.e. that conforms to the Class.ecore metamodel) and should be better renamed sampleClass.xmi (or something similar).
Then, starting from this, you should be able to set up properly a new launch configuration to produce as output a Relational model that could be named sampleRelational.xmi for instance.
You may have to modify/simplify a bit the transformation, but from what I've seen its overall structure is correct.
Best regards,
Hugo
------------------------------------------
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.01904 seconds