Hi Jody
Jody Garnett schrieb:
Hi Matthias:
I have just been paying attention to the Parameter definitions in order
to make swing dialogs for the demo section. There is no requirement for
an object tree (we just take it when we can get it); I would of expected
a java.util.Map to hold the complex information (if it was not something
more specific like Geometry or a Feature).
The WPS spec has a very whacked relationship with complex data
parameters; it allows you to stitch in complex data but you need to
refer to a schema that defines the possibilities for what is getting
stitched in. As a result the WPS document examples referred to a couple
magic schemas for holding a single geometry; my impression was if I
wanted to add my own thing I would need to set up a similar arrangement.
So if you can get by with an xml fragment that should be okay; if you
want Objects out you may need to explore that xml parser a bit more and
add bindings for any content we don't currently handle (from your list I
would expect swe and om). Ben has some hard one experience - especially
with om - so I would recommend talking to him.
Thanks for that explanation. Since there are several namespaces from
different schemas I hope to avoid the object tree. Even it would be more
generic ... but we will always have the same request just with some
changes inside the paramter.
There's an an example xml for the input attached. But reading it into a
String and then just use it as Input-Parameter for the WPS Process
fails: The ComplexData element is empty. That's why I thought I have to
provide an object tree.
I don't understand what you mean with using an java.util.Map to store
the complex information.
Cheers, Matthias
<om:ObservationCollection xmlns:om="http://www.opengis.net/om/0.0"
xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:swe="http://www.opengis.net/swe/0.0" xmlns:ns="http://www.opengis.net/swe/0.0"
gml:id="oc_1234">
<om:member>
<om:Observation gml:id="obs_seismic_1234567">
<om:samplingTime>
<gml:TimeInstant>
<gml:timePosition>2007-12-12T01:12:00+02</gml:timePosition>
</gml:TimeInstant>
</om:samplingTime>
<om:procedure xlink:href="urn:foo:foo2:def:procedure:bar23" />
<om:observedProperty>
<swe:CompositePhenomenon gml:id="comp_123"
dimension="1">
<gml:csName>bar</gml:csName>
<swe:base xlink:href="urn:bar:foo2:def:phenomenon:SeismicComposite" />
<swe:component xlink:href="urn:foo:foo2:def:quantity:depth:BelowEpicenter" />
<swe:component xlink:href="urn:bar:foo2:def:phenomenon:universalMagnitude" />
<swe:component xlink:href="urn:bar:foo2:def:phenomenon:originLocation" />
</swe:CompositePhenomenon>
</om:observedProperty>
<om:featureOfInterest>
<gml:FeatureCollection gml:id="foi_earthquake">
<gml:location>
<gml:Point>
<gml:pos srsName="urn:ogc:crs:epsg:4328">
104.095 -6.2522
</gml:pos>
</gml:Point>
</gml:location>
</gml:FeatureCollection>
</om:featureOfInterest>
<om:resultDefinition>
<swe:DataBlockDefinition>
<swe:components name="">
<ns:SimpleDataRecord>
<ns:field name="">
<ns:Time definition="urn:ogc:data:time:iso8601" />
</ns:field>
<ns:field name="">
<ns:Quantity definition="urn:foo:foo2:def:quantity:depth:BelowEpicenter">
<ns:uom xlink:href="m" />
</ns:Quantity>
</ns:field>
<ns:field name="">
<ns:Quantity definition="urn:bar:foo2:def:phenomenon:universalMagnitude" />
</ns:field>
<ns:field name="">
<ns:Text definition="urn:bar:foo2:def:phenomenon:originLocation" />
</ns:field>
</ns:SimpleDataRecord>
</swe:components>
<swe:encoding>
<swe:TextBlock decimalSeparator="." blockSeparator="@@"
tokenSeparator="," />
</swe:encoding>
</swe:DataBlockDefinition>
</om:resultDefinition>
<om:result>
2007-12-12T01:12:00+02,109.12,8,104.095 -6.25229@@
</om:result>
</om:Observation>
</om:member>
<om:member>
<om:Observation gml:id="obs_buoy_003_1234567">
<om:samplingTime>
<gml:TimeInstant>
<gml:timePosition>2007-12-12T01:20:00+02</gml:timePosition>
</gml:TimeInstant>
</om:samplingTime>
<om:procedure xlink:href="urn:foo:foo2:def:procedure:doos:buoy:station:ts01" />
<om:observedProperty>
<swe:CompositePhenomenon gml:id="comp_1"
dimension="1">
<gml:csName>bar</gml:csName>
<swe:base xlink:href="urn:bar:foo2:def:phenomenon:BuoyComposite" />
<swe:component xlink:href="urn:bar:foo2:def:quantity:sealevel:change" />
</swe:CompositePhenomenon>
</om:observedProperty>
<om:featureOfInterest>
<gml:FeatureCollection gml:id="foi_buoy1">
<gml:location>
<gml:Point>
<gml:pos srsName="urn:ogc:crs:epsg:4328">
99.113 -2.7365
</gml:pos>
</gml:Point>
</gml:location>
</gml:FeatureCollection>
</om:featureOfInterest>
<om:resultDefinition>
<swe:DataBlockDefinition>
<swe:components name="">
<ns:SimpleDataRecord>
<ns:field name="">
<ns:Time definition="urn:ogc:data:time:iso8601" />
</ns:field>
<ns:field name="">
<ns:Quantity definition="urn:bar:foo2:def:quantity:sealevel:change">
<ns:uom xlink:href="cm" />
</ns:Quantity>
</ns:field>
<ns:field name="">
<ns:Text definition="urn:bar:foo2:def:phenomenon:BuoyLocation" />
</ns:field>
</ns:SimpleDataRecord>
</swe:components>
<swe:encoding>
<swe:TextBlock decimalSeparator="." blockSeparator="@@"
tokenSeparator="," />
</swe:encoding>
</swe:DataBlockDefinition>
</om:resultDefinition>
<om:result>
2007-12-12T01:20:00+02,23.032,99.113 -2.7365@@
</om:result>
</om:Observation>
</om:member>
<om:member>
<om:Observation gml:id="obs_buoy_002_1234567">
<om:samplingTime>
<gml:TimeInstant>
<gml:timePosition>2007-12-12T01:41:00+02</gml:timePosition>
</gml:TimeInstant>
</om:samplingTime>
<om:procedure xlink:href="urn:foo:foo2:def:procedure:doos:buoy:station:ts02" />
<om:observedProperty>
<swe:CompositePhenomenon gml:id="comp_2"
dimension="1">
<gml:csName>bar</gml:csName>
<swe:base xlink:href="urn:bar:foo2:def:phenomenon:BuoyComposite" />
<swe:component xlink:href="urn:bar:foo2:def:quantity:sealevel:change" />
</swe:CompositePhenomenon>
</om:observedProperty>
<om:featureOfInterest>
<gml:FeatureCollection gml:id="foi_buoy2">
<gml:location>
<gml:Point>
<gml:pos srsName="urn:ogc:crs:epsg:4328">
97.547 -0.611
</gml:pos>
</gml:Point>
</gml:location>
</gml:FeatureCollection>
</om:featureOfInterest>
<om:resultDefinition>
<swe:DataBlockDefinition>
<swe:components name="">
<ns:SimpleDataRecord>
<ns:field name="">
<ns:Time definition="urn:ogc:data:time:iso8601" />
</ns:field>
<ns:field name="">
<ns:Quantity definition="urn:bar:foo2:def:quantity:sealevel:change">
<ns:uom xlink:href="cm" />
</ns:Quantity>
</ns:field>
<ns:field name="">
<ns:Text definition="urn:bar:foo2:def:phenomenon:BuoyLocation" />
</ns:field>
</ns:SimpleDataRecord>
</swe:components>
<swe:encoding>
<swe:TextBlock decimalSeparator="." blockSeparator="@@"
tokenSeparator="," />
</swe:encoding>
</swe:DataBlockDefinition>
</om:resultDefinition>
<om:result>
2007-12-12T01:41:00+02,23.032,97.547 -0.611@@
</om:result>
</om:Observation>
</om:member>
</om:ObservationCollection>
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel