sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1726341 - in /sis/branches/JDK8/core: sis-metadata/src/main/java/org/apache/sis/internal/metadata/ sis-metadata/src/main/java/org/apache/sis/metadata/iso/ sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/ sis-metadata/src/te...
Date Fri, 22 Jan 2016 23:21:18 GMT
Author: desruisseaux
Date: Fri Jan 22 23:21:18 2016
New Revision: 1726341

URL: http://svn.apache.org/viewvc?rev=1726341&view=rev
Log:
Yet another attempt to clarify our use of "authority" versus "codespace" and where the "version" apply.
In particular, our javadoc for "version" was unclear about whether it is the code version or the namespace version.

Modified:
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/NameMeaning.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ServicesForUtility.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/CitationsTest.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/CommonAuthorityFactory.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticAuthorityFactory.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGFactory.java
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/CommonAuthorityFactoryTest.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/simple/CitationConstant.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleIdentifier.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/MetadataServices.java
    sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/mock/IdentifiedObjectMock.java

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/NameMeaning.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/NameMeaning.java?rev=1726341&r1=1726340&r2=1726341&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/NameMeaning.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/NameMeaning.java [UTF-8] Fri Jan 22 23:21:18 2016
@@ -101,6 +101,11 @@ public final class NameMeaning extends S
         add("UCUM");            // Unified Code for Units of Measure
         add("UNSD");            // United Nations Statistics Division
         add("USNO");            // United States Naval Observatory
+
+        // Codespaces defined by WMS specification for CRS.
+        AUTHORITIES.put(Constants.CRS, Constants.OGC);
+        AUTHORITIES.put("AUTO",        Constants.OGC);
+        AUTHORITIES.put("AUTO2",       Constants.OGC);
     }
 
     /**

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ServicesForUtility.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ServicesForUtility.java?rev=1726341&r1=1726340&r2=1726341&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ServicesForUtility.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ServicesForUtility.java [UTF-8] Fri Jan 22 23:21:18 2016
@@ -17,11 +17,12 @@
 package org.apache.sis.internal.metadata;
 
 import java.util.Collection;
+import org.opengis.metadata.Identifier;
 import org.opengis.metadata.citation.Role;
 import org.opengis.metadata.citation.Citation;
 import org.opengis.metadata.citation.PresentationForm;
 import org.opengis.metadata.citation.Responsibility;
-import org.apache.sis.internal.simple.SimpleCitation;
+import org.apache.sis.internal.simple.CitationConstant;
 import org.apache.sis.internal.util.Constants;
 import org.apache.sis.internal.util.MetadataServices;
 import org.apache.sis.metadata.iso.ImmutableIdentifier;
@@ -39,7 +40,7 @@ import static java.util.Collections.sing
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.6
- * @version 0.6
+ * @version 0.7
  * @module
  */
 public final class ServicesForUtility extends MetadataServices {
@@ -56,15 +57,9 @@ public final class ServicesForUtility ex
      * @return The requested citation, or {@code null} if there is no constant for the given name.
      */
     @Override
-    public Citation getCitationConstant(final String name) {
+    public CitationConstant getCitationConstant(final String name) {
         final Citation c = Citations.fromName(name);
-        /*
-         * The fact that the following line uses the citation class as a non-public criterion for identifying
-         * when the Citations.fromName(String) method found no match is documented in that Citations.fromName
-         * method body. If we do not rely anymore on this criterion, please update the Citations.fromName(…)
-         * comment accordingly.
-         */
-        return (c.getClass() != SimpleCitation.class) ? c : null;
+        return (c instanceof CitationConstant) ? (CitationConstant) c : null;
     }
 
     /**
@@ -86,9 +81,10 @@ public final class ServicesForUtility ex
         String           code                  = null;
         String           codeSpace             = null;
         String           version               = null;
+        Identifier       alternateIdentifier   = null;
         CharSequence     citedResponsibleParty = null;
         PresentationForm presentationForm      = null;
-        Citation         copyFrom              = null;  // Copy citedResponsibleParty from that citation.
+        Citation[]       copyFrom              = null;      // Copy citedResponsibleParty from those citations.
         switch (key) {
             case "ISO 19115-1": {
                 title     = "Geographic Information — Metadata Part 1: Fundamentals";
@@ -106,17 +102,36 @@ public final class ServicesForUtility ex
                 code      = "19115-2";
                 codeSpace = "ISO";
                 version   = "2009(E)";
-                copyFrom  = Citations.ISO_19115.get(0);
+                copyFrom  = new Citation[] {Citations.ISO_19115.get(0)};
                 presentationForm = PresentationForm.DOCUMENT_DIGITAL;
                 break;
             }
+            case "ISO 19128": {
+                title               = "Geographic Information — Web map server interface";   // ISO title
+                alternateTitle      = "Web Map Server Implementation Specification";         // OGC title
+                alternateIdentifier = new ImmutableIdentifier(Citations.OGC, "OGC", "06-042", null, null);
+                edition             = "ISO 19128:2005";
+                code                = "19128";
+                codeSpace           = "ISO";
+                version             = "2005";
+                copyFrom            = new Citation[] {Citations.ISO_19115.get(0), Citations.OGC};
+                presentationForm    = PresentationForm.DOCUMENT_DIGITAL;
+                break;
+            }
             case Constants.OGC: {
-                title     = "Identifier in OGC namespace";
-                code      = "OGC";
+                title = "Identifiers in OGC namespace";
+                code = Constants.OGC;
                 citedResponsibleParty = "Open Geospatial Consortium";
                 presentationForm = PresentationForm.DOCUMENT_DIGITAL;
                 break;
             }
+            case Constants.IOGP: {                                      // Not in public API (see Citations.IOGP javadoc)
+                title = "Using the EPSG Geodetic Parameter Dataset";    // Geomatics Guidance Note number 7, part 1
+                code = Constants.IOGP;
+                copyFrom = new Citation[] {Citations.EPSG};
+                presentationForm = PresentationForm.DOCUMENT_DIGITAL;
+                break;
+            }
             case Constants.EPSG: {
                 title     = "EPSG Geodetic Parameter Dataset";
                 code      = Constants.EPSG;
@@ -126,6 +141,9 @@ public final class ServicesForUtility ex
                 /*
                  * More complete information is provided as an ISO 19115 structure
                  * in EPSG Surveying and Positioning Guidance Note Number 7, part 1.
+                 * EPSGDataAccess.getAuthority() also add more information.
+                 * After we moved the content of this citation in a database,
+                 * EPSGDataAccess.getAuthority() should use this citation as a template.
                  */
                 break;
             }
@@ -163,19 +181,25 @@ public final class ServicesForUtility ex
         if (alternateTitle        != null) c.setAlternateTitles(singleton(Types.toInternationalString(alternateTitle)));
         if (edition               != null) c.setEdition(Types.toInternationalString(edition));
         if (code                  != null) c.setIdentifiers(singleton(new ImmutableIdentifier(null, codeSpace, code, version, null)));
-        if (copyFrom              != null) c.setCitedResponsibleParties(copyFrom.getCitedResponsibleParties());
         if (presentationForm      != null) c.setPresentationForms(singleton(presentationForm));
         if (citedResponsibleParty != null) {
-            final DefaultOrganisation organisation = new DefaultOrganisation();
-            organisation.setName(Types.toInternationalString(citedResponsibleParty));
-            final DefaultResponsibility r = new DefaultResponsibility(Role.PRINCIPAL_INVESTIGATOR, null, organisation);
-            final Collection<Responsibility> parties = c.getCitedResponsibleParties();
-            if (parties != null) {
-                parties.add(r);
-            } else {
-                c.setCitedResponsibleParties(singleton(r));
+            c.setCitedResponsibleParties(singleton(new DefaultResponsibility(Role.PRINCIPAL_INVESTIGATOR, null,
+                    new DefaultOrganisation(citedResponsibleParty, null, null, null))));
+        }
+        if (copyFrom != null) {
+            for (final Citation other : copyFrom) {
+                final Collection<? extends Responsibility> parties = other.getCitedResponsibleParties();
+                final Collection<Responsibility> current = c.getCitedResponsibleParties();
+                if (current != null) {
+                    current.addAll(parties);
+                } else {
+                    c.setCitedResponsibleParties(parties);
+                }
             }
         }
+        if (alternateIdentifier != null) {
+            c.getIdentifiers().add(alternateIdentifier);    // getIdentifiers() should not return null at this point.
+        }
         c.freeze();
         return c;
     }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java?rev=1726341&r1=1726340&r2=1726341&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java [UTF-8] Fri Jan 22 23:21:18 2016
@@ -94,35 +94,43 @@ public class DefaultIdentifier extends I
     private static final long serialVersionUID = -23375776954553866L;
 
     /**
+     * Person or party responsible for maintenance of the namespace.
+     *
+     * @see #getAuthority()
+     */
+    private Citation authority;
+
+    /**
      * Alphanumeric value identifying an instance in the namespace.
+     *
+     * @see #getCode()
      */
     private String code;
 
     /**
      * Identifier or namespace in which the code is valid.
+     *
+     * @see #getCodeSpace()
      */
     private String codeSpace;
 
     /**
-     * Identifier of the version of the associated code space or code, as specified
-     * by the code space or code authority. This version is included only when the
-     * {@linkplain #getCode code} uses versions. When appropriate, the edition is
-     * identified by the effective date, coded using ISO 8601 date format.
+     * Version identifier for the namespace, as specified by the code authority.
+     * This version is included only when the {@linkplain #getCode code} uses versions.
+     * When appropriate, the edition is identified by the effective date, coded using ISO 8601 date format.
+     *
+     * @see #getVersion()
      */
     private String version;
 
     /**
      * Natural language description of the meaning of the code value.
+     *
+     * @see #getDescription()
      */
     private InternationalString description;
 
     /**
-     * Organization or party responsible for definition and maintenance of the
-     * {@linkplain #getCode code}.
-     */
-    private Citation authority;
-
-    /**
      * Construct an initially empty identifier.
      */
     public DefaultIdentifier() {
@@ -155,10 +163,8 @@ public class DefaultIdentifier extends I
      *       {@linkplain org.apache.sis.util.CharSequences#isUnicodeIdentifier(CharSequence) unicode identifier}.</li>
      * </ol>
      *
-     * @param authority The organization or party responsible for definition and maintenance
-     *                  of the code, or {@code null} if none.
-     * @param code      The alphanumeric value identifying an instance in the namespace,
-     *                  or {@code null} if none.
+     * @param authority The the person or party responsible for maintenance of the namespace, or {@code null} if none.
+     * @param code      The alphanumeric value identifying an instance in the namespace, or {@code null} if none.
      *
      * @see org.apache.sis.metadata.iso.citation.Citations#getUnicodeIdentifier(Citation)
      */
@@ -214,6 +220,29 @@ public class DefaultIdentifier extends I
     }
 
     /**
+     * Returns the person or party responsible for maintenance of the namespace.
+     * The organization's abbreviation is often the same than this identifier
+     * {@linkplain #getCodeSpace() code space}, but not necessarily.
+     *
+     * @return Person or party responsible for maintenance of the namespace, or {@code null} if not available.
+     */
+    @Override
+    @XmlElement(name = "authority")
+    public Citation getAuthority() {
+        return authority;
+    }
+
+    /**
+     * Sets the person or party responsible for maintenance of the namespace.
+     *
+     * @param newValue The new authority.
+     */
+    public void setAuthority(final Citation newValue) {
+        checkWritePermission();
+        authority = newValue;
+    }
+
+    /**
      * Returns the alphanumeric value identifying an instance in the namespace.
      * The code is optionally from a controlled list or pattern.
      *
@@ -232,6 +261,7 @@ public class DefaultIdentifier extends I
 
     /**
      * Sets the alphanumeric value identifying an instance in the namespace.
+     * Should avoid characters that are not legal in URLs.
      *
      * @param newValue The new code, or {@code null}.
      */
@@ -246,7 +276,7 @@ public class DefaultIdentifier extends I
      *
      * <div class="note"><b>Example:</b> {@code "EPSG"}.</div>
      *
-     * @return The identifier code space, or {@code null} if none.
+     * @return The identifier or namespace in which the code is valid, or {@code null} if none.
      *
      * @since 0.5
      */
@@ -268,14 +298,13 @@ public class DefaultIdentifier extends I
     }
 
     /**
-     * Identifier of the version of the associated code, as specified by the code space or
-     * code authority. This version is included only when the {@linkplain #getCode() code}
-     * uses versions. When appropriate, the edition is identified by the effective date,
-     * coded using ISO 8601 date format.
+     * Returns the version identifier for the namespace, as specified by the code authority.
+     * This version is included only when the {@linkplain #getCode() code} uses versions.
+     * When appropriate, the edition is identified by the effective date, coded using ISO 8601 date format.
      *
      * <div class="note"><b>Example:</b> the version of the underlying EPSG database.</div>
      *
-     * @return The version, or {@code null} if not available.
+     * @return The version identifier for the namespace, or {@code null} if none.
      */
     @Override
     public String getVersion() {
@@ -283,9 +312,9 @@ public class DefaultIdentifier extends I
     }
 
     /**
-     * Sets an identifier of the version of the associated code.
+     * Sets the version identifier for the namespace.
      *
-     * @param newValue The new version.
+     * @param newValue The new version, or {@code null} if none.
      */
     public void setVersion(final String newValue) {
         checkWritePermission();
@@ -317,27 +346,4 @@ public class DefaultIdentifier extends I
         checkWritePermission();
         description = newValue;
     }
-
-    /**
-     * Organization or party responsible for definition and maintenance of the {@linkplain #getCode() code}.
-     * The organization's abbreviation is often the same than this identifier {@linkplain #getCodeSpace() code space},
-     * but not necessarily.
-     *
-     * @return The authority, or {@code null} if not available.
-     */
-    @Override
-    @XmlElement(name = "authority")
-    public Citation getAuthority() {
-        return authority;
-    }
-
-    /**
-     * Sets the organization or party responsible for definition and maintenance of the {@linkplain #getCode() code}.
-     *
-     * @param newValue The new authority.
-     */
-    public void setAuthority(final Citation newValue) {
-        checkWritePermission();
-        authority = newValue;
-    }
 }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java?rev=1726341&r1=1726340&r2=1726341&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java [UTF-8] Fri Jan 22 23:21:18 2016
@@ -142,37 +142,34 @@ public class ImmutableIdentifier extends
     private static final long serialVersionUID = -7681717592582493409L;
 
     /**
-     * Identifier code or name, optionally from a controlled list or pattern defined by a code space.
+     * The person or party responsible for maintenance of the namespace, or {@code null} if not available.
      *
-     * @see #getCode()
+     * @see #getAuthority()
      */
     @XmlElement(required = true)
-    private final String code;
+    private final Citation authority;
 
     /**
-     * Name or identifier of the person or organization responsible for namespace, or
-     * {@code null} if not available. This is often an abbreviation of the authority name.
+     * Alphanumeric value identifying an instance in the namespace.
      *
-     * @see #getCodeSpace()
+     * @see #getCode()
      */
     @XmlElement(required = true)
-    private final String codeSpace;
+    private final String code;
 
     /**
-     * Organization or party responsible for definition and maintenance of the code space or code,
-     * or {@code null} if not available.
+     * Identifier or namespace in which the code is valid, or {@code null} if not available.
+     * This is often an abbreviation of the authority name.
      *
-     * @see #getAuthority()
+     * @see #getCodeSpace()
      */
     @XmlElement(required = true)
-    private final Citation authority;
+    private final String codeSpace;
 
     /**
-     * Identifier of the version of the associated code space or code as specified
-     * by the code space or code authority, or {@code null} if not available. This
-     * version is included only when the {@linkplain #getCode() code} uses versions.
-     * When appropriate, the edition is identified by the effective date, coded using
-     * ISO 8601 date format.
+     * Version identifier for the namespace, as specified by the code authority.
+     * This version is included only when the {@linkplain #getCode code} uses versions.
+     * When appropriate, the edition is identified by the effective date, coded using ISO 8601 date format.
      *
      * @see #getVersion()
      */
@@ -204,14 +201,12 @@ public class ImmutableIdentifier extends
      * Creates a new identifier from the specified code and authority.
      *
      * @param authority
-     *          Organization or party responsible for definition and maintenance of the code
-     *          space or code, or {@code null} if not available.
+     *          The person or party responsible for maintenance of the namespace, or {@code null} if not available.
      * @param codeSpace
-     *          Name or identifier of the person or organization responsible for namespace, or
-     *          {@code null} if not available. This is often an abbreviation of the authority name.
+     *          Identifier or namespace in which the code is valid, or {@code null} if not available.
+     *          This is often an abbreviation of the authority name.
      * @param code
