sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Desruisseaux (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SIS-197) Remove the scope of NamedIdentifier, since it duplicates the path
Date Thu, 09 Apr 2015 22:34:12 GMT
Martin Desruisseaux created SIS-197:
---------------------------------------

             Summary: Remove the scope of NamedIdentifier, since it duplicates the path
                 Key: SIS-197
                 URL: https://issues.apache.org/jira/browse/SIS-197
             Project: Spatial Information Systems
          Issue Type: Bug
          Components: Referencing
    Affects Versions: 0.5, 0.4
            Reporter: Martin Desruisseaux
            Assignee: Martin Desruisseaux
             Fix For: 0.6


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:

{code:java}
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.
{code}

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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message