Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Generating code from xmi(Generating code from xmi)
Generating code from xmi [message #1276503] Mon, 24 March 2014 17:00 Go to next message
Yoncho Yonchev is currently offline Yoncho YonchevFriend
Messages: 2
Registered: March 2014
Junior Member
Hello. I am a beginner, using EMF and this forum. So excuse me if this topic is misplaced. I import an ecore model in Eclipse and generate it. Then in run-time I import some xmi files, which instantiate the model. Is there any way I can generate a class structure out of these xmi files? For example the ecore meta-model contains classes for entity, enumeration, business line etc., the xmi files contain instances of Entity (e.g. Contract, Person) and I need to generate code so I can create instances of Contract and Person. Thanks for your help.
Re: Generating code from xmi [message #1276550 is a reply to message #1276503] Mon, 24 March 2014 18:10 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33218
Registered: July 2009
Senior Member
Yoncho,

Comments below.

On 24/03/2014 10:41 AM, Yoncho Yonchev wrote:
> Hello. I am a beginner, using EMF and this forum. So excuse me if this
> topic is misplaced. I import an ecore model in Eclipse and generate
> it. Then in run-time I import some xmi files, which instantiate the
> model. Is there any way I can generate a class structure out of these
> xmi files?
There isn't a general mapping from "arbitrary model" to "some Java
thing"....
> For example the ecore meta-model contains classes for entity,
> enumeration, business line etc., the xmi files contain instances of
> Entity (e.g. Contract, Person) and I need to generate code so I can
> create instances of Contract and Person. Thanks for your help.
If you define an arbitrary model, you'll have to define/implement how
it's mapped to Java. You might use a language like Xtend to generate
something from your model instances...


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Generating code from xmi [message #1279114 is a reply to message #1276550] Fri, 28 March 2014 08:48 Go to previous message
Yoncho Yonchev is currently offline Yoncho YonchevFriend
Messages: 2
Registered: March 2014
Junior Member
Thanks, Ed.
Previous Topic:[CDO][Oomph] Fixing Unknown Host Key errors in fresh IDEs
Next Topic:[EMF Core] Restlet Framework integrates with EMF 2.6
Goto Forum:
  


Current Time: Thu Sep 26 04:41:56 GMT 2024

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

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

Back to the top