Skip to main content



      Home
Home » Archived » M2M (model-to-model transformation) » transformation ATL
transformation ATL [message #88582] Tue, 19 August 2008 22:55 Go to next message
Eclipse UserFriend
Hi Friends

I'm trying to run an atl transformation over uml2 model but I cannot
generate all classes into yours respective packages.


rule MergeClass {
from s : UML2!Class (
to t : UML2!Class mapsTo s (
isAbstract <- s.isAbstract,
name <- s.name,
namespace <- s.namespace (? in uml2 ?)
)
}

oes anyone know how I can assign the element namaspace in uml2?
In uml1.4 , I just set: namespace <- s.namespace!

Best Regards
Re: transformation ATL [message #88598 is a reply to message #88582] Wed, 20 August 2008 05:58 Go to previous messageGo to next message
Eclipse UserFriend
Geam Carlos schrieb:
> Hi Friends
>
> I'm trying to run an atl transformation over uml2 model but I cannot
> generate all classes into yours respective packages.
>
>
> rule MergeClass {
> from s : UML2!Class (
> to t : UML2!Class mapsTo s (
> isAbstract <- s.isAbstract,
> name <- s.name,
> namespace <- s.namespace (? in uml2 ?)
> )
> }
>
> oes anyone know how I can assign the element namaspace in uml2? In
> uml1.4 , I just set: namespace <- s.namespace!
>
> Best Regards
>
You don't have to, namespace computed.
greetings, urs.
Re: transformation ATL [message #88613 is a reply to message #88598] Wed, 20 August 2008 19:00 Go to previous messageGo to next message
Eclipse UserFriend
Hi urs,

When I run an uml2 atl transformation programmatically the generated model
don't has the MODEL element as root element of tree. There are elements
(packages and classes) at the same level of the MODEL element.

I expected a document with this hierarch:
-Model
-Package1
-class1
-class2
-package2
-class3


But I obtain an document with this hierach:
-Model
-Package1
-class1
-class2
-Package2
-class3

Best Regards
Re: transformation ATL [message #88628 is a reply to message #88613] Thu, 21 August 2008 02:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: me.urszeidler.de

packagedElement <- invar.packagedElement,

Is the important statement to get the package hierarchy right.

Here are the examples of the rules for model and package :


rule ModelRule {
from invar : UML2!"uml::Model" (thisModule.ModelGuard(invar))
to Modelvar : UML2!Model (
name <- invar.name,
visibility <- invar.visibility,
viewpoint <- invar.viewpoint,
eAnnotations <- invar.eAnnotations,
ownedComment <- invar.ownedComment,
clientDependency <- invar.clientDependency,
nameExpression <- invar.nameExpression,
elementImport <- invar.elementImport,
packageImport <- invar.packageImport,
ownedRule <- invar.ownedRule,
owningTemplateParameter <-invar.owningTemplateParameter,
templateParameter <- invar.templateParameter,
templateBinding <- invar.templateBinding,
ownedTemplateSignature <- invar.ownedTemplateSignature,
--ownedType <- invar.ownedType,
packageMerge <- invar.packageMerge,
packagedElement <- invar.packagedElement,
--nestedPackage <- invar.nestedPackage,
nestingPackage <- invar.nestingPackage,
profileApplication <- invar.profileApplication
)
do {

invar.debug('ModelRule');
for (p in invar.getAllAppliedProfiles()){
--p.debug();
thisModule.findProfile(p.getQualifiedName()).debug('profile' );
Modelvar.applyProfile(thisModule.findProfile(p.getQualifiedN ame()));
}

thisModule.copyStereoType(invar,Modelvar);
}
}


rule PackageRule {
from invar : UML2!"uml::Package" (thisModule.PackageGuard(invar))
to Packagevar : UML2!Package (
name <- invar.name,
visibility <- invar.visibility,
eAnnotations <- invar.eAnnotations,
ownedComment <- invar.ownedComment,
clientDependency <- invar.clientDependency,
nameExpression <- invar.nameExpression,
elementImport <- invar.elementImport,
packageImport <- invar.packageImport,
ownedRule <- invar.ownedRule,
owningTemplateParameter <-invar.owningTemplateParameter,
templateParameter <- invar.templateParameter,
templateBinding <- invar.templateBinding,
ownedTemplateSignature <- invar.ownedTemplateSignature,
ownedType <- invar.ownedType,
packageMerge <- invar.packageMerge,
packagedElement <- invar.packagedElement,
-- nestedPackage <- invar.nestedPackage,
nestingPackage <- invar.nestingPackage,
profileApplication <- invar.profileApplication
)
do {

thisModule.copyStereoType(invar,Packagevar);
-- invar.debug('PackageRule');
}
}



greetings urs.
Re: transformation ATL [message #88657 is a reply to message #88628] Thu, 21 August 2008 08:19 Go to previous messageGo to next message
Eclipse UserFriend
Hi urs,
Very much thanks your attention!

I used the transformation rule that you cited, but released the following
errors:
****** BEGIN Stack Trace
message: feature owningTemplateParameter does not exist on UML2!Model
****** BEGIN Stack Trace
message: feature packagedElement does not exist on UML2!Model
****** BEGIN Stack Trace
message: feature nestingPackage is not changeable
****** BEGIN Stack Trace
message: feature profileApplication does not exist on UML2!Model

I am using the follow eclipse-uml2-1.1.1 API. Will be this the problem?

I have a dependency with this API (eclipse-uml2-1.1.1), because I am using
the repository andromda-repository-emf-3.2
( http://galaxy.andromda.org/docs-3.2/andromda-repository-emf/ index.html)
to persist the uml models. Do you know some repository else?

The rule below:
rule Model {
from s : UML2!Model(thisModule.inElements->includes(s))
to
t : UML2!Model mapsTo s(
name <- s.name,
visibility <- s.visibility,
viewpoint <- s.viewpoint,
eAnnotations <- s.eAnnotations,
ownedComment <- s.ownedComment,
clientDependency <- s.clientDependency,
nameExpression <- s.nameExpression,
elementImport <- s.elementImport,
packageImport <- s.packageImport,
ownedRule <- s.ownedRule,
-- owningTemplateParameter <-s.owningTemplateParameter,
templateParameter <- s.templateParameter,
templateBinding <- s.templateBinding,
ownedTemplateSignature <- s.ownedTemplateSignature,
--ownedType <- s.ownedType,
packageMerge <- s.packageMerge,
-- packagedElement <- s.packagedElement,
-- nestedPackage <- s.nestedPackage,
-- nestingPackage <- s.nestingPackage,
-- profileApplication <- s.profileApplication
)
}


grateful for your help! Geam Carlos.
Re: transformation ATL [message #88673 is a reply to message #88657] Thu, 21 August 2008 10:19 Go to previous messageGo to next message
Eclipse UserFriend
Geam Carlos schrieb:
> Hi urs,
> Very much thanks your attention!
>
> I used the transformation rule that you cited, but released the
> following errors:
> ****** BEGIN Stack Trace
> message: feature owningTemplateParameter does not exist on UML2!Model
> ****** BEGIN Stack Trace
> message: feature packagedElement does not exist on UML2!Model
> ****** BEGIN Stack Trace
> message: feature nestingPackage is not changeable
> ****** BEGIN Stack Trace
> message: feature profileApplication does not exist on UML2!Model
>
> I am using the follow eclipse-uml2-1.1.1 API. Will be this the problem?
>
It looks like.
This rules are for "http://www.eclipse.org/uml2/2.1.0/UML",
and not for the 1.xx version. And I'm really sorry, i did not work with
the 1.xx version of uml2 and ATL.

> I have a dependency with this API (eclipse-uml2-1.1.1), because I am
> using the repository andromda-repository-emf-3.2
> ( http://galaxy.andromda.org/docs-3.2/andromda-repository-emf/ index.html)
> to persist the uml models. Do you know some repository else?
>
I do not have any experience with andromda.
Sorry.

Greeting, urs.
Re: transformation ATL [message #88688 is a reply to message #88673] Thu, 21 August 2008 12:27 Go to previous message
Eclipse UserFriend
Hi urs,
You're right! It really is version uml2 1.x.

But, I am search any implentation of repository to version uml2 2.x. I use
the ATL transfornations of mode programmatically.

Do you know some implementation of repository, to persist the elements
version uml2 2.x?


grateful.
Previous Topic:Programatical launch of an ATL transformation from Ecore to Ecore
Next Topic:[QVTO] Parser error using ParameterDirectionKind enumeration
Goto Forum:
  


Current Time: Mon Jul 14 04:07:21 EDT 2025

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

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

Back to the top