sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1683824 [6/7] - in /sis/branches/JDK6: ./ application/sis-console/src/test/java/org/apache/sis/console/ core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ core/sis-metadata/src/main/java/org/apache/sis/io/wkt/ core/sis-metad...
Date Fri, 05 Jun 2015 17:46:10 GMT
Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/TimeDependentBWPTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/TimeDependentBWPTest.java?rev=1683824&r1=1683823&r2=1683824&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/TimeDependentBWPTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/TimeDependentBWPTest.java [UTF-8] Fri Jun  5 17:46:07 2015
@@ -37,24 +37,17 @@ import static org.apache.sis.internal.re
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.4
- * @version 0.4
+ * @version 0.6
  * @module
  */
 @DependsOn(BursaWolfParametersTest.class)
 public final strictfp class TimeDependentBWPTest extends TestCase {
     /**
-     * Tests the {@link BursaWolfParameters#setPositionVectorTransformation(Matrix, double)} method
-     * using the example given in the EPSG database for operation method EPSG:1053.
-     *
-     * @throws NoninvertibleMatrixException Should not happen.
+     * Creates a {@code TimeDependentBWP} using the example given in the EPSG database for operation method EPSG:1053.
+     * The target datum given by the EPG example is actually GDA94, but it is coincident with WGS84 to within 1 metre.
+     * For the purpose of this test, the target datum does not matter anyway.
      */
-    @Test
-    @DependsOnMethod("testEpsgCalculation")
-    public void testSetPositionVectorTransformation() throws NoninvertibleMatrixException {
-        /*
-         * The target datum is actually GDA94, but it is coincident with WGS84 to within 1 metre.
-         * For the purpose of this test, the target datum does not matter anyway.
-         */
+    private static TimeDependentBWP create() {
         final TimeDependentBWP p = new TimeDependentBWP(WGS84, null, date("1994-01-01 00:00:00"));
         p.tX = -0.08468;    p.dtX = +1.42;
         p.tY = -0.01942;    p.dtY = +1.34;
@@ -63,10 +56,49 @@ public final strictfp class TimeDependen
         p.rY = -0.0022578;  p.drY = -1.1820;
         p.rZ = -0.0024015;  p.drZ = -1.1551;
         p.dS = +0.00971;    p.ddS = +0.000109;
+        return p;
+    }
+
+    /**
+     * Tests {@link TimeDependentBWP#invert()}. This will indirectly tests {@link TimeDependentBWP#getValues()}
+     * followed by {@link TimeDependentBWP#setValues(double[])} because of the way the {@code invert()} method
+     * is implemented.
+     */
+    @Test
+    public void testInvert() {
+        /*
+         * Opportunistically test getValue() first because it is used by TimeDependentBWP.invert().
+         */
+        final double[] expected = {
+            -0.08468, -0.01942, +0.03201, +0.0004254, -0.0022578, -0.0024015, +0.00971,
+            +1.42,    +1.34,    +0.90,    -1.5461,    -1.1820,    -1.1551,    +0.000109
+        };
+        final TimeDependentBWP p = create();
+        assertArrayEquals(expected, p.getValues(), STRICT);
+        /*
+         * Now perform the actual TimeDependentBWP.invert() test.
+         */
+        for (int i=0; i<expected.length; i++) {
+            expected[i] = -expected[i];
+        }
+        p.invert();
+        assertArrayEquals(expected, p.getValues(), STRICT);
+    }
+
+    /**
+     * Tests the {@link TimeDependentBWP#setPositionVectorTransformation(Matrix, double)} method
+     * using the example given in the EPSG database for operation method EPSG:1053.
+     *
+     * @throws NoninvertibleMatrixException Should not happen.
+     */
+    @Test
+    @DependsOnMethod("testEpsgCalculation")
+    public void testSetPositionVectorTransformation() throws NoninvertibleMatrixException {
         /*
          * The transformation that we are going to test use as input
          * geocentric coordinates on ITRF2008 at epoch 2013.9.
          */
+        final TimeDependentBWP p = create();
         final Date time = p.getTimeReference();
         time.setTime(time.getTime() + StrictMath.round((2013.9 - 1994) * JULIAN_YEAR_LENGTH));
         assertEquals(date("2013-11-25 11:24:00"), time);

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultConversionTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultConversionTest.java?rev=1683824&r1=1683823&r2=1683824&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultConversionTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultConversionTest.java [UTF-8] Fri Jun  5 17:46:07 2015
@@ -30,7 +30,7 @@ import org.opengis.referencing.operation
 import org.opengis.referencing.operation.MathTransformFactory;
 import org.opengis.referencing.operation.Conversion;
 import org.opengis.referencing.operation.OperationMethod;
-import org.apache.sis.internal.referencing.OperationMethods;
+import org.apache.sis.internal.metadata.ReferencingServices;
 import org.apache.sis.internal.referencing.ReferencingUtilities;
 import org.apache.sis.internal.system.DefaultFactories;
 import org.apache.sis.referencing.IdentifiedObjects;
@@ -38,6 +38,7 @@ import org.apache.sis.referencing.datum.
 import org.apache.sis.referencing.cs.HardCodedCS;
 import org.apache.sis.referencing.crs.HardCodedCRS;
 import org.apache.sis.referencing.crs.DefaultGeographicCRS;
+import org.apache.sis.referencing.datum.DefaultGeodeticDatum;
 import org.apache.sis.referencing.operation.matrix.Matrix3;
 import org.apache.sis.referencing.operation.matrix.Matrix4;
 import org.apache.sis.referencing.operation.matrix.Matrices;
@@ -70,16 +71,24 @@ public final strictfp class DefaultConve
     private static final double OFFSET = 2.33722917;
 
     /**
-     * Creates a CRS using the same datum than the "Nouvelle Triangulation Française (Paris)" datum (EPSG:6807).
+     * Creates a CRS using the same ellipsoid than the "Nouvelle Triangulation Française (Paris)" datum (EPSG:6807),
+     * but with the prime meridian optionally set to Greenwich. Such CRS is not in real usage, but this is convenient
+     * for testing a conversion consisting of only a longitude rotation, which is a very simple operation easy to test.
      *
      * @param isSource {@code true} if creating the source CRS, or {@code false} if creating the target CRS.
      * @param cs {@link HardCodedCS#GEODETIC_2D}, {@link HardCodedCS#GEODETIC_φλ} or other compatible coordinate system.
+     * @param useGreenwich {@code true} for using Greenwich prime meridian, or {@code false} for staying on the Paris one.
      *
      * @see HardCodedCRS#NTF
      */
-    private static GeographicCRS createParisCRS(final boolean isSource, final EllipsoidalCS cs) {
+    private static GeographicCRS createParisCRS(final boolean isSource, final EllipsoidalCS cs, final boolean useGreenwich) {
+        DefaultGeodeticDatum datum = HardCodedDatum.NTF;
+        if (useGreenwich) {
+            datum = new DefaultGeodeticDatum(Collections.singletonMap(DefaultGeodeticDatum.NAME_KEY, datum.getName()),
+                    datum.getEllipsoid(), HardCodedDatum.GREENWICH);
+        }
         return new DefaultGeographicCRS(Collections.singletonMap(GeographicCRS.NAME_KEY,
-                isSource ? HardCodedCRS.NTF.getName() : "Back to Greenwich"), HardCodedDatum.NTF, cs);
+                isSource ? HardCodedCRS.NTF.getName() : "Back to Greenwich"), datum, cs);
     }
 
     /**
@@ -100,10 +109,13 @@ public final strictfp class DefaultConve
      * change the prime meridian). However we handle them as conversions for testing purpose only, because the
      * longitude rotation is a very simple operation easy to test.</p>
      *
+     * @param  useGreenwich {@code true} for using Greenwich prime meridian in the {@code targetCRS},
+     *         or {@code false} for staying on the Paris one.
      * @return A pseudo-conversion performing a longitude rotation.
      */
-    public static DefaultConversion createLongitudeRotation() {
-        return createLongitudeRotation(HardCodedCRS.NTF, createParisCRS(false, HardCodedCS.GEODETIC_2D), null);
+    public static DefaultConversion createLongitudeRotation(final boolean useGreenwich) {
+        return createLongitudeRotation(HardCodedCRS.NTF,
+                createParisCRS(false, HardCodedCS.GEODETIC_2D, useGreenwich), null);
     }
 
     /**
@@ -146,7 +158,7 @@ public final strictfp class DefaultConve
          */
         final Map<String,Object> properties = new HashMap<String,Object>(4);
         properties.put(DefaultTransformation.NAME_KEY, "Paris to Greenwich");
-        properties.put(OperationMethods.PARAMETERS_KEY, pg);
+        properties.put(ReferencingServices.PARAMETERS_KEY, pg);
         return new DefaultConversion(properties, sourceCRS, targetCRS, interpolationCRS,
                 method, MathTransforms.linear(rotation));
     }
@@ -184,7 +196,17 @@ public final strictfp class DefaultConve
      */
     @Test
     public void testConstruction() {
-        verifyProperties(createLongitudeRotation(), false);
+        /*
+         * Test construction of a valid conversion.
+         * This conversion use the same datum for the source and target CRS.
+         */
+        verifyProperties(createLongitudeRotation(false), false);
+        /*
+         * Test a conversion with a source and target CRS using different datum.
+         * This is a violation of conversion definition, but SIS is tolerant to
+         * such violation. See DefaultConversion constructor javadoc for discussion.
+         */
+        verifyProperties(createLongitudeRotation(true), false);
     }
 
     /**
@@ -199,7 +221,7 @@ public final strictfp class DefaultConve
     @Test
     @DependsOnMethod("testConstruction")
     public void testDefiningConversion() throws FactoryException {
-        final DefaultConversion reference = createLongitudeRotation();
+        final DefaultConversion reference = createLongitudeRotation(true);
         final DefaultConversion definingConversion = new DefaultConversion(
                 IdentifiedObjects.getProperties(reference),
                 reference.getMethod(),
@@ -240,8 +262,8 @@ public final strictfp class DefaultConve
     public void testSpecialize() throws FactoryException {
         final MathTransformFactory factory = DefaultFactories.forBuildin(MathTransformFactory.class);
         DefaultConversion op = createLongitudeRotation(
-                createParisCRS(true,  HardCodedCS.GEODETIC_3D),
-                createParisCRS(false, HardCodedCS.GEODETIC_3D), null);
+                createParisCRS(true,  HardCodedCS.GEODETIC_3D, false),
+                createParisCRS(false, HardCodedCS.GEODETIC_3D, true), null);
         assertMatrixEquals("Longitude rotation of a three-dimensional CRS", new Matrix4(
                 1, 0, 0, OFFSET,
                 0, 1, 0, 0,
@@ -282,7 +304,7 @@ public final strictfp class DefaultConve
     @DependsOnMethod("testDefiningConversion")
     public void testWithInterpolationCRS() throws FactoryException {
         DefaultConversion op = createLongitudeRotation(HardCodedCRS.NTF,
-                createParisCRS(false, HardCodedCS.GEODETIC_2D), HardCodedCRS.TIME);
+                createParisCRS(false, HardCodedCS.GEODETIC_2D, true), HardCodedCRS.TIME);
         assertMatrixEquals("Longitude rotation of a time-varying CRS", new Matrix4(
                 1, 0, 0, 0,
                 0, 1, 0, OFFSET,
@@ -310,7 +332,7 @@ public final strictfp class DefaultConve
     @Test
     public void testDatumCheck() throws FactoryException {
         final MathTransformFactory factory = DefaultFactories.forBuildin(MathTransformFactory.class);
-        final DefaultConversion op = createLongitudeRotation();
+        final DefaultConversion op = createLongitudeRotation(true);
         try {
             op.specialize(Conversion.class, HardCodedCRS.WGS84, HardCodedCRS.NTF, factory);
             fail("Should not have accepted to change the geodetic datum.");
@@ -335,6 +357,6 @@ public final strictfp class DefaultConve
     @Test
     @DependsOnMethod("testConstruction")
     public void testSerialization() {
-        verifyProperties(assertSerializedEquals(createLongitudeRotation()), false);
+        verifyProperties(assertSerializedEquals(createLongitudeRotation(false)), false);
     }
 }

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultOperationMethodTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultOperationMethodTest.java?rev=1683824&r1=1683823&r2=1683824&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultOperationMethodTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultOperationMethodTest.java [UTF-8] Fri Jun  5 17:46:07 2015
@@ -25,8 +25,8 @@ import org.opengis.referencing.operation
 import org.apache.sis.io.wkt.Convention;
 import org.apache.sis.util.ComparisonMode;
 import org.apache.sis.metadata.iso.ImmutableIdentifier;
+import org.apache.sis.metadata.iso.citation.Citations;
 import org.apache.sis.metadata.iso.citation.DefaultCitation;
-import org.apache.sis.metadata.iso.citation.HardCodedCitations;
 import org.apache.sis.parameter.DefaultParameterDescriptorGroup;
 import org.apache.sis.test.DependsOnMethod;
 import org.apache.sis.test.DependsOn;
@@ -66,7 +66,7 @@ public final strictfp class DefaultOpera
         final Map<String,Object> properties = new HashMap<String,Object>(8);
         assertNull(properties.put(OperationMethod.NAME_KEY, method));
         assertNull(properties.put(Identifier.CODESPACE_KEY, "EPSG"));
-        assertNull(properties.put(Identifier.AUTHORITY_KEY, HardCodedCitations.IOGP));
+        assertNull(properties.put(Identifier.AUTHORITY_KEY, Citations.EPSG));
         /*
          * The parameter group for a Mercator projection is actually not empty, but it is not the purpose of
          * this class to test DefaultParameterDescriptorGroup. So we use an empty group of parameters here.
@@ -77,7 +77,7 @@ public final strictfp class DefaultOpera
          * Then define the other properties to be given to OperationMethod.
          */
         assertNotNull(properties.put(OperationMethod.NAME_KEY, pg.getName()));
-        assertNull(properties.put(OperationMethod.IDENTIFIERS_KEY, new ImmutableIdentifier(HardCodedCitations.IOGP, "EPSG", identifier)));
+        assertNull(properties.put(OperationMethod.IDENTIFIERS_KEY, new ImmutableIdentifier(Citations.EPSG, "EPSG", identifier)));
         assertNull(properties.put(OperationMethod.FORMULA_KEY, new DefaultCitation(formula)));
         return new DefaultOperationMethod(properties, dimension, dimension, pg);
     }
@@ -161,7 +161,7 @@ public final strictfp class DefaultOpera
     @DependsOnMethod("testConstruction")
     public void testWKT() {
         final OperationMethod method = create("Mercator (variant A)", "9804", "EPSG guidance note #7-2", 2);
-        assertWktEquals("Method[“Mercator (variant A)”, Id[“EPSG”, 9804, Citation[“IOGP”], URI[“urn:ogc:def:method:EPSG::9804”]]]", method);
+        assertWktEquals("Method[“Mercator (variant A)”, Id[“EPSG”, 9804, URI[“urn:ogc:def:method:EPSG::9804”]]]", method);
         assertWktEquals(Convention.WKT1, "PROJECTION[“Mercator (variant A)”, AUTHORITY[“EPSG”, “9804”]]", method);
     }
 }

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultTransformationTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultTransformationTest.java?rev=1683824&r1=1683823&r2=1683824&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultTransformationTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultTransformationTest.java [UTF-8] Fri Jun  5 17:46:07 2015
@@ -23,7 +23,7 @@ import org.opengis.parameter.ParameterVa
 import org.opengis.referencing.datum.GeodeticDatum;
 import org.opengis.referencing.operation.Matrix;
 import org.opengis.referencing.operation.OperationMethod;
