Uploaded image for project: 'Spatial Information Systems'
  1. Spatial Information Systems
  2. SIS-590

NilReason on a wider range of types

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.4
    • None
    • Metadata
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              desruisseaux Martin Desruisseaux
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: