library ExampleQVTLibrary; //this is needed to define that it is a library // these are the model A requirements modeltype A "strict" uses testA('http://dim.de/testA'); // these are the model B requirements modeltype B "strict" uses testB('http://dim.de/testB'); mapping A::ContactA::toContactList() : B::ContactB { value := self.value; type := self.type.toContactType(); } query A::ContactTypeA::toContactType() : B::ContactTypeB { return switch { case (self = A::ContactTypeA::PHONE) B::ContactTypeB::PHONE; case (self = A::ContactTypeA::MOBILE) B::ContactTypeB::MOBILE; case (self = A::ContactTypeA::WHATSAPP) B::ContactTypeB::WHATSAPP; case (self = A::ContactTypeA::EMAIL) B::ContactTypeB::EMAIL; case (self = A::ContactTypeA::SKYPE) B::ContactTypeB::SKYPE; case (self = A::ContactTypeA::WEBADDRESS) B::ContactTypeB::WEBADDRESS; } }