Hi,
i was just wondering if there is any way of customizing the data received from the WFS or if it has to be done after.
I mean , if i want, for example, to change the name of an attribute on the resulting gml, what’s the best way, if any, to do it.
An example i have a feature that has an len attribute but i want it to be a length tag in the resulting GML, can i do this? and how?
Also, is there any way to change the result from GML? I know a WFS is supposed to return GML, but in deegree i think there’s an option to produce other XML, depending on the server configuration. I haven’t found anything like it in GeoServer, so i’m assuming it can´t be done. I would need to write a class that parsed the gml to whatever i wan’t, right?
If anyone knows anything that i don’t about this, i woul appreciate your help.
Thanks,
Manuel Gomes
i was just wondering if there is any way of customizing the data
received
from the WFS or if it has to be done after.
I mean , if i want, for example, to change the name of an attribute
on the
resulting gml, what's the best way, if any, to do it.
An example i have a feature that has an len attribute but i want it
to be a
length tag in the resulting GML, can i do this? and how?
No, there's not yet a really good way of doing this. There have been a
couple of experiments, with the concept of a 'view' of the data, but
none of them have quite come into maturity in geoserver/geotools.
Also, is there any way to change the result from GML? I know a WFS is
supposed to return GML, but in deegree i think there's an option to
produce
other XML, depending on the server configuration. I haven't found
anything
like it in GeoServer, so i'm assuming it can´t be done. I would need
to
write a class that parsed the gml to whatever i wan't, right?
We've recently done some refactoring to make it easier to add a new
output format, and at some point I'm planning to put some time in to
make output formats pluggable, like our datastores currently all, to
make it really easy for people to write new classes. The class that
you write would implement FeatureResponseDelegate. It would not parse
the gml, that would take a lot of overhead, instead it should just work
directly with the Feature, the geotools java object that we use
internally. If an xml format I would recommend implementing it with
SAX, similar to the geotools
org.geotools.gml.producer.FeatureTransformer that we use to write GML.
This will be much more scalable. But before that you may try just
writing strings directly, to get things working. If your format might
be used by others we would certainly consider rolling it into the
geoserver code base.
Chris
If anyone knows anything that i don't about this, i woul appreciate
your
help.
Thanks,
Manuel Gomes
----------------------------------------------------------
This mail sent through IMP: https://webmail.limegroup.com/