Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Get model's name
[ATL] Get model's name [message #77862] Fri, 28 March 2008 15:06 Go to next message
Eclipse UserFriend
Originally posted by: bch.bluexml.com

Hi,

I try to get a weaving model from 2 input models with an ATL
transformation. I need to fill (in the weaving model) the path to access
to models. Is it possible to get it in the ATL transformation ?

Thanks
Re: [ATL] Get model's name [message #77991 is a reply to message #77862] Mon, 31 March 2008 13:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Hugo.Bruneliere.univ-nantes.fr

Hi Benjamin,

The paths to access to the woven models are not directly stored into the
weaving model (".amw" file). They are stored into a separated XML
document (".amw.prop" file) which also contains additional information
such as the extensions of the core weaving metamodel which are used.
So basically your ATL transformation will takes as input the 2 woven
models and will generates as output the weaving model + the XML model
corresponding to the ".amw.prop" XML file.

About the problem of directly getting the path of an input model in an
ATL transformation, it is not realizable with the current version of ATL.
A solution is to add a parameter model (e.g. an XML model), which will
contain the missing information (i.e. the paths of the models), as an
additional input of your transformation.

I also forward this post to the AMW newsgroup as your problem also is
indirectly related to AMW.

Best regards,

Hugo

Benjamin CHEVALLEREAU a écrit :
> Hi,
>
> I try to get a weaving model from 2 input models with an ATL
> transformation. I need to fill (in the weaving model) the path to access
> to models. Is it possible to get it in the ATL transformation ?
>
> Thanks


--
--------------------------------------------------------
Hugo Bruneliere - R&D Engineer
ATLAS Group (INRIA & LINA) - University of Nantes
2, rue de la Houssiniere
44322 Nantes Cedex 3 - France
office +33 2 51 12 58 10 /\ cell.+33 6 07 42 45 30
EMail: Hugo.Bruneliere@univ-nantes.fr
http://www.sciences.univ-nantes.fr/lina/atl/
--------------------------------------------------------
Re: [ATL] Get model's name [message #78022 is a reply to message #77991] Mon, 31 March 2008 14:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mddfabro.ilog.fr

Hi Benjamin,

As Hugo said, ATL does not have a "native" solution to get the path of
models.

However, you can use the AMW Model Handler to obtain such facility.

The model handler has a method called generateModelRef(), which can be
called by any model element. For instance, you can call

MOF!EPackage.generateModelRef('modelname').

'modelname' is the name of the model declared in the ATL header. It
returns a String with the URI of the model.

To be able to use the handler, you must install the model handler
plug-in, and choose 'AMW' in the list of model handlers in the ATL
launch configuration.

The following link has more information about using the handler:

http://wiki.eclipse.org/index.php/AMW_Model_Handler#generate ModelRef

Regards,

Marcos.

Hugo Bruneliere wrote:
> Hi Benjamin,
>
> The paths to access to the woven models are not directly stored into the
> weaving model (".amw" file). They are stored into a separated XML
> document (".amw.prop" file) which also contains additional information
> such as the extensions of the core weaving metamodel which are used.
> So basically your ATL transformation will takes as input the 2 woven
> models and will generates as output the weaving model + the XML model
> corresponding to the ".amw.prop" XML file.
>
> About the problem of directly getting the path of an input model in an
> ATL transformation, it is not realizable with the current version of ATL.
> A solution is to add a parameter model (e.g. an XML model), which will
> contain the missing information (i.e. the paths of the models), as an
> additional input of your transformation.
>
> I also forward this post to the AMW newsgroup as your problem also is
> indirectly related to AMW.
>
> Best regards,
>
> Hugo
>
> Benjamin CHEVALLEREAU a écrit :
>> Hi,
>>
>> I try to get a weaving model from 2 input models with an ATL
>> transformation. I need to fill (in the weaving model) the path to
>> access to models. Is it possible to get it in the ATL transformation ?
>>
>> Thanks
>
>
Re: [ATL] Get model's name [message #78343 is a reply to message #78022] Fri, 04 April 2008 15:35 Go to previous message
Eclipse UserFriend
Originally posted by: bch.bluexml.com

Thanks for your help, I resolve my problem...

Marcos Didonet Del Fabro a écrit :
> Hi Benjamin,
>
> As Hugo said, ATL does not have a "native" solution to get the path of
> models.
>
> However, you can use the AMW Model Handler to obtain such facility.
>
> The model handler has a method called generateModelRef(), which can be
> called by any model element. For instance, you can call
>
> MOF!EPackage.generateModelRef('modelname').
>
> 'modelname' is the name of the model declared in the ATL header. It
> returns a String with the URI of the model.
>
> To be able to use the handler, you must install the model handler
> plug-in, and choose 'AMW' in the list of model handlers in the ATL
> launch configuration.
>
> The following link has more information about using the handler:
>
> http://wiki.eclipse.org/index.php/AMW_Model_Handler#generate ModelRef
>
> Regards,
>
> Marcos.
>
> Hugo Bruneliere wrote:
>> Hi Benjamin,
>>
>> The paths to access to the woven models are not directly stored into
>> the weaving model (".amw" file). They are stored into a separated XML
>> document (".amw.prop" file) which also contains additional information
>> such as the extensions of the core weaving metamodel which are used.
>> So basically your ATL transformation will takes as input the 2 woven
>> models and will generates as output the weaving model + the XML model
>> corresponding to the ".amw.prop" XML file.
>>
>> About the problem of directly getting the path of an input model in an
>> ATL transformation, it is not realizable with the current version of ATL.
>> A solution is to add a parameter model (e.g. an XML model), which will
>> contain the missing information (i.e. the paths of the models), as an
>> additional input of your transformation.
>>
>> I also forward this post to the AMW newsgroup as your problem also is
>> indirectly related to AMW.
>>
>> Best regards,
>>
>> Hugo
>>
>> Benjamin CHEVALLEREAU a écrit :
>>> Hi,
>>>
>>> I try to get a weaving model from 2 input models with an ATL
>>> transformation. I need to fill (in the weaving model) the path to
>>> access to models. Is it possible to get it in the ATL transformation ?
>>>
>>> Thanks
>>
>>
Previous Topic:[QVTO] Temporary objects, removing objects and current limitations ?
Next Topic:[AM3][ATL] Experiences getting ATL/AM3/TCS running from CVS
Goto Forum:
  


Current Time: Sat Dec 21 12:53:12 GMT 2024

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

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

Back to the top