![]() |
Migration of tutorial model |
Post Reply
|
| Author | |
pimf
Member
Joined: 25.Feb.2013 Points: 2 |
Post Options
Thanks(0)
Quote Reply
Topic: Migration of tutorial modelPosted: 25.Feb.2013 at 22:05 |
|
Hi,
I'm working through the evaluation tutorial of MetaEdit+ and I finished the extension of the initial family tree metamodel with the male and female objects. I would like to adjust the graph of an instanced the initial metamodel (Simpson family tree) to the new meta model by changing the object type 'Person' to 'Male' or 'Female' so that the 'old' model complies to the evolved meta model. But I cannot find any function for accomplishing that and no description in the user's guides. Can you help? Thank you! |
|
![]() |
|
stevek
MetaCase
Joined: 11.Mar.2008 Points: 643 |
Post Options
Thanks(0)
Quote Reply
Posted: 25.Feb.2013 at 22:46 |
|
There's really no way for MetaEdit+ to know which of your "Person" objects should be changed to be "Male" objects and which "Female". In this case, the simplest thing is just to delete the existing few objects and recreate them, as the tutorial says.
Don't worry though: in a real-world example where you would be worried about the work of recreating them, you could script transforming the model. MetaEdit+ offers an API for doing this, or you can export the models to XML, transform with XSLT and import, or then generate the transformed XML directly for import. Interestingly, in practice this kind of change tends to happen only at the stage where we are doing the first naive prototyping of a modeling language. It doesn't take long to see that in the Family Tree domain, you're going to need Male & Female rather than just Person! |
|
![]() |
|
Post Reply
|
|
| Tweet |
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |