sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1576972 [4/5] - in /sis/branches/JDK6: ./ core/sis-feature/src/main/java/org/apache/sis/feature/ core/sis-metadata/src/main/java/org/apache/sis/io/wkt/ core/sis-metadata/src/main/java/org/apache/sis/metadata/ core/sis-metadata/src/main/jav...
Date Wed, 12 Mar 2014 22:44:22 GMT
Modified: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/SubTypes.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/SubTypes.java?rev=1576972&r1=1576971&r2=1576972&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/SubTypes.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/SubTypes.java [UTF-8] Wed Mar 12 22:44:18 2014
@@ -23,12 +23,16 @@ import org.opengis.referencing.crs.Coord
 import org.opengis.referencing.datum.Datum;
 import org.opengis.referencing.datum.Ellipsoid;
 import org.opengis.referencing.datum.PrimeMeridian;
+import org.opengis.parameter.ParameterDescriptor;
+import org.opengis.parameter.ParameterDescriptorGroup;
 import org.apache.sis.referencing.crs.AbstractCRS;
 import org.apache.sis.referencing.cs.AbstractCS;
 import org.apache.sis.referencing.cs.DefaultCoordinateSystemAxis;
 import org.apache.sis.referencing.datum.AbstractDatum;
 import org.apache.sis.referencing.datum.DefaultEllipsoid;
 import org.apache.sis.referencing.datum.DefaultPrimeMeridian;
+import org.apache.sis.parameter.DefaultParameterDescriptor;
+import org.apache.sis.parameter.DefaultParameterDescriptorGroup;
 
 
 /**
@@ -77,6 +81,12 @@ final class SubTypes {
         if (object instanceof PrimeMeridian) {
             return DefaultPrimeMeridian.castOrCopy((PrimeMeridian) object);
         }
+        if (object instanceof ParameterDescriptor<?>) {
+            return DefaultParameterDescriptor.castOrCopy((ParameterDescriptor<?>) object);
+        }
+        if (object instanceof ParameterDescriptorGroup) {
+            return DefaultParameterDescriptorGroup.castOrCopy((ParameterDescriptorGroup) object);
+        }
         /*
          * Intentionally check for AbstractIdentifiedObject after the interfaces because user may have defined his own
          * subclass implementing the interface. If we were checking for AbstractIdentifiedObject before the interfaces,

Modified: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java?rev=1576972&r1=1576971&r2=1576972&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java [UTF-8] Wed Mar 12 22:44:18 2014
@@ -190,7 +190,7 @@ public class AbstractCRS extends Abstrac
 
     /**
      * Returns a SIS coordinate reference system implementation with the values of the given arbitrary implementation.
-     * This method performs the first applicable actions in the following choices:
+     * This method performs the first applicable action in the following choices:
      *
      * <ul>
      *   <li>If the given object is {@code null}, then this method returns {@code null}.</li>

Modified: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java?rev=1576972&r1=1576971&r2=1576972&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java [UTF-8] Wed Mar 12 22:44:18 2014
@@ -233,7 +233,7 @@ public class AbstractCS extends Abstract
 
     /**
      * Returns a SIS coordinate system implementation with the values of the given arbitrary implementation.
-     * This method performs the first applicable actions in the following choices:
+     * This method performs the first applicable action in the following choices:
      *
      * <ul>
      *   <li>If the given object is {@code null}, then this method returns {@code null}.</li>

Modified: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/AbstractDatum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/AbstractDatum.java?rev=1576972&r1=1576971&r2=1576972&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/AbstractDatum.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/AbstractDatum.java [UTF-8] Wed Mar 12 22:44:18 2014
@@ -219,7 +219,7 @@ public class AbstractDatum extends Abstr
 
     /**
      * Returns a SIS datum implementation with the values of the given arbitrary implementation.
-     * This method performs the first applicable actions in the following choices:
+     * This method performs the first applicable action in the following choices:
      *
      * <ul>
      *   <li>If the given object is {@code null}, then this method returns {@code null}.</li>

Modified: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java?rev=1576972&r1=1576971&r2=1576972&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java [UTF-8] Wed Mar 12 22:44:18 2014
@@ -342,7 +342,10 @@ public class DefaultPrimeMeridian extend
         super.formatTo(formatter);
         final Convention convention = formatter.getConvention();
         final boolean isWKT1 = convention.majorVersion() == 1;
-        final Unit<Angle> targetUnit = formatter.toContextualUnit(NonSI.DEGREE_ANGLE);
+        Unit<Angle> targetUnit = formatter.toContextualUnit(NonSI.DEGREE_ANGLE);
+        if (targetUnit == null) {
+            targetUnit = NonSI.DEGREE_ANGLE;
+        }
         formatter.append(isWKT1 ? getGreenwichLongitude(targetUnit) : greenwichLongitude);
         if (isWKT1) {
             return "PrimeM";

Copied: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterDescriptorGroupTest.java (from r1576954, sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterDescriptorGroupTest.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterDescriptorGroupTest.java?p2=sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterDescriptorGroupTest.java&p1=sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterDescriptorGroupTest.java&r1=1576954&r2=1576972&rev=1576972&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterDescriptorGroupTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterDescriptorGroupTest.java [UTF-8] Wed Mar 12 22:44:18 2014
@@ -52,12 +52,12 @@ public final strictfp class DefaultParam
     static {
         final Integer DEFAULT_VALUE = 10;
         final Class<Integer> type = Integer.class;
-        final Map<String,Object> properties = new HashMap<>(4);
+        final Map<String,Object> properties = new HashMap<String,Object>(4);
         M1_M1_O1_O2 = new DefaultParameterDescriptorGroup(singletonMap(NAME_KEY, "Test group"), 0, 1,
-            new DefaultParameterDescriptor<>(name(properties, "Mandatory 1", "Ambiguity"), type, null, null, DEFAULT_VALUE, true),
-            new DefaultParameterDescriptor<>(name(properties, "Mandatory 2", "Alias 2"),   type, null, null, DEFAULT_VALUE, true),
-            new DefaultParameterDescriptor<>(name(properties,  "Optional 3", "Alias 3"),   type, null, null, DEFAULT_VALUE, false),
-            new MultiOccurrenceDescriptor <>(name(properties,  "Optional 4", "Ambiguity"), type, null, null, DEFAULT_VALUE, false)
+            new DefaultParameterDescriptor<Integer>(name(properties, "Mandatory 1", "Ambiguity"), type, null, null, DEFAULT_VALUE, true),
+            new DefaultParameterDescriptor<Integer>(name(properties, "Mandatory 2", "Alias 2"),   type, null, null, DEFAULT_VALUE, true),
+            new DefaultParameterDescriptor<Integer>(name(properties,  "Optional 3", "Alias 3"),   type, null, null, DEFAULT_VALUE, false),
+            new MultiOccurrenceDescriptor <Integer>(name(properties,  "Optional 4", "Ambiguity"), type, null, null, DEFAULT_VALUE, false)
         );
     }
 
@@ -76,10 +76,10 @@ public final strictfp class DefaultParam
     @Test
     public void testConstruction() {
         final Class<Integer> type = Integer.class;
-        final Map<String,Object> properties = new HashMap<>(4);
+        final Map<String,Object> properties = new HashMap<String,Object>(4);
         final DefaultParameterDescriptor<Integer> p1, p2;
-        p1 = new DefaultParameterDescriptor<>(name(properties, "Name", null), type, null, null, null, true);
-        p2 = new DefaultParameterDescriptor<>(name(properties, "  NAME ", null), type, null, null, null, true);
+        p1 = new DefaultParameterDescriptor<Integer>(name(properties, "Name", null), type, null, null, null, true);
+        p2 = new DefaultParameterDescriptor<Integer>(name(properties, "  NAME ", null), type, null, null, null, true);
         try {
             new DefaultParameterDescriptorGroup(singletonMap(NAME_KEY, "Test group"), 0, 1, p1, p2);
             fail("Constructor should have detected the duplicated names.");

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterDescriptorTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterDescriptorTest.java?rev=1576972&r1=1576971&r2=1576972&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterDescriptorTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterDescriptorTest.java [UTF-8] Wed Mar 12 22:44:18 2014
@@ -22,13 +22,16 @@ import java.util.Locale;
 import javax.measure.unit.SI;
 import javax.measure.unit.Unit;
 import org.opengis.parameter.ParameterDescriptor;
+import org.apache.sis.measure.Range;
+import org.apache.sis.measure.NumberRange;
+import org.apache.sis.measure.MeasurementRange;
 import org.apache.sis.test.DependsOnMethod;
 import org.apache.sis.test.DependsOn;
 import org.apache.sis.test.TestCase;
 import org.junit.Test;
 
-import static org.junit.Assert.*;
 import static org.opengis.test.Validators.*;
+import static org.apache.sis.test.MetadataAssert.*;
 
 
 /**
@@ -47,13 +50,9 @@ public final strictfp class DefaultParam
      * @param  name The parameter name.
      * @return The properties to be given to descriptor constructor.
      */
