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

Bug 324583

Summary: Provide generic copy/transform processor
Product: [Modeling] EMFT Reporter: Martin Taal <mtaal>
Component: TexoAssignee: Martin Taal <mtaal>
Status: CLOSED INVALID QA Contact:
Severity: enhancement    
Priority: P3    
Version: Future   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Martin Taal CLA 2010-09-06 10:11:02 EDT
The idea is to provide a common copy/transform process which is able to copy/transform from one representation to the other, for example:
EMF --> Texo
Texo --> EMF
Texo --> JSON

The main flow is as follows:
for each object from the source:
- ask the target context for an object representing the same object in the target representation. The target context needs to get the id and type of the requested object. The target context can decide to either create a new object or read the object from somewhere else (a database)
- the for each efeature the value is transformed
- for eattributes the value can be set normally using getters/setters
- for ereferences the referenced object should be used, for each reference the target context should provide the object being referenced, again using an id and type information.

The target context should keep a mapping internally of id/type to target objects, this to ensure that when the process requests again an object using an earlier used id/type that the same instance of the target object is returned.