-import org.apache.sis.internal.referencing.OperationMethods;
+import org.apache.sis.internal.metadata.ReferencingServices;
 import org.apache.sis.parameter.DefaultParameterDescriptorTest;
 import org.apache.sis.referencing.IdentifiedObjects;
 import org.apache.sis.referencing.cs.HardCodedCS;
@@ -95,7 +95,7 @@ public final strictfp class DefaultTrans
          */
         final Map<String,Object> properties = new HashMap<String,Object>(4);
         properties.put(DefaultTransformation.NAME_KEY, "Tokyo to JGD2000 (GSI)");
-        properties.put(OperationMethods.PARAMETERS_KEY, pg);
+        properties.put(ReferencingServices.PARAMETERS_KEY, pg);
         return new DefaultTransformation(properties,
                 createCRS(null,      HardCodedDatum.TOKYO),     // SourceCRS
                 createCRS("JGD2000", HardCodedDatum.JGD2000),   // TargetCRS
@@ -176,7 +176,7 @@ public final strictfp class DefaultTrans
                 "      Axis[“(Y)”, geocentricY, Order[2]],\n" +
                 "      Axis[“(Z)”, geocentricZ, Order[3]],\n" +
                 "      LengthUnit[“metre”, 1]]],\n" +
-                "  Method[“Geocentric translations”, Id[“EPSG”, 1031, Citation[“IOGP”]]],\n" +
+                "  Method[“Geocentric translations”, Id[“EPSG”, 1031]],\n" +
                 "  Parameter[“X-axis translation”, -146.414, Id[“EPSG”, 8605]],\n" +
                 "  Parameter[“Y-axis translation”, 507.337, Id[“EPSG”, 8606]],\n" +
                 "  Parameter[“Z-axis translation”, 680.507, Id[“EPSG”, 8607]]]", op);

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactoryTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactoryTest.java?rev=1683824&r1=1683823&r2=1683824&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactoryTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactoryTest.java [UTF-8] Fri Jun  5 17:46:07 2015
@@ -17,12 +17,15 @@
 package org.apache.sis.referencing.operation.transform;
 
 import java.util.Set;
+import org.opengis.util.FactoryException;
 import org.opengis.util.NoSuchIdentifierException;
 import org.opengis.referencing.operation.Conversion;
 import org.opengis.referencing.operation.Projection;
 import org.opengis.referencing.operation.SingleOperation;
 import org.opengis.referencing.operation.OperationMethod;
+import org.opengis.referencing.operation.MathTransform;
 import org.opengis.referencing.operation.MathTransformFactory;
+import org.apache.sis.referencing.operation.matrix.Matrix2;
 import org.apache.sis.internal.referencing.provider.Affine;
 import org.apache.sis.internal.referencing.provider.Mercator1SP;
 import org.apache.sis.internal.system.DefaultFactories;
@@ -139,4 +142,24 @@ public final strictfp class DefaultMathT
         assertSame(current, factory.getOperationMethod("Equidistant Cylindrical (Spherical)"));
         assertSame("Should share the non-deprecated implementation.", current, deprecated);
     }
+
+    /**
+     * Test {@link DefaultMathTransformFactory#createFromWKT(String)}. We test only a very small WKT here because
+     * it is not the purpose of this class to test the parser. The main purpose of this test is to verify that
+     * {@link DefaultMathTransformFactory} has been able to instantiate the parser.
+     *
+     * @throws FactoryException if the parsing failed.
+     */
+    @Test
+    public void testCreateFromWKT() throws FactoryException {
+        final MathTransform tr = factory().createFromWKT(
+                "PARAM_MT[\"Affine\","
+                    + "PARAMETER[\"num_row\",2],"
+                    + "PARAMETER[\"num_col\",2],"
+                    + "PARAMETER[\"elt_0_1\",7]]");
+
+        assertMatrixEquals("Affine", new Matrix2(
+                1, 7,
+                0, 1), MathTransforms.getMatrix(tr), STRICT);
+    }
 }

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/test/ReferencingAssert.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/test/ReferencingAssert.java?rev=1683824&r1=1683823&r2=1683824&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/test/ReferencingAssert.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/test/ReferencingAssert.java [UTF-8] Fri Jun  5 17:46:07 2015
@@ -40,9 +40,9 @@ import org.apache.sis.metadata.iso.citat
 import org.apache.sis.referencing.IdentifiedObjects;
 import org.apache.sis.referencing.operation.transform.LinearTransform;
 import org.apache.sis.util.iso.DefaultNameSpace;
+import org.apache.sis.internal.util.Constants;
 
 import static java.lang.StrictMath.*;