-    private static Map<String,Object> properties(final String name,
-            final Object minimumValue, final Object maximumValue)
-    {
-        final Map<String,Object> properties = new HashMap<String,Object>(8);
+    private static Map<String,Object> properties(final String name) {
+        final Map<String,Object> properties = new HashMap<String,Object>(4);
         assertNull(properties.put(DefaultParameterDescriptor.NAME_KEY, name));
-        assertNull(properties.put(DefaultParameterDescriptor.MINIMUM_VALUE_KEY, minimumValue));
-        assertNull(properties.put(DefaultParameterDescriptor.MAXIMUM_VALUE_KEY, maximumValue));
         assertNull(properties.put(DefaultParameterDescriptor.LOCALE_KEY, Locale.US));
         return properties;
     }
@@ -66,42 +65,41 @@ public final strictfp class DefaultParam
      * @return The parameter descriptor.
      */
     static <T> DefaultParameterDescriptor<T> createSimpleOptional(final String name, final Class<T> type) {
-        return new DefaultParameterDescriptor<T>(properties(name, null, null), type, null, null, false);
+        return new DefaultParameterDescriptor<T>(properties(name), type, null, null, null, false);
     }
 
     /**
      * Creates a descriptor for a mandatory parameter in a range of integer values.
      *
      * @param  name         The parameter name.
-     * @param  defaultValue The default value for the parameter.
      * @param  minimumValue The minimum parameter value.
      * @param  maximumValue The maximum parameter value.
+     * @param  defaultValue The default value for the parameter.
      * @return The parameter descriptor for the given range of values.
      */
     static DefaultParameterDescriptor<Integer> create(final String name,
-            final int defaultValue, final int minimumValue, final int maximumValue)
+            final int minimumValue, final int maximumValue, final int defaultValue)
     {
-        return new DefaultParameterDescriptor<Integer>(properties(name, minimumValue, maximumValue),
-                 Integer.class, Integer.valueOf(defaultValue), null, true);
+        return new DefaultParameterDescriptor<Integer>(properties(name), Integer.class,
+                NumberRange.create(minimumValue, true, maximumValue, true), null, Integer.valueOf(defaultValue), true);
     }
 
     /**
      * Creates a descriptor for a mandatory parameter in a range of floating point values.
      *
      * @param  name         The parameter name.
-     * @param  defaultValue The default value for the parameter, or {@link Double#NaN} if none.
-     * @param  minimum      The minimum parameter value, or {@link minimumValue#NEGATIVE_INFINITY} if none.
+     * @param  minimumValue The minimum parameter value, or {@link Double#NEGATIVE_INFINITY} if none.
      * @param  maximumValue The maximum parameter value, or {@link Double#POSITIVE_INFINITY} if none.
+     * @param  defaultValue The default value for the parameter, or {@link Double#NaN} if none.
      * @param  unit         The unit for default, minimum and maximum values.
      * @return The parameter descriptor for the given range of values.
      */
     static DefaultParameterDescriptor<Double> create(final String name,
-            final double defaultValue, final double minimumValue, final double maximumValue, final Unit<?> unit)
+            final double minimumValue, final double maximumValue, final double defaultValue, final Unit<?> unit)
     {
-        return new DefaultParameterDescriptor<Double>(properties(name,
-                minimumValue == Double.NEGATIVE_INFINITY ? null : Double.valueOf(minimumValue),
-                maximumValue == Double.POSITIVE_INFINITY ? null : Double.valueOf(maximumValue)),
-                Double.class, Double.isNaN(defaultValue) ? null : Double.valueOf(defaultValue), unit, true);
+        return new DefaultParameterDescriptor<Double>(properties(name), Double.class,
+                MeasurementRange.create(minimumValue, true, maximumValue, true, unit), null,
+                Double.isNaN(defaultValue) ? null : Double.valueOf(defaultValue), true);
     }
 
     /**
@@ -117,9 +115,23 @@ public final strictfp class DefaultParam
     static <T> DefaultParameterDescriptor<T> create(final String name, final Class<T> type,
             final T[] validValues, final T defaultValue)
     {
-        final Map<String,Object> properties = properties(name, null, null);
-        assertNull(properties.put(DefaultParameterDescriptor.VALID_VALUES_KEY, validValues));
-        return new DefaultParameterDescriptor<T>(properties, type, defaultValue, null, true);
+        return new DefaultParameterDescriptor<T>(properties(name), type, null, validValues, defaultValue, true);
+    }
+
+    /**
+     * Creates a descriptor for an array of {@code double[] values.
+     *
+     * @param  name         The parameter name.
+     * @param  minimumValue The minimum parameter value, or {@link Double#NEGATIVE_INFINITY} if none.
+     * @param  maximumValue The maximum parameter value, or {@link Double#POSITIVE_INFINITY} if none.
+     * @param  unit         The unit for minimum and maximum values.
+     * @return The parameter descriptor for the given range of values.
+     */
+    static DefaultParameterDescriptor<double[]> createForArray(final String name,
+            final double minimumValue, final double maximumValue, final Unit<?> unit)
+    {
+        final MeasurementRange<Double> valueDomain = MeasurementRange.create(minimumValue, true, maximumValue, true, unit);
+        return new DefaultParameterDescriptor<double[]>(properties(name), double[].class, valueDomain, null, null, true);
     }
 
     /**
@@ -146,12 +158,12 @@ public final strictfp class DefaultParam
     @DependsOnMethod("testOptionalInteger")
     public void testRangeValidation() {
         try {
-            create("Test range", 12, 20, 4);
+            create("Test range", 20, 4, 12);
             fail("minimum > maximum");
         } catch (IllegalArgumentException exception) {
             assertEquals("Range [20 … 4] is not valid.", exception.getMessage());
         }
-        final ParameterDescriptor<Integer> descriptor = create("Test range", 12, 4, 20);
+        final ParameterDescriptor<Integer> descriptor = create("Test range", 4, 20, 12);
         assertEquals("name",          "Test range",        descriptor.getName().getCode());
         assertEquals("valueClass",    Integer.class,       descriptor.getValueClass());
         assertNull  ("validValues",                        descriptor.getValidValues());
@@ -169,10 +181,10 @@ public final strictfp class DefaultParam
     @DependsOnMethod("testRangeValidation")
     public void testDefaultValueValidation() {
         try {
-            create("Test default", 3, 4, 20);
+            create("Test default", 4, 20, 3);
             fail("defaultValue < minimum");
         } catch (IllegalArgumentException exception) {
-            assertEquals("Value ‘Test default’=3 is invalid. Expected a value in the [4 … 20] range.", exception.getMessage());
+            assertEquals("Value ‘Test default’ = 3 is invalid. Expected a value in the [4 … 20] range.", exception.getMessage());
         }
     }
 
@@ -181,7 +193,7 @@ public final strictfp class DefaultParam
      */
     @Test
     public void testDoubleType() {
-        final ParameterDescriptor<Double> descriptor = create("Length measure", 12, 4, 20, SI.METRE);
+        final ParameterDescriptor<Double> descriptor = create("Length measure", 4, 20, 12, SI.METRE);
         assertEquals("name",         "Length measure",   descriptor.getName().getCode());
         assertEquals("unit",         SI.METRE,           descriptor.getUnit());
         assertEquals("class",        Double.class,       descriptor.getValueClass());
@@ -189,8 +201,6 @@ public final strictfp class DefaultParam
         assertEquals("minimum",      Double.valueOf( 4), descriptor.getMinimumValue());
         assertEquals("maximum",      Double.valueOf(20), descriptor.getMaximumValue());
         validate(descriptor);
-        assertEquals("DefaultParameterDescriptor[\"Length measure\", mandatory, class=Double, " +
-                "valid=[4.0 … 20.0], default=12.0, unit=m]", descriptor.toString());
     }
 
     /**
@@ -198,26 +208,19 @@ public final strictfp class DefaultParam
      */
     @Test
     public void testStringType() {
-        final ParameterDescriptor<String> descriptor = new DefaultParameterDescriptor<String>(
-                properties("String param", "AAA", "BBB"), String.class, "ABC", null, false);
+        final Range<String> valueDomain = new Range<String>(String.class, "AAA", true, "BBB", true);
+        final DefaultParameterDescriptor<String> descriptor = new DefaultParameterDescriptor<String>(
+                properties("String param"), String.class, valueDomain, null, "ABC", false);
         assertEquals("name", "String param",     descriptor.getName().getCode());
         assertEquals("valueClass", String.class, descriptor.getValueClass());
         assertNull  ("validValues",              descriptor.getValidValues());
+        assertSame  ("valueDomain", valueDomain, descriptor.getValueDomain());
         assertEquals("defaultValue",  "ABC",     descriptor.getDefaultValue());
         assertEquals("minimumValue",  "AAA",     descriptor.getMinimumValue());
         assertEquals("maximumValue",  "BBB",     descriptor.getMaximumValue());
         assertEquals("minimumOccurs", 0,         descriptor.getMinimumOccurs());
         assertEquals("maximumOccurs", 1,         descriptor.getMaximumOccurs());
-        /*
-         * Same construction than above, except that we specify a unit of measurement.
-         * This operation shall be invalid for non-numerical types.
-         */
-        try {
-            new DefaultParameterDescriptor<String>(properties("Invalid param", "AAA", "BBB"),
-                     String.class, "ABC", SI.METRE, false);
-        } catch (IllegalArgumentException e) {
-            assertEquals("Unit of measurement “m” is not valid for “Invalid param” values.", e.getMessage());
-        }
+        assertNull  ("unit",                     descriptor.getUnit());
     }
 
     /**
@@ -237,6 +240,7 @@ public final strictfp class DefaultParam
         assertNull       ("maximumValue",              descriptor.getMaximumValue());
         assertEquals     ("minimumOccurs", 1,          descriptor.getMinimumOccurs());
         assertEquals     ("maximumOccurs", 1,          descriptor.getMaximumOccurs());
+        assertNull       ("unit",                      descriptor.getUnit());
         /*
          * Invalid operation: element not in the list of valid elements.
          */
