Home » Modeling » EMF » EMF Resources Data Migration
| |
Re: EMF Resources Data Migration [message #418539 is a reply to message #418538] |
Fri, 18 April 2008 00:15 |
Al B Messages: 130 Registered: July 2009 |
Senior Member |
|
|
This Ed's posted message #: 2,000,199
--------------------------------------
Hi Ed,
Sorry, I should have explicitily indicated that there are not proxies
between resources (i.e. A1 and P1). In other words, when the user drags
an element from A1 into P1, an P1 element instance is created using the
data from the A1 instance, however, a proxy is not establish between them.
It might be worth mentioning that there are not model changes in any of
the 2 ecore model either.
So, the problem is that data contained by the original element in A1 can
change so the P1 resource need to be update with those changes.
For instance, looking at it from the element level let's say the A1
element ActivityDef contains properties (EObjects) from an EClass called
Property.
+-------------+ (contains) +-------------+
| ActivityDef |*-------------->| Property |
+-------------+ +-------------+
When the user drags the ActivityDef element into the P1 editor, a P1
element Task instance is created; which also contains its own properties
and some of them are populated with the property data from the ActivityDef.
+-------------+ (contains) +-------------+
| Task |*-------------->| Property |
+-------------+ +-------------+
So, we need to migrate any changes (e.g. properties added, removed, or
value modified) that occur in the ActivityDef element contained in the A1
resource into the Task element contained in the P1 resource.
I hope this more clear now.
Thanks again Ed.
-AJ
|
|
|
Re: EMF Resources Data Migration [message #418552 is a reply to message #418539] |
Fri, 18 April 2008 10:34 |
Ed Merks Messages: 33142 Registered: July 2009 |
Senior Member |
|
|
AJ,
Comments below.
AJ wrote:
> This Ed's posted message #: 2,000,199
> --------------------------------------
>
> Hi Ed,
>
> Sorry, I should have explicitily indicated that there are not proxies
> between resources (i.e. A1 and P1). In other words, when the user
> drags an element from A1 into P1, an P1 element instance is created
> using the data from the A1 instance, however, a proxy is not establish
> between them.
So it's effectively copied from P1.
>
> It might be worth mentioning that there are not model changes in any
> of the 2 ecore model either.
So at least the meta model has remained consistent.
>
> So, the problem is that data contained by the original element in A1
> can change so the P1 resource need to be update with those changes.
That's making more sense now.
>
> For instance, looking at it from the element level let's say the A1
> element ActivityDef contains properties (EObjects) from an EClass
> called Property.
>
> +-------------+ (contains) +-------------+
> | ActivityDef |*-------------->| Property |
> +-------------+ +-------------+
>
> When the user drags the ActivityDef element into the P1 editor, a P1
> element Task instance is created; which also contains its own
> properties and some of them are populated with the property data from
> the ActivityDef.
>
>
> +-------------+ (contains) +-------------+
> | Task |*-------------->| Property |
> +-------------+ +-------------+
>
> So, we need to migrate any changes (e.g. properties added, removed, or
> value modified) that occur in the ActivityDef element contained in the
> A1 resource into the Task element contained in the P1 resource.
Given there are no references from A1 back to P1, you'd need to
establish a correspondence between an Task in A1 and an ActivityDef in
P1. Is that problem solved already. Do they perhaps share a common ID
(or UUID, which of course would imply the UU is a misnomer)? Perhaps
they have a name that would allow them to match? In EMFT there is a
compare framework, but normally you'd be comparing instances of the same
model, not two different models, so I'm not sure it could be used in
this scenario. It's possible it might work for that though. If guess
the Property objects themselves are of the same EClass in both? The
compare framework could certainly be used in that case. I imagine
properties could be determined to correspond based on name.
>
> I hope this more clear now.
>
> Thanks again Ed.
>
> -AJ
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: EMF Resources Data Migration [message #418561 is a reply to message #418552] |
Fri, 18 April 2008 14:05 |
Al B Messages: 130 Registered: July 2009 |
Senior Member |
|
|
>Is that problem solved already. Do they perhaps share a common ID (or UUID,
which of course would imply the UU is a misnomer)? Perhaps they have a name
that would allow them to match?
Yes,they do share an UID and a name that will allow us to match them.
>In EMFT there is a compare framework, but normally you'd be comparing
instances of the same model, not two different models, so I'm not sure it
could be used in this scenario. It's possible it might work for that though.
OK, I will take a look at it, however, as you pointed out it might not
help since they are two different models.
>If guess the Property objects themselves are of the same EClass in both? I
imagine properties could be determined to correspond based on name.
Unfortunately, they are not. However, the properties can be determined to
correspond based on name.
Thanks Ed!
|
|
| | |
Re: EMF Resources Data Migration [message #418594 is a reply to message #418593] |
Mon, 21 April 2008 19:21 |
Ed Merks Messages: 33142 Registered: July 2009 |
Senior Member |
|
|
AJ,
It does the same thing as invoking Set SDO Defaults on the GenModel root
object, but somehow I don't think this will be a good approach. You'd
need to be saving the delta along with the model. You could accomplish
the same things with a ChangeRecorder and serialize the ChangeDescription...
AJ wrote:
> Jason,
>
> Thank you for your comments on this. Unfortunately, the
> database/hibernate approach is not an option for us at this point.
> However, would you mind explaining a little bit more about the -sdo
> option in generation? Is that a property that we can set via the
> GenModel property editor?
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Goto Forum:
Current Time: Fri Apr 26 22:29:29 GMT 2024
Powered by FUDForum. Page generated in 0.03218 seconds
|