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

Support gco:uuid and href on primitive types

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 0.3
    • Fix Version/s: None
    • Component/s: Metadata
    • Labels:
      None

      Description

      Metadata objects can specified gco:uuid, xlink:href and similar attributes by implementing the org.apache.sis.xml.IdentifiedObject interface. However we can not do that for JDK final classes like Integer and String. This is a problem similar to the one described in SIS-115 (NilReason for primitive types) and may be solved in a similar way. We have not yet solved this problem because the use case for gco:uuid or xlink:href attributes on elements as small as Integer or String are unclear at this stage.

      If nevertheless the above-cited support for identifiers is needed, then we could proceed as below:

      • In org.apache.sis.internal.jaxb.gco.PropertyType, complete the PropertyType(BoundType value, boolean mayBeNil) constructor in order to check for XLink and UUID in addition to NilReason.
      • Search usages of the above constructor. Conditions like value.intValue() == 0 may need to be removed.
      • We may need to provide a special implementation of org.apache.sis.xml.IdentifierMap which delegate its work to the org.apache.sis.internal.jaxb.PrimitiveTypeProperties static methods.
      • We may need to provide some static method (location to be determined) returning an IdentifierMap for a given Object, something similar to what we currently have in NilReason.forObject(Object).

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated: