Skip to main content



      Home
Home » Modeling » EMF » Support for UUIDs in binary resource
Support for UUIDs in binary resource [message #1841919] Thu, 03 June 2021 09:26 Go to next message
Eclipse UserFriend
I have a multi-resource binary model which is saved in different parts of the program. I want to use UUIDs references because there is a problem with index ones when I change one of the model resources which must be in memory from the beginning till the end.

Do you think to add UUID references for Binary Resources? If not is there any problem with them, because I think to implement them myself by extending the default BinaryResource?
Re: Support for UUIDs in binary resource [message #1841925 is a reply to message #1841919] Thu, 03 June 2021 12:24 Go to previous messageGo to next message
Eclipse UserFriend
Have a look at using org.eclipse.emf.ecore.xmi.XMLResource.OPTION_BINARY because this includes saving the extrinsic IDs maintained by an XMLResource, e.g., see org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doSave(OutputStream, Map<?, ?>).
Re: Support for UUIDs in binary resource [message #1841960 is a reply to message #1841925] Fri, 04 June 2021 08:43 Go to previous messageGo to next message
Eclipse UserFriend
Thank you, Ed.
I didn't know that you can save binary models with XMLResource class. It seems that this works for me.
I am only curious if there are any performance issues when it is used XMLResource instead of BinaryResource.
Re: Support for UUIDs in binary resource [message #1841963 is a reply to message #1841960] Fri, 04 June 2021 09:41 Go to previous message
Eclipse UserFriend
I expect no performance issues given both resource implementations delegate to the same implementation classes org.eclipse.emf.ecore.resource.impl.BinaryResourceImpl.EObjectOutputStream and org.eclipse.emf.ecore.resource.impl.BinaryResourceImpl.EObjectInputStream. The XML Resource just also writes the eObjectToIDMap and reads it so that's the only significant additional overhead that I expect, but that's exactly what you're asking to do...
Previous Topic:import org.eclipse cannot be resolved
Next Topic:[CDO] Saving a CDOResourceFolder to File
Goto Forum:
  


Current Time: Sat Nov 08 05:25:27 EST 2025

Powered by FUDForum. Page generated in 0.03862 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top