@@ -246,4 +250,48 @@ public final strictfp class DefaultParam
             assertEquals("Parameter “Enumeration param” can not take the “Pear” value.", e.getMessage());
         }
     }
+
+    /**
+     * Tests a descriptor for a parameter value of kind {@code double[]}.
+     */
+    @Test
+    @DependsOnMethod("testDoubleType")
+    public void testArrayType() {
+        final DefaultParameterDescriptor<double[]> descriptor = createForArray("Array param", 4, 9, SI.METRE);
+        assertEquals("name",       "Array param",  descriptor.getName().getCode());
+        assertEquals("valueClass", double[].class, descriptor.getValueClass());
+        assertEquals("unit",       SI.METRE,       descriptor.getUnit());
+        assertNull  ("validValues",                descriptor.getValidValues());
+        assertNull  ("defaultValue",               descriptor.getDefaultValue());
+        assertNull  ("minimumValue",               descriptor.getMinimumValue());
+        assertNull  ("maximumValue",               descriptor.getMaximumValue());
+        assertEquals("minimumOccurs", 1,           descriptor.getMinimumOccurs());
+        assertEquals("maximumOccurs", 1,           descriptor.getMaximumOccurs());
+
+        final Range<?> valueDomain = descriptor.getValueDomain();
+        assertNotNull("valueDomain", valueDomain);
+        assertEquals(Double.class,      valueDomain.getElementType());
+        assertEquals(Double.valueOf(4), valueDomain.getMinValue());
+        assertEquals(Double.valueOf(9), valueDomain.getMaxValue());
+        /*
+         * Invalid operation: wrong type of range value.
+         */
+        try {
+            new DefaultParameterDescriptor<double[]>(properties("Array param"), double[].class,
+                    NumberRange.create(4, true, 9, true), null, null, false);
+        } catch (IllegalArgumentException e) {
+            assertEquals("Argument ‘valueDomain’ can not be an instance of ‘Range<Integer>’.", e.getMessage());
+        }
+    }
+
+    /**
+     * Tests the WKT representation.
+     */
+    @Test
+    public void testWKT() {
+        final DefaultParameterDescriptor<Double> descriptor = create("Real number", 4, 8, 5, SI.METRE);
+        assertWktEquals("Parameter[“Integer param”, 5]", create("Integer param", 4, 8, 5));
+        assertWktEquals("Parameter[“Real number”, 5.0, LengthUnit[“metre”, 1]]", descriptor);
+        assertEquals("Parameter[\"Real number\", 5.0, Unit[\"metre\", 1]]", descriptor.toString());
+    }
 }

