Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » QVT-OML » how to use two target sources?
how to use two target sources? [message #1060613] Mon, 27 May 2013 10:24 Go to next message
Emre T is currently offline Emre TFriend
Messages: 119
Registered: April 2013
Senior Member
Hello there!

I have a transformation where I use my own meta-model as a source. And as for the target models, I need to use two meta-models which are -indirectly- related together.

How could I achieve this? Any help will be appreciated.

Thanks.
Re: how to use two target sources? [message #1060671 is a reply to message #1060613] Mon, 27 May 2013 16:06 Go to previous messageGo to next message
Sergey Boyko is currently offline Sergey BoykoFriend
Messages: 171
Registered: July 2009
Senior Member
Hi Emre,

Actually you do not need to do anything special in order to achieve that. Just create objects from desired metamodels. For example:

modeltype UML uses "http://www.eclipse.org/uml2/4.0.0/UML";
modeltype Ecore uses "http://www.eclipse.org/emf/2002/Ecore";

transformation NewTransformation(in src : UML, out dst : UML);

main() {
	object EClass {
		name := "ECore class"
	};
	object Class {
		name := "UML class"
	}
}


Type of transformation parameters' 'dst' (which is 'UML') is used as a hint on file extension to be used for output file. For the transformation above output file 'NewTransformation.uml' has the following content:

<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML">
  <ecore:EClass xmi:id="_5XiVUMbtEeKBSPmarAtVhQ" name="ECore class"/>
  <uml:Class xmi:id="_5XiVUcbtEeKBSPmarAtVhQ" name="UML class"/>
</xmi:XMI>


Regards,
Sergey
Re: how to use two target sources? [message #1061278 is a reply to message #1060671] Thu, 30 May 2013 22:49 Go to previous message
Emre T is currently offline Emre TFriend
Messages: 119
Registered: April 2013
Senior Member
Thanks a lot for the clear answer!
Previous Topic:Stereotypes and multi-valued attributes
Next Topic:A case scenario regarding the selection of mappings based on composed model elements
Goto Forum:
  


Current Time: Fri Apr 19 16:30:47 GMT 2024

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

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

Back to the top