allow a single value of the correct data type to be bound to an array
---------------------------------------------------------------------
Key: GEOT-1945
URL: http://jira.codehaus.org/browse/GEOT-1945
Project: GeoTools
Issue Type: Improvement
Components: ext xml-xsd
Reporter: Rob Atkinson
Assignee: Justin Deoliveira
Data types such as gml:DirectPositionType have a DoubleList binding.
In the case of single dimensional coordinate systems it is desirable to be able
to supply a single value. There isnt a way with 2D spatial systems to have, for
example, a 1-D envelope. This is a real requirement we are finding in the
GeoSciML testbed.
<gml:Envelope axisLabels="depth" srsDimension="1"
srsName="urn:ogc:def:crs:OGC:1.3:CRS84" uomLabels="metres">
<gml:lowerCorner>123.75</gml:lowerCorner>
</gml:Envelope>
The attached patch addresses this issue, and also provides for these values to
be provided as userdata to complex data types (such as gml:Envelope) by
allowing the ComplexBinding attempt to make sense of the supplied object, even
when the converter fails.
All Geotools 2.4 unit tests pass with this patch.
It has the side-effect that complex bindings will try to encode, whereas before
these were ignored if the converter couldnt handle the value. This may hide
failures to encode.
I couldnt see a particularly good way to test complex bindings - if you have an
example I happily create a unit test.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel