Skip to main content



      Home
Home » Modeling » QVT-OML » how to use two target sources?
how to use two target sources? [message #1060613] Mon, 27 May 2013 06:24 Go to next message
Eclipse UserFriend
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 12:06 Go to previous messageGo to next message
Eclipse UserFriend
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 18:49 Go to previous message
Eclipse UserFriend
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: Wed Jul 02 15:13:01 EDT 2025

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

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

Back to the top