[ATL] Error loading platform [message #524000] |
Tue, 30 March 2010 05:05  |
Eclipse User |
|
|
|
I created a Xpand project, with two metamodels, one called metamodel (an object metamodel), and another metamodel called relationnel (an relationnal metamodel).
Now I'm trying to transform an xmi model I created following the object metamodel into a relationnal metamodel.
I started with the basics, for all objects of type Class (in object metamodel), I want an Object of type Table (in relationnal metamodel). both have a name attribute.
when I try to run my ATL file, I get
Error loading platform:/resource/Object2Relationnal/metamodels/metamodel.ecore: null
What does that mean ?
my metamodel is in metamodels folder, and the project name is Object2Relationnal, so it should be able to find it.
Here is my atl file
module Object2Relationnal;
-- @path Object=/metamodels/metamodel.ecore
-- @path Relationnel=/metamodels/relationnel.ecore
create Out : Relationnel from IN : Object;
-- Takes all classes from Model, and creates a Table from it
rule Class2Table{
from
s : Object!Class
to
t : Relationnel!Table(
name <- s.name
)
}
|
|
|
Re: [ATL] Error loading platform [message #524030 is a reply to message #524000] |
Tue, 30 March 2010 03:18   |
Eclipse User |
|
|
|
Originally posted by: thierry.fortin.obeo.fr
Hello Maxime,
First of all, your two "-- @path" lines won't work, because you have to
include the project name in the path. So your complete path lines would be:
-- @path Object=/Object2Relationnal/metamodels/metamodel.ecore
-- @path Relationnel=/Object2Relationnal/metamodels/relationnel.ecore
These lines are generally put at the top of the file, above the module
declaration. But actually, they are only used for completion, so it
won't solve your problem.
Concerning the error you get, it's weird. Are you sure about your launch
configuration, that everything is correct (no confusion between
"relationnal" and "relationnel")? Could you be more accurate about you
launching the transformation?
Regards,
Thierry
Le 30/03/2010 11:05, Maxime Lecourt a écrit :
> I created a Xpand project, with two metamodels, one called metamodel (an
> object metamodel), and another metamodel called relationnel (an
> relationnal metamodel).
>
> Now I'm trying to transform an xmi model I created following the object
> metamodel into a relationnal metamodel.
>
> I started with the basics, for all objects of type Class (in object
> metamodel), I want an Object of type Table (in relationnal metamodel).
> both have a name attribute.
>
> when I try to run my ATL file, I get
> Error loading
> platform:/resource/Object2Relationnal/metamodels/metamodel.e core: null
>
>
> What does that mean ?
> my metamodel is in metamodels folder, and the project name is
> Object2Relationnal, so it should be able to find it.
>
> Here is my atl file
> module Object2Relationnal;
>
> -- @path Object=/metamodels/metamodel.ecore
> -- @path Relationnel=/metamodels/relationnel.ecore
>
> create Out : Relationnel from IN : Object;
>
> -- Takes all classes from Model, and creates a Table from it
> rule Class2Table{
> from
> s : Object!Class
> to
> t : Relationnel!Table(
> name <- s.name
> )
> }
|
|
|
|
|
|
|
|
|
|
Re: [ATL] Error loading platform [message #670818 is a reply to message #670813] |
Sun, 15 May 2011 13:52  |
Eclipse User |
|
|
|
And for completion, the example with NSPrefix=Families and NSPrefix=Persons in the respective ecore.file.
Don't forget to register the Metamodel (Model.ecore) via right-click after changing!
<?xml version="1.0" encoding="ISO-8859-1"?>
<Families:Family xmi:version="2.0" xmlns:xmi="..."
xmlns:Families="http:someArbitraryNamespaceURI/Families/" lastName="March">
<father firstName="Jim"/>
<mother firstName="Cindy"/>
<sons firstName="Brandon"/>
<daughters firstName="Brenda"/>
</Families:Family>
Generated File:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="..." xmlns:Persons="http:someArbitraryNamespaceURI/Persons/">
<Persons:Male fullName="Jim March"/>
<Persons:Male fullName="Brandon March"/>
<Persons:Female fullName="Cindy March"/>
<Persons:Female fullName="Brenda March"/>
</xmi:XMI>
|
|
|
Powered by
FUDForum. Page generated in 0.05805 seconds