Different versions - same metamodel [message #899111] |
Mon, 30 July 2012 11:13  |
Eclipse User |
|
|
|
Hello,
I want to create a transformation which will do "downgrade" of uml-models (only a very small subset to be exact). I have UML2-models with version 3.0.0 and want to transform them to UML2-modles with version 2.1.0.
Currently my script looks like this:
modeltype UML23 uses 'http://www.eclipse.org/uml2/3.0.0/UML';
modeltype UML21 uses 'http://www.eclipse.org/uml2/2.1.0/UML';
transformation Test1(in source : UML23, out target : UML21);
main() {
source.rootObjects()[UML23::Model]->map Model2Model();
}
mapping UML23::Model::Model2Model() : UML21::Model {
name := self.name + "_mapped";
}
When I execute the transformation, the target-model is also saved with the version 3.0.0. This probably happens, because the serializer for version 2.1.0 is not available, so the 3.0.0 is used. I then tried to make the modeltypes strict and expected I would get an error that the serializer for 2.1.0 can not be found. But there was no error and the target-model still was version 3.0.0.
What do I have to do, to make this work?
Thanks
Wolfgang
|
|
|
|
|
Re: Different versions - same metamodel [message #899322 is a reply to message #899203] |
Tue, 31 July 2012 09:18  |
Eclipse User |
|
|
|
If I recall correctly, you'd need XML Helper and XML Save implementations that serialize based on the "old" format. Note that the resource implementations provided by UML2 are designed to transform things in the "forward" direction, so there could well be other obstacles to overcome...
Kenn
|
|
|
Powered by
FUDForum. Page generated in 0.08185 seconds