Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » XSD to Ecore to UML XMI ?
XSD to Ecore to UML XMI ? [message #26880] Mon, 25 August 2003 07:07 Go to next message
Eclipse User
Originally posted by: pch.sa-glas.mottmac.com

Hi Folks,

I am new to all this so I was wondering if someone could point me in the
right direction. I am hoping to write a standalone Java application that
reads schema files, constructs an internal Ecore model (which I then hope
to manipulate a bit via my own GUI) and then eventually I want to
serialise it out as (UML) XMI. From what I can gather this sounds like
it's do-able with EMF and maybe XSD(?), but I'm not sure where to begin.
Are there any tutorials that would teach me how to use the
classes/packages that I'd need?

Hope you can help
Cheers
Paul
Re: XSD to Ecore to UML XMI ? [message #26921 is a reply to message #26880] Mon, 25 August 2003 18:52 Go to previous messageGo to next message
Eclipse User
Originally posted by: merks.ca.ibm.com

--------------858B5B22672BECD9E5BFEC96
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Paul,

In terms of XSD, there are small examples in XSDPrototypicalSchema, the
org.eclipse.xsd.test plugin contains working example of how to run
standalone, the stuff in org.eclipse.xsd.edit can be used to build your own
GUI (even outside of Eclipse, but why would you ;-) and
org.eclipse.xsd.editor contains a sample of how to use this within Eclipse.

In terms of EMF, there are the documentation and tutorials at the website:

http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/doc.html

and, since you invite an opportunity for me to shameless promote our new
book, there's a really fine book too:

http://www.awprofessional.com/titles/0131425420

I wonder if converting XSD to UML isn't a lot like converting XSD to Ecore,
which is done in XSDEcoreBuilder


Paul Hunter wrote:

> Hi Folks,
>
> I am new to all this so I was wondering if someone could point me in the
> right direction. I am hoping to write a standalone Java application that
> reads schema files, constructs an internal Ecore model (which I then hope
> to manipulate a bit via my own GUI) and then eventually I want to
> serialise it out as (UML) XMI. From what I can gather this sounds like
> it's do-able with EMF and maybe XSD(?), but I'm not sure where to begin.
> Are there any tutorials that would teach me how to use the
> classes/packages that I'd need?
>
> Hope you can help
> Cheers
> Paul

--------------858B5B22672BECD9E5BFEC96
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Paul,
<p>In terms of XSD, there are small examples in XSDPrototypicalSchema,&nbsp;
the org.eclipse.xsd.test plugin contains working example of how to run
standalone, the stuff in org.eclipse.xsd.edit can be used to build your
own GUI (even outside of Eclipse, but why would you ;-) and org.eclipse.xsd.editor
contains a sample of how to use this within Eclipse.
<p>In terms of EMF, there are the documentation and tutorials at the website:
<blockquote>&nbsp;<a href=" http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/doc.html"> http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/doc.html</a></blockquote>
and, since you invite an opportunity for me to shameless promote our new
book, there's a really fine book too:
<blockquote>&nbsp;<a href="http://www.awprofessional.com/titles/0131425420">http://www.awprofessional.com/titles/0131425420</a></blockquote>
I wonder if converting XSD to UML isn't a lot like converting XSD to Ecore,
which is done in XSDEcoreBuilder
<br>&nbsp;
<p>Paul Hunter wrote:
<blockquote TYPE=CITE>Hi Folks,
<p>I am new to all this so I was wondering if someone could point me in
the
<br>right direction.&nbsp; I am hoping to write a standalone Java application
that
<br>reads schema files, constructs an internal Ecore model (which I then
hope
<br>to manipulate a bit via my own GUI) and then eventually I want to
<br>serialise it out as (UML) XMI.&nbsp; From what I can gather this sounds
like
<br>it's do-able with EMF and maybe XSD(?), but I'm not sure where to begin.
<br>Are there any tutorials that would teach me how to use the
<br>classes/packages that I'd need?
<p>Hope you can help
<br>Cheers
<br>Paul</blockquote>
</html>

--------------858B5B22672BECD9E5BFEC96--
Re: XSD to Ecore to UML XMI ? [message #26961 is a reply to message #26921] Tue, 26 August 2003 12:08 Go to previous messageGo to next message
Eclipse User
Originally posted by: pch.sa-glas.mottmac.com

Ed,

Thanks for the speedy response. I am off and running now! One further
question for now...

I have been looking at XSDEcoreBuilder. I was hoping to pass in the
XSDSchema instance and have an ECore model fall out the other end but I
don't see how to do this. Wishful thinking perhaps! So at the moment I'm
doing it bit by bit with:

XSDEcoreBuilder builder = new XSDEcoreBuilder();
EList list = schema.getElementDeclarations();
for (Iterator i = schema.getElementDeclarations().iterator();
i.hasNext(); )
{
XSDElementDeclaration decl = (XSDElementDeclaration) i.next();
EClassifier cClass = builder.getEClassifier(decl);
}

I guess then that I'd throw all the EClassifiers into an EPackage or
something like that. Is this a reasonable approach or am I missing
something easier?

Thanks again,
Paul.

ps. Consider your plug a success - the book is on order!


Ed Merks wrote:

> Paul,

> In terms of XSD, there are small examples in XSDPrototypicalSchema, the
> org.eclipse.xsd.test plugin contains working example of how to run
> standalone, the stuff in org.eclipse.xsd.edit can be used to build your own
> GUI (even outside of Eclipse, but why would you ;-) and
> org.eclipse.xsd.editor contains a sample of how to use this within Eclipse.

> In terms of EMF, there are the documentation and tutorials at the website:

>
http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/doc.html

> and, since you invite an opportunity for me to shameless promote our new
> book, there's a really fine book too:

> http://www.awprofessional.com/titles/0131425420

> I wonder if converting XSD to UML isn't a lot like converting XSD to Ecore,
> which is done in XSDEcoreBuilder


> Paul Hunter wrote:

> > Hi Folks,
> >
> > I am new to all this so I was wondering if someone could point me in the
> > right direction. I am hoping to write a standalone Java application that
> > reads schema files, constructs an internal Ecore model (which I then hope
> > to manipulate a bit via my own GUI) and then eventually I want to
> > serialise it out as (UML) XMI. From what I can gather this sounds like
> > it's do-able with EMF and maybe XSD(?), but I'm not sure where to begin.
> > Are there any tutorials that would teach me how to use the
> > classes/packages that I'd need?
> >
> > Hope you can help
> > Cheers
> > Paul
Re: XSD to Ecore to UML XMI ? [message #27000 is a reply to message #26961] Tue, 26 August 2003 14:16 Go to previous message
Eclipse User
Originally posted by: merks.ca.ibm.com

--------------57AE9D5328CFE649364E6A07
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Paul,

Sorry there's no Javadoc yet. You can use

builder.generate(schema)

and then look at the map

builder.getTargetNamespaceToEPackageMap()

to see the namespace to package mapping; the values() of this map are the generated
EPackages.

I am working actively on this code and will likely be making significant enhancements.


Paul Hunter wrote:

> Ed,
>
> Thanks for the speedy response. I am off and running now! One further
> question for now...
>
> I have been looking at XSDEcoreBuilder. I was hoping to pass in the
> XSDSchema instance and have an ECore model fall out the other end but I
> don't see how to do this. Wishful thinking perhaps! So at the moment I'm
> doing it bit by bit with:
>
> XSDEcoreBuilder builder = new XSDEcoreBuilder();
> EList list = schema.getElementDeclarations();
> for (Iterator i = schema.getElementDeclarations().iterator();
> i.hasNext(); )
> {
> XSDElementDeclaration decl = (XSDElementDeclaration) i.next();
> EClassifier cClass = builder.getEClassifier(decl);
> }
>
> I guess then that I'd throw all the EClassifiers into an EPackage or
> something like that. Is this a reasonable approach or am I missing
> something easier?
>
> Thanks again,
> Paul.
>
> ps. Consider your plug a success - the book is on order!
>
> Ed Merks wrote:
>
> > Paul,
>
> > In terms of XSD, there are small examples in XSDPrototypicalSchema, the
> > org.eclipse.xsd.test plugin contains working example of how to run
> > standalone, the stuff in org.eclipse.xsd.edit can be used to build your own
> > GUI (even outside of Eclipse, but why would you ;-) and
> > org.eclipse.xsd.editor contains a sample of how to use this within Eclipse.
>
> > In terms of EMF, there are the documentation and tutorials at the website:
>
> >
> http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/doc.html
>
> > and, since you invite an opportunity for me to shameless promote our new
> > book, there's a really fine book too:
>
> > http://www.awprofessional.com/titles/0131425420
>
> > I wonder if converting XSD to UML isn't a lot like converting XSD to Ecore,
> > which is done in XSDEcoreBuilder
>
> > Paul Hunter wrote:
>
> > > Hi Folks,
> > >
> > > I am new to all this so I was wondering if someone could point me in the
> > > right direction. I am hoping to write a standalone Java application that
> > > reads schema files, constructs an internal Ecore model (which I then hope
> > > to manipulate a bit via my own GUI) and then eventually I want to
> > > serialise it out as (UML) XMI. From what I can gather this sounds like
> > > it's do-able with EMF and maybe XSD(?), but I'm not sure where to begin.
> > > Are there any tutorials that would teach me how to use the
> > > classes/packages that I'd need?
> > >
> > > Hope you can help
> > > Cheers
> > > Paul

--------------57AE9D5328CFE649364E6A07
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Paul,
<p>Sorry there's no Javadoc yet.&nbsp; You can use
<blockquote>builder.generate(schema)</blockquote>
and then look at the map
<blockquote>builder.getTargetNamespaceToEPackageMap()</blockquote >
to see the namespace to package mapping; the values() of this map are the
generated EPackages.
<p>I am working actively on this code and will likely be making significant
enhancements.
<br>&nbsp;
<p>Paul Hunter wrote:
<blockquote TYPE=CITE>Ed,
<p>Thanks for the speedy response.&nbsp; I am off and running now!&nbsp;
One further
<br>question for now...
<p>I have been looking at XSDEcoreBuilder.&nbsp; I was hoping to pass in
the
<br>XSDSchema instance and have an ECore model fall out the other end but
I
<br>don't see how to do this.&nbsp; Wishful thinking perhaps!&nbsp; So
at the moment I'm
<br>doing it bit by bit with:
<p>&nbsp; XSDEcoreBuilder builder = new XSDEcoreBuilder();
<br>&nbsp; EList list = schema.getElementDeclarations();
<br>&nbsp; for (Iterator i = schema.getElementDeclarations().iterator();
<br>i.hasNext(); )
<br>&nbsp; {
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; XSDElementDeclaration decl = (XSDElementDeclaration)
i.next();
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EClassifier cClass = builder.getEClassifier(decl);
<br>&nbsp; }
<p>I guess then that I'd throw all the EClassifiers into an EPackage or
<br>something like that.&nbsp; Is this a reasonable approach or am I missing
<br>something easier?
<p>Thanks again,
<br>Paul.
<p>ps. Consider your plug a success - the book is on order!
<p>Ed Merks wrote:
<p>> Paul,
<p>> In terms of XSD, there are small examples in XSDPrototypicalSchema,&nbsp;
the
<br>> org.eclipse.xsd.test plugin contains working example of how to run
<br>> standalone, the stuff in org.eclipse.xsd.edit can be used to build
your own
<br>> GUI (even outside of Eclipse, but why would you ;-) and
<br>> org.eclipse.xsd.editor contains a sample of how to use this within
Eclipse.
<p>> In terms of EMF, there are the documentation and tutorials at the
website:
<p>>
<br><a href=" http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/doc.html"> http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/doc.html</a>
<p>> and, since you invite an opportunity for me to shameless promote our
new
<br>> book, there's a really fine book too:
<p>> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://www.awprofessional.com/titles/0131425420">http://www.awprofessional.com/titles/0131425420</a>
<p>> I wonder if converting XSD to UML isn't a lot like converting XSD
to Ecore,
<br>> which is done in XSDEcoreBuilder
<p>> Paul Hunter wrote:
<p>> > Hi Folks,
<br>> >
<br>> > I am new to all this so I was wondering if someone could point
me in the
<br>> > right direction.&nbsp; I am hoping to write a standalone Java application
that
<br>> > reads schema files, constructs an internal Ecore model (which I
then hope
<br>> > to manipulate a bit via my own GUI) and then eventually I want
to
<br>> > serialise it out as (UML) XMI.&nbsp; From what I can gather this
sounds like
<br>> > it's do-able with EMF and maybe XSD(?), but I'm not sure where
to begin.
<br>> > Are there any tutorials that would teach me how to use the
<br>> > classes/packages that I'd need?
<br>> >
<br>> > Hope you can help
<br>> > Cheers
<br>> > Paul</blockquote>
</html>

--------------57AE9D5328CFE649364E6A07--
Re: XSD to Ecore to UML XMI ? [message #576389 is a reply to message #26880] Mon, 25 August 2003 18:52 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25947
Registered: July 2009
Senior Member
--------------858B5B22672BECD9E5BFEC96
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Paul,

In terms of XSD, there are small examples in XSDPrototypicalSchema, the
org.eclipse.xsd.test plugin contains working example of how to run
standalone, the stuff in org.eclipse.xsd.edit can be used to build your own
GUI (even outside of Eclipse, but why would you ;-) and
org.eclipse.xsd.editor contains a sample of how to use this within Eclipse.

In terms of EMF, there are the documentation and tutorials at the website:

http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/doc.html

and, since you invite an opportunity for me to shameless promote our new
book, there's a really fine book too:

http://www.awprofessional.com/titles/0131425420

I wonder if converting XSD to UML isn't a lot like converting XSD to Ecore,
which is done in XSDEcoreBuilder


Paul Hunter wrote:

> Hi Folks,
>
> I am new to all this so I was wondering if someone could point me in the
> right direction. I am hoping to write a standalone Java application that
> reads schema files, constructs an internal Ecore model (which I then hope
> to manipulate a bit via my own GUI) and then eventually I want to
> serialise it out as (UML) XMI. From what I can gather this sounds like
> it's do-able with EMF and maybe XSD(?), but I'm not sure where to begin.
> Are there any tutorials that would teach me how to use the
> classes/packages that I'd need?
>
> Hope you can help
> Cheers
> Paul

--------------858B5B22672BECD9E5BFEC96
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Paul,
<p>In terms of XSD, there are small examples in XSDPrototypicalSchema,&nbsp;
the org.eclipse.xsd.test plugin contains working example of how to run
standalone, the stuff in org.eclipse.xsd.edit can be used to build your
own GUI (even outside of Eclipse, but why would you ;-) and org.eclipse.xsd.editor
contains a sample of how to use this within Eclipse.
<p>In terms of EMF, there are the documentation and tutorials at the website:
<blockquote>&nbsp;<a href=" http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/doc.html"> http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/doc.html</a></blockquote>
and, since you invite an opportunity for me to shameless promote our new
book, there's a really fine book too:
<blockquote>&nbsp;<a href="http://www.awprofessional.com/titles/0131425420">http://www.awprofessional.com/titles/0131425420</a></blockquote>
I wonder if converting XSD to UML isn't a lot like converting XSD to Ecore,
which is done in XSDEcoreBuilder
<br>&nbsp;
<p>Paul Hunter wrote:
<blockquote TYPE=CITE>Hi Folks,
<p>I am new to all this so I was wondering if someone could point me in
the
<br>right direction.&nbsp; I am hoping to write a standalone Java application
that
<br>reads schema files, constructs an internal Ecore model (which I then
hope
<br>to manipulate a bit via my own GUI) and then eventually I want to
<br>serialise it out as (UML) XMI.&nbsp; From what I can gather this sounds
like
<br>it's do-able with EMF and maybe XSD(?), but I'm not sure where to begin.
<br>Are there any tutorials that would teach me how to use the
<br>classes/packages that I'd need?
<p>Hope you can help
<br>Cheers
<br>Paul</blockquote>
</html>

--------------858B5B22672BECD9E5BFEC96--
Re: XSD to Ecore to UML XMI ? [message #576465 is a reply to message #26921] Tue, 26 August 2003 12:08 Go to previous message
Eclipse User
Originally posted by: pch.sa-glas.mottmac.com

Ed,

Thanks for the speedy response. I am off and running now! One further
question for now...

I have been looking at XSDEcoreBuilder. I was hoping to pass in the
XSDSchema instance and have an ECore model fall out the other end but I
don't see how to do this. Wishful thinking perhaps! So at the moment I'm
doing it bit by bit with:

XSDEcoreBuilder builder = new XSDEcoreBuilder();
EList list = schema.getElementDeclarations();
for (Iterator i = schema.getElementDeclarations().iterator();
i.hasNext(); )
{
XSDElementDeclaration decl = (XSDElementDeclaration) i.next();
EClassifier cClass = builder.getEClassifier(decl);
}

I guess then that I'd throw all the EClassifiers into an EPackage or
something like that. Is this a reasonable approach or am I missing
something easier?

Thanks again,
Paul.

ps. Consider your plug a success - the book is on order!


Ed Merks wrote:

> Paul,

> In terms of XSD, there are small examples in XSDPrototypicalSchema, the
> org.eclipse.xsd.test plugin contains working example of how to run
> standalone, the stuff in org.eclipse.xsd.edit can be used to build your own
> GUI (even outside of Eclipse, but why would you ;-) and
> org.eclipse.xsd.editor contains a sample of how to use this within Eclipse.

> In terms of EMF, there are the documentation and tutorials at the website:

>
http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/doc.html

> and, since you invite an opportunity for me to shameless promote our new
> book, there's a really fine book too:

> http://www.awprofessional.com/titles/0131425420

> I wonder if converting XSD to UML isn't a lot like converting XSD to Ecore,
> which is done in XSDEcoreBuilder


> Paul Hunter wrote:

> > Hi Folks,
> >
> > I am new to all this so I was wondering if someone could point me in the
> > right direction. I am hoping to write a standalone Java application that
> > reads schema files, constructs an internal Ecore model (which I then hope
> > to manipulate a bit via my own GUI) and then eventually I want to
> > serialise it out as (UML) XMI. From what I can gather this sounds like
> > it's do-able with EMF and maybe XSD(?), but I'm not sure where to begin.
> > Are there any tutorials that would teach me how to use the
> > classes/packages that I'd need?
> >
> > Hope you can help
> > Cheers
> > Paul
Re: XSD to Ecore to UML XMI ? [message #576520 is a reply to message #26961] Tue, 26 August 2003 14:16 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25947
Registered: July 2009
Senior Member
--------------57AE9D5328CFE649364E6A07
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Paul,

Sorry there's no Javadoc yet. You can use

builder.generate(schema)

and then look at the map

builder.getTargetNamespaceToEPackageMap()

to see the namespace to package mapping; the values() of this map are the generated
EPackages.

I am working actively on this code and will likely be making significant enhancements.


Paul Hunter wrote:

> Ed,
>
> Thanks for the speedy response. I am off and running now! One further
> question for now...
>
> I have been looking at XSDEcoreBuilder. I was hoping to pass in the
> XSDSchema instance and have an ECore model fall out the other end but I
> don't see how to do this. Wishful thinking perhaps! So at the moment I'm
> doing it bit by bit with:
>
> XSDEcoreBuilder builder = new XSDEcoreBuilder();
> EList list = schema.getElementDeclarations();
> for (Iterator i = schema.getElementDeclarations().iterator();
> i.hasNext(); )
> {
> XSDElementDeclaration decl = (XSDElementDeclaration) i.next();
> EClassifier cClass = builder.getEClassifier(decl);
> }
>
> I guess then that I'd throw all the EClassifiers into an EPackage or
> something like that. Is this a reasonable approach or am I missing
> something easier?
>
> Thanks again,
> Paul.
>
> ps. Consider your plug a success - the book is on order!
>
> Ed Merks wrote:
>
> > Paul,
>
> > In terms of XSD, there are small examples in XSDPrototypicalSchema, the
> > org.eclipse.xsd.test plugin contains working example of how to run
> > standalone, the stuff in org.eclipse.xsd.edit can be used to build your own
> > GUI (even outside of Eclipse, but why would you ;-) and
> > org.eclipse.xsd.editor contains a sample of how to use this within Eclipse.
>
> > In terms of EMF, there are the documentation and tutorials at the website:
>
> >
> http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/doc.html
>
> > and, since you invite an opportunity for me to shameless promote our new
> > book, there's a really fine book too:
>
> > http://www.awprofessional.com/titles/0131425420
>
> > I wonder if converting XSD to UML isn't a lot like converting XSD to Ecore,
> > which is done in XSDEcoreBuilder
>
> > Paul Hunter wrote:
>
> > > Hi Folks,
> > >
> > > I am new to all this so I was wondering if someone could point me in the
> > > right direction. I am hoping to write a standalone Java application that
> > > reads schema files, constructs an internal Ecore model (which I then hope
> > > to manipulate a bit via my own GUI) and then eventually I want to
> > > serialise it out as (UML) XMI. From what I can gather this sounds like
> > > it's do-able with EMF and maybe XSD(?), but I'm not sure where to begin.
> > > Are there any tutorials that would teach me how to use the
> > > classes/packages that I'd need?
> > >
> > > Hope you can help
> > > Cheers
> > > Paul

--------------57AE9D5328CFE649364E6A07
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Paul,
<p>Sorry there's no Javadoc yet.&nbsp; You can use
<blockquote>builder.generate(schema)</blockquote>
and then look at the map
<blockquote>builder.getTargetNamespaceToEPackageMap()</blockquote >
to see the namespace to package mapping; the values() of this map are the
generated EPackages.
<p>I am working actively on this code and will likely be making significant
enhancements.
<br>&nbsp;
<p>Paul Hunter wrote:
<blockquote TYPE=CITE>Ed,
<p>Thanks for the speedy response.&nbsp; I am off and running now!&nbsp;
One further
<br>question for now...
<p>I have been looking at XSDEcoreBuilder.&nbsp; I was hoping to pass in
the
<br>XSDSchema instance and have an ECore model fall out the other end but
I
<br>don't see how to do this.&nbsp; Wishful thinking perhaps!&nbsp; So
at the moment I'm
<br>doing it bit by bit with:
<p>&nbsp; XSDEcoreBuilder builder = new XSDEcoreBuilder();
<br>&nbsp; EList list = schema.getElementDeclarations();
<br>&nbsp; for (Iterator i = schema.getElementDeclarations().iterator();
<br>i.hasNext(); )
<br>&nbsp; {
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; XSDElementDeclaration decl = (XSDElementDeclaration)
i.next();
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EClassifier cClass = builder.getEClassifier(decl);
<br>&nbsp; }
<p>I guess then that I'd throw all the EClassifiers into an EPackage or
<br>something like that.&nbsp; Is this a reasonable approach or am I missing
<br>something easier?
<p>Thanks again,
<br>Paul.
<p>ps. Consider your plug a success - the book is on order!
<p>Ed Merks wrote:
<p>> Paul,
<p>> In terms of XSD, there are small examples in XSDPrototypicalSchema,&nbsp;
the
<br>> org.eclipse.xsd.test plugin contains working example of how to run
<br>> standalone, the stuff in org.eclipse.xsd.edit can be used to build
your own
<br>> GUI (even outside of Eclipse, but why would you ;-) and
<br>> org.eclipse.xsd.editor contains a sample of how to use this within
Eclipse.
<p>> In terms of EMF, there are the documentation and tutorials at the
website:
<p>>
<br><a href=" http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/doc.html"> http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/doc.html</a>
<p>> and, since you invite an opportunity for me to shameless promote our
new
<br>> book, there's a really fine book too:
<p>> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://www.awprofessional.com/titles/0131425420">http://www.awprofessional.com/titles/0131425420</a>
<p>> I wonder if converting XSD to UML isn't a lot like converting XSD
to Ecore,
<br>> which is done in XSDEcoreBuilder
<p>> Paul Hunter wrote:
<p>> > Hi Folks,
<br>> >
<br>> > I am new to all this so I was wondering if someone could point
me in the
<br>> > right direction.&nbsp; I am hoping to write a standalone Java application
that
<br>> > reads schema files, constructs an internal Ecore model (which I
then hope
<br>> > to manipulate a bit via my own GUI) and then eventually I want
to
<br>> > serialise it out as (UML) XMI.&nbsp; From what I can gather this
sounds like
<br>> > it's do-able with EMF and maybe XSD(?), but I'm not sure where
to begin.
<br>> > Are there any tutorials that would teach me how to use the
<br>> > classes/packages that I'd need?
<br>> >
<br>> > Hope you can help
<br>> > Cheers
<br>> > Paul</blockquote>
</html>

--------------57AE9D5328CFE649364E6A07--
Previous Topic:XSD to Ecore to UML XMI ?
Next Topic:JBuilder to Eclipse Migration
Goto Forum:
  


Current Time: Thu Jul 31 01:33:13 EDT 2014

Powered by FUDForum. Page generated in 0.37937 seconds