Skip to main content



      Home
Home » Modeling » EMF » auto-split EMF model in several files
auto-split EMF model in several files [message #1066288] Mon, 01 July 2013 18:21 Go to next message
Eclipse UserFriend
Hello,

I have created an EMF metamodel from an xsd file and it works fine. But now I'd like to split the model in several files. I'd like have in one file the root element of xml file and for each child of root element generate automatically a new file with subtree content. I search a lot but I didn't any solution, it is possible?

Thank you for your time and attention.

Best regards,
Victor.
Re: auto-split EMF model in several files [message #1066300 is a reply to message #1066288] Tue, 02 July 2013 01:27 Go to previous messageGo to next message
Eclipse UserFriend
Victor,

If you want the serialization to conform to the schema, that's probably
not possible. The root element of each document must be specified as a
global element in the schema and the cross document references from the
one root element you already have would need to specify what cross
document references look like, e.g., using elements of type anyURI. EMF
does in general support cross document references, even for containment
references; the containment reference must have resolveProxies true and
the GenModel Containment Proxies must be set to true.

In terms of "auto-splitting", you need to create the Resource instances
yourself and decide each of their URIs and then save each of them.


On 02/07/2013 12:21 AM, Victor Pavon wrote:
> Hello,
>
> I have created an EMF metamodel from an xsd file and it works fine.
> But now I'd like to split the model in several files. I'd like have in
> one file the root element of xml file and for each child of root
> element generate automatically a new file with subtree content. I
> search a lot but I didn't any solution, it is possible?
>
> Thank you for your time and attention.
>
> Best regards,
> Victor.
Re: auto-split EMF model in several files [message #1073646 is a reply to message #1066300] Thu, 25 July 2013 04:27 Go to previous message
Eclipse UserFriend
Thank very much for your answer, Ed Merks
Previous Topic:Why is EMF called EMF?
Next Topic:Ecore->XSD->Ecore roundtrip
Goto Forum:
  


Current Time: Wed Jul 30 17:50:21 EDT 2025

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

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

Back to the top