How to copy eResources such that xmi ids are maintained across resources [message #615995] |
Wed, 26 March 2008 19:40 |
Rohit Kelapure Messages: 11 Registered: July 2009 |
Junior Member |
|
|
How do I copy an eResource (say oldResource) to a new eResource (say
newResource) such that the newResource keeps the same xmi ids of the model
eobjects persisted in the oldResource.
This is what I am currently doing ..
Resource oldResource = myEObject.eResource();
ResourceSet resourceSet = oldResource.getResourceSet();
URI originalUri = oldResource.getURI();
Resource newResource = resourceSet.createResource(originalUri);
newResource.setURI(newURI);
newResource.getContents().add(newDD);
newResource().save(new HashMap());
After creating and persisting the newResource I dont see the XMI ids of
the eObjects in oldResource copy over to the newResource.
Can someone please help. What do I need to do here ...?
Thanks in advance,
Rohit Kelapure
|
|
|
Powered by
FUDForum. Page generated in 0.01976 seconds