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

Remove the scope of NamedIdentifier, since it duplicates the path

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.4, 0.5
    • 0.6
    • Referencing
    • None

    Description

      The NamedIdentifier(Citation, CharSequence) constructor creates automatically a NameSpace (the value returned by the GenericName.scope() method) based on the Citation title. But this name space is also stored in the head (the value returned by the GenericName.head() method) of the name. This results in duplicated identifier when the full name is printed. For example:

      NamedIdentifier name = new NamedIdentifier(Citations.OGC, "scale_factor");
      System.out.println( name.toString() );    // Prints "OGC:scale_factor" - duplication is unnoticed.
      System.out.println( name.toFullyQualifiedName().toString() );    // Prints "OGC:OGC:scale_factor" - duplication become visible.
      

      The proposed fix is to omit completely the NameSpace creation for automatically generated names. Users can still specify a name space by creating their GenericName explicitly, for example using a NameFactory or the convenience static methods provided in the Names class.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: