Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » Move functionality from QVTo to a library.(QVTO library question.)
Move functionality from QVTo to a library. [message #866333] Mon, 30 April 2012 21:05
Satya Muddu is currently offline Satya MudduFriend
Messages: 1
Registered: April 2012
Junior Member
Sometime before, I have implemented a helper method in my QVTo as below, now this method is required to call by many other QVTOs in my project. So, I am trying to create a common library and move this helper to library, so that I can import that library in all my qvto files.
The main problem is how to pass transformation parameter (z) to library method.
my qvto is as below and I would like to move somehelper() to library, so that I can call from other qvtos

modeltype X "strict" uses '.../X';
modeltype Y "strict" uses '.../Y';
modeltype Z "strict" uses '.../Z';

transformation X2Y(in x : Y, out y : Y, out z : Z);
x.objectsOfType(X::X1).map toY1();

mapping X::X1::toY1() : Y:Y1
name :=;

helper somehelper(str1:String, obj : OclAny)

var keyName:String := getKeyName(obj); //this is black box function.

var z1 := object Z::z1@z{}; := 'z1name';

var z2 := object Z::z2@z{
name := keyName;


I tried adding a property as below in library and assigning value from transformation, this is not working because it treats as a different type.
Please help me with details as I am new to QVTO transformation.

Thanks in advance,

[Updated on: Mon, 30 April 2012 21:06]

Report message to a moderator

Previous Topic:Regla que cree y retorne coleccion de objetos
Next Topic:Official excuses
Goto Forum:

Current Time: Mon Nov 30 09:51:49 GMT 2015

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

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