Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Programmatically creating EMF from XSD
Programmatically creating EMF from XSD [message #424853] Fri, 07 November 2008 03:08 Go to next message
Derek Palma is currently offline Derek PalmaFriend
Messages: 141
Registered: July 2009
Senior Member
Hi,

I have a situation where 100s of xsd's need to be available as EMF in my
app. It would be nice to not have to make the part of the build process and
allow xsds (and their respective EMF models) to be added to the system at
runtime. What is the most appropriate programmatic technique for achieving
this?

Currently I have been looking at loading the xsds with the XSD API and then
using its XSDEcoreBuilder like in
http://www.theserverside.com/tt/articles/content/BindingXMLJ ava/article.html.
However, I was not sure where to get the extendedMetaData to pass to the
XSDEcoreBuilder constructor and whether this was required or not. I would
assume that all the metadata required (the complete xsd that could be used
to generate EMF) would be in the XSD model when the XSD was loaded, so this
should not be required (???).
Re: Programmatically creating EMF from XSD [message #424860 is a reply to message #424853] Fri, 07 November 2008 10:54 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33216
Registered: July 2009
Senior Member
Derek,

Comments below.

Derek Palma wrote:
> Hi,
>
> I have a situation where 100s of xsd's need to be available as EMF in
> my app.
That's quite a few.
> It would be nice to not have to make the part of the build process and
> allow xsds (and their respective EMF models) to be added to the system
> at runtime.
Do you need generated code for these models or is dynamic EMF
sufficient? OSGi allows bundles to be added a runtime.
> What is the most appropriate programmatic technique for achieving this?
>
> Currently I have been looking at loading the xsds with the XSD API and
> then using its XSDEcoreBuilder like in
> http://www.theserverside.com/tt/articles/content/BindingXMLJ ava/article.html.

That seems a reasonable way.
> However, I was not sure where to get the extendedMetaData to pass to
> the XSDEcoreBuilder constructor and whether this was required or not.
There's a constructor which doesn't require one.
> I would assume that all the metadata required (the complete xsd that
> could be used to generate EMF) would be in the XSD model when the XSD
> was loaded, so this should not be required (???).
It might be the case that models in the XSDs depend on generated models
that already exist...


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[CDO] Does BDStore support non-auditing mode?
Next Topic:How to edit JET1- templates in Ganymade?
Goto Forum:
  


Current Time: Sun Sep 22 06:24:53 GMT 2024

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

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

Back to the top