-     *          Identifier code or name, optionally from a controlled list or pattern defined by
-     *          a code space. The code can not be null.
+     *          Alphanumeric value identifying an instance in the namespace. The code can not be null.
      */
     public ImmutableIdentifier(final Citation authority, final String codeSpace, final String code) {
         this(authority, codeSpace, code, null, null);
@@ -222,17 +217,14 @@ public class ImmutableIdentifier extends
      * with an optional version number and description.
      *
      * @param authority
-     *          Organization or party responsible for definition and maintenance of the code
-     *          space or code, or {@code null} if not available.
+     *          The person or party responsible for maintenance of the namespace, or {@code null} if not available.
      * @param codeSpace
-     *          Name or identifier of the person or organization responsible for namespace, or
-     *          {@code null} if not available. This is often an abbreviation of the authority name.
+     *          Identifier or namespace in which the code is valid, or {@code null} if not available.
+     *          This is often an abbreviation of the authority name.
      * @param code
-     *          Identifier code or name, optionally from a controlled list or pattern defined by
-     *          a code space. The code can not be null.
+     *          Alphanumeric value identifying an instance in the namespace. The code can not be null.
      * @param version
-     *          The version of the associated code space or code as specified by the code authority,
-     *          or {@code null} if none.
+     *          The version identifier for the namespace as specified by the code authority, or {@code null} if none.
      * @param description
      *          Natural language description of the meaning of the code value, or {@code null} if none.
      */
@@ -385,11 +377,23 @@ public class ImmutableIdentifier extends
     }
 
     /**
-     * Identifier code or name, optionally from a controlled list or pattern.
+     * The person or party responsible for maintenance of the namespace.
+     * The organization's abbreviation is often the same than this identifier {@linkplain #getCodeSpace() code space},
+     * but not necessarily.
+     *
+     * @return The authority, or {@code null} if not available.
+     */
+    @Override
+    public Citation getAuthority() {
+        return authority;
+    }
+
+    /**
+     * Alphanumeric value identifying an instance in the namespace.
      *
      * <div class="note"><b>Example:</b> {@code "4326"}.</div>
      *
-     * @return The code, never {@code null}.
+     * @return Value identifying an instance in the namespace (never {@code null}).
      *
      * @see org.apache.sis.referencing.NamedIdentifier#tip()
      */
@@ -399,12 +403,12 @@ public class ImmutableIdentifier extends
     }
 
     /**
-     * Name or identifier of the person or organization responsible for namespace.
+     * Identifier or namespace in which the code is valid.
      * This is often the {@linkplain #getAuthority() authority}'s abbreviation, but not necessarily.
      *
      * <div class="note"><b>Example:</b> {@code "EPSG"}.</div>
      *
-     * @return The code space, or {@code null} if not available.
+     * @return Identifier or namespace in which the code is valid, or {@code null} if not available.
      *
      * @see org.apache.sis.referencing.NamedIdentifier#head()
      * @see org.apache.sis.referencing.NamedIdentifier#scope()
@@ -415,25 +419,13 @@ public class ImmutableIdentifier extends
     }
 
     /**
-     * Organization or party responsible for definition and maintenance of the {@linkplain #getCode() code}.
-     * The organization's abbreviation is often the same than this identifier {@linkplain #getCodeSpace() code space},
-     * but not necessarily.
-     *
-     * @return The authority, or {@code null} if not available.
-     */
-    @Override
-    public Citation getAuthority() {
-        return authority;
-    }
-
-    /**
-     * Identifier of the version of the associated code space or code, as specified by the code authority.
-     * This version is included only when the {@linkplain #getCode() code} uses versions. When appropriate,
-     * the edition is identified by the effective date, coded using ISO 8601 date format.
+     * The version identifier for the namespace, as specified by the code authority.
+     * This version is included only when the {@linkplain #getCode() code} uses versions.
+     * When appropriate, the edition is identified by the effective date, coded using ISO 8601 date format.
      *
      * <div class="note"><b>Example:</b> the version of the underlying EPSG database.</div>
      *
-     * @return The version, or {@code null} if not available.
+     * @return The version identifier for the namespace, or {@code null} if none.
      */
     @Override
     public String getVersion() {
@@ -629,15 +621,7 @@ public class ImmutableIdentifier extends
         /** Formats the URI. */
         @Override
         protected String formatTo(final Formatter formatter) {
-            final StringBuilder buffer = new StringBuilder(DefinitionURI.PREFIX)
-                    .append(DefinitionURI.SEPARATOR).append(type)
-                    .append(DefinitionURI.SEPARATOR).append(codeSpace)
-                    .append(DefinitionURI.SEPARATOR);
-            if (version != null) {
-                buffer.append(version);
-            }
-            buffer.append(DefinitionURI.SEPARATOR).append(code);
-            formatter.append(buffer.toString(), null);
+            formatter.append(DefinitionURI.format(type, codeSpace, version, code), null);
             return WKTKeywords.URI;
         }
     }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java?rev=1726341&r1=1726340&r2=1726341&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java [UTF-8] Fri Jan 22 23:21:18 2016
@@ -17,6 +17,7 @@
 package org.apache.sis.metadata.iso.citation;
 
 import java.util.List;
+import java.util.Collections;
 import org.opengis.metadata.citation.Citation;
 import org.opengis.referencing.IdentifiedObject;        // For javadoc
 import org.apache.sis.util.Static;
