Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » how to use instance of ecore as another metamodel?
how to use instance of ecore as another metamodel? [message #479228] Mon, 10 August 2009 11:12 Go to next message
Eclipse UserFriend
Originally posted by: mail.hamburg.googlemail.com

Hello dear community,
I would like to know wether there is a way for the following steps:

- create a metamodel with ecore
- create dynamic instance of the ecore metamodel and add objects as
instances of the metamodel
- (re)use the resulting dynamic instance as another metamodel (as a new
metamodel layer) - maybe somehow transforming it to ecore?
- add some more specific references, etc. (meaning editing this instance
like a common .ecore)


Well, the first 2 steps are possible, but how about the next steps? Is
there a way to do this? Is it wise to do this?

As an alternative for creating such "layers" I tried to use inheritance
which worked quite acceptable for me. But it's still interesting if the
approach above is possible.

Thank you in advance.
Re: how to use instance of ecore as another metamodel? [message #479255 is a reply to message #479228] Mon, 10 August 2009 13:18 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 30691
Registered: July 2009
Senior Member
Juri,

Comments below.

Juri Hamburg wrote:
> Hello dear community,
> I would like to know wether there is a way for the following steps:
>
> - create a metamodel with ecore
> - create dynamic instance of the ecore metamodel and add objects as
> instances of the metamodel
> - (re)use the resulting dynamic instance as another metamodel (as a new
> metamodel layer) - maybe somehow transforming it to ecore?
>
Only Ecore supports creating instances. That's why there are things
like XSDEcoreBuilder for converting XML Schema instances to Ecore
instances...
> - add some more specific references, etc. (meaning editing this instance
> like a common .ecore)
>
If you convert it to Ecore then it's not just like Ecore it is Ecore...
>
> Well, the first 2 steps are possible, but how about the next steps? Is
> there a way to do this? Is it wise to do this?
>
You could look at XSDEcoreBuilder as an example. This article will help
understand a bit how XSD is converted to Ecore.
> As an alternative for creating such "layers" I tried to use inheritance
> which worked quite acceptable for me. But it's still interesting if the
> approach above is possible.
>
> Thank you in advance.
>
Previous Topic:get EPackage from a EStructuralFeature
Next Topic:type cannot be resolved in generated class
Goto Forum:
  


Current Time: Wed Dec 11 19:53:13 GMT 2019

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

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

Back to the top