[Geoserver-devel] Please sir can I have some code ...

Hi Chris; I was trying to write up a complete example on how to use the GeoTools "Transformers" to generate GML Problem is (as we both know) there is no such thing "GML" - you need a schema.

I would like to ask you if you could donate the GeoServer schema generation code into GeoTools - I cannot think of a sane way to document the transformers without having the users generate up a schema for their document. (Currently I have just cut and pasted an example - but I am sure most users will skip right over it).

The page is here:
- http://docs.codehaus.org/display/GEOTDOC/03+XML+Transform

What do you think? Is this a good idea ...
Jody
Aside: I was interested to see this ( xmlns:citef="http://www.opengis.net/cite/functions" ) in the geoserver describe feature type response what does it do?

Which classes are you talking about? There shouldn't be a problem, just want to be sure exactly what the contribution is.

And you'd want us to then depend on the code in GeoTools? Which module would it live in in gt?

Jody Garnett wrote:

Hi Chris; I was trying to write up a complete example on how to use the GeoTools "Transformers" to generate GML Problem is (as we both know) there is no such thing "GML" - you need a schema.

I would like to ask you if you could donate the GeoServer schema generation code into GeoTools - I cannot think of a sane way to document the transformers without having the users generate up a schema for their document. (Currently I have just cut and pasted an example - but I am sure most users will skip right over it).

The page is here:
- http://docs.codehaus.org/display/GEOTDOC/03+XML+Transform

What do you think? Is this a good idea ...
Jody
Aside: I was interested to see this ( xmlns:citef="http://www.opengis.net/cite/functions" ) in the geoserver describe feature type response what does it do?

!DSPAM:4005,46965670228151804284693!

Chris Holmes wrote:

Which classes are you talking about? There shouldn't be a problem, just want to be sure exactly what the contribution is.

I will have to hunt down the code - this is just my volunteer "documentation project" so I will need to find where the code is in geoserver after work (although perhaps Andrea or Justin already know?). I remember writing some schema generation code back in GeoServer 1.1 - but I think it was stripped out (not sure what is generating schemas for DescribeFeatureType right now - perhaps it does it directly?).

And you'd want us to then depend on the code in GeoTools? Which module would it live in in gt?

It would live in the xml module - along with the feature collection transformer you already use.

In a perfect world the code would be a "transformer" for the GeoTools FeatureType - but I would take anything.
Jody

Jody Garnett wrote:

Hi Chris; I was trying to write up a complete example on how to use the GeoTools "Transformers" to generate GML Problem is (as we both know) there is no such thing "GML" - you need a schema.

I would like to ask you if you could donate the GeoServer schema generation code into GeoTools - I cannot think of a sane way to document the transformers without having the users generate up a schema for their document. (Currently I have just cut and pasted an example - but I am sure most users will skip right over it).

The page is here:
- http://docs.codehaus.org/display/GEOTDOC/03+XML+Transform

What do you think? Is this a good idea ...
Jody
Aside: I was interested to see this ( xmlns:citef="http://www.opengis.net/cite/functions" ) in the geoserver describe feature type response what does it do?

!DSPAM:4005,46965670228151804284693!

Jody Garnett wrote:

Chris Holmes wrote:

Which classes are you talking about? There shouldn't be a problem, just want to be sure exactly what the contribution is.

I will have to hunt down the code - this is just my volunteer "documentation project" so I will need to find where the code is in geoserver after work (although perhaps Andrea or Justin already know?). I remember writing some schema generation code back in GeoServer 1.1 - but I think it was stripped out (not sure what is generating schemas for DescribeFeatureType right now - perhaps it does it directly?).

And you'd want us to then depend on the code in GeoTools? Which module would it live in in gt?

It would live in the xml module - along with the feature collection transformer you already use.

In a perfect world the code would be a "transformer" for the GeoTools FeatureType - but I would take anything.

Hmmmm... I guess you mean like the code from 1.5.x? I believe for 1.6.x we're using Justin's new parser/producer, so that's making the schema there.

The 1.5.x code for generating a schema is pretty bad. I mean, it works great, but it's just a bunch of appending strings. And it's also pretty GeoServer specific, the code to do the 'transform' is not abstracted out:

http://svn.codehaus.org/geoserver/branches/1.5.x/geoserver/wfs/src/main/java/org/vfny/geoserver/wfs/responses/DescribeResponse.java

Jody

Jody Garnett wrote:

Hi Chris; I was trying to write up a complete example on how to use the GeoTools "Transformers" to generate GML Problem is (as we both know) there is no such thing "GML" - you need a schema.

I would like to ask you if you could donate the GeoServer schema generation code into GeoTools - I cannot think of a sane way to document the transformers without having the users generate up a schema for their document. (Currently I have just cut and pasted an example - but I am sure most users will skip right over it).

The page is here:
- http://docs.codehaus.org/display/GEOTDOC/03+XML+Transform

What do you think? Is this a good idea ...
Jody
Aside: I was interested to see this ( xmlns:citef="http://www.opengis.net/cite/functions" ) in the geoserver describe feature type response what does it do?

!DSPAM:4005,46967dda271733668746562!

Chris Holmes wrote:

Hmmmm... I guess you mean like the code from 1.5.x? I believe for 1.6.x we're using Justin's new parser/producer, so that's making the schema there.

Ah so I need to hit him up for a code example; yeah the documentation is for trunk so Justin's parser/encoder will work fine. Just wish he would give it a name (ie other than "justin's xml parser that happens to do encoding as well".

The 1.5.x code for generating a schema is pretty bad. I mean, it works great, but it's just a bunch of appending strings. And it's also pretty GeoServer specific, the code to do the 'transform' is not abstracted out:
http://svn.codehaus.org/geoserver/branches/1.5.x/geoserver/wfs/src/main/java/org/vfny/geoserver/wfs/responses/DescribeResponse.java

Cool I will have a look.
Jody

Hi guys,

Chiming in a bit late here... apologies. But i am not sure how easy this will be... The DescribeFeatureType code is pretty tied to the geoserver catalog interfaces, FeautreTypeInfo in particular.

The 1.1 code is a bit cleaner in that it actually builds up an XSDSchema object and then just serializes it using a method provided by the xsd library.

The 1.0 code keeps a bit string buffer around and just writes out xml schema directly.

-Justin

Jody Garnett wrote:

Chris Holmes wrote:

Hmmmm... I guess you mean like the code from 1.5.x? I believe for 1.6.x we're using Justin's new parser/producer, so that's making the schema there.

Ah so I need to hit him up for a code example; yeah the documentation is for trunk so Justin's parser/encoder will work fine. Just wish he would give it a name (ie other than "justin's xml parser that happens to do encoding as well".

The 1.5.x code for generating a schema is pretty bad. I mean, it works great, but it's just a bunch of appending strings. And it's also pretty GeoServer specific, the code to do the 'transform' is not abstracted out:
http://svn.codehaus.org/geoserver/branches/1.5.x/geoserver/wfs/src/main/java/org/vfny/geoserver/wfs/responses/DescribeResponse.java

Cool I will have a look.
Jody

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

!DSPAM:4007,4696833d276501137850744!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org