Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Re: Two metamodels into one
[ATL] Re: Two metamodels into one [message #80445] Tue, 29 April 2008 17:14 Go to next message
Eclipse UserFriend
Originally posted by: codeslave.ca.ibm.com

Copying this question to the ATL newsgroup, eclipse.modeling.m2m.

Jorge Roberto wrote:
> Hi, i am making a investigation about this tecnology to know if i can
> use in my tesis, but i need to make a integration of 2 or more
> metamodels into 1, but i canŽt, in the time that i write two inputs in
> the from inside of the rule this doesnŽt make anything, dont crash, dont
> message error, just a output without information. i take the
> Author2Person example for this, i include another package, my atl is this
>
> module Author2Person2; -- Module Template
> create OUT : Person from IN : Author, IN2 : Author2;
>
> rule Author2
> {
> from a : Author!Author
> to
> p : Person!Person
> (
> name <- a.name, surname <- a.surname
> )
> }
>
> the output i like the example without modification
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <xmi:XMI xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI" xmlns="Person">
> <Person name="Yuni" surname="Higuera"/>
> <Person name="Jorge" surname="Rivas"/>
> <Person name="Juan" surname="Rivas"/>
> <Person name="Elsie" surname="Higuera"/>
> </xmi:XMI>
>
> but when i do this
> module Author2Person2; -- Module Template
> create OUT : Person from IN : Author, IN2 : Author2;
>
> rule Author2
> {
> from a : Author!Author, b : Author2!Author2
> to
> p : Person!Person
> (
> name <- a.name, surname <- a.surname
> )
> }
>
> note: the from in the rule is the diference, the output is this
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <xmi:XMI xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI" xmlns="Person">
> <Person/>
> <Person/>
> <Person/>
> <Person/>
> </xmi:XMI>
>
> with no message error.
>
> any help its usefull, sorry for my english, its not my native lenguaje.
>
> thanks, bye
>
Re: [ATL] Re: Two metamodels into one [message #80511 is a reply to message #80445] Wed, 30 April 2008 08:37 Go to previous messageGo to next message
William Piers is currently offline William PiersFriend
Messages: 301
Registered: July 2009
Senior Member
Hello,

Nick Boldt a écrit :
> Copying this question to the ATL newsgroup, eclipse.modeling.m2m.
>

Thanks !

> Jorge Roberto wrote:
>> Hi, i am making a investigation about this tecnology to know if i can
>> use in my tesis, but i need to make a integration of 2 or more
>> metamodels into 1, but i canŽt, in the time that i write two inputs in
>> the from inside of the rule this doesnŽt make anything, dont crash,
>> dont message error, just a output without information. i take the
>> Author2Person example for this, i include another package, my atl is this
>>
>> module Author2Person2; -- Module Template
>> create OUT : Person from IN : Author, IN2 : Author2;
>>
>> rule Author2
>> {
>> from a : Author!Author
>> to
>> p : Person!Person
>> (
>> name <- a.name, surname <- a.surname
>> )
>> }
>>
>> the output i like the example without modification
>> <?xml version="1.0" encoding="ISO-8859-1"?>
>> <xmi:XMI xmi:version="2.0"
>> xmlns:xmi="http://www.omg.org/XMI" xmlns="Person">
>> <Person name="Yuni" surname="Higuera"/>
>> <Person name="Jorge" surname="Rivas"/>
>> <Person name="Juan" surname="Rivas"/>
>> <Person name="Elsie" surname="Higuera"/>
>> </xmi:XMI>
>>
>> but when i do this
>> module Author2Person2; -- Module Template
>> create OUT : Person from IN : Author, IN2 : Author2;
>>
*snip*

if you want to use multiple outputs you must specify the compiler by
adding this line at the top of your transformation file :

-- @atlcompiler atl2006

>> rule Author2
>> {
>> from a : Author!Author, b : Author2!Author2
>> to
>> p : Person!Person
>> (
>> name <- a.name, surname <- a.surname
>> )
>> }
>>
>> note: the from in the rule is the diference, the output is this
>>
>> <?xml version="1.0" encoding="ISO-8859-1"?>
>> <xmi:XMI xmi:version="2.0"
>> xmlns:xmi="http://www.omg.org/XMI" xmlns="Person">
>> <Person/>
>> <Person/>
>> <Person/>
>> <Person/>
>> </xmi:XMI>
>>
>> with no message error.
>>
>> any help its usefull, sorry for my english, its not my native lenguaje.
>>
>> thanks, bye
>>
Re: [ATL] Re: Two metamodels into one [message #81083 is a reply to message #80511] Thu, 08 May 2008 14:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rivas_jorge55.hotmaill.com

thanks, but i donŽt want multiple outputs, what i want itŽs multiple
inputs.

make a atl file within two or more ecore files in from section in rule
statement.

my question is, if i can make something like this

rule Author2
{
from
a : Author!Author,
b : Author2!Author2

to
p : Person!Person
(
name <- a.name,
surname <- b.surname
)
}

the from with two inputs "a" and "b" and mixin to make only once outpus.
Re: [ATL] Re: Two metamodels into one [message #81146 is a reply to message #81083] Tue, 13 May 2008 10:06 Go to previous messageGo to next message
William Piers is currently offline William PiersFriend
Messages: 301
Registered: July 2009
Senior Member
Hello,

Jorge Roberto a écrit :
> thanks, but i donŽt want multiple outputs, what i want itŽs multiple
> inputs.
>
> make a atl file within two or more ecore files in from section in rule
> statement.
>
> my question is, if i can make something like this
>
> rule Author2
> {
> from a : Author!Author,
> b : Author2!Author2
>
> to
> p : Person!Person
> (
> name <- a.name, surname <- b.surname
> )
> }
>
> the from with two inputs "a" and "b" and mixin to make only once outpus.
>

Yes you can do that, also using atl2006 compiler.

Regards,

William
Re: [ATL] Re: Two metamodels into one [message #82124 is a reply to message #81146] Fri, 23 May 2008 14:32 Go to previous message
Eclipse UserFriend
Originally posted by: rivas_jorge55.hotmail.com

thanks, that is the solution, the compilator directive it works, but i
canŽt find information about this, can you say me where i can find the
something about this, because now i want to make something like a logic
join between models, ok, thanks a lot, see you
Previous Topic:[ATL] Multiple metamodels for a single source file. possible?
Next Topic:[ATL] uml2 models transformation
Goto Forum:
  


Current Time: Fri Mar 29 05:00:07 GMT 2024

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

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

Back to the top