You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by "Martin Desruisseaux (JIRA)" <ji...@apache.org> on 2015/04/10 00:36:12 UTC

[jira] [Resolved] (SIS-197) Remove the scope of NamedIdentifier, since it duplicates the path

     [ https://issues.apache.org/jira/browse/SIS-197?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Desruisseaux resolved SIS-197.
-------------------------------------
    Resolution: Fixed

> 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.4, 0.5
>            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)