[
https://issues.apache.org/jira/browse/SIS-590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17788063#comment-17788063
]
Martin Desruisseaux commented on SIS-590:
-----------------------------------------
Replacement could be done on optional properties too. This is not yet done
because we are considering replacing {{Integer}} by {{BigInteger}} and
{{Double}} by {{Quantity}}, in which case use of {{NilObject}} will be
possible. However the optional {{Boolean}} still need to be done.
> 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
> Priority: Major
>
> 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 with above-cited private
> getters/setters for the properties which were supported in Apache SIS 1.3.
> The following classes or properties have 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)