Hi Fuhwei,
Sure. The ecore2ecore model maps one ecore model to another.
Here's a real world scenario that I'm using it for that will hopefully
make it clearer.
1) I generate an ecore model from the maven pom v400 xml schema.
2) I map this model using ecore2ecore to another model I created
(LibrarySpecDescriptor)
3) I load maven pom.xml instances and use the ecore2ecore processor to
create corresponding LibrarySpecDescriptor instances (That are passed to
a JET template for generating RPM Spec files).
So the Ecore2Ecore model describes how EClassifiers of two different
models relate, as well as howthe EStructuralFeatures of the two models map.
The processor will create a target model instance, given a source model
instance.
SDO Scenario:
Suppose you had an SDO model: PurchaseOrderVersion1
Later you create a newer version: PurchaseOrderVersion2
PurchaseOrderVersion2 has features and classes that map to
PurchaseOrderVersion1
In addition PurchaseOrderVersion2 has additional features and classes
that map to SupplierVersion1
So you wish to create PurchaseOrderVersion2 instances from
PurchaseOrderVersion1 instances, along with SupplierVersion1 instances.
You could use Ecore2Ecore to map the models and then the
Ecore2EcoreProcessor to create the PurchaseOrderVersion2 instances.
Does that help?
Please let me know if need to elaborate on certain areas.
Thanks,
- Ole
Fuhwei Lwo wrote:
Hi Ole,
I am no EMF expert. Can you help me understand what this Ecore2Ecore Model and
Processor is used for? Thanks.
Sincerely,
Fuhwei Lwo
Ole Ersoy <[EMAIL PROTECTED]> wrote: Hi,
I've created an Ecore2Ecore Model and Processor.
I was wondering if this might find a home in Tuscany?
The model maps one ecore model to another.
It's different from the Eclipse implementation (Thought it was tricky to
use),
but I tried to reuse the naming of objects as much as possible.
The processor will take a source model instance and create the
corresponding target model.
Here is the URL:
https://svn.apache.org/repos/asf/directory/sandbox/oersoy/rpm.factory.all/ecore2ecore.model.parent
Cheers,
- Ole
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]