Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [emf-dev] Convert Model to Metamodel

Michael,

It's best to use the newsgroup for questions like thiswhich aren't directly
related to the development work of EMF itself:

   news://news.eclipse.org/eclipse.tools.emf

It sounds like your problem is not so much different  from way UML2 and XSD
are not only described by Ecore (i.e., UML2.ecore and XSD.ecore) but also
act as metamodels and hence have defined importers and exporters that do
two-way UML2 <-> Ecore and XSD <-> Ecore instance mapping.   That's the
step you'll see in this tutorial where an XML Schema instance is converted
to Ecore

   http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.emf.doc/tutorials/xlibmod/xlibmod.html

So it sounds to me like you want something quite similar to
org.eclipse.xsd.ecore.XSDEcoreBuilder which traverses an XSD instance to
convert it to an Ecore instance.  Likely you'd want to provide importers
and exporters for your model and plug into the importer/exporter framework.
Again, the XSD model would be a good example to follow.

Please ask followup questions on the newsgroup.


Ed Merks/Toronto/IBM@IBMCA
mailto: merks@xxxxxxxxxx
905-413-3265  (t/l 313)




                                                                           
             Michael Gebhart                                               
             <lists@miketech.n                                             
             et>                                                        To 
             Sent by:                  emf-dev@xxxxxxxxxxx                 
             emf-dev-bounces@e                                          cc 
             clipse.org                                                    
                                                                   Subject 
                                       [emf-dev] Convert Model to          
             12/30/2007 08:39          Metamodel                           
             AM                                                            
                                                                           
                                                                           
             Please respond to                                             
             Eclipse Modelling                                             
                 Framework                                                 
             <emf-dev@eclipse.                                             
                   org>                                                    
                                                                           
                                                                           




Hi,

to realize my current project in a model driven way I wanna use EMF for
the creation of the different models. In my case I don't have the usual
way of ecore at M3, the metamodel at M2 and the model at M1 level.

I have an additional abstraction layer, so my first model is assigned to
level M3 instead of M2.

An instance of this model can be created (on level M2) and in a further
step this created model acts as a metamodel for the next model (M1).

So I have these steps:

M3 (Instance of Ecore) -> M2 (Instance of M3 Model) -> M1 (Instance of
M2 Model)

Now my problem is that the created model on M2 has to act as a new
metamodel. So I am looking for a way to convert the created model on M2
to a Ecore Metamodel, so that I can create a further instance of it.

Do you have any idea how I could realize this?

Another description of the problem could be: I wanna create a model with
the ecore model designer in eclipse, not with the ecore model in the
backend but with an own model that is based on ecore.

Greetings

Michael

_______________________________________________
emf-dev mailing list
emf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/emf-dev




Back to the top