FW: [Geoserver-devel] GTXML

-----Original Message-----
From: Randy George [mailto:rkgeorge@anonymised.com]
Sent: Wednesday, March 15, 2006 10:09 AM
To: 'geoserver-devel@lists.sourceforge.net'
Subject: RE: [Geoserver-devel] GTXML

Hi Saul,

I was experimenting with JAXB the other day. Were you successful with ER
JAXB 2.0?

I was able to get the 2.0 jtc compiler to produce the classes for
capabilities_1_3_0.xsd but then couldn't get the api to read in the sample
http://schemas.opengis.net/wms/1.3.0/capabilities_1_3_0.xml
file?
By dropping back to the jaxb 1.0.6 and using the capabilities DTD(transcoded
to xsd using Trang) I finally managed to get a useful class set for
GeoServer GetCapabilities xml.

The reason I asked about Jaxb2.0 is that the generated class hierarchy
appears to be much cleaner for 2.0 than the jaxb1.0.6. I didn't try
compiling classes for any of the other xsd schemas.

I am looking forward to playing with GTXML since it promises xml streaming
capability.

I was interested in your results
http://maps.massgis.state.ma.us/~sfarber/ogc_schemas/net_opengis_src.jar
but get 404 errors.

rkgeorge

-----Original Message-----
From: geoserver-devel-admin@lists.sourceforge.net
[mailto:geoserver-devel-admin@lists.sourceforge.net] On Behalf Of Saul
Farber
Sent: Wednesday, March 15, 2006 9:08 AM
To: geoserver-devel@lists.sourceforge.net
Subject: Re: [Geoserver-devel] GTXML

A side question: Is it possible with some technology to automatically
generate Java classes corresponding to the Types defined in a collection
of XML Schemas?

Yes, JAXB or EMF. I have not used JAXB so I cant really comment. However
I have used EMF and it is an excellent modelling technology. UDIG uses
it extensivly. EMF is built around another technology called XSD (the
EMF XML Schema library). Its the same library that GTXML uses.

Jonas

And I've used JAXB and it is also very cool. See, for example,
http://maps.massgis.state.ma.us/~sfarber/ogc_schemas

I used it to auto-generate "model" classes for GML 2.1.2 and SLD.

After I figured out what the heck to do, it only took about 10 minutes
to do every OGC schema I could find.

--saul

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Randy,

Yeah, I've stayed away from jaxb 1.x, becasue it's DTD-only and was sort-of abandoned by sun at some point. I needed schema support, so I went straight to the 2.0 stuff.

That said, I only used the weekly-drops of the Reference Implementation project. Also, I worked on this over a year ago and haven't had much time to work with it since...so much of the info might be out of date or incompatible with current technology drops.

That said, I went to look for that net_opengis_src.jar file and it was gone. Not sure what happened...

I re-generated what I *think* is the right thing and re-posted it, so feel free to nab it if you like.

Re: your problems getting the capabilities, filter and gml schemas to generate. The big problem is: THEY AREN'T VALID. See:
http://maps.massgis.state.ma.us/~sfarber/ogc_schemas/history.html

I had to modify the feature.xsd/geometry.xsd schemas to get it to validate, and only then would any of the tools work correctly.

--saul

Hi Saul,

I was experimenting with JAXB the other day. Were you successful with ER
JAXB 2.0?

I was able to get the 2.0 jtc compiler to produce the classes for
capabilities_1_3_0.xsd but then couldn't get the api to read in the sample
http://schemas.opengis.net/wms/1.3.0/capabilities_1_3_0.xml
file?
By dropping back to the jaxb 1.0.6 and using the capabilities DTD(transcoded
to xsd using Trang) I finally managed to get a useful class set for
GeoServer GetCapabilities xml.

The reason I asked about Jaxb2.0 is that the generated class hierarchy
appears to be much cleaner for 2.0 than the jaxb1.0.6. I didn't try
compiling classes for any of the other xsd schemas.

I am looking forward to playing with GTXML since it promises xml streaming
capability.

I was interested in your results
http://maps.massgis.state.ma.us/~sfarber/ogc_schemas/net_opengis_src.jar
but get 404 errors.

rkgeorge