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

Metadata implementations could use a single field for union

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.3
    • Metadata
    • None

    Description

      The ISO 19115 specification defines some properties as conditional. Most of the time, they are a set of mutually exclusive properties. For example the MD_Resolution class defines two properties: equivalentScale and distance, both of them flagged as conditional. The specification said: "Only one of equivalent scale and ground sample distance may be provided".

      Currently those two properties are defined in separated fields and could be defined together. We could replace the two private fields by a single private Object field, and use instanceof check in getter methods. The advantage would be:

      • Automatically gain enforcement of the ISO specification.
      • Save a little bit of memory space for metadata instances.

      One consequence is that if an XML document contains two properties, the last property would silently overwrite the previous one at unmarshalling time. To prevent such thing to happen silently, we would need the APPENDABLE mode proposed in SIS-81.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: