Skip to main content



      Home
Home » Archived » M2M (model-to-model transformation) » [ATL] EMF primitive types
[ATL] EMF primitive types [message #37071] Fri, 11 May 2007 06:56 Go to next message
Eclipse UserFriend
I'm using a transformation that is designed to move a metamodel
from the km3 metametamodel space into the emf metametamodel
space. As part of this I'd like to change the type of an attribute
to one of the EMF primitive types, e.g. EString. Is this possible
with an ATL transformation?

I've tried setting the appropriate instanceClassName on the
primitive types in the KM3 metamodel. This allows me to
generate an implementation of the EMF form of the metamodel.
However, this is not sufficient for MOFScript to load the
metamodel, it appears that this required the attribute type
changes mentioned above.

Andy.

--
-- ------------------------------------------------------------ -------------
Dr Andy Carpenter
School of Computer Science,
University of Manchester, Manchester M13 9PL, UK
Email: Andy.Carpenter@manchester.ac.uk
Tel: +44 161 275 6168
Fax: +44 161 275 6280
Re: [ATL] EMF primitive types [message #37737 is a reply to message #37071] Tue, 15 May 2007 01:34 Go to previous message
Eclipse UserFriend
Hello,

> I'm using a transformation that is designed to move a metamodel
> from the km3 metametamodel space into the emf metametamodel
> space. As part of this I'd like to change the type of an attribute
> to one of the EMF primitive types, e.g. EString. Is this possible
> with an ATL transformation?

Yes, this is possible. You will however need to allow inter-model
references (see advanced tab in launch config), so that you may
initialize a property of a given target element with an element (i.e.,
EString) coming from another model (i.e., the metametamodel).

Then you can write something like:

type <- Ecore!DataType.allInstancesFrom('Ecore')->any(e | e.name =
'EString')

Note that I assumed that you declared Ecore : Ecore as a source model,
and referenced it "by URI" in the launch config.


Regards,

Frédéric Jouault
Previous Topic:Re: [ATL] How to create a new class
Next Topic:[ATL] Metamodel für XPDL 2.0 and / or AML
Goto Forum:
  


Current Time: Sat May 10 16:27:44 EDT 2025

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

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

Back to the top