-import static org.apache.sis.internal.util.Constants.*;
 
 
 /**
@@ -73,13 +73,16 @@ public strictfp class ReferencingAssert
      */
     public static void assertOgcIdentifierEquals(final String expected, final Identifier actual) {
         assertNotNull(actual);
-        assertSame("Authority", Citations.OGC, actual.getAuthority());
-        assertIdentifierEquals(null, OGC, OGC, null, expected, actual);
+        assertEquals("code",       expected,      actual.getCode());
+        assertEquals("codeSpace",  Constants.OGC, actual.getCodeSpace());
+        assertSame  ("authority",  Citations.OGC, actual.getAuthority());
+        assertEquals("identifier", Constants.OGC + DefaultNameSpace.DEFAULT_SEPARATOR + expected,
+                IdentifiedObjects.toString(actual));
     }
 
     /**
      * Asserts that the given identifier has the expected code and the {@code "EPSG"} code space.
-     * The authority is expected to have the {@code "IOGP"} title or alternate title.
+     * The authority is expected to have the {@code "EPSG"} title, alternate title or identifier.
      *
      * @param expected The expected identifier code.
      * @param actual   The identifier to verify.
@@ -88,10 +91,10 @@ public strictfp class ReferencingAssert
      */
     public static void assertEpsgIdentifierEquals(final String expected, final Identifier actual) {
         assertNotNull(actual);
-        assertEquals("code",       expected, actual.getCode());
-        assertEquals("codeSpace",  EPSG,  actual.getCodeSpace());
-        assertEquals("authority",  IOGP,  Citations.getIdentifier(actual.getAuthority()));
-        assertEquals("identifier", EPSG + DefaultNameSpace.DEFAULT_SEPARATOR + expected,
+        assertEquals("code",       expected,        actual.getCode());
+        assertEquals("codeSpace",  Constants.EPSG,  actual.getCodeSpace());
+        assertEquals("authority",  Constants.EPSG,  Citations.getIdentifier(actual.getAuthority()));
+        assertEquals("identifier", Constants.EPSG + DefaultNameSpace.DEFAULT_SEPARATOR + expected,
                 IdentifiedObjects.toString(actual));
     }
 
@@ -100,8 +103,8 @@ public strictfp class ReferencingAssert
      * EPSG code. As a special case if the given code is 0, then this method verifies that the given object has no
      * identifier.
      *
-     * @param expected    The expected EPSG code, or {@code 0} if we expect no EPSG code.
-     * @param actual The set of identifiers in which to verify the EPSG code.
+     * @param expected The expected EPSG code, or {@code 0} if we expect no EPSG code.
+     * @param actual   The set of identifiers in which to verify the EPSG code.
      */
     public static void assertEpsgIdentifierEquals(final int expected, final Collection<? extends Identifier> actual) {
         assertNotNull(actual);

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/test/integration/ReferencingInMetadataTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/test/integration/ReferencingInMetadataTest.java?rev=1683824&r1=1683823&r2=1683824&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/test/integration/ReferencingInMetadataTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/test/integration/ReferencingInMetadataTest.java [UTF-8] Fri Jun  5 17:46:07 2015
@@ -180,7 +180,8 @@ public final strictfp class ReferencingI
      * @param object The object to verify.
      */
     private static void verifyIdentifiers(final String code, final IdentifiedObject object) {
-        assertIdentifierEquals("identifier", "SIS", "SIS", null, code, getSingleton(object.getIdentifiers()));
+        assertIdentifierEquals("identifier", "Apache Spatial Information System", "SIS",
+                null, code, getSingleton(object.getIdentifiers()));
         assertIdentifierEquals("name", null, null, null, "Depth", object.getName());
     }
 }

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java?rev=1683824&r1=1683823&r2=1683824&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java [UTF-8] Fri Jun  5 17:46:07 2015
@@ -33,7 +33,6 @@ import org.junit.BeforeClass;
     org.apache.sis.internal.referencing.FormulasTest.class,
     org.apache.sis.internal.referencing.j2d.ShapeUtilitiesTest.class,
     org.apache.sis.internal.referencing.AxisDirectionsTest.class,
-    org.apache.sis.internal.referencing.VerticalDatumTypesTest.class,
     org.apache.sis.internal.referencing.PositionalAccuracyConstantTest.class,
     org.apache.sis.internal.referencing.ReferencingUtilitiesTest.class,
     org.apache.sis.internal.jaxb.referencing.CodeTest.class,
@@ -136,10 +135,14 @@ import org.junit.BeforeClass;
     org.apache.sis.referencing.crs.SubTypesTest.class,
     org.apache.sis.referencing.crs.DefaultCompoundCRSTest.class,
     org.apache.sis.referencing.crs.HardCodedCRSTest.class,
+    org.apache.sis.referencing.factory.GeodeticObjectFactoryTest.class,
     org.apache.sis.referencing.StandardDefinitionsTest.class,
     org.apache.sis.referencing.CommonCRSTest.class,
     org.apache.sis.referencing.CRSTest.class,
 
+    org.apache.sis.io.wkt.MathTransformParserTest.class,
+    org.apache.sis.io.wkt.GeodeticObjectParserTest.class,
+
     org.apache.sis.geometry.AbstractDirectPositionTest.class,
     org.apache.sis.geometry.GeneralDirectPositionTest.class,
     org.apache.sis.geometry.DirectPosition1DTest.class,

Modified: sis/branches/JDK6/core/sis-utility/pom.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/pom.xml?rev=1683824&r1=1683823&r2=1683824&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/pom.xml (original)
+++ sis/branches/JDK6/core/sis-utility/pom.xml Fri Jun  5 17:46:07 2015
@@ -114,25 +114,6 @@ Miscellaneous utilities.
   <build>
     <plugins>
 
-      <!-- Delete the "com/sun/xml/..." directory after compilation. -->
-      <plugin>
-       <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-antrun-plugin</artifactId>
-        <executions>
-          <execution>
-            <phase>process-test-classes</phase>
-            <goals>
-              <goal>run</goal>
-            </goals>
-            <configuration>
-              <target>
-                <delete dir="${project.build.outputDirectory}/com"/>
-              </target>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-
       <!-- Compile properties files into resources UTF files. -->
       <plugin>
         <groupId>org.apache.sis.core</groupId>
@@ -175,6 +156,14 @@ Miscellaneous utilities.
       <groupId>javax</groupId>
       <artifactId>javaee-api</artifactId>
     </dependency>
+
+    <!-- Allows compiler to use a JAXB class which should exist on the JVM. -->
+    <dependency>
+      <groupId>com.googlecode.jaxb-namespaceprefixmapper-interfaces</groupId>
+      <artifactId>JAXBNamespacePrefixMapper</artifactId>
+      <version>2.2.4</version>
+      <scope>provided</scope>
+    </dependency>
   </dependencies>
 
 </project>

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/NonMarshalledAuthority.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/NonMarshalledAuthority.java?rev=1683824&r1=1683823&r2=1683824&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/NonMarshalledAuthority.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/NonMarshalledAuthority.java [UTF-8] Fri Jun  5 17:46:07 2015
@@ -19,18 +19,10 @@ package org.apache.sis.internal.jaxb;
 import java.util.Iterator;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Locale;
-import java.util.logging.Level;
-import java.util.logging.LogRecord;
-import java.io.Serializable;
-import java.lang.reflect.Field;
 import org.opengis.metadata.Identifier;
 import org.opengis.metadata.citation.Citation;
-import org.apache.sis.internal.simple.SimpleCitation;
+import org.apache.sis.internal.simple.CitationConstant;
 import org.apache.sis.internal.util.UnmodifiableArrayList;
-import org.apache.sis.util.Debug;
-import org.apache.sis.util.logging.Logging;
-import org.apache.sis.util.resources.Errors;
 import org.apache.sis.xml.IdentifierSpace;
 
 
@@ -65,29 +57,23 @@ import org.apache.sis.xml.IdentifierSpac
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
- * @version 0.3
+ * @version 0.6
  * @module
  *
  * @see IdentifierSpace
  */
-public final class NonMarshalledAuthority<T> extends SimpleCitation implements IdentifierSpace<T>, Serializable {
+public final class NonMarshalledAuthority<T> extends CitationConstant.Authority<T> {
     /**
      * For cross-version compatibility.
      */
     private static final long serialVersionUID = 6299502270649111201L;
 
     /**
-     * Sets to {@code true} if {@link #getCitation(String)} has already logged a warning.
-     * This is used in order to avoid flooding the logs with the same message.
-     */
-    private static volatile boolean warningLogged;
-
-    /**
      * Ordinal values for switch statements. The constant defined here shall
      * mirror the constants defined in the {@link IdentifierSpace} interface
      * and {@link org.apache.sis.metadata.iso.citation.DefaultCitation} class.
      */
-    public static final int ID=0, UUID=1, HREF=2, XLINK=3, ISSN=4, ISBN=5;
+    public static final byte ID=0, UUID=1, HREF=2, XLINK=3, ISSN=4, ISBN=5;
     // If more codes are added, please update readResolve() below.
 
     /**
@@ -98,39 +84,21 @@ public final class NonMarshalledAuthorit
      * versions of the SIS library (the attribute name is more reliable). This instance should
      * be replaced by one of the exiting constants at deserialization time anyway.</p>
      */
-    final transient int ordinal;
+    final transient byte ordinal;
 
     /**
-     * Creates a new enum for the given attribute.
+     * Creates a new citation for the given XML attribute name.
      *
      * @param attribute The XML attribute name, to be returned by {@link #getName()}.
      * @param ordinal   Ordinal value for switch statement, as one of the {@link #ID},
      *                  {@link #UUID}, <i>etc.</i> constants.
      */
-    public NonMarshalledAuthority(final String attribute, final int ordinal) {
+    public NonMarshalledAuthority(final String attribute, final byte ordinal) {
         super(attribute);
         this.ordinal = ordinal;
     }
 
     /**
-     * Returns the XML attribute name with its prefix. Attribute names can be {@code "gml:id"},
-     * {@code "gco:uuid"} or {@code "xlink:href"}.
-     */
-    @Override
-    public String getName() {
-        return title;
-    }
-
-    /**
-     * Returns a string representation of this identifier space.
-     */
-    @Debug
-    @Override
-    public String toString() {
-        return "IdentifierSpace[" + title + ']';
-    }
-
-    /**
      * Returns the first marshallable identifier from the given collection. This method omits
      * "special" identifiers (ISO 19139 attributes, ISBN codes...), which are recognized by
      * the implementation class of their authority.
@@ -269,54 +237,25 @@ public final class NonMarshalledAuthorit
     }
 
     /**
-     * Returns one of the constants in the {@link org.apache.sis.metadata.iso.citation.DefaultCitation} class,
-     * or {@code null} if none. We need to use Java reflection because the {@code sis-metadata} module may not
-     * be in the classpath.
-     */
-    private static IdentifierSpace<?> getCitation(final String name) {
-        try {
-            final Field field = Class.forName("org.apache.sis.metadata.iso.citation.DefaultCitation").getDeclaredField(name);
-            field.setAccessible(true);
-            return (IdentifierSpace<?>) field.get(null);
-        } catch (Exception e) {
-            if (!warningLogged) {
-                warningLogged = true;
-                final LogRecord record = Errors.getResources((Locale) null).getLogRecord(Level.WARNING,
-                        Errors.Keys.MissingRequiredModule_1, "sis-metadata");
-                /*
-                 * Log directly the the logger rather than invoking the Context.warningOccured(…) method because
-                 * this warning does not occur during XML (un)marshalling. It may occurs only during serialization.
-                 */
-                record.setThrown(e);
-                Logging.log(NonMarshalledAuthority.class, "readResolve", record);
-            }
-        }
-        return null;
-    }
-
-    /**
      * Invoked at deserialization time in order to replace the deserialized instance
      * by the appropriate instance defined in the {@link IdentifierSpace} interface.
+     *
+     * @return The instance to use, as an unique instance if possible.
      */
-    private Object readResolve() {
+    @Override
+    protected Object readResolve() {
+        final String name = getName();
+        IdentifierSpace<?> candidate;
         int code = 0;
-        while (true) {
-            final IdentifierSpace<?> candidate;
-            switch (code) {
+        do {
+            switch (code++) {
                 case ID:    candidate = IdentifierSpace.ID;    break;
                 case UUID:  candidate = IdentifierSpace.UUID;  break;
                 case HREF:  candidate = IdentifierSpace.HREF;  break;
                 case XLINK: candidate = IdentifierSpace.XLINK; break;
-                case ISBN:  candidate = getCitation("ISBN");   break;
-                case ISSN:  candidate = getCitation("ISSN");   break;
-                default: return this;
-            }
-            if (candidate instanceof NonMarshalledAuthority<?> &&
-                    ((NonMarshalledAuthority<?>) candidate).title.equals(title))
-            {
-                return candidate;
+                default: return super.readResolve();
             }
-            code++;
-        }
+        } while (!((NonMarshalledAuthority<?>) candidate).getName().equals(name));
+        return candidate;
     }
 }

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/JDK8.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/JDK8.java?rev=1683824&r1=1683823&r2=1683824&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/JDK8.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/JDK8.java [UTF-8] Fri Jun  5 17:46:07 2015
@@ -63,6 +63,23 @@ public final class JDK8 {
     }
 
     /**
+     * Returns the value of the given key, or the given default value if there is no value for that key.
+     *
+     * @param <V> The type of values.
+     * @param map The map from which to get the value.
+     * @param key The key for the value to fetch.
+     * @param defaultValue The value to return if the map does not contain any value for the given key.
+     * @return The value for the given key (which may be {@code null}), or {@code defaultValue}.
+     */
+    public static <V> V getOrDefault(final Map<?,V> map, final Object key, final V defaultValue) {
+        V value = map.get(key);
+        if (value == null && !map.containsKey(key)) {
+            value = defaultValue;
+        }
+        return value;
+    }
+
+    /**
      * Stores the value in the given map, provided that no value were set.
      * This implementation presumes that the map can not contain null values.
      *

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleCitation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleCitation.java?rev=1683824&r1=1683823&r2=1683824&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleCitation.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleCitation.java [UTF-8] Fri Jun  5 17:46:07 2015
@@ -39,6 +39,12 @@ import org.apache.sis.internal.jdk7.Obje
 /**
  * A trivial implementation of {@link Citation} containing only a title.
  *
+ * <div class="note"><b>Design note:</b>
+ * we do not put more field than {@link #title} in this {@code SimpleCitation} in order to keep it simple,
+ * because the title is the only "universal" property (the need for all other fields will be determined in
+ * subclasses on a case-by-case basis) and because {@code SimpleCitation} are sometime only proxy identified
+ * by the {@link #title}.</div>
+ *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
  * @version 0.3
@@ -53,10 +59,10 @@ public class SimpleCitation implements C
     /**
      * The title to be returned by {@link #getTitle()}.
      */
-    protected final String title;
+    public final String title;
 
     /**
-     * Creates a new object for the given name.
+     * Creates a new object for the given title.
      *
      * @param title The title to be returned by {@link #getTitle()}.
      */
@@ -75,27 +81,26 @@ public class SimpleCitation implements C
     }
 
     /**
-     * Methods inherited from the {@link Citation} interface which are
-     * not of interest to this {@code SimpleCitation} implementation.
-     * Those methods will be removed in the JDK8 branch.
+     * Methods inherited from the {@link Citation} interface which are not of interest to this
+     * {@code SimpleCitation} implementation. Those methods may be removed in the JDK8 branch.
      *
      * @return An empty list.
      */
-    @Override public Collection<InternationalString>  getAlternateTitles()         {return Collections.emptyList();}
-    @Override public Collection<CitationDate>         getDates()                   {return Collections.emptyList();}
-    @Override public InternationalString              getEdition()                 {return null;}
-    @Override public Date                             getEditionDate()             {return null;}
-    @Override public Collection<? extends Identifier> getIdentifiers()             {return Collections.emptyList();}
-    @Override public Collection<Responsibility>       getCitedResponsibleParties() {return Collections.emptyList();}
-    @Override public Collection<PresentationForm>     getPresentationForms()       {return Collections.emptyList();}
-    @Override public Series                           getSeries()                  {return null;}
-    @Override public Collection<InternationalString>  getOtherCitationDetails()    {return Collections.emptyList();}
-    @Override public String                           getISBN()                    {return null;}
-    @Override public String                           getISSN()                    {return null;}
-    @Override public Collection<OnlineResource>       getOnlineResources()         {return Collections.emptyList();}
-    @Override public Collection<BrowseGraphic>        getGraphics()                {return Collections.emptyList();}
+    @Override public Collection<? extends InternationalString>  getAlternateTitles()         {return Collections.emptyList();}
+    @Override public Collection<? extends CitationDate>         getDates()                   {return Collections.emptyList();}
+    @Override public InternationalString                        getEdition()                 {return null;}
+    @Override public Date                                       getEditionDate()             {return null;}
+    @Override public Collection<? extends Identifier>           getIdentifiers()             {return Collections.emptyList();}
+    @Override public Collection<? extends Responsibility>       getCitedResponsibleParties() {return Collections.emptyList();}
+    @Override public Collection<PresentationForm>               getPresentationForms()       {return Collections.emptyList();}
+    @Override public Series                                     getSeries()                  {return null;}
+    @Override public Collection<? extends InternationalString>  getOtherCitationDetails()    {return Collections.emptyList();}
+    @Override public Collection<? extends OnlineResource>       getOnlineResources()         {return Collections.emptyList();}
+    @Override public Collection<? extends BrowseGraphic>        getGraphics()                {return Collections.emptyList();}
+    @Override public String                                     getISBN()                    {return null;}
+    @Override public String                                     getISSN()                    {return null;}
     @Deprecated
-    @Override public InternationalString              getCollectiveTitle()         {return null;}
+    @Override public InternationalString                        getCollectiveTitle()         {return null;}
 
     /**
      * Compares the given object with this citation for equality.
@@ -125,6 +130,6 @@ public class SimpleCitation implements C
     @Debug
     @Override
     public String toString() {
-        return "Citation[\"" + title + "\"]";
+        return "Citation[“" + title + "”]";
     }
 }

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleIdentifiedObject.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleIdentifiedObject.java?rev=1683824&r1=1683823&r2=1683824&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleIdentifiedObject.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleIdentifiedObject.java [UTF-8] Fri Jun  5 17:46:07 2015
@@ -43,7 +43,7 @@ import org.apache.sis.internal.jdk7.Obje
  * @author  Guilhem Legal (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.5
- * @version 0.3
+ * @version 0.5
  * @module
  *
  * @see org.apache.sis.referencing.AbstractIdentifiedObject
@@ -251,7 +251,7 @@ public class SimpleIdentifiedObject impl
         buffer.append(code).append('"');
         final String identifier = Citations.getIdentifier(authority, true);
         if (identifier != null) {
-            buffer.append(", ID[\"").append(identifier).append("\"]");
+            buffer.append(", Id[\"").append(identifier).append("\"]");   // "Id" should be consistent with WKTKeywords.Id.
         }
         return buffer.append(']').toString();
     }

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleIdentifier.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleIdentifier.java?rev=1683824&r1=1683823&r2=1683824&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleIdentifier.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleIdentifier.java [UTF-8] Fri Jun  5 17:46:07 2015
@@ -24,6 +24,7 @@ import org.apache.sis.internal.util.Cita
 import org.apache.sis.util.CharSequences;
 import org.apache.sis.util.Classes;
 import org.apache.sis.util.Debug;
+import org.apache.sis.util.Deprecable;
 
 import static org.apache.sis.util.iso.DefaultNameSpace.DEFAULT_SEPARATOR;
 
@@ -39,10 +40,10 @@ import org.apache.sis.internal.jdk7.Obje
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
- * @version 0.5
+ * @version 0.6
  * @module
  */
-public class SimpleIdentifier implements Identifier, Serializable {
+public class SimpleIdentifier implements Identifier, Deprecable, Serializable {
     /**
      * For cross-version compatibility.
      */
@@ -69,14 +70,21 @@ public class SimpleIdentifier implements
     protected final String code;
 
     /**
+     * {@code true} if this identifier is deprecated.
+     */
+    protected final boolean isDeprecated;
+
+    /**
      * Creates a new reference identifier.
      *
-     * @param authority Responsible party for definition and maintenance of the code, or null.
-     * @param code Alphanumeric value identifying an instance in the namespace.
-     */
-    public SimpleIdentifier(final Citation authority, final String code) {
-        this.authority = authority;
-        this.code = code;
+     * @param authority     Responsible party for definition and maintenance of the code, or null.
+     * @param code          Alphanumeric value identifying an instance in the namespace.
+     * @param isDeprecated  {@code true} if this identifier is deprecated.
+     */
+    public SimpleIdentifier(final Citation authority, final String code, final boolean isDeprecated) {
+        this.authority    = authority;
+        this.code         = code;
+        this.isDeprecated = isDeprecated;
     }
 
     /**
@@ -150,6 +158,26 @@ public class SimpleIdentifier implements
     }
 
     /**
+     * An optional free text.
+     *
+     * @since 0.6
+     */
+    @Override
+    public InternationalString getRemarks() {
+        return null;
+    }
+
+    /**
+     * {@code true} if this identifier is deprecated.
+     *
+     * @since 0.6
+     */
+    @Override
+    public boolean isDeprecated() {
+        return isDeprecated;
+    }
+
+    /**
      * Returns {@code true} if the given object is of the same class than this
      * {@code SimpleIdentifier} and has the same values.
      *
@@ -160,7 +188,9 @@ public class SimpleIdentifier implements
     public boolean equals(final Object obj) {
         if (obj != null && obj.getClass() == getClass()) {
             final SimpleIdentifier that = (SimpleIdentifier) obj;
-            return Objects.equals(code, that.code) && Objects.equals(authority, that.authority);
+            return Objects.equals(code, that.code) &&
+                   Objects.equals(authority, that.authority) &&
+                   isDeprecated == that.isDeprecated;
         }
         return false;
     }
@@ -172,7 +202,7 @@ public class SimpleIdentifier implements
      */
     @Override
     public int hashCode() {
-        return Objects.hash(authority, code) ^ (int) serialVersionUID;
+        return Objects.hash(authority, code, isDeprecated) ^ (int) serialVersionUID;
     }
 
     /**
@@ -219,8 +249,8 @@ public class SimpleIdentifier implements
      * @return Pseudo Well Known Text for this identifier.
      */
     public String toWKT() {
-        final StringBuilder buffer = new StringBuilder(40).append("ID[");
-        append(buffer, Citations.getIdentifier(authority, true));   // Do not invoke getCodeSpace().
+        final StringBuilder buffer = new StringBuilder(40).append("Id[");   // Consistent with WKTKeywords.Id.
+        append(buffer, Citations.getIdentifier(authority, true));           // Do not invoke getCodeSpace().
         append(buffer.append(", "), code);
         return buffer.append(']').toString();
     }

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/system/DefaultFactories.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/system/DefaultFactories.java?rev=1683824&r1=1683823&r2=1683824&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/system/DefaultFactories.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/system/DefaultFactories.java [UTF-8] Fri Jun  5 17:46:07 2015
@@ -61,7 +61,19 @@ public final class DefaultFactories exte
     }
 
     /**
-     * Return the default factory implementing the given interface.
+     * Returns {@code true} if the default factory of the given type is the given instance.
+     *
+     * @param  <T>  The interface type.
+     * @param  type The interface type.
+     * @param  factory The factory implementation to test.
+     * @return {@code true} if the given factory implementation is the default instance.
+     */
+    public static synchronized <T> boolean isDefaultInstance(final Class<T> type, final T factory) {
+        return FACTORIES.get(type) == factory;
+    }
+
+    /**
+     * Returns the default factory implementing the given interface.
      * This method gives preference to Apache SIS implementation of factories if present.
      * This is a temporary mechanism while we are waiting for a real dependency injection mechanism.
      *
@@ -87,6 +99,19 @@ public final class DefaultFactories exte
             if (factory == null) {
                 factory = fallback;
             }
+            /*
+             * Verifies if the factory that we just selected is the same implementation than an existing instance.
+             * The main case for this test is org.apache.sis.referencing.factory.GeodeticObjectFactory, where the
+             * same class implements 3 factory interfaces.
+             */
+            if (factory != null) {
+                for (final Object existing : FACTORIES.values()) {
+                    if (existing != null && factory.getClass().equals(existing.getClass())) {
+                        factory = type.cast(existing);
+                        break;
+                    }
+                }
+            }
             FACTORIES.put(type, factory);
         }
         return factory;

Copied: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/system/OptionalDependency.java (from r1683791, sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/system/OptionalDependency.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/system/OptionalDependency.java?p2=sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/system/OptionalDependency.java&p1=sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/system/OptionalDependency.java&r1=1683791&r2=1683824&rev=1683824&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/system/OptionalDependency.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/system/OptionalDependency.java [UTF-8] Fri Jun  5 17:46:07 2015
@@ -93,7 +93,7 @@ public abstract class OptionalDependency
             record.setLoggerName(module);
             Logging.log(type, "getInstance", record);
             return null;
-        } catch (ReflectiveOperationException exception) {
+        } catch (Exception exception) {    // (ReflectiveOperationException) on JDK7 branch.
             // Should never happen if we didn't broke our helper class.
             throw new AssertionError(exception);
         }

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/system/SystemListener.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/system/SystemListener.java?rev=1683824&r1=1683823&r2=1683824&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/system/SystemListener.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/system/SystemListener.java [UTF-8] Fri Jun  5 17:46:07 2015
@@ -28,7 +28,7 @@ import org.apache.sis.util.ArraysExt;
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
- * @version 0.3
+ * @version 0.6
  * @module
  */
 public abstract class SystemListener implements EventListener {
@@ -45,7 +45,7 @@ public abstract class SystemListener imp
     private final String module;
 
     /**
-     * Creates a nes listener.
+     * Creates a new listener.
      *
      * @param module The OSGi module symbolic name, as declared in the {@code Bundle-SymbolicName}
      *        entry of the {@code META-INF/MANIFEST.MF} file. Shall be one of {@link Modules} constants.
@@ -134,7 +134,16 @@ public abstract class SystemListener imp
 
     /**
      * Invoked when the classpath is likely to have changed.
-     * Any classes using {@link java.util.ServiceLoader} are advised to clear their cache.
+     * When this method is invoked, any classes using {@link java.util.ServiceLoader} are advised to clear their cache.
      */
     protected abstract void classpathChanged();
+
+    /**
+     * Invoked when the database content changed.
+     * When this method is invoked, EPSG and Citations database are advised to clear their cache.
+     *
+     * @since 0.6
+     */
+    protected void databaseChanged() {
+    }
 }

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/util/Citations.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/util/Citations.java?rev=1683824&r1=1683823&r2=1683824&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/util/Citations.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/util/Citations.java [UTF-8] Fri Jun  5 17:46:07 2015
@@ -25,12 +25,10 @@ import org.opengis.util.InternationalStr
 import org.apache.sis.xml.IdentifierSpace;
 import org.apache.sis.util.CharSequences;
 import org.apache.sis.util.Characters;
+import org.apache.sis.util.Deprecable;
 import org.apache.sis.util.Static;
 
-import static org.apache.sis.util.CharSequences.equalsFiltered;
-import static org.apache.sis.util.CharSequences.trimWhitespaces;
-import static org.apache.sis.util.CharSequences.isUnicodeIdentifier;
-import static org.apache.sis.util.Characters.Filter.LETTERS_AND_DIGITS;
+import static org.apache.sis.util.iso.DefaultNameSpace.DEFAULT_SEPARATOR;
 
 // Branch-dependent imports
 import org.apache.sis.internal.jdk7.Objects;
@@ -54,6 +52,26 @@ public final class Citations extends Sta
     }
 
     /**
+     * Returns {@code true} if the given code is {@code "EPSG"} while the codespace is {@code "IOGP"} or {@code "OGP"}
+     * (ignoring case). This particular combination of code and codespace is handled in a special way.
+     *
+     * <p>This method can be used for identifying where in Apache SIS source code the relationship between
+     * EPSG authority and IOGP code space is hard-coded.</p>
+     *
+     * @param  codeSpace The identifier code space, or {@code null}.
+     * @param  code The identifier code, or {@code null}.
+     * @return {@code true} if the given identifier is {@code "IOGP:EPSG"}.
+     *
+     * @see org.apache.sis.metadata.iso.citation.Citations#EPSG
+     */
+    public static boolean isEPSG(final String codeSpace, final String code) {
+        return Constants.EPSG.equalsIgnoreCase(code) &&
+              (Constants.IOGP.equalsIgnoreCase(codeSpace) || "OGP".equalsIgnoreCase(codeSpace) ||
+               Constants.EPSG.equalsIgnoreCase(codeSpace));
+        // "OGP" is a legacy abbreviation that existed before "IOGP".
+    }
+
+    /**
      * Returns the collection iterator, or {@code null} if the given collection is null
      * or empty. We use this method as a paranoiac safety against broken implementations.
      *
@@ -66,12 +84,35 @@ public final class Citations extends Sta
     }
 
     /**
-     * Returns a "unlocalized" string representation of the given international string,
-     * or {@code null} if none. This method is used by {@link #getIdentifier(Citation, boolean)},
-     * which is why we don't want the localized string.
+     * Return {@code true} if the given object is deprecated.
+     */
+    private static boolean isDeprecated(final Object object) {
+        return (object instanceof Deprecable) && ((Deprecable) object).isDeprecated();
+    }
+
+    /**
+     * Returns a "unlocalized" string representation of the given international string, or {@code null} if none
+     * or if the string is deprecated. This method is used by {@link #getIdentifier(Citation, boolean)}, which
+     * is why we don't want the localized string.
      */
     private static String toString(final InternationalString title) {
-        return (title != null) ? trimWhitespaces(title.toString(Locale.ROOT)) : null;
+        return (title != null && !isDeprecated(title))
+               ? CharSequences.trimWhitespaces(title.toString(Locale.ROOT)) : null;
+    }
+
+    /**
+     * The method to be used consistently for comparing titles or identifiers in all {@code fooMathes(…)}
+     * methods declared in this class.
+     *
+     * @param  s1 The first characters sequence to compare, or {@code null}.
+     * @param  s2 The second characters sequence to compare, or {@code null}.
+     * @return {@code true}if both arguments are {@code null} or if the two given texts are equal,
+     *         ignoring case and any characters other than digits and letters.
+     *
+     * @since 0.6
+     */
+    public static boolean equalsFiltered(final CharSequence s1, final CharSequence s2) {
+        return CharSequences.equalsFiltered(s1, s2, Characters.Filter.LETTERS_AND_DIGITS, true);
     }
 
     /**
@@ -133,12 +174,12 @@ public final class Citations extends Sta
             do {
                 if (candidate != null) {
                     final String unlocalized = candidate.toString(Locale.ROOT);
-                    if (equalsFiltered(unlocalized, title, LETTERS_AND_DIGITS, true)) {
+                    if (equalsFiltered(unlocalized, title)) {
                         return true;
                     }
                     final String localized = candidate.toString();
                     if (!Objects.equals(localized, unlocalized) // Slight optimization for a common case.
-                            && equalsFiltered(localized, title, LETTERS_AND_DIGITS, true))
+                            && equalsFiltered(localized, title))
                     {
                         return true;
                     }
@@ -196,14 +237,14 @@ public final class Citations extends Sta
 
     /**
      * Returns {@code true} if the given citation has at least one identifier equals to the given string,
-     * ignoring case and non-alphanumeric characters. If and <em>only</em> if the citations do not contain
+     * ignoring case and non-alphanumeric characters. If and <em>only</em> if the citation does not contain
      * any identifier, then this method fallback on titles comparison.
      * See {@link org.apache.sis.metadata.iso.citation.Citations#identifierMatches(Citation, String)}
      * for the public documentation of this method.
      *
      * @param  citation   The citation to check for, or {@code null}.
-     * @param  identifier The identifier to compare, or {@code null} to unknown.
-     * @param  code       The identifier code to compare, or {@code null}.
+     * @param  identifier The identifier to compare, or {@code null} if unknown.
+     * @param  code       Value of {@code identifier.getCode()}, or {@code null}.
      * @return {@code true} if both arguments are non-null, and an identifier matches the given string.
      */
     public static boolean identifierMatches(final Citation citation, final Identifier identifier, final CharSequence code) {
@@ -214,13 +255,13 @@ public final class Citations extends Sta
             }
             while (identifiers.hasNext()) {
                 final Identifier id = identifiers.next();
-                if (id != null && equalsFiltered(code, id.getCode(), LETTERS_AND_DIGITS, true)) {
+                if (id != null && equalsFiltered(code, id.getCode())) {
                     if (identifier != null) {
                         final String codeSpace = identifier.getCodeSpace();
                         if (codeSpace != null) {
                             final String cs = id.getCodeSpace();
                             if (cs != null) {
-                                return equalsFiltered(codeSpace, cs, LETTERS_AND_DIGITS, true);
+                                return equalsFiltered(codeSpace, cs);
                             }
                         }
                     }
@@ -313,59 +354,95 @@ public final class Citations extends Sta
      * @param  strict {@code true} for returning a non-null value only if the identifier is a valid Unicode identifier.
      * @return A non-empty identifier for the given citation without leading or trailing whitespaces,
      *         or {@code null} if the given citation is null or does not declare any identifier or title.
+     *
+     * @see <a href="https://issues.apache.org/jira/browse/SIS-201">SIS-201</a>
      */
     public static String getIdentifier(final Citation citation, final boolean strict) {
-        boolean isUnicode = false; // Whether 'identifier' is a Unicode identifier.
-        String identifier = null;
         if (citation != null) {
+            boolean isUnicode = false;      // Whether 'identifier' is a Unicode identifier.
+            String identifier = null;       // The best identifier found so far.
+            String codeSpace  = null;       // Code space of the identifier, or null if none.
             final Iterator<? extends Identifier> it = iterator(citation.getIdentifiers());
             if (it != null) while (it.hasNext()) {
                 final Identifier id = it.next();
-                if (id != null) {
-                    final String candidate = trimWhitespaces(id.getCode());
-                    if (candidate != null) {
-                        final int length = candidate.length();
-                        if (length != 0 && (identifier == null || length < identifier.length())) {
-                            final boolean s = isUnicodeIdentifier(candidate);
-                            if (s || !isUnicode) {
-                                identifier = candidate;
-                                isUnicode = s;
+                if (id != null && !isDeprecated(id)) {
+                    final String candidate = CharSequences.trimWhitespaces(id.getCode());
+                    if (candidate != null && !candidate.isEmpty()) {
+                        /*
+                         * For a non-empty identifier. Verify if both the code ans its codespace are valid
+                         * Unicode identifiers. If a codespace exist, the code does not need to begin with
+                         * a "Unicode identifier start" (it may be a "Unicode identifier part").
+                         */
+                        String cs = CharSequences.trimWhitespaces(id.getCodeSpace());
+                        if (cs == null || cs.isEmpty()) {
+                            cs = null;
+                            isUnicode = CharSequences.isUnicodeIdentifier(candidate);
+                        } else {
+                            isUnicode = CharSequences.isUnicodeIdentifier(cs);
+                            if (isUnicode) for (int i = 0; i < candidate.length();) {
+                                final int c = candidate.codePointAt(i);
+                                if (!Character.isUnicodeIdentifierPart(c)) {
+                                    isUnicode = false;
+                                    break;
+                                }
+                                i += Character.charCount(c);
                             }
                         }
+                        /*
+                         * If we found a Unicode identifier, we are done and we can exit the loop.
+                         * Otherwise retain the first identifier and continue the search for Unicode identifier.
+                         */
+                        if (identifier == null || isUnicode) {
+                            identifier = candidate;
+                            codeSpace  = cs;
+                            if (isUnicode) break;
+                        }
                     }
                 }
             }
             /*
-             * If no identifier has been found, fallback on the shortest title or alternate title.
-             * We search for alternate titles because ISO specification said that those titles are
-             * often used for abbreviations.
+             * If no identifier has been found, fallback on the first title or alternate title.
+             * We search for alternate titles because ISO specification said that those titles
+             * are often used for abbreviations. Again we give preference to Unicode identifiers,
+             * which are typically alternate titles.
              */
             if (identifier == null) {
-                identifier = toString(citation.getTitle()); // Whitepaces removed by toString(…).
+                identifier = toString(citation.getTitle());     // Whitepaces removed by toString(…).
                 if (identifier != null) {
                     if (identifier.isEmpty()) {
                         identifier = null;
                     } else {
-                        isUnicode = isUnicodeIdentifier(identifier);
+                        isUnicode = CharSequences.isUnicodeIdentifier(identifier);
                     }
                 }
-                final Iterator<? extends InternationalString> iterator = iterator(citation.getAlternateTitles());
-                if (iterator != null) while (iterator.hasNext()) {
-                    final String candidate = toString(iterator.next());
-                    if (candidate != null) {
-                        final int length = candidate.length();
-                        if (length != 0 && (identifier == null || length < identifier.length())) {
-                            final boolean s = isUnicodeIdentifier(candidate);
-                            if (s || !isUnicode) {
+                if (!isUnicode) {
+                    final Iterator<? extends InternationalString> iterator = iterator(citation.getAlternateTitles());
+                    if (iterator != null) while (iterator.hasNext()) {
+                        final String candidate = toString(iterator.next());
+                        if (candidate != null && !candidate.isEmpty()) {
+                            isUnicode = CharSequences.isUnicodeIdentifier(candidate);
+                            if (identifier == null || isUnicode) {
                                 identifier = candidate;
-                                isUnicode = s;
+                                if (isUnicode) break;
                             }
                         }
                     }
                 }
             }
+            /*
+             * Finished searching in the identifiers, title and alternate titles. If the identifier that
+             * we found is not a valid Unicode identifier, we will return it only if the caller did not
+             * asked for strictly valid Unicode identifier.
+             */
+            if (isUnicode || !strict) {
+                if (codeSpace != null && !isEPSG(codeSpace, identifier)) {
+                    return codeSpace + (strict ? '_' : DEFAULT_SEPARATOR) + identifier;
+                } else {
+                    return identifier;
+                }
+            }
         }
-        return (isUnicode || !strict) ? identifier : null;
+        return null;
     }
 
     /**
@@ -430,9 +507,16 @@ public final class Citations extends Sta
 
     /**
      * Infers a code space from the given citation, or returns {@code null} if none.
-     * This method is very close to {@link #getUnicodeIdentifier(Citation)}; its main difference is regarding
-     * the {@link org.apache.sis.metadata.iso.citation.Citations#EPSG} constant: this method returns "EPSG"
-     * instead than "IOGP".
+     * This method is very close to {@link #getUnicodeIdentifier(Citation)}, except that it looks for
+     * {@link IdentifierSpace#getName()} before to scan the identifiers and titles. The result should
+     * be the same in most cases, except some cases like the {@link org.apache.sis.metadata.iso.citation.Citations}
+     * constant for {@code "Proj.4"} in which case this method returns {@code "Proj4"} instead of {@code null}.
+     * As a side effect, using this method also avoid constructing {@code DefaultCitation} objects which were deferred.
+     *
+     * <p>We do not put this method in public API for now because the actions performed by this method could be
+     * revisited in any future SIS version depending on the experience gained. However we should try to keep the
+     * behavior of this method close to the behavior of {@link #getUnicodeIdentifier(Citation)}, which is the
+     * method having a public facade.</p>
      *
      * @param  citation The citation for which to infer the code space, or {@code null}.
      * @return A non-empty code space for the given citation without leading or trailing whitespaces,

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/util/LocalizedParseException.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/util/LocalizedParseException.java?rev=1683824&r1=1683823&r2=1683824&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/util/LocalizedParseException.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/util/LocalizedParseException.java [UTF-8] Fri Jun  5 17:46:07 2015
@@ -49,7 +49,7 @@ public final class LocalizedParseExcepti
     private static final long serialVersionUID = -1467571540435486742L;
 
     /**
-     * The locale to use for formatting the localized error message.
+     * The locale to use for formatting the localized error message, or {@code null} for the default.
      */
     private final Locale locale;
 
@@ -67,7 +67,7 @@ public final class LocalizedParseExcepti
      * Constructs a {@code ParseException} with a message formatted from the given resource key
      * and message arguments. This is the most generic constructor.
      *
-     * @param locale      The locale for {@link #getLocalizedMessage()}.
+     * @param locale      The locale for {@link #getLocalizedMessage()}, or {@code null} for the default.
      * @param key         The resource key as one of the {@code Errors.Keys} constant.
      * @param arguments   The values to be given to {@link Errors#getString(short, Object)}.
      * @param errorOffset The position where the error is found while parsing.
@@ -84,7 +84,7 @@ public final class LocalizedParseExcepti
      * and unparsable string. This convenience constructor fetches the word starting at the error
      * index, and uses that word as the single argument associated to the resource key.
      *
-     * @param locale      The locale for {@link #getLocalizedMessage()}.
+     * @param locale      The locale for {@link #getLocalizedMessage()}, or {@code null} for the default.
      * @param key         The resource key as one of the {@code Errors.Keys} constant.
      * @param text        The full text that {@code Format} failed to parse.
      * @param errorOffset The position where the error is found while parsing.
@@ -98,7 +98,7 @@ public final class LocalizedParseExcepti
      * information. This convenience constructor creates a message of the kind <cite>"Can not
      * parse string "text" as an object of type 'type'"</cite>.
      *
-     * @param  locale The locale for {@link #getLocalizedMessage()}.
+     * @param  locale The locale for {@link #getLocalizedMessage()}, or {@code null} for the default.
      * @param  type   The type of objects parsed by the {@link java.text.Format}.
      * @param  text   The full text that {@code Format} failed to parse.
      * @param  pos    Index of the {@linkplain ParsePosition#getIndex() first parsed character},
@@ -173,7 +173,7 @@ public final class LocalizedParseExcepti
      */
     @Override
     public Locale getLocale() {
-        return locale;
+        return (locale != null) ? locale : Locale.getDefault();
     }
 
     /**

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java?rev=1683824&r1=1683823&r2=1683824&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java [UTF-8] Fri Jun  5 17:46:07 2015
@@ -1598,7 +1598,7 @@ cmp:    while (ia < lga) {
      * @param  s2 The second characters sequence to compare, or {@code null}.
      * @param  filter The subset of characters to compare, or {@code null} for comparing all characters.
      * @param  ignoreCase {@code true} for comparing cases, or {@code false} for requiring exact match.
-     * @return {@code true} if or if both arguments are {@code null} or if the two given texts are equal,
+     * @return {@code true} if both arguments are {@code null} or if the two given texts are equal,
      *         optionally ignoring case and filtered-out characters.
      */
     public static boolean equalsFiltered(final CharSequence s1, final CharSequence s2,

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/collection/Containers.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/collection/Containers.java?rev=1683824&r1=1683823&r2=1683824&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/collection/Containers.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/collection/Containers.java [UTF-8] Fri Jun  5 17:46:07 2015
@@ -173,20 +173,19 @@ public final class Containers extends St
      *
      * <p>The {@link Map#put(Object,Object) Map.put(K,V)} method is supported only if the given
      * converters are {@linkplain org.apache.sis.math.FunctionProperty#INVERTIBLE invertible}.
-     * An invertible converter is not mandatory for other {@code Map} operations.
-     * However some of them are likely to be faster if the inverse converters are available.</p>
+     * An invertible converter is not mandatory for other {@code Map} operations like {@link Map#get(Object)},
+     * but some of them may be faster if the inverse converters are available.</p>
      *
-     * <p>The derived map may contain fewer entries than the original map if some keys
-     * are not convertible. Non-convertible keys are <var>K</var> values for which
-     * {@code keyConverter.apply(K)} returns {@code null}. As a consequence of this sentinel
-     * value usage, the derived map can not contain {@code null} keys.
+     * <p>The derived map may contain fewer entries than the original map if some keys are not convertible.
+     * A key <var>K</var> is non-convertible if {@code keyConverter.apply(K)} returns {@code null}.
+     * As a consequence of this sentinel key usage, the derived map can not contain {@code null} keys.
      * It may contain {@code null} values however.</p>
      *
      * <p>The returned map can be serialized if the given map and converters are serializable.
      * The returned map is <strong>not</strong> thread-safe.</p>
      *
      * <p>The returned map does not implement the {@link CheckedContainer} interface since {@code Map}
-     * is not {@code Collection} sub-type, but the derived map {@linkplain Map#keySet() key set} and
+     * is not a {@code Collection} sub-type, but the derived map {@linkplain Map#keySet() key set} and
      * {@linkplain Map#entrySet() entry set} do.</p>
      *
      * @param <SK>         The type of keys   in the storage map.

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java?rev=1683824&r1=1683823&r2=1683824&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java [UTF-8] Fri Jun  5 17:46:07 2015
@@ -709,7 +709,7 @@ public final class Types extends Static
 
     /**
      * Returns the given characters sequence as an international string. If the given sequence is
-     * null or an instance of {@link InternationalString}, this this method returns it unchanged.
+     * null or an instance of {@link InternationalString}, then this method returns it unchanged.
      * Otherwise, this method copies the {@link InternationalString#toString()} value in a new
      * {@link SimpleInternationalString} instance and returns it.
      *

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java?rev=1683824&r1=1683823&r2=1683824&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java [UTF-8] Fri Jun  5 17:46:07 2015
@@ -246,6 +246,11 @@ public final class Errors extends Indexe
         public static final short EmptyProperty_1 = 23;
 
         /**
+         * Error in “{0}”: {1}
+         */
+        public static final short ErrorIn_2 = 190;
+
+        /**
          * Argument ‘{0}’ shall not contain more than {1} elements. A number of {2} is excessive.
          */
         public static final short ExcessiveArgumentSize_3 = 24;
@@ -525,6 +530,16 @@ public final class Errors extends Indexe
         public static final short MissingAuthority_1 = 135;
 
         /**
+         * Missing a ‘{1}’ character in “{0}” element.
+         */
+        public static final short MissingCharacterInElement_2 = 188;
+
+        /**
+         * Missing a “{1}” component in “{0}”.
+         */
+        public static final short MissingComponentInElement_2 = 189;
+
+        /**
          * No horizontal dimension found in “{0}”.
          */
         public static final short MissingHorizontalDimension_1 = 169;
@@ -616,7 +631,7 @@ public final class Errors extends Indexe
         public static final short NoSuchAuthorityCode_3 = 137;
 
         /**
-         * No operation method found for name of identifier “{0}”.
+         * No operation method found for name or identifier “{0}”.
          */
         public static final short NoSuchOperationMethod_1 = 179;
 
@@ -871,6 +886,11 @@ public final class Errors extends Indexe
         public static final short UnexpectedParameter_1 = 152;
 
         /**
+         * Unexpected value “{1}” in “{0}” element.
+         */
+        public static final short UnexpectedValueInElement_2 = 191;
+
+        /**
          * Parameter “{0}” has no unit.
          */
         public static final short UnitlessParameter_1 = 139;
@@ -901,6 +921,11 @@ public final class Errors extends Indexe
         public static final short UnknownFormatFor_1 = 115;
 
         /**
+         * Keyword “{1}” in element “{0}” is unknown.
+         */
+        public static final short UnknownKeywordInElement_2 = 192;
+
+        /**
          * Option “{0}” is not recognized.
          */
         public static final short UnknownOption_1 = 116;
@@ -951,6 +976,11 @@ public final class Errors extends Indexe
         public static final short UnparsableStringForClass_3 = 125;
 
         /**
+         * Can not parse “{1}” in element “{0}”.
+         */
+        public static final short UnparsableStringInElement_2 = 187;
+
+        /**
          * Feature named “{0}” has not yet been resolved.
          */
         public static final short UnresolvedFeatureName_1 = 164;

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties?rev=1683824&r1=1683823&r2=1683824&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties [ISO-8859-1] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties [ISO-8859-1] Fri Jun  5 17:46:07 2015
@@ -60,6 +60,7 @@ EmptyArgument_1                   = Argu
 EmptyDictionary                   = The dictionary shall contain at least one entry.
 EmptyEnvelope2D                   = Envelope must be at least two-dimensional and non-empty.
 EmptyProperty_1                   = Property named \u201c{0}\u201d shall not be empty.
+ErrorIn_2                         = Error in \u201c{0}\u201d: {1}
 ExcessiveArgumentSize_3           = Argument \u2018{0}\u2019 shall not contain more than {1} elements. A number of {2} is excessive.
 ExcessiveListSize_2               = A size of {1} elements is excessive for the \u201c{0}\u201d list.
 ExcessiveNumberOfDimensions_1     = For this algorithm, {0} is an excessive number of dimensions.
@@ -115,6 +116,8 @@ MismatchedPropertyType_1          = Mism
 MismatchedTransformDimension_3    = The transform has {2} {0,choice,0#source|1#target} dimension{2,choice,1#|2#s}, while {1} was expected.
 MismatchedValueClass_3            = Class of \u201c{0}\u201d values is \u2018{2}\u2019, but the requested type is \u2018{1}\u2019.
 MissingAuthority_1                = No authority was specified for code \u201c{0}\u201d. The expected syntax is \u201cAUTHORITY:CODE\u201d.
+MissingCharacterInElement_2       = Missing a \u2018{1}\u2019 character in \u201c{0}\u201d element.
+MissingComponentInElement_2       = Missing a \u201c{1}\u201d component in \u201c{0}\u201d.
 MissingInterpolationOrdinates     = Not enough dimension in \u2018MathTransform\u2019 input or output coordinates for the interpolation points.
 MissingNamespace_1                = \u201c{0}\u201d has no namespace.
 MissingRequiredModule_1           = This operation requires the \u201c{0}\u201d module.
@@ -156,7 +159,7 @@ NotASkewSymmetricMatrix           = Matr
 NotAUnicodeIdentifier_1           = Text \u201c{0}\u201d is not a Unicode identifier.
 NotComparableClass_1              = Class \u2018{0}\u2019 is not a comparable.
 NoSuchAuthorityCode_3             = No code \u201c{2}\u201d from authority \u201c{0}\u201d found for object of type \u2018{1}\u2019.
-NoSuchOperationMethod_1           = No operation method found for name of identifier \u201c{0}\u201d.
+NoSuchOperationMethod_1           = No operation method found for name or identifier \u201c{0}\u201d.
 NoUnit                            = No unit of measurement has been specified.
 NullArgument_1                    = Argument \u2018{0}\u2019 shall not be null.
 NullCollectionElement_1           = \u2018{0}\u2019 collection does not accept null elements.
@@ -185,12 +188,14 @@ UnexpectedEndOfFile_1             = Unex
 UnexpectedEndOfString_1           = More characters were expected at the end of \u201c{0}\u201d.
 UnexpectedFileFormat_2            = File \u201c{1}\u201d seems to be encoded in an other format than {0}.
 UnexpectedParameter_1             = Parameter \u201c{0}\u201d was not expected.
+UnexpectedValueInElement_2        = Unexpected value \u201c{1}\u201d in \u201c{0}\u201d element.
 UnitlessParameter_1               = Parameter \u201c{0}\u201d has no unit.
 UnknownAuthority_1                = Authority \u201c{0}\u201d is unknown.
 UnknownAxisDirection_1            = Axis direction \u201c{0}\u201d is unknown.
 UnknownCommand_1                  = Command \u201c{0}\u201d is not recognized.
 UnknownEnumValue_2                = \u201c{1}\u201d is not a known or supported value for the \u2018{0}\u2019 enumeration.
 UnknownFormatFor_1                = Format of \u201c{0}\u201d is not recognized.
+UnknownKeywordInElement_2         = Keyword \u201c{1}\u201d in element \u201c{0}\u201d is unknown.
 UnknownOption_1                   = Option \u201c{0}\u201d is not recognized.
 UnknownType_1                     = Type \u2018{0}\u2019 is unknown in this context.
 UnknownTypeForProperty_1          = Type of the \u201c{0}\u201d property is unknown.
@@ -201,6 +206,7 @@ UnmodifiableMetadata              = This
 UnmodifiableObject_1              = This instance of \u2018{0}\u2019 is not modifiable.
 UnparsableStringForClass_2        = Text \u201c{1}\u201d can not be parsed as an object of type \u2018{0}\u2019.
 UnparsableStringForClass_3        = Text \u201c{1}\u201d can not be parsed as an object of type \u2018{0}\u2019, because of the \u201c{2}\u201d characters.
+UnparsableStringInElement_2       = Can not parse \u201c{1}\u201d in element \u201c{0}\u201d.
 UnresolvedFeatureName_1           = Feature named \u201c{0}\u201d has not yet been resolved.
 UnspecifiedCRS                    = Coordinate reference system has not been specified.
 UnspecifiedFormatForClass_1       = No format is specified for objects of class \u2018{0}\u2019.



Mime
View raw message