Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » auto-split EMF model in several files
auto-split EMF model in several files [message #1066288] Mon, 01 July 2013 22:21 Go to next message
Victor Pavon is currently offline Victor PavonFriend
Messages: 50
Registered: April 2012
Location: Spain
Member
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.


Víctor Pavón,
Research at Quercus Software Engineering Group
University of Extremadura, Spain.
Re: auto-split EMF model in several files [message #1066300 is a reply to message #1066288] Tue, 02 July 2013 05:27 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
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.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: auto-split EMF model in several files [message #1073646 is a reply to message #1066300] Thu, 25 July 2013 08:27 Go to previous message
Victor Pavon is currently offline Victor PavonFriend
Messages: 50
Registered: April 2012
Location: Spain
Member
Thank very much for your answer, Ed Merks

Víctor Pavón,
Research at Quercus Software Engineering Group
University of Extremadura, Spain.
Previous Topic:Why is EMF called EMF?
Next Topic:Ecore->XSD->Ecore roundtrip
Goto Forum:
  


Current Time: Thu Apr 25 23:27:53 GMT 2024

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

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

Back to the top