Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] creating aggregation relation between model elements
[ATL] creating aggregation relation between model elements [message #79216] Tue, 15 April 2008 13:07 Go to next message
Luis Pedro is currently offline Luis PedroFriend
Messages: 29
Registered: July 2009
Junior Member
Dear all,
I'm creating some transformation rules in ATL and I've the problem that
I'm not being able to create containment (aggregation) relations between
elements in the target model. This two of the rules I'm using:

rule init {
from
enumerations : enumerationDC!EnumerationDC
to
coopnpackage: COOPNMetaModel!COOPNPackage(
name <- 'COOPN_Enum_Package'
)
}

rule ADT {
from
dc : enumerationDC!DCEnum
to
coopnadt: COOPNMetaModel!"COOPNMetamodel::ADTModule::COOPNADT"(
name<- dc.name
)

}

COOPNMetaModel!COOPNPackage and COOPNMetamodel::ADTModule::COOPNADT are
related with each other by a 0..* aggregation (named "ownedModules")
with COOPNMetaModel!COOPNPackage as the EContaining Class.

Any hint on how can now associate the created coopnadt to the previously
created coopnpackage by the ownedModules aggregation?

Thanks very much in advance for your time and help.

Best regards,

Luis Pedro
Re: [ATL] creating aggregation relation between model elements [message #79258 is a reply to message #79216] Tue, 15 April 2008 15:02 Go to previous messageGo to next message
William Piers is currently offline William PiersFriend
Messages: 301
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------030305090005000303060509
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hello,

I put some indications inside your code :

Luis Pedro a
Re: [ATL] creating aggregation relation between model elements [message #79272 is a reply to message #79258] Tue, 15 April 2008 15:43 Go to previous message
Luis Pedro is currently offline Luis PedroFriend
Messages: 29
Registered: July 2009
Junior Member
Hi,
Thanks. I was not aware of that source of information! I was able to
solve the problem.

Again, thanks.

Best regards,

Luis Pedro

William Piers wrote:
> Hello,
>
> I put some indications inside your code :
>
> Luis Pedro a écrit :
>> Dear all,
>> I'm creating some transformation rules in ATL and I've the problem
>> that I'm not being able to create containment (aggregation) relations
>> between elements in the target model. This two of the rules I'm using:
>>
>> rule init {
>> from
>> enumerations : enumerationDC!EnumerationDC
>> to
>> coopnpackage: COOPNMetaModel!COOPNPackage(
>> name <- 'COOPN_Enum_Package'
> ownedModules <- -- put here an OCL expression retrieving --
> the list of enumerationDC!DCEnum, later transformed into coopnadt,
> -- that you want to link with coopnpackage.
> -- this may be a kind of : ownedModules <- enumerations.ownedDCEnum
>> )
>> }
>>
>> rule ADT {
>> from
>> dc : enumerationDC!DCEnum
>> to
>> coopnadt: COOPNMetaModel!"COOPNMetamodel::ADTModule::COOPNADT"(
>> name<- dc.name
>> ) }
>>
>> COOPNMetaModel!COOPNPackage and COOPNMetamodel::ADTModule::COOPNADT
>> are related with each other by a 0..* aggregation (named
>> "ownedModules") with COOPNMetaModel!COOPNPackage as the EContaining
>> Class.
>>
>> Any hint on how can now associate the created coopnadt to the
>> previously created coopnpackage by the ownedModules aggregation?
>>
>
> In order top better understand ATL implicit traceability links (between
> source and target model elements) I advise you to read those kind of
> simple examples : http://www.eclipse.org/m2m/atl/basicExamples_Patterns/
>
> Best Regards,
>
> William
>
>> Thanks very much in advance for your time and help.
>>
>> Best regards,
>>
>> Luis Pedro
Previous Topic:ATL installation problem
Next Topic:[ATL] UML 2 BPEL
Goto Forum:
  


Current Time: Thu Apr 25 01:59:31 GMT 2024

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

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

Back to the top