@@ -70,7 +71,7 @@ import static org.apache.sis.internal.ut
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.3
- * @version 0.6
+ * @version 0.7
  * @module
  */
 public final class Citations extends Static {
@@ -111,15 +112,42 @@ public final class Citations extends Sta
     });
 
     /**
+     * The <cite>Geographic Information — Web map server interface</cite> standards defined by ISO 19128.
+     * This specification is also available as the OGC
+     * <a href="http://www.opengeospatial.org/standards/wms">Web Map Service</a> (WMS) specification version 1.3.
+     *
+     * <div class="section">Content and future evolution</div>
+     * This list currently contains only one standard, but is nevertheless defined as a list in case a
+     * future version splits the standard in many parts.
+     * The content of this list may vary in future Apache SIS versions depending on the evolution of standards
+     * and in the way that SIS support them.
+     *
+     * <div class="section">Main usage</div>
+     * Among other things, this specification defines the Coordinate Reference System objects
+     * in the {@code "CRS"}, {@code "AUTO"} and {@code "AUTO2"} namespaces.
+     *
+     * @since 0.7
+     */
+    public static final List<Citation> ISO_19128 = Collections.singletonList(new CitationConstant("ISO 19128"));
+
+    /**
      * The <a href="http://www.iogp.org">International Association of Oil &amp; Gas producers</a> (IOGP) organization.
      * This organization is responsible for maintainance of {@link #EPSG} database.
      *
      * <p>We do not expose this citation in public API because it is an organization rather than a reference
-     * to a document or a database (see SIS-200). However we need it as the authority of {@link #EPSG}.</p>
+     * to a document or a database (see SIS-200). For now we keep this citation mostly for resolving the legacy
+     * "OGP" identifier as "IOGP" (see the special case in fromName(String) method). This is also a way to share
+     * the same citation instance in GML like below:</p>
      *
+     * {@preformat xml
+     *   <gml:identifier codeSpace="IOGP">urn:ogc:def:crs:EPSG::4326</gml:identifier>
+     * }
+     *
+     * @see #fromName(String)
+     * @see org.apache.sis.internal.jaxb.referencing.Code#getIdentifier()
      * @see <a href="http://issues.apache.org/jira/browse/SIS-200">SIS-200</a>
      */
-    static final Citation IOGP = new SimpleCitation("IOGP");
+    static final Citation IOGP = new CitationConstant(Constants.IOGP);
 
     /**
      * The authority for identifiers of objects defined by the
@@ -168,6 +196,8 @@ public final class Citations extends Sta
      * This value can be returned by:
      * <ul>
      *   <li>{@link org.apache.sis.metadata.iso.ImmutableIdentifier#getAuthority()}</li>
+     *   <li>{@link org.apache.sis.referencing.factory.sql.EPSGFactory#getAuthority()}
+     *       with the addition of version information.</li>
      * </ul>
      *
      * @since 0.4
@@ -390,21 +420,22 @@ public final class Citations extends Sta
      * List of citations declared in this class.
      * Most frequently used citations (at least in SIS) should be first.
      */
