Martin Desruisseaux created SIS-590:
---------------------------------------
Summary: NilReason on a wider range of types
Key: SIS-590
URL: https://issues.apache.org/jira/browse/SIS-590
Project: Spatial Information Systems
Issue Type: Improvement
Components: Metadata
Affects Versions: 1.4
Reporter: Martin Desruisseaux
Apache SIs 1.3 supported {{NilReason}} on many (but not all) properties. A
special treatment was done for {{Boolean}}, {{Integer}}, {{Float}} and
{{Double}} types because they cannot be extended for implementing the
{{NilObject}} interface.
Apache SIS 1.4 removed the special treatment because primitive wrappers will
become value objects in a future Java version, which invalidate the technic
used in Apache SIS 1.3 and before. This is because that technic was relying on
object identities. The special treatment has been kept for {{Float}} and
{{Double}} using the various NaN values allowed by IEEE 754.
Apache SIS 1.5 restored the special treatment for {{Boolean}} and {{Integer}}
types but using a different technic, based on a new map view: {{NilReasonMap}}.
This new approach is applicable to all types that cannot be represented as
{{NilObject}}. However the information is lost at XML marshaling time, unless
private getters and setters are added.
XML marshaling of "nil reason" has been updated for properties which were
supported in Apache SIS 1.3. The following classes or properties has not yet
been updated because they were not supported in SIS 1.3. However they could be
opportunistically updated too:
* {{java.util.Date}}.
* All {{CodeList}} subclasses
* {{DefaultRepresentativeFraction.denominator}} — because a primitive long
integer is used.
* {{DefaultGeorectified.checkPointAvailability}} — because a primitive boolean
is used.
* {{DefaultGeoreferenceable.controlPointAvailability}} — idem.
* {{DefaultGeoreferenceable.orientationParameterAvailability}} — idem.
* {{DefaultGridSpatialRepresentation.transformationParameterAvailability}} —
idem.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)