Model instance transformation [message #500040] |
Tue, 24 November 2009 18:45 |
Eclipse User |
|
|
|
Originally posted by: luzi.anderegg.ergon.ch
Hi,
we store our model instances in multiple XMIResource using UUID's. There
is a base resource A which is referenced by resource B and C. Sometimes,
we replace an object in resource A by some other object. The object
should have the same ID as it is referenced by other objects in resource
B and C. What is the best way to do this?
Thanks,
Luzi
|
|
|
|
Re: Model instance transformation [message #500073 is a reply to message #500059] |
Tue, 24 November 2009 20:47 |
Eclipse User |
|
|
|
Originally posted by: luzi.anderegg.ergon.ch
Ed Merks schrieb:
> Luzi,
>
> XMLResource has getID and setID methods you could use.
Thanks Ed. And is it ok to call setId with an EObject which is not in
the resource, i.e. can I first get the id of the object to replace, then
set the same id for the new object, and finally replace the object in
the resource?
>
>
> Luzi Anderegg wrote:
>> Hi,
>>
>> we store our model instances in multiple XMIResource using UUID's.
>> There is a base resource A which is referenced by resource B and C.
>> Sometimes, we replace an object in resource A by some other object.
>> The object should have the same ID as it is referenced by other
>> objects in resource B and C. What is the best way to do this?
>>
>> Thanks,
>> Luzi
|
|
|
Re: Model instance transformation [message #500088 is a reply to message #500073] |
Tue, 24 November 2009 21:48 |
Ed Merks Messages: 33142 Registered: July 2009 |
Senior Member |
|
|
Luzi,
I think that's okay, but it seems better to replace it and then set the ID.
Luzi Anderegg wrote:
> Ed Merks schrieb:
>> Luzi,
>>
>> XMLResource has getID and setID methods you could use.
> Thanks Ed. And is it ok to call setId with an EObject which is not in
> the resource, i.e. can I first get the id of the object to replace,
> then set the same id for the new object, and finally replace the
> object in the resource?
>>
>>
>> Luzi Anderegg wrote:
>>> Hi,
>>>
>>> we store our model instances in multiple XMIResource using UUID's.
>>> There is a base resource A which is referenced by resource B and C.
>>> Sometimes, we replace an object in resource A by some other object.
>>> The object should have the same ID as it is referenced by other
>>> objects in resource B and C. What is the best way to do this?
>>>
>>> Thanks,
>>> Luzi
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03018 seconds