Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsMapping of classes N to 1
https://www.eclipse.org/forums/index.php/mv/msg/1069210/1704230/#msg_1704230
Hello,
I am still new to QVTo and learning.
I am trying to transform a model SRC to DST.
Description of the mapping:
The attributes from SRC:Block are being mapped to the DST:Blocks, DST:Diagram and DST:Props
While trying to map SRC class 'Block' to DST classes Blocks I have tried to constructors and intermediate classes (I have attached the ecore diagrams). However, I am getting errors while doing so. Kindly help.
The code I tried:
-- Declaration with a condition: the instance may differ from the metamodel,
-- but should have exactly one Project object. Location specific reference.
modeltype SRC uses "com.example.src" where
{ self.objectsOfType(Model)->size() = 1 };
-- Strict declaration, using a package namespace URI
modeltype DST "strict" uses "com.example.dst";
transformation SRCTransformation(in Source: SRC, out Target: DST);
Also, kindly let me know if there are any tutorials/reference documents explaining the keywords.
Thank you,
Abhishek
]]>Abhishek Kappattanavar2015-08-09T11:01:50-00:00Re: Mapping of classes N to 1
https://www.eclipse.org/forums/index.php/mv/msg/1069210/1704280/#msg_1704280
For documentation about QVTo check the WIKI: https://wiki.eclipse.org/QVTo
If you want help with your error, please list the error as well. Also providing minimal examples of your problem in your question instead of listing everything will help in getting answers.
As a start, adding intermediate properties to intermediate classes is strange (and maybe not well supported by the implementation). Add those attributes directly to the intermediate class.
]]>Rolf Theunissen2015-08-10T06:58:22-00:00Re: Mapping of classes N to 1
https://www.eclipse.org/forums/index.php/mv/msg/1069210/1705959/#msg_1705959
Thank you for your inputs. I abandoned the usage of intermediate classes and I am trying other ways. And I am sorry, I shall try to keep it short.]]>Abhishek Kappattanavar2015-08-20T12:37:20-00:00