Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 340001

Summary: Remove current solution for serializing EAnnotations
Product: [Modeling] EMFStore Reporter: Edgar Mueller <emueller>
Component: ServerCoreAssignee: Project Inbox <emfstore.servercore-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: mkoegel
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:

Description Edgar Mueller CLA 2011-03-15 07:27:38 EDT
When serializing all attributes of a EAnnotation into CreateDeleteOperation#getEObjectToIdMap(), deserialization fails for the details map of the source attribute. That is because the source attribute contains a URI, which will be used to reference its details map.  But since a URI contains forward slashes, which are also used for referencing the EObjects within the serialized file, the URI will be escaped. When trying to deserialize CreateDeleteOperation#getEObjectToIdMap() again, the the map contains null keys for all objects, that were referenced via the source's URI. 

One possible solution, which is also used at the moment, is to encode the source attribute via:

annotation.setSource(URLEncoder.encode(annotation.getSource())

but then one also has to pay attention to decode the URI at the appropriate places.
Comment 1 Maximilian Koegel CLA 2011-03-30 05:06:38 EDT
removed custom code