Skip to main content



      Home
Home » Archived » M2M (model-to-model transformation) » aggregation relationship?
aggregation relationship? [message #78716] Thu, 10 April 2008 16:20
Eclipse UserFriend
Originally posted by: comouraf-lixo.yahoo.fr

Hi,

After using the transformation down below, I expected to have a Model
containing a StructuredComponent, which, in turn, should contain an
AssemblyPart, since the attributes "parts" and "ownedElement" below are
aggregation-type. However, the result was simply:

<MARTE.CoreElements.Foundations:Model name="MyModel"/>
<MARTE.GCM:StructuredComponent name="A"/>
<MARTE.GCM:AssemblyPart name="propA"/>

While I expected something like:

<MARTE.CoreElements.Foundations:Model name="MyModel">
<ownedElement xsi:type="MARTE.GCM:StructuredComponent" name="A">
<parts xsi:type="MARTE.GCM:AssemblyPart" name="propA"/>
</ownedElement>
</MARTE.CoreElements.Foundations:Model>

Can anyone tell me what I am doing wrong? The transformation is reproduced
below.

Thanks for any clue,


César

------------------------------------------------------------ -----------------------------
transformation UML2MarteTemplate(in uml : UML, out marte:Marte);

main( in umlmodel:UML::Model, out martemodel:Marte::Model) {
martemodel:= umlmodel.map umlmodel2martemodel();
}
mapping UML::Model::umlmodel2martemodel() : Marte::Model {
name:=self.name;
ownedElement:=self.ownedElement->select(oclIsKindOf(UML::Class))- > collect(oclAsType(UML::Class)).mapClass2StructuredComponent( );}mapping UML::Class::Class2StructuredComponent() : GCM::StructuredComponent { name:=self.name; parts:=self.ownedAttribute.map Property2Part()->asBag();}mapping UML::Property::Property2Part() : AssemblyPart { name:=self.name;}
Previous Topic:[ATL] problem with applystereotype
Next Topic:[ATL] references between in and out models
Goto Forum:
  


Current Time: Sun Jun 01 21:04:36 EDT 2025

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

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

Back to the top