2

I am a beginner in Eclipse EMF. I have created an Ecore metamodel which I want to transform into a new Ecore metamodel in Java that takes into account some characteristics of the first metamodel. I have searched the web but the exlpanations I've found were not clear to me.

How can I get access to the first metamodel from a Java app and how can I generate a new metamodel with the corresponding .ecore and .genmodel files?

Is such a task even possible?

Thanks!

McRaven
  • 111
  • 1
  • 2
  • 11

2 Answers2

0

There is EMF Epsilon language framework which you can use for model transformations. It is written in Java and can be used in java applications. Here is an example.

0

You can access in this way :

ResourceSet rs = new ResourceSetImpl();
Resource resource = rs.getResource(URI.createFileURI(metamodelStringURI), true);
sali333
  • 125
  • 4
  • 15