blob: f6980c93e4923a713350d9a93d371b63b57d3c34 [file] [log] [blame]
modeltype ECORE uses 'http://www.eclipse.org/emf/2002/Ecore';
modeltype UML uses 'http://www.eclipse.org/uml2/2.0.0/UML';
transformation Ecore2Uml(
in inModel : ECORE, out outModel : UML);
main() {
inModel.rootObjects()[EPackage]->map ePackage2Model();
}
mapping EPackage::ePackage2Model() : Model {
name := self.getName();
// name := self.getNameAtoB();
}
query ENamedElement::getName() : String = self.name;
query EPackage::getNameAtoB() : String {
if (self.name = 'root') then {
return 'B';
} endif;
return self.name;
}