Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Support for UUIDs in binary resource
Support for UUIDs in binary resource [message #1841919] Thu, 03 June 2021 13:26 Go to next message
Nikolay Stanishev is currently offline Nikolay StanishevFriend
Messages: 2
Registered: June 2021
Junior Member
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 16:24 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 32985
Registered: July 2009
Senior Member
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<?, ?>).

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Support for UUIDs in binary resource [message #1841960 is a reply to message #1841925] Fri, 04 June 2021 12:43 Go to previous messageGo to next message
Nikolay Stanishev is currently offline Nikolay StanishevFriend
Messages: 2
Registered: June 2021
Junior Member
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 13:41 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 32985
Registered: July 2009
Senior Member
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...

Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:import org.eclipse cannot be resolved
Next Topic:[CDO] Saving a CDOResourceFolder to File
Goto Forum:
  


Current Time: Sat Nov 11 09:26:21 GMT 2023

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

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

Back to the top