-    private static final SimpleCitation[] CITATIONS = {
-        (SimpleCitation) EPSG,
-        (SimpleCitation) OGC,
-        (SimpleCitation) ESRI,
-        (SimpleCitation) NETCDF,
-        (SimpleCitation) GEOTIFF,
-        (SimpleCitation) PROJ4,
-        (SimpleCitation) MAP_INFO,
-        (SimpleCitation) S57,
-        (SimpleCitation) ISBN,
-        (SimpleCitation) ISSN,
-        (SimpleCitation) SIS,
-        (SimpleCitation) ISO_19115.get(0),
-        (SimpleCitation) ISO_19115.get(1),
-        (SimpleCitation) IOGP
+    private static final CitationConstant[] CITATIONS = {
+        (CitationConstant) EPSG,
+        (CitationConstant) OGC,
+        (CitationConstant) ESRI,
+        (CitationConstant) NETCDF,
+        (CitationConstant) GEOTIFF,
+        (CitationConstant) PROJ4,
+        (CitationConstant) MAP_INFO,
+        (CitationConstant) S57,
+        (CitationConstant) ISBN,
+        (CitationConstant) ISSN,
+        (CitationConstant) SIS,
+        (CitationConstant) ISO_19115.get(0),
+        (CitationConstant) ISO_19115.get(1),
+        (CitationConstant) ISO_19128.get(0),
+        (CitationConstant) IOGP
     };
 
     static {  // Must be after CITATIONS array construction.
@@ -425,10 +456,8 @@ public final class Citations extends Sta
      * may have changed. This method notifies all citations that they will need to refresh their content.
      */
     static void refresh() {
-        for (final SimpleCitation citation : CITATIONS) {
-            if (citation instanceof CitationConstant) {
-                ((CitationConstant) citation).refresh();
-            }
+        for (final CitationConstant citation : CITATIONS) {
+            citation.refresh();
         }
     }
 
@@ -449,7 +478,7 @@ public final class Citations extends Sta
         if (identifier == null || ((identifier = CharSequences.trimWhitespaces(identifier)).isEmpty())) {
             return null;
         }
-        for (final SimpleCitation citation : CITATIONS) {
+        for (final CitationConstant citation : CITATIONS) {
             if (equalsFiltered(identifier, citation.title)) {
                 return citation;
             }
@@ -458,9 +487,8 @@ public final class Citations extends Sta
             return IOGP;
         }
         /*
-         * If we found no match, org.apache.sis.internal.metadata.ServicesForUtility expects the default citation
-         * to be of this exact class: SimpleCitation (not a subclass). If the type of citation created below is
-         * modified, then we need to review ServicesForUtility.getCitationConstant(String) method body.
+         * If we found no match, org.apache.sis.internal.metadata.ServicesForUtility expects
+         * that we return anything that is not an instance of CitationConstant.
          */
         return new SimpleCitation(identifier);
     }

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/CitationsTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/CitationsTest.java?rev=1726341&r1=1726340&r2=1726341&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/CitationsTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/CitationsTest.java [UTF-8] Fri Jan 22 23:21:18 2016
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.metadata.iso.citation;
 
+import java.util.List;
 import java.util.Locale;
 import java.lang.reflect.Field;
 import org.opengis.metadata.Identifier;
@@ -36,7 +37,7 @@ import static org.apache.sis.test.Metada
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.6
- * @version 0.6
+ * @version 0.7
  * @module
  */
 public final strictfp class CitationsTest extends TestCase {
@@ -64,6 +65,7 @@ public final strictfp class CitationsTes
         assertSame(ISSN,             fromName("ISSN"));
         assertSame(ISO_19115.get(0), fromName("ISO 19115-1"));
         assertSame(ISO_19115.get(1), fromName("ISO 19115-2"));
+        assertSame(ISO_19128.get(0), fromName("ISO 19128"));
         /*
          * Verify again, but using reflection for making sure that the field names
          * are consistent and that we did not forgot any citation constant.
@@ -84,6 +86,7 @@ public final strictfp class CitationsTes
     public void testGetIdentifier() {
         assertEquals("SIS",         getIdentifier(SIS));
         assertEquals("OGC",         getIdentifier(OGC));
+        assertEquals("IOGP",        getIdentifier(IOGP));
         assertEquals("EPSG",        getIdentifier(EPSG));
         assertEquals("ESRI",        getIdentifier(ESRI));
         assertEquals("NetCDF",      getIdentifier(NETCDF));
@@ -95,6 +98,9 @@ public final strictfp class CitationsTes
         assertEquals("S-57",        getIdentifier(S57));    // Not a valid Unicode identifier.
         assertEquals("ISO:19115-1", getIdentifier(ISO_19115.get(0)));  // The ':' separator is not usual in ISO references
         assertEquals("ISO:19115-2", getIdentifier(ISO_19115.get(1)));  // and could be changed in future SIS versions.
+        assertEquals("ISO:19128",   getIdentifier(ISO_19128.get(0)));
+        assertIdentifierEquals("OGC:06-042", "Identifiers in OGC namespace", "OGC", null, "06-042",
+                ((List<? extends Identifier>) ISO_19128.get(0).getIdentifiers()).get(1));
     }
 
     /**
@@ -106,6 +112,7 @@ public final strictfp class CitationsTes
     public void testGetUnicodeIdentifier() {
         assertEquals("SIS",         getUnicodeIdentifier(SIS));
         assertEquals("OGC",         getUnicodeIdentifier(OGC));
+        assertEquals("IOGP",        getUnicodeIdentifier(IOGP));
         assertEquals("EPSG",        getUnicodeIdentifier(EPSG));
         assertEquals("ESRI",        getUnicodeIdentifier(ESRI));
         assertEquals("NetCDF",      getUnicodeIdentifier(NETCDF));
@@ -117,6 +124,7 @@ public final strictfp class CitationsTes
         assertNull  ("S57",         getUnicodeIdentifier(S57));        // Not yet publicly declared as an identifier.
         assertNull  ("ISO_19115-1", getUnicodeIdentifier(ISO_19115.get(0)));  // Not a valid Unicode identifier.
         assertNull  ("ISO_19115-2", getUnicodeIdentifier(ISO_19115.get(1)));
+        assertEquals("ISO_19128",   getUnicodeIdentifier(ISO_19128.get(0)));
     }
 
     /**
@@ -128,6 +136,7 @@ public final strictfp class CitationsTes
     public void testGetCodeSpace() {
         assertEquals("SIS",         org.apache.sis.internal.util.Citations.getCodeSpace(SIS));
         assertEquals("OGC",         org.apache.sis.internal.util.Citations.getCodeSpace(OGC));
+        assertEquals("IOGP",        org.apache.sis.internal.util.Citations.getCodeSpace(IOGP));
         assertEquals("EPSG",        org.apache.sis.internal.util.Citations.getCodeSpace(EPSG));
         assertEquals("ESRI",        org.apache.sis.internal.util.Citations.getCodeSpace(ESRI));
         assertEquals("NetCDF",      org.apache.sis.internal.util.Citations.getCodeSpace(NETCDF));
@@ -139,6 +148,7 @@ public final strictfp class CitationsTes
         assertEquals("S57",         org.apache.sis.internal.util.Citations.getCodeSpace(S57));
         assertNull  ("ISO_19115-1", org.apache.sis.internal.util.Citations.getCodeSpace(ISO_19115.get(0)));
         assertNull  ("ISO_19115-2", org.apache.sis.internal.util.Citations.getCodeSpace(ISO_19115.get(1)));
+        assertEquals("ISO_19128",   org.apache.sis.internal.util.Citations.getCodeSpace(ISO_19128.get(0)));
     }
 
     /**
@@ -147,7 +157,7 @@ public final strictfp class CitationsTes
     @Test
     public void testGetTitles() {
         assertTitleEquals("SIS",     "Apache Spatial Information System",    SIS);
-        assertTitleEquals("OGC",     "Identifier in OGC namespace",          OGC);
+        assertTitleEquals("OGC",     "Identifiers in OGC namespace",         OGC);
         assertTitleEquals("EPSG",    "EPSG Geodetic Parameter Dataset",      EPSG);
         assertTitleEquals("ISBN",    "International Standard Book Number",   ISBN);
         assertTitleEquals("ISSN",    "International Standard Serial Number", ISSN);
@@ -157,6 +167,7 @@ public final strictfp class CitationsTes
         assertTitleEquals("S57",     "S-57",                                 S57);
         assertTitleEquals("ISO_19115", "Geographic Information — Metadata Part 1: Fundamentals", ISO_19115.get(0));
         assertTitleEquals("ISO_19115", "Geographic Information — Metadata Part 2: Extensions for imagery and gridded data", ISO_19115.get(1));
+        assertTitleEquals("ISO_19128", "Geographic Information — Web map server interface", ISO_19128.get(0));
     }
 
     /**
@@ -168,6 +179,7 @@ public final strictfp class CitationsTes
         assertEquals("International Organization for Standardization",   getCitedResponsibleParty(ISO_19115.get(0)));
         assertEquals("International Organization for Standardization",   getCitedResponsibleParty(ISO_19115.get(1)));
         assertEquals("International Association of Oil & Gas producers", getCitedResponsibleParty(EPSG));
+        assertEquals("International Association of Oil & Gas producers", getCitedResponsibleParty(IOGP));
     }
 
     /**

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/CommonAuthorityFactory.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/CommonAuthorityFactory.java?rev=1726341&r1=1726340&r2=1726341&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/CommonAuthorityFactory.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/CommonAuthorityFactory.java [UTF-8] Fri Jan 22 23:21:18 2016
@@ -264,12 +264,16 @@ public class CommonAuthorityFactory exte
     }
 
     /**
-     * Returns the organization responsible for definition of the CRS codes recognized by this factory.
-     * The authority for this factory is the <cite>Open Geospatial Consortium</cite>.
+     * Returns the specification that defines the codes recognized by this factory. The definitive source
+     * for this factory is ISO 19128: <cite>Geographic Information — Web map server interface</cite>,
+     * also available as the OGC <a href="http://www.opengeospatial.org/standards/wms">Web Map Service</a> (WMS)
+     * specification. However this method returns OGC as the authority since it is the authority reported in URN
+     * (for example {@code "urn:ogc:def:crs:OGC:1.3:CRS84"}).
      *
-     * @return The OGC authority.
+     * @return The <cite>"Identifiers in OGC namespace"</cite> authority.
      *
      * @see Citations#OGC
+     * @see Citations#ISO_19128
      */
     @Override
     public Citation getAuthority() {

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java?rev=1726341&r1=1726340&r2=1726341&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java [UTF-8] Fri Jan 22 23:21:18 2016
@@ -650,7 +650,7 @@ public abstract class ConcurrentAuthorit
     }
 
     /**
-     * Returns the organization or party responsible for definition and maintenance of the underlying database.
+     * Returns the database or specification that defines the codes recognized by this factory.
      * The default implementation performs the following steps:
      * <ul>
      *   <li>Returns the cached value if it exists.</li>

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticAuthorityFactory.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticAuthorityFactory.java?rev=1726341&r1=1726340&r2=1726341&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticAuthorityFactory.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticAuthorityFactory.java [UTF-8] Fri Jan 22 23:21:18 2016
@@ -71,7 +71,7 @@ public abstract class GeodeticAuthorityF
     }
 
     /**
-     * Returns the organization or party responsible for definition and maintenance of the database.
+     * Returns the database or specification that defines the codes recognized by this factory.
      * This method may return {@code null} if it can not obtain this information, for example because
      * the connection to a database is not available.
      *
@@ -122,10 +122,9 @@ public abstract class GeodeticAuthorityF
      *       {@code EPSGDataAccess.createFoo(String)} methods accept only codes like {@code "4326"} without
      *       {@code "EPSG:"} prefix (the reason is that {@code EPSGDataAccess} is not expected to be used directly).</li>
      *
-     *   <li>The {@link CommonAuthorityFactory} authority identifier is {@code "OGC"} but its {@code getCodeSpaces()}
-     *       method returns a set containing {@code "CRS"}, {@code "AUTO"} and {@code "AUTO2"}.
-     *       While OGC is the authority defining those namespaces, the {@code "OGC"} string itself
-     *       is not used as a namespace for CRS objects (in theory — in practice some do).</li>
+     *   <li>The {@link CommonAuthorityFactory} authority identifiers are ISO 19128 and OGC 06-042 (the WMS specification)
+     *       but its {@code getCodeSpaces()} method returns a set containing {@code "CRS"}, {@code "AUTO"} and {@code "AUTO2"}.
+     *       While ISO 19128 is defined as the first authority, the namespace is actually defined by OGC.</li>
      * </ul></div>
      *
      * The default implementation infers the namespace from the {@linkplain #getAuthority() authority}.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java?rev=1726341&r1=1726340&r2=1726341&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java [UTF-8] Fri Jan 22 23:21:18 2016
@@ -198,7 +198,7 @@ public class MultiAuthoritiesFactory ext
     }
 
     /**
-     * Returns the organization or party responsible for definition and maintenance of the database.
+     * Returns the database or specification that defines the codes recognized by this factory.
      * The default implementation returns {@code null} since {@code MultiAuthoritiesFactory} is not
      * about a particular authority.
      */

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java?rev=1726341&r1=1726340&r2=1726341&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java [UTF-8] Fri Jan 22 23:21:18 2016
@@ -336,9 +336,23 @@ public class EPSGDataAccess extends Geod
     }
 
     /**
-     * Returns the authority for this EPSG database. The returned citation contains the database version
+     * Returns the authority for this EPSG dataset. The returned citation contains the database version
      * in the {@linkplain Citation#getEdition() edition} attribute, together with date of last update in
      * the {@linkplain Citation#getEditionDate() edition date}.
+     * Example (the exact content will vary with Apache SIS versions, JDBC driver and EPSG dataset versions):
+     *
+     * {@preformat text
+     *   Citation
+     *   ├─ Title ……………………………………………………… EPSG Geodetic Parameter Dataset
+     *   ├─ Identifier ………………………………………… EPSG
+     *   ├─ Online resource (1 of 2)
+     *   │  ├─ Linkage ………………………………………… http://epsg-registry.org/
+     *   │  └─ Function ……………………………………… Browse
+     *   └─ Online resource (2 of 2)
+     *      ├─ Linkage ………………………………………… jdbc:derby:/my/path/to/SIS_DATA/Databases/SpatialMetadata
+     *      ├─ Description ……………………………… EPSG dataset version 8.8 on “Apache Derby Embedded JDBC Driver” version 10.12.
+     *      └─ Function ……………………………………… Connection
+     * }
      */
     @Override
     public synchronized Citation getAuthority() {
@@ -376,6 +390,9 @@ public class EPSGDataAccess extends Geod
              *    Linkage:      jdbc:derby:/my/path/to/SIS_DATA/Databases/SpatialMetadata
              *    Function:     Connection
              *    Description:  EPSG dataset version 8.8 on “Apache Derby Embedded JDBC Driver” version 10.12.
+             *
+             * TODO: A future version should use Citations.EPSG as a template.
+             *       See the "EPSG" case in ServiceForUtility.createCitation(String).
              */
             final DatabaseMetaData metadata  = connection.getMetaData();
 addURIs:    for (int i=0; ; i++) {

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGFactory.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGFactory.java?rev=1726341&r1=1726340&r2=1726341&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGFactory.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGFactory.java [UTF-8] Fri Jan 22 23:21:18 2016
@@ -22,6 +22,7 @@ import java.util.Set;
 import java.sql.Connection;
 import java.sql.SQLException;
 import javax.sql.DataSource;
+import java.util.concurrent.TimeUnit;
 import org.opengis.util.NameFactory;
 import org.opengis.util.FactoryException;
 import org.opengis.referencing.crs.CRSFactory;
@@ -178,6 +179,7 @@ public class EPSGFactory extends Concurr
         this.mtFactory    = factory(MathTransformFactory.class, mtFactory);
         this.translator   = translator;
         this.locale       = Locale.getDefault(Locale.Category.DISPLAY);
+        super.setTimeout(10, TimeUnit.SECONDS);
     }
 
     /**

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/CommonAuthorityFactoryTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/CommonAuthorityFactoryTest.java?rev=1726341&r1=1726340&r2=1726341&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/CommonAuthorityFactoryTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/CommonAuthorityFactoryTest.java [UTF-8] Fri Jan 22 23:21:18 2016
@@ -355,6 +355,6 @@ public final strictfp class CommonAuthor
                 "    ANGLEUNIT[“degree”, 0.017453292519943295],\n" +
                 "  AREA[“World”],\n" +
                 "  BBOX[-90.00, -180.00, 90.00, 180.00],\n" +
-                "  ID[“CRS”, 84, CITATION[“OGC”]]]", crs);
+                "  ID[“CRS”, 84, CITATION[“OGC”], URI[“urn:ogc:def:crs:OGC::84”]]]", crs);  // TODO: URI needs tuning.
     }
 }

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/simple/CitationConstant.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/simple/CitationConstant.java?rev=1726341&r1=1726340&r2=1726341&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/simple/CitationConstant.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/simple/CitationConstant.java [UTF-8] Fri Jan 22 23:21:18 2016
@@ -40,7 +40,7 @@ import org.apache.sis.internal.util.Meta
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.6
- * @version 0.6
+ * @version 0.7
  * @module
  *
  * @see IdentifierSpace
@@ -136,7 +136,8 @@ public class CitationConstant extends Si
                 if (c == null) {
                     c = MetadataServices.getInstance().createCitation(title);
                     if (c == null) {
-                        // 'sis-metadata' module not on the classpath (should be very rare).
+                        // 'sis-metadata' module not on the classpath (should be very rare)
+                        // or no citation defined for the given primary key.
                         c = new SimpleCitation(title);
                     }
                     delegate = c;
@@ -173,7 +174,15 @@ public class CitationConstant extends Si
      * @return The instance to use, as an unique instance if possible.
      */
     protected Object readResolve() {
-        final Citation c = MetadataServices.getInstance().getCitationConstant(title);
-        return (c != null) ? c : this;
+        CitationConstant c = MetadataServices.getInstance().getCitationConstant(title);
+        if (c == null) {
+            /*
+             * Should happen only if the sis-metadata module is not on the classpath (should be rare)
+             * or if the Citation has been serialized on a more recent version of Apache SIS than the
+             * current version.
+             */
+            c = this;
+        }
+        return c;
     }
 }

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleIdentifier.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleIdentifier.java?rev=1726341&r1=1726340&r2=1726341&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleIdentifier.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleIdentifier.java [UTF-8] Fri Jan 22 23:21:18 2016
@@ -102,9 +102,9 @@ public class SimpleIdentifier implements
     }
 
     /**
-     * Returns the name or identifier of the person or organization responsible for namespace,
-     * or {@code null} if none. The default implementation returns the shortest identifier of
-     * the {@linkplain #getAuthority() authority}, if any.
+     * Returns the identifier or namespace in which the code is valid, or {@code null} if none.
+     * The default implementation returns the shortest identifier of the {@linkplain #getAuthority() authority},
+     * if any.
      *
      * @return A code space inferred from the authority given at construction time, or {@code null} if none.
      */

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/MetadataServices.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/MetadataServices.java?rev=1726341&r1=1726340&r2=1726341&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/MetadataServices.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/MetadataServices.java [UTF-8] Fri Jan 22 23:21:18 2016
@@ -17,6 +17,7 @@
 package org.apache.sis.internal.util;
 
 import org.opengis.metadata.citation.Citation;
+import org.apache.sis.internal.simple.CitationConstant;
 import org.apache.sis.internal.system.Modules;
 import org.apache.sis.internal.system.OptionalDependency;
 
@@ -28,7 +29,7 @@ import org.apache.sis.internal.system.Op
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.6
- * @version 0.6
+ * @version 0.7
  * @module
  */
 public class MetadataServices extends OptionalDependency {
@@ -95,7 +96,7 @@ public class MetadataServices extends Op
      * @param  name The name of one of the citation constants defined in the {@code Citations} class.
      * @return The requested citation, or {@code null} if the {@code sis-metadata} module is not available.
      */
-    public Citation getCitationConstant(final String name) {
+    public CitationConstant getCitationConstant(final String name) {
         return null;
     }
 

Modified: sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/mock/IdentifiedObjectMock.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/mock/IdentifiedObjectMock.java?rev=1726341&r1=1726340&r2=1726341&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/mock/IdentifiedObjectMock.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/mock/IdentifiedObjectMock.java [UTF-8] Fri Jan 22 23:21:18 2016
@@ -127,9 +127,9 @@ public strictfp class IdentifiedObjectMo
     }
 
     /**
-     * Returns the identifier version ({@code null} for now).
+     * Returns the namespace version ({@code null} for now).
      *
-     * @return The identifier version.
+     * @return The namespace version.
      */
     @Override
     public final String getVersion() {



Mime
View raw message