Copied: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterValueGroupTest.java (from r1576954, sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterValueGroupTest.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterValueGroupTest.java?p2=sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterValueGroupTest.java&p1=sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterValueGroupTest.java&r1=1576954&r2=1576972&rev=1576972&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterValueGroupTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterValueGroupTest.java [UTF-8] Wed Mar 12 22:44:18 2014
@@ -69,11 +69,12 @@ public final strictfp class DefaultParam
      * and assigns to them an integer value in sequence with the given step. For example if {@code step} is 10,
      * then this method will create parameters with values 10, 20, 30 and 40.
      */
+    @SuppressWarnings({"unchecked", "rawtypes"})
     private DefaultParameterValue<?>[] createValues(final int step) {
         final List<GeneralParameterDescriptor> descriptors = descriptor.descriptors();
         final DefaultParameterValue<?>[] parameters = new DefaultParameterValue<?>[descriptors.size()];
         for (int i=0; i<parameters.length;) {
-            parameters[i] = new DefaultParameterValue<>((ParameterDescriptor<?>) descriptors.get(i));
+            parameters[i] = new DefaultParameterValue((ParameterDescriptor<?>) descriptors.get(i));
             parameters[i].setValue(++i * step);
         }
         return parameters;
@@ -236,7 +237,7 @@ public final strictfp class DefaultParam
     public void testValuesAddWrongParameter() {
         final DefaultParameterValueGroup    group = createGroup(10);
         final List<GeneralParameterValue>  values = group.values();
-        final ParameterValue<Integer> nonExistent = new DefaultParameterDescriptor<>(
+        final ParameterValue<Integer> nonExistent = new DefaultParameterDescriptor<Integer>(
                 singletonMap(NAME_KEY, "Optional 5"), Integer.class, null, null, null, false).createValue();
         try {
             values.add(nonExistent);

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterValueTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterValueTest.java?rev=1576972&r1=1576971&r2=1576972&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterValueTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterValueTest.java [UTF-8] Wed Mar 12 22:44:18 2014
@@ -21,7 +21,6 @@ import javax.measure.unit.NonSI;
 import javax.measure.unit.Unit;
 import org.opengis.referencing.cs.AxisDirection;
 import org.opengis.referencing.datum.VerticalDatumType;
-import org.opengis.parameter.ParameterValue;
 import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.parameter.InvalidParameterTypeException;
 import org.opengis.parameter.InvalidParameterValueException;
@@ -59,6 +58,38 @@ public final strictfp class DefaultParam
     private static final double EPS = 1E-10;
 
     /**
+     * A subclass of {@code DefaultParameterValue} which store the value converted by {@link Verifier}.
+     * This allows {@link DefaultParameterValueTest} methods to verify the conversion result.
+     */
+    @SuppressWarnings("serial")
+    private static final strictfp class Watcher<T> extends DefaultParameterValue<T> {
+        /** The value converted by {@link Verifier}. */
+        T convertedValue;
+
+        /** Creates a new parameter value for testing purpose. */
+        Watcher(final DefaultParameterDescriptor<T> descriptor) {
+            super(descriptor);
+        }
+
+        /** Automatically invoked when a new value is set. */
+        @Override protected void validate(final T value) {
+            convertedValue = value;
+        }
+
+        /** Asserts that the value and the converted value are equal to the expected one. */
+        void assertValueEquals(final Object expected) {
+            assertEquals("value",          expected, getValue());
+            assertEquals("convertedValue", expected, convertedValue);
+        }
+
+        /** Asserts that the value and the converted value are equal to the expected ones. */
+        void assertValueEquals(final Object expected, final Object converted) {
+            assertEquals("value",          expected,  getValue());
+            assertEquals("convertedValue", converted, convertedValue);
+        }
+    }
+
+    /**
      * Constructs an optional parameter initialized to the given value.
      * The descriptor has no default value, no minimum and no maximum.
      *
@@ -66,8 +97,8 @@ public final strictfp class DefaultParam
      * @param  value The parameter value.
      * @return A new parameter instance for the given name and value.
      */
-    private static DefaultParameterValue<Integer> createOptional(final String name, final int value) {
-        final DefaultParameterValue<Integer> parameter = new DefaultParameterValue<Integer>(
+    private static Watcher<Integer> createOptional(final String name, final int value) {
+        final Watcher<Integer> parameter = new Watcher<Integer>(
                 DefaultParameterDescriptorTest.createSimpleOptional(name, Integer.class));
         parameter.setValue(value, null);
         return parameter;
@@ -81,10 +112,9 @@ public final strictfp class DefaultParam
      * @param unit  The unit for the parameter value.
      * @return A new parameter instance for the given name and value.
      */
-    private static DefaultParameterValue<Double> create(final String name, final double value, final Unit<?> unit) {
-        final ParameterDescriptor<Double> descriptor = DefaultParameterDescriptorTest.create(
-                name, Double.NaN, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, unit);
-        final DefaultParameterValue<Double> parameter = new DefaultParameterValue<Double>(descriptor);
+    private static Watcher<Double> create(final String name, final double value, final Unit<?> unit) {
+        final Watcher<Double> parameter = new Watcher<Double>(DefaultParameterDescriptorTest.create(
+                name, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, Double.NaN, unit));
         parameter.setValue(value, unit);
         return parameter;
     }
@@ -96,7 +126,7 @@ public final strictfp class DefaultParam
      */
     @Test
     public void testInteger() {
-        final ParameterValue<Integer> parameter = createOptional("Integer param", 14);
+        final Watcher<Integer> parameter = createOptional("Integer param", 14);
         final ParameterDescriptor<Integer> descriptor = parameter.getDescriptor();
         validate(parameter);
 
@@ -139,7 +169,7 @@ public final strictfp class DefaultParam
          * the value should stay null (not substituted by the default value).
          */
         parameter.setValue(-15);
-        assertEquals(Integer.valueOf(-15), parameter.getValue());
+        parameter.assertValueEquals(Integer.valueOf(-15));
         parameter.setValue(null);
         assertNull(parameter.getValue());
         validate(parameter);
@@ -153,8 +183,8 @@ public final strictfp class DefaultParam
     @Test
     @DependsOnMethod("testInteger")
     public void testBoundedInteger() {
-        final DefaultParameterValue<Integer> parameter = new DefaultParameterValue<Integer>(
-                DefaultParameterDescriptorTest.create("Bounded param", 15, -30, +40));
+        final Watcher<Integer> parameter = new Watcher<Integer>(
+                DefaultParameterDescriptorTest.create("Bounded param", -30, +40, 15));
         assertEquals(Integer.class, parameter.getDescriptor().getValueClass());
         assertEquals(      "value", Integer.valueOf(15), parameter.getValue());
         assertEquals(   "intValue", 15, parameter.intValue());
@@ -164,7 +194,7 @@ public final strictfp class DefaultParam
          * Set a value inside the range of valid values.
          */
         parameter.setValue(12);
-        assertEquals(      "value", Integer.valueOf(12), parameter.getValue());
+        parameter.assertValueEquals(Integer.valueOf(12));
         assertEquals(   "intValue", 12, parameter.intValue());
         assertEquals("doubleValue", 12, parameter.doubleValue(), STRICT);
         validate(parameter);
@@ -203,7 +233,7 @@ public final strictfp class DefaultParam
          * the value can be converted to an integer.
          */
         parameter.setValue(10.0);
-        assertEquals(      "value", Integer.valueOf(10), parameter.getValue());
+        parameter.assertValueEquals(Integer.valueOf(10));
         assertEquals(   "intValue", 10, parameter.intValue());
         assertEquals("doubleValue", 10, parameter.doubleValue(), STRICT);
         validate(parameter);
@@ -226,7 +256,7 @@ public final strictfp class DefaultParam
      */
     @Test
     public void testMeasure() {
-        final DefaultParameterValue<Double> parameter = create("Numerical param", 3, SI.METRE);
+        final Watcher<Double> parameter = create("Numerical param", 3, SI.METRE);
         final ParameterDescriptor<Double> descriptor = parameter.getDescriptor();
         validate(parameter);
 
@@ -258,6 +288,7 @@ public final strictfp class DefaultParam
          * Sets a value in centimetres.
          */
         parameter.setValue(400, SI.CENTIMETRE);
+        parameter.assertValueEquals(Double.valueOf(400), Double.valueOf(4));
         assertEquals("unit",        SI.CENTIMETRE, parameter.getUnit());
         assertEquals("doubleValue", 400, parameter.doubleValue(),              STRICT);
         assertEquals("doubleValue", 400, parameter.doubleValue(SI.CENTIMETRE), STRICT);
@@ -272,8 +303,8 @@ public final strictfp class DefaultParam
     @Test
     @DependsOnMethod("testMeasure")
     public void testBoundedDouble() {
-        final DefaultParameterValue<Double> parameter = new DefaultParameterValue<Double>(
-                DefaultParameterDescriptorTest.create("Bounded param", 15.0, -30.0, +40.0, null));
+        final Watcher<Double> parameter = new Watcher<Double>(
+                DefaultParameterDescriptorTest.create("Bounded param", -30.0, +40.0, 15.0, null));
         assertEquals(Double.class, parameter.getDescriptor().getValueClass());
         assertEquals(      "value", Double.valueOf(15), parameter.getValue());
         assertEquals(   "intValue", 15, parameter.intValue());
@@ -281,7 +312,7 @@ public final strictfp class DefaultParam
         validate(parameter);
 
         parameter.setValue(12.0);
-        assertEquals(      "value", Double.valueOf(12), parameter.getValue());
+        parameter.assertValueEquals(Double.valueOf(12));
         assertEquals(   "intValue", 12, parameter.intValue());
         assertEquals("doubleValue", 12, parameter.doubleValue(), STRICT);
         validate(parameter);
@@ -316,8 +347,8 @@ public final strictfp class DefaultParam
     @Test
     @DependsOnMethod({"testMeasure", "testBoundedDouble"})
     public void testBoundedMeasure() {
-        final DefaultParameterValue<Double> parameter = new DefaultParameterValue<Double>(
-                DefaultParameterDescriptorTest.create("Length measure", 12, 4, 20, SI.METRE));
+        final Watcher<Double> parameter = new Watcher<Double>(
+                DefaultParameterDescriptorTest.create("Length measure", 4, 20, 12, SI.METRE));
         assertEquals("value",    Double.valueOf(12), parameter.getValue());
         assertEquals("intValue", 12,                 parameter.intValue());
         assertEquals("unit",     SI.METRE,           parameter.getUnit());
@@ -325,7 +356,7 @@ public final strictfp class DefaultParam
 
         for (int i=4; i<=20; i++) {
             parameter.setValue(i);
-            assertEquals("value", Double.valueOf(i), parameter.getValue());
+            parameter.assertValueEquals(Double.valueOf(i));
             assertEquals("unit",  SI.METRE,          parameter.getUnit());
             assertEquals("value", i,                 parameter.doubleValue(SI.METRE), STRICT);
             assertEquals("value", 100*i,             parameter.doubleValue(SI.CENTIMETRE), STRICT);
@@ -337,16 +368,61 @@ public final strictfp class DefaultParam
             assertEquals("Length measure", exception.getParameterName());
         }
         try {
+            parameter.setValue(10.0, SI.KILOMETRE); // Out of range only after unit conversion.
+            fail("setValue(> max)");
+        } catch (InvalidParameterValueException exception) {
+            assertEquals("Length measure", exception.getParameterName());
+        }
+        try {
             parameter.setValue("12");
             fail("setValue(Sring)");
         } catch (InvalidParameterValueException exception) {
             assertEquals("Length measure", exception.getParameterName());
         }
         for (int i=400; i<=2000; i+=100) {
+            final double metres = i / 100.0;
             parameter.setValue(i, SI.CENTIMETRE);
-            assertEquals("value", Double.valueOf(i), parameter.getValue());
-            assertEquals("unit",  SI.CENTIMETRE,     parameter.getUnit());
-            assertEquals("value", i/100,             parameter.doubleValue(SI.METRE), EPS);
+            parameter.assertValueEquals(Double.valueOf(i), Double.valueOf(metres));
+            assertEquals("unit",  SI.CENTIMETRE, parameter.getUnit());
+            assertEquals("value", metres,        parameter.doubleValue(SI.METRE), EPS);
+        }
+    }
+
+    /**
+     * Tests a parameter for values of type {@code double[]}.
+     */
+    @Test
+    public void testArray() {
+        double[] values = {5, 10, 15};
+        final Watcher<double[]> parameter = new Watcher<double[]>(
+                DefaultParameterDescriptorTest.createForArray("myValues", 4, 4000, SI.METRE));
+        parameter.setValue(values);
+        assertArrayEquals(values, parameter.getValue(), 0);
+        assertArrayEquals(values, parameter.convertedValue, 0);
+        assertArrayEquals(values, parameter.doubleValueList(), 0);
+        assertArrayEquals(new double[] {500, 1000, 1500}, parameter.doubleValueList(SI.CENTIMETRE), 0);
+        /*
+         * New values in kilometres.
+         */
+        values = new double[] {3, 2, 4};
+        final double[] metres = new double[] {3000, 2000, 4000};
+        parameter.setValue(values, SI.KILOMETRE);
+        assertArrayEquals(values, parameter.getValue(), 0);
+        assertArrayEquals(metres, parameter.convertedValue, 0);
+        assertArrayEquals(values, parameter.doubleValueList(), 0);
+        assertArrayEquals(metres, parameter.doubleValueList(SI.METRE), 0);
+        /*
+         * Values out of range.
+         */
+        try {
+            parameter.setValue(new double[] {5, 10, -5}, SI.METRE);
+        } catch (InvalidParameterValueException e) {
+            assertTrue(e.getMessage().contains("myValues[2]"));
+        }
+        try {
+            parameter.setValue(new double[] {4, 5}, SI.KILOMETRE); // Out of range only after unit conversion.
+        } catch (InvalidParameterValueException e) {
+            assertTrue(e.getMessage().contains("myValues[1]"));
         }
     }
 
@@ -358,8 +434,8 @@ public final strictfp class DefaultParam
         final AxisDirection[] directions = {
             AxisDirection.NORTH,
             AxisDirection.SOUTH,
-            AxisDirection.DISPLAY_LEFT,
-            AxisDirection.PAST
+            AxisDirection.PAST,
+            AxisDirection.DISPLAY_LEFT
         };
         final ParameterDescriptor<AxisDirection> descriptor = DefaultParameterDescriptorTest.create(
                 "Direction", AxisDirection.class, directions, AxisDirection.NORTH);

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/AbstractIdentifiedObjectTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/AbstractIdentifiedObjectTest.java?rev=1576972&r1=1576971&r2=1576972&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/AbstractIdentifiedObjectTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/AbstractIdentifiedObjectTest.java [UTF-8] Wed Mar 12 22:44:18 2014
@@ -109,7 +109,7 @@ public final strictfp class AbstractIden
             // The message may be in any language, but shall
             // contain at least the missing property name.
             final String message = e.getMessage();
-            assertTrue(message, message.contains("code"));
+            assertTrue(message, message.contains("name"));
         }
         // Try again, with error messages forced to English.
         assertNull(properties.put(AbstractIdentifiedObject.LOCALE_KEY, Locale.US));
@@ -117,7 +117,7 @@ public final strictfp class AbstractIden
             new AbstractIdentifiedObject(properties);
             fail("Should not allow unnamed object.");
         } catch (IllegalArgumentException e) {
-            assertEquals("Missing value for “code” property.", e.getMessage());
+            assertEquals("Missing value for “name” property.", e.getMessage());
         }
         // "code" with String value is accepted as well.
         assertNull(properties.put("code", "Test"));

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/NamedIdentifierTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/NamedIdentifierTest.java?rev=1576972&r1=1576971&r2=1576972&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/NamedIdentifierTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/NamedIdentifierTest.java [UTF-8] Wed Mar 12 22:44:18 2014
@@ -18,6 +18,8 @@ package org.apache.sis.referencing;
 
 import java.util.Locale;
 import org.opengis.referencing.ReferenceIdentifier;
+import org.opengis.util.InternationalString;
+import org.opengis.util.NameSpace;
 import org.opengis.util.GenericName;
 import org.opengis.test.Validators;
 import org.apache.sis.util.iso.DefaultInternationalString;
@@ -26,6 +28,8 @@ import org.apache.sis.test.TestCase;
 import org.junit.Test;
 
 import static org.apache.sis.test.Assert.*;
+import static org.apache.sis.internal.system.DefaultFactories.SIS_NAMES;
+import static org.apache.sis.metadata.iso.citation.HardCodedCitations.OGP;
 import static org.apache.sis.metadata.iso.citation.HardCodedCitations.EPSG;
 
 
@@ -39,18 +43,49 @@ import static org.apache.sis.metadata.is
  */
 public final strictfp class NamedIdentifierTest extends TestCase {
     /**
-     * Tests the {@link NamedIdentifier#NamedIdentifier(Citation, String)} constructor.
+     * Tests the {@link NamedIdentifier#NamedIdentifier(Citation, String, String, String, InternationalString)}
+     * constructor.
      */
     @Test
     public void testCreateFromCode() {
-        final NamedIdentifier identifier = new NamedIdentifier(EPSG, "4326");
+        final NamedIdentifier identifier = new NamedIdentifier(OGP, "EPSG", "4326", "8.3", null);
         Validators.validate((ReferenceIdentifier) identifier);
         Validators.validate((GenericName) identifier);
 
         // ImmutableIdentifier properties
         assertEquals("code",      "4326", identifier.getCode());
         assertEquals("codeSpace", "EPSG", identifier.getCodeSpace());
-        assertSame  ("authority",  EPSG,  identifier.getAuthority());
+        assertSame  ("authority",  OGP,   identifier.getAuthority());
+        assertEquals("version",   "8.3",  identifier.getVersion());
+        assertNull  ("remarks",           identifier.getRemarks());
+        assertFalse ("isDeprecated",      identifier.isDeprecated());
+
+        // NamedIdentifier properties
+        assertEquals("depth",  2,          identifier.depth());
+        assertEquals("tip",   "4326",      identifier.tip().toString());
+        assertEquals("head",  "EPSG",      identifier.head().toString());
+        assertEquals("name",  "EPSG:4326", identifier.toString());
+
+        // Scope (derived from the autority)
+        final NameSpace scope = identifier.scope();
+        assertFalse ("scope",        scope.isGlobal());
+        assertEquals("scope", "OGP", scope.name().toString());
+    }
+
+    /**
+     * Tests the {@link NamedIdentifier#NamedIdentifier(GenericName)} constructor.
+     */
+    @Test
+    public void testCreateFromName() {
+        final NameSpace scope = SIS_NAMES.createNameSpace(SIS_NAMES.createLocalName(null, "OGP"), null);
+        final NamedIdentifier identifier = new NamedIdentifier(SIS_NAMES.createGenericName(scope, "EPSG", "4326"));
+        Validators.validate((ReferenceIdentifier) identifier);
+        Validators.validate((GenericName) identifier);
+
+        // ImmutableIdentifier properties
+        assertEquals("code",      "4326", identifier.getCode());
+        assertEquals("codeSpace", "EPSG", identifier.getCodeSpace());
+        assertEquals("authority", "OGP",  identifier.getAuthority().getTitle().toString());
         assertNull  ("version",           identifier.getVersion());
         assertNull  ("remarks",           identifier.getRemarks());
         assertFalse ("isDeprecated",      identifier.isDeprecated());
@@ -60,7 +95,7 @@ public final strictfp class NamedIdentif
         assertEquals("tip",   "4326",      identifier.tip().toString());
         assertEquals("head",  "EPSG",      identifier.head().toString());
         assertEquals("name",  "EPSG:4326", identifier.toString());
-        assertTrue  ("scope",              identifier.scope().isGlobal());
+        assertSame  ("scope", scope,       identifier.scope());
     }
 
     /**
@@ -101,7 +136,11 @@ public final strictfp class NamedIdentif
         assertEquals("name",  "EPSG:name", identifier.toInternationalString().toString(Locale.ENGLISH));
         assertEquals("name",  "EPSG:nom",  identifier.toInternationalString().toString(Locale.FRENCH));
         assertEquals("name",  "EPSG:名前",  identifier.toInternationalString().toString(Locale.JAPANESE));
-        assertTrue  ("scope",              identifier.scope().isGlobal());
+
+        // Scope (derived from the autority)
+        final NameSpace scope = identifier.scope();
+        assertFalse ("scope",         scope.isGlobal());
+        assertEquals("scope", "EPSG", scope.name().toString());
     }
 
     /**

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=1576972&r1=1576971&r2=1576972&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] Wed Mar 12 22:44:18 2014
@@ -50,8 +50,14 @@ import org.junit.BeforeClass;
     org.apache.sis.referencing.NamedIdentifierTest.class,
     org.apache.sis.referencing.AbstractIdentifiedObjectTest.class,
     org.apache.sis.referencing.AbstractReferenceSystemTest.class,
+    org.apache.sis.referencing.BuilderTest.class,
     org.apache.sis.parameter.DefaultParameterDescriptorTest.class,
+    org.apache.sis.parameter.DefaultParameterDescriptorGroupTest.class,
     org.apache.sis.parameter.DefaultParameterValueTest.class,
+    org.apache.sis.parameter.DefaultParameterValueGroupTest.class,
+    org.apache.sis.parameter.ParametersTest.class,
+    org.apache.sis.parameter.ParameterBuilderTest.class,
+    org.apache.sis.parameter.ParameterFormatTest.class,
     org.apache.sis.referencing.datum.BursaWolfParametersTest.class,
     org.apache.sis.referencing.datum.TimeDependentBWPTest.class,
     org.apache.sis.referencing.datum.DefaultEllipsoidTest.class,

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/util/CollectionsExt.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/util/CollectionsExt.java?rev=1576972&r1=1576971&r2=1576972&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/util/CollectionsExt.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/util/CollectionsExt.java [UTF-8] Wed Mar 12 22:44:18 2014
@@ -18,6 +18,7 @@ package org.apache.sis.internal.util;
 
 import java.util.*;
 import java.lang.reflect.Array;
+import org.opengis.util.CodeList;
 import org.apache.sis.util.Static;
 import org.apache.sis.util.collection.CodeListSet;
 import org.apache.sis.util.resources.Errors;
@@ -202,6 +203,26 @@ public final class CollectionsExt extend
     }
 
     /**
+     * Creates an initially empty set for elements of the given type.
+     * This method will creates specialized set for code lists and enumerations.
+     *
+     * @param  <E>   The type of elements in the set.
+     * @param  type  The type of elements in the set.
+     * @param  count The expected number of elements to put in the set.
+     * @return A new set for elements of the given type.
+     */
+    @SuppressWarnings({"unchecked","rawtypes"})
+    public static <E> Set<E> createSetForType(final Class<E> type, final int count) {
+        if (CodeList.class.isAssignableFrom(type)) {
+            return new CodeListSet((Class) type);
+        }
+        if (Enum.class.isAssignableFrom(type)) {
+            return EnumSet.noneOf((Class) type);
+        }
+        return new LinkedHashSet<E>(hashMapCapacity(count));
+    }
+
+    /**
      * Returns the specified array as an immutable set, or {@code null} if the array is null.
      * If the given array contains duplicated elements, i.e. elements that are equal in the
      * sense of {@link Object#equals(Object)}, then only the last instance of the duplicated

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/util/X364.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/util/X364.java?rev=1576972&r1=1576971&r2=1576972&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/util/X364.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/util/X364.java [UTF-8] Wed Mar 12 22:44:18 2014
@@ -208,7 +208,7 @@ search:     do {
                 return buffer.append(text, fromIndex, toIndex);
             }
         }
-        return text;
+        return text.subSequence(fromIndex, toIndex);
     }
 
     /**

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/io/CompoundFormat.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/io/CompoundFormat.java?rev=1576972&r1=1576971&r2=1576972&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/io/CompoundFormat.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/io/CompoundFormat.java [UTF-8] Wed Mar 12 22:44:18 2014
@@ -29,9 +29,13 @@ import java.text.ParsePosition;
 import java.text.NumberFormat;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
+import javax.measure.unit.Unit;
+import javax.measure.unit.UnitFormat;
 
 import org.apache.sis.measure.Angle;
 import org.apache.sis.measure.AngleFormat;
+import org.apache.sis.measure.Range;
+import org.apache.sis.measure.RangeFormat;
 import org.apache.sis.util.Localized;
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.collection.BackingStoreException;
@@ -272,7 +276,7 @@ public abstract class CompoundFormat<T> 
      *
      * @param  object      The object to format.
      * @param  toAppendTo  Where to format the object.
-     * @throws IOException If an error occurred while writing in the given appender.
+     * @throws IOException If an error occurred while writing to the given appendable.
      */
     public abstract void format(T object, Appendable toAppendTo) throws IOException;
 
@@ -365,6 +369,9 @@ public abstract class CompoundFormat<T> 
      *   <tr><td>{@link Angle}</td>  <td>{@link AngleFormat}</td></tr>
      *   <tr><td>{@link Date}</td>   <td>{@link DateFormat}</td></tr>
      *   <tr><td>{@link Number}</td> <td>{@link NumberFormat}</td></tr>
+     *   <tr><td>{@link Unit}</td>   <td>{@link UnitFormat}</td></tr>
+     *   <tr><td>{@link Range}</td>  <td>{@link RangeFormat}</td></tr>
+     *   <tr><td>{@link Class}</td>  <td>(internal)</td></tr>
      * </table>
      *
      * Subclasses can override this method for adding more types, or for configuring the
@@ -404,6 +411,10 @@ public abstract class CompoundFormat<T> 
             return format;
         } else if (valueType == Angle.class) {
             return AngleFormat.getInstance(locale);
+        } else if (valueType == Unit.class) {
+            return UnitFormat.getInstance(locale);
+        } else if (valueType == Range.class) {
+            return new RangeFormat(locale);
         } else if (valueType == Class.class) {
             return ClassFormat.INSTANCE;
         }

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/io/TableAppender.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/io/TableAppender.java?rev=1576972&r1=1576971&r2=1576972&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/io/TableAppender.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/io/TableAppender.java [UTF-8] Wed Mar 12 22:44:18 2014
@@ -526,6 +526,14 @@ public class TableAppender extends Appen
     /**
      * Writes an horizontal separator.
      */
+    public void appendHorizontalSeparator() {
+        writeHorizontalSeparator();
+    }
+
+    /**
+     * @deprecated Renamed {@link #appendHorizontalSeparator()}.
+     */
+    @Deprecated
     public void writeHorizontalSeparator() {
         if (currentColumn != 0 || buffer.length() != 0) {
             nextLine();

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/io/TabularFormat.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/io/TabularFormat.java?rev=1576972&r1=1576971&r2=1576972&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/io/TabularFormat.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/io/TabularFormat.java [UTF-8] Wed Mar 12 22:44:18 2014
@@ -40,15 +40,13 @@ import org.apache.sis.internal.jdk7.JDK7
  *   <li>{@link #setColumnSeparatorPattern(String)}</li>
  * </ul>
  *
- * For implementors, this base class takes care of splitting a column separator pattern into
- * its components ({@link #beforeFill}, {@link #fillCharacter} and {@link #columnSeparator})
- * for easier usage in {@code format(…)} method implementations. Subclasses can use those fields
- * like below:
+ * {@section Note for subclass implementions}
+ * This base class takes care of splitting a column separator pattern into its components
+ * ({@link #beforeFill}, {@link #fillCharacter} and {@link #columnSeparator})
+ * for easier usage in {@code format(…)} method implementations.
+ * Subclasses can use those fields like below:
  *
- * <table class="sis"><tr>
- *   <th>Table with no border</th>
- *   <th>Table with a border</th>
- * </tr><tr><td>
+ * <p><b>Formatting table without border:</b></p>
  * {@preformat java
  *     TableAppender table = new TableAppender(out, "");
  *     // ... do some work, then add a column separator:
@@ -56,14 +54,14 @@ import org.apache.sis.internal.jdk7.JDK7
  *     table.nextColumn(fillCharacter);
  *     table.append(columnSeparator);
  * }
- * </td><td>
+ *
+ * <p><b>Formatting table with a border:</b></p>
  * {@preformat java
  *     TableAppender table = new TableAppender(out, columnSeparator);
  *     // ... do some work, then add a column separator:
  *     table.append(beforeFill);
  *     table.nextColumn(fillCharacter);
  * }
- * </td></tr></table>
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
@@ -101,7 +99,7 @@ public abstract class TabularFormat<T> e
      * This is the character between the "{@code [ ]}" pair of brackets in the pattern given
      * to the {@link #setColumnSeparatorPattern(String)} method.
      *
-     * Subclasses will typically use this value in calls to {@link TableAppender#nextColumn(char)}.
+     * <p>Subclasses will typically use this value in calls to {@link TableAppender#nextColumn(char)}.</p>
      */
     protected char fillCharacter;
 
@@ -217,14 +215,15 @@ public abstract class TabularFormat<T> e
      *   <li>The repeated character (specified inside the pair of brackets) is mandatory.</li>
      *   <li>In the current implementation, the repeated character must be in the
      *       {@linkplain Character#isBmpCodePoint(int) Basic Multilanguage Plane}.</li>
-     *   <li>If {@code '/'} is present, anything on its right must be compliant
+     *   <li>If {@code '/'} is present, anything on its right side shall be compliant
      *       with the {@link Pattern} syntax.</li>
      * </ul>
      *
-     * {@section Example}
+     * <div class="note"><b>Example:</b>
      * The {@code "?……[…] "} pattern means "<cite>If the next value is non-null, then insert the
      * {@code "……"} string, repeat the {@code '…'} character as many time as needed (may be zero),
      * then insert a space</cite>".
+     * </div>
      *
      * @param  pattern The pattern of the new column separator.
      * @throws IllegalArgumentException If the given pattern is illegal.

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/math/StatisticsFormat.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/math/StatisticsFormat.java?rev=1576972&r1=1576971&r2=1576972&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/math/StatisticsFormat.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/math/StatisticsFormat.java [UTF-8] Wed Mar 12 22:44:18 2014
@@ -121,12 +121,12 @@ public class StatisticsFormat extends Ta
     }
 
     /**
-     * Returns the kind of objects formatted by this class.
+     * Returns the type of objects formatted by this class.
      *
      * @return {@code Statistics.class}
      */
     @Override
-    public Class<Statistics> getValueType() {
+    public final Class<Statistics> getValueType() {
         return Statistics.class;
     }
 
@@ -229,7 +229,7 @@ public class StatisticsFormat extends Ta
      *
      * @param  stats       The statistics to format.
      * @param  toAppendTo  Where to format the statistics.
-     * @throws IOException If an error occurred while writing in the given appender.
+     * @throws IOException If an error occurred while writing to the given appendable.
      */
     @Override
     public void format(Statistics stats, final Appendable toAppendTo) throws IOException {
@@ -248,7 +248,7 @@ public class StatisticsFormat extends Ta
      *
      * @param  stats       The statistics to format.
      * @param  toAppendTo  Where to format the statistics.
-     * @throws IOException If an error occurred while writing in the given appender.
+     * @throws IOException If an error occurred while writing to the given appendable.
      */
     public void format(final Statistics[] stats, final Appendable toAppendTo) throws IOException {
         /*

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/measure/MeasurementRange.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/measure/MeasurementRange.java?rev=1576972&r1=1576971&r2=1576972&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/measure/MeasurementRange.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/measure/MeasurementRange.java [UTF-8] Wed Mar 12 22:44:18 2014
@@ -231,6 +231,8 @@ public class MeasurementRange<E extends 
 
     /**
      * {@inheritDoc}
+     *
+     * @return {@inheritDoc}
      */
     @Override
     @SuppressWarnings("unchecked")
@@ -343,6 +345,7 @@ public class MeasurementRange<E extends 
      * the value of the other range to the unit of measurement of this range before to perform
      * the operation.
      *
+     * @return {@inheritDoc}
      * @throws IllegalArgumentException is the given range is an instance of
      *         {@code MeasurementRange} using incommensurable unit of measurement.
      */
@@ -357,6 +360,7 @@ public class MeasurementRange<E extends 
      * the value of the other range to the unit of measurement of this range before to perform
      * the operation.
      *
+     * @return {@inheritDoc}
      * @throws IllegalArgumentException is the given range is an instance of
      *         {@code MeasurementRange} using incommensurable unit of measurement.
      */
@@ -371,6 +375,7 @@ public class MeasurementRange<E extends 
      * the value of the other range to the unit of measurement of this range before to perform
      * the operation.
      *
+     * @return {@inheritDoc}
      * @throws IllegalArgumentException is the given range is an instance of
      *         {@code MeasurementRange} using incommensurable unit of measurement.
      */
@@ -385,6 +390,7 @@ public class MeasurementRange<E extends 
      * the value of the other range to the unit of measurement of this range before to perform
      * the operation.
      *
+     * @return {@inheritDoc}
      * @throws IllegalArgumentException is the given range is an instance of
      *         {@code MeasurementRange} using incommensurable unit of measurement.
      */
@@ -399,6 +405,7 @@ public class MeasurementRange<E extends 
      * the value of the other range to the unit of measurement of this range before to perform
      * the operation.
      *
+     * @return {@inheritDoc}
      * @throws IllegalArgumentException is the given range is an instance of
      *         {@code MeasurementRange} using incommensurable unit of measurement.
      */
@@ -409,15 +416,21 @@ public class MeasurementRange<E extends 
 
     /**
      * Compares this range with the specified object for equality.
+     *
+     * @return {@inheritDoc}
      */
     @Override
     public boolean equals(final Object object) {
-        if (super.equals(object)) {
-            if (object instanceof MeasurementRange<?>) {
-                return Objects.equals(unit, ((MeasurementRange<?>) object).unit);
-            }
-            return true;
-        }
-        return false;
+        return super.equals(object) && Objects.equals(unit, ((MeasurementRange<?>) object).unit);
+    }
+
+    /**
+     * Returns a hash code value for this measurement range.
+     *
+     * @return {@inheritDoc}
+     */
+    @Override
+    public int hashCode() {
+        return super.hashCode() + Objects.hashCode(unit);
     }
 }

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/measure/Range.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/measure/Range.java?rev=1576972&r1=1576971&r2=1576972&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/measure/Range.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/measure/Range.java [UTF-8] Wed Mar 12 22:44:18 2014
@@ -126,12 +126,17 @@ public class Range<E extends Comparable<
         isMinIncluded = range.isMinIncluded;
         maxValue      = range.maxValue;
         isMaxIncluded = range.isMaxIncluded;
-        assert validate();
+        assert validate() : elementType;
     }
 
     /**
      * Creates a new range bounded by the given endpoint values.
      *
+     * <div class="note"><b>Assertion:</b>
+     * This constructor verifies the {@code minValue} and {@code maxValue} arguments type if Java assertions
+     * are enabled. This verification is not performed in normal execution because theoretically unnecessary
+     * unless Java generic types have been tricked.</div>
+     *
      * @param elementType    The base type of the range elements.
      * @param minValue       The minimal value, or {@code null} if none.
      * @param isMinIncluded  {@code true} if the minimal value is inclusive, or {@code false} if exclusive.
@@ -152,7 +157,7 @@ public class Range<E extends Comparable<
         this.isMinIncluded = isMinIncluded && (minValue != null);
         this.maxValue      = maxValue;
         this.isMaxIncluded = isMaxIncluded && (maxValue != null);
-        assert validate();
+        assert validate() : elementType;
     }
 
     /**
@@ -659,6 +664,8 @@ public class Range<E extends Comparable<
         }
         final Unit<?> unit = unit();
         if (unit != null) {
+            // No need to check if we should omit the space because Unit.toString()
+            // uses UCUM format, so we will never have symbol like the ° one.
             buffer.append(' ').append(unit);
         }
         return buffer.toString();

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/measure/RangeFormat.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/measure/RangeFormat.java?rev=1576972&r1=1576971&r2=1576972&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/measure/RangeFormat.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/measure/RangeFormat.java [UTF-8] Wed Mar 12 22:44:18 2014
@@ -16,6 +16,8 @@
  */
 package org.apache.sis.measure;
 
+import java.util.Map;
+import java.util.HashMap;
 import java.util.Date;
 import java.util.Locale;
 import java.util.TimeZone;
@@ -89,7 +91,7 @@ import org.apache.sis.util.resources.Err
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3 (derived from geotk-3.06)
- * @version 0.3
+ * @version 0.4
  * @module
  *
  * @see Range#toString()
@@ -289,6 +291,13 @@ public class RangeFormat extends Format 
     protected final UnitFormat unitFormat;
 
     /**
+     * Whether we should insert a space between the bracket and the unit symbol.
+     *
+     * @see #insertSpaceBeforeUnit(Unit)
+     */
+    private transient Map<Unit<?>,Boolean> insertSpaceBeforeUnit;
+
+    /**
      * Creates a new format for parsing and formatting {@linkplain NumberRange number ranges}
      * using the {@linkplain Locale#getDefault() default locale}.
      */
@@ -461,6 +470,23 @@ public class RangeFormat extends Format 
     }
 
     /**
+     * Returns whether we should insert a space between the bracket and the unit symbol.
+     * We cache the result because checking for this condition forces us to format the unit symbol twice.
+     */
+    private boolean insertSpaceBeforeUnit(final Unit<?> unit) {
+        if (insertSpaceBeforeUnit == null) {
+            insertSpaceBeforeUnit = new HashMap<Unit<?>,Boolean>();
+        }
+        Boolean value = insertSpaceBeforeUnit.get(unit);
+        if (value == null) {
+            final String symbol = unitFormat.format(unit);
+            value = !symbol.isEmpty() && Character.isLetterOrDigit(symbol.codePointAt(0));
+            insertSpaceBeforeUnit.put(unit, value);
+        }
+        return value;
+    }
+
+    /**
      * Returns the {@code *_FIELD} constant for the given field position, or -1 if none.
      */
     private static int getField(final FieldPosition position) {
@@ -574,7 +600,9 @@ public class RangeFormat extends Format 
             } else {
                 final Format format;
                 if (field == UNIT_FIELD) {
-                    startPosition = toAppendTo.append(' ').length();
+                    if (insertSpaceBeforeUnit((Unit) value)) {
+                        startPosition = toAppendTo.append(' ').length();
+                    }
                     format = unitFormat;
                 } else {
                     format = elementFormat;

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/Classes.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/Classes.java?rev=1576972&r1=1576971&r2=1576972&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/Classes.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/Classes.java [UTF-8] Wed Mar 12 22:44:18 2014
@@ -321,8 +321,7 @@ public final class Classes extends Stati
      */
     private static Set<Class<?>> getInterfaceSet(final Class<?> type, Set<Class<?>> addTo) {
         final Class<?>[] interfaces = type.getInterfaces();
-        for (int i=0; i<interfaces.length; i++) {
-            final Class<?> candidate = interfaces[i];
+        for (final Class<?> candidate : interfaces) {
             if (addTo == null) {
                 addTo = new LinkedHashSet<Class<?>>(hashMapCapacity(interfaces.length));
             }

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTableFormat.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTableFormat.java?rev=1576972&r1=1576971&r2=1576972&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTableFormat.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTableFormat.java [UTF-8] Wed Mar 12 22:44:18 2014
@@ -189,9 +189,9 @@ public class TreeTableFormat extends Tab
     }
 
     /**
-     * Returns the type of object formatted by this class, which is {@link TreeTable}.
+     * Returns the type of objects formatted by this class.
      *
-     * @return {@inheritDoc}
+     * @return {@code TreeTable.class}
      */
     @Override
     public final Class<TreeTable> getValueType() {
@@ -593,7 +593,7 @@ public class TreeTableFormat extends Tab
         private final Map<Object,Object> parentObjects;
 
         /**
-         * Creates a new instance which will write in the given appendable.
+         * Creates a new instance which will write to the given appendable.
          *
          * @param out           Where to format the tree.
          * @param column        The columns of the tree table to format.
@@ -731,7 +731,7 @@ public class TreeTableFormat extends Tab
      *
      * @param  tree        The tree to format.
      * @param  toAppendTo  Where to format the tree.
-     * @throws IOException If an error occurred while writing in the given appender.
+     * @throws IOException If an error occurred while writing to the given appendable.
      *
      * @see TreeTables#toString(TreeTable)
      */

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/AbstractName.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/AbstractName.java?rev=1576972&r1=1576971&r2=1576972&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/AbstractName.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/AbstractName.java [UTF-8] Wed Mar 12 22:44:18 2014
@@ -94,7 +94,7 @@ public abstract class AbstractName imple
 
     /**
      * Returns a SIS name implementation with the values of the given arbitrary implementation.
-     * This method performs the first applicable actions in the following choices:
+     * This method performs the first applicable action in the following choices:
      *
      * <ul>
      *   <li>If the given object is {@code null}, then this method returns {@code null}.</li>

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultLocalName.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultLocalName.java?rev=1576972&r1=1576971&r2=1576972&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultLocalName.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultLocalName.java [UTF-8] Wed Mar 12 22:44:18 2014
@@ -146,7 +146,7 @@ public class DefaultLocalName extends Ab
 
     /**
      * Returns a SIS local name implementation with the values of the given arbitrary implementation.
-     * This method performs the first applicable actions in the following choices:
+     * This method performs the first applicable action in the following choices:
      *
      * <ul>
      *   <li>If the given object is {@code null}, then this method returns {@code null}.</li>

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultNameFactory.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultNameFactory.java?rev=1576972&r1=1576971&r2=1576972&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultNameFactory.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultNameFactory.java [UTF-8] Wed Mar 12 22:44:18 2014
@@ -245,8 +245,7 @@ public class DefaultNameFactory extends 
     /**
      * Constructs a generic name from a qualified name.
      * This method splits the given name around a separator inferred from the given scope, or the
-     * {@value org.apache.sis.util.iso.DefaultNameSpace#DEFAULT_SEPARATOR} separator if the given
-     * scope is null.
+     * {@link DefaultNameSpace#DEFAULT_SEPARATOR ':'} separator if the given scope is null.
      *
      * @param  scope The {@linkplain AbstractName#scope() scope} of the generic name to
      *         be created, or {@code null} for a global namespace.

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultNameSpace.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultNameSpace.java?rev=1576972&r1=1576971&r2=1576972&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultNameSpace.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultNameSpace.java [UTF-8] Wed Mar 12 22:44:18 2014
@@ -21,7 +21,6 @@ import java.util.List;
 import java.util.ListIterator;
 import java.util.Locale;
 import java.io.Serializable;
-import java.io.ObjectStreamException;
 import org.opengis.util.NameSpace;
 import org.opengis.util.LocalName;
 import org.opengis.util.ScopedName;
@@ -64,8 +63,8 @@ public class DefaultNameSpace implements
     private static final long serialVersionUID = 8272640747799127007L;
 
     /**
-     * The default separator, which is {@value}. The separator is inserted between the
-     * namespace and any {@linkplain GenericName generic name} in that namespace.
+     * The default separator, which is {@code ':'}. The separator is inserted between
+     * the namespace and any {@linkplain GenericName generic name} in that namespace.
      */
     public static final char DEFAULT_SEPARATOR = ':';
 

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecordType.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecordType.java?rev=1576972&r1=1576971&r2=1576972&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecordType.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecordType.java [UTF-8] Wed Mar 12 22:44:18 2014
@@ -134,7 +134,7 @@ public class DefaultRecordType implement
 
     /**
      * Returns a SIS implementation with the name and members of the given arbitrary implementation.
-     * This method performs the first applicable actions in the following choices:
+     * This method performs the first applicable action in the following choices:
      *
      * <ul>
      *   <li>If the given object is {@code null}, then this method returns {@code null}.</li>

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=1576972&r1=1576971&r2=1576972&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] Wed Mar 12 22:44:18 2014
@@ -713,10 +713,9 @@ public final class Types extends Static 
      * <ul>
      *   <li>{@link GenericName}, to be casted and returned as-is.</li>
      *   <li>{@link CharSequence} (usually a {@link String} or an {@link InternationalString}),
-     *       to be parsed as a generic name using the
-     *       {@value org.apache.sis.util.iso.DefaultNameSpace#DEFAULT_SEPARATOR} separator.</li>
+     *       to be parsed as a generic name using the {@link DefaultNameSpace#DEFAULT_SEPARATOR ':'} separator.</li>
      *   <li>{@link Identifier}, its {@linkplain Identifier#getCode() code} to be parsed as a generic name
-     *       using the {@value org.apache.sis.util.iso.DefaultNameSpace#DEFAULT_SEPARATOR} separator.</li>
+     *       using the {@link DefaultNameSpace#DEFAULT_SEPARATOR ':'} separator.</li>
      * </ul>
      *
      * If {@code value} is an array or a collection containing {@code null} elements,

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/logging/WarningListeners.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/logging/WarningListeners.java?rev=1576972&r1=1576971&r2=1576972&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/logging/WarningListeners.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/logging/WarningListeners.java [UTF-8] Wed Mar 12 22:44:18 2014
@@ -257,7 +257,7 @@ public class WarningListeners<S> impleme
                 }
             }
         }
-        throw new NoSuchElementException(Errors.format(Errors.Keys.NoSuchElement_1, listener));
+        throw new NoSuchElementException(Errors.format(Errors.Keys.ElementNotFound_1, listener));
     }
 
     /**

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=1576972&r1=1576971&r2=1576972&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] Wed Mar 12 22:44:18 2014
@@ -64,6 +64,11 @@ public final class Errors extends Indexe
         }
 
         /**
+         * Name “{2}” is ambiguous because it can be understood as either “{0}” or “{1}”.
+         */
+        public static final short AmbiguousName_3 = 151;
+
+        /**
          * No element can be added to this set because properties ‘{0}’ and ‘{1}’ are mutually
          * exclusive.
          */
@@ -165,11 +170,21 @@ public final class Errors extends Indexe
         public static final short DuplicatedOption_1 = 18;
 
         /**
+         * Name or alias for parameter “{0}” at index {1} conflict with name “{2}” at index {3}.
+         */
+        public static final short DuplicatedParameterName_4 = 150;
+
+        /**
          * Element “{0}” is already present.
          */
         public static final short ElementAlreadyPresent_1 = 19;
 
         /**
+         * Element “{0}” has not been found.
+         */
+        public static final short ElementNotFound_1 = 70;
+
+        /**
          * Argument ‘{0}’ shall not be empty.
          */
         public static final short EmptyArgument_1 = 20;
@@ -398,6 +413,11 @@ public final class Errors extends Indexe
         public static final short MismatchedMatrixSize_4 = 60;
 
         /**
+         * Mismatched descriptor for “{0}” parameter.
+         */
+        public static final short MismatchedParameterDescriptor_1 = 146;
+
+        /**
          * No authority was specified for code “{0}”. The expected syntax is “AUTHORITY:CODE”.
          */
         public static final short MissingAuthority_1 = 135;
@@ -458,16 +478,6 @@ public final class Errors extends Indexe
         public static final short NoSuchAuthorityCode_3 = 137;
 
         /**
-         * Element “{0}” has not been found.
-         */
-        public static final short NoSuchElement_1 = 70;
-
-        /**
-         * No property named “{0}” has been found in “{1}”.
-         */
-        public static final short NoSuchProperty_2 = 71;
-
-        /**
          * No unit of measurement has been specified.
          */
         public static final short NoUnit = 72;
@@ -608,6 +618,16 @@ public final class Errors extends Indexe
         public static final short OddArrayLength_1 = 98;
 
         /**
+         * No parameter named “{1}” has been found in “{0}”.
+         */
+        public static final short ParameterNotFound_2 = 147;
+
+        /**
+         * No property named “{1}” has been found in “{0}”.
+         */
+        public static final short PropertyNotFound_2 = 71;
+
+        /**
          * Recursive call while creating an object for the “{0}” key.
          */
         public static final short RecursiveCreateCallForKey_1 = 99;
@@ -638,11 +658,21 @@ public final class Errors extends Indexe
         public static final short TooFewArguments_2 = 104;
 
         /**
+         * Too few occurrences of “{1}”. Expected at least {0} of them.
+         */
+        public static final short TooFewOccurrences_2 = 148;
+
+        /**
          * Expected at most {0} argument{0,choice,1#|2#s}, but got {1}.
          */
         public static final short TooManyArguments_2 = 105;
 
         /**
+         * Too many occurrences of “{1}”. There is already {0} of them.
+         */
+        public static final short TooManyOccurrences_2 = 149;
+
+        /**
          * Tree depth exceeds the maximum.
          */
         public static final short TreeDepthExceedsMaximum = 145;
@@ -788,12 +818,12 @@ public final class Errors extends Indexe
         public static final short ValueAlreadyDefined_1 = 131;
 
         /**
-         * Value ‘{0}’={1} is invalid. Expected a number greater than 0.
+         * Value ‘{0}’ = {1} is invalid. Expected a number greater than 0.
          */
         public static final short ValueNotGreaterThanZero_2 = 132;
 
         /**
-         * Value ‘{0}’={3} is invalid. Expected a value in the [{1} … {2}] range.
+         * Value ‘{0}’ = {3} is invalid. Expected a value in the [{1} … {2}] range.
          */
         public static final short ValueOutOfRange_4 = 133;
     }



Mime
View raw message