Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[emf-dev] Creating one EMF file of multiple resources

Hello,

I have a small problem with writing EMF models to files. The setup is as 
follows: I have one top level EObject which refers to some subobjects. The 
toplevel object and all subobjects are located in seperate Resources in the 
same ResourceSet. The references between these objects are transparently 
resolved by a model repository for my first program (which acts as a client 
for this repository).

However I have a second program which knows about EMF but cannot be connected 
to the repository. Therefore resolving references does not work. I want to 
use the client to write one file (or maybe a set of files?) for use with this 
second program. The references have to be updated to point to the correct 
(local) subobject.

I already tried to use the EcoreUtil.copier class to make a copy of the top 
level object, update its references and save the copy to one file. But then 
the references are still pointing to (for my second program) unavailable EMF 
resources.

I could imagine that writing one file per resource and using a URIConverter to 
fix the references would do the trick. But I'm quite new to this stuff and 
have no idea how to implement this.

Thank you in advance for your help.

Best regards,
 Eike Thaden


Back to the top