sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1629471 [1/3] - in /sis/branches/JDK6: ./ core/sis-feature/ core/sis-feature/src/main/java/org/apache/sis/feature/ core/sis-feature/src/test/java/org/apache/sis/feature/ core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata...
Date Sun, 05 Oct 2014 06:19:23 GMT
Author: desruisseaux
Date: Sun Oct  5 06:19:21 2014
New Revision: 1629471

URL: http://svn.apache.org/r1629471
Log:
Merge from the JDK7 branch. This merge is about the retrofitting
of ReferencingIdentifier into the Identifier parent type.

Added:
    sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleIdentifier.java
      - copied, changed from r1629470, sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleIdentifier.java
    sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/internal/simple/SimpleIdentifierTest.java
      - copied unchanged from r1629470, sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/internal/simple/SimpleIdentifierTest.java
Removed:
    sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleReferenceIdentifier.java
    sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/internal/simple/SimpleReferenceIdentifierTest.java
Modified:
    sis/branches/JDK6/   (props changed)
    sis/branches/JDK6/core/sis-feature/pom.xml
    sis/branches/JDK6/core/sis-feature/src/main/java/org/apache/sis/feature/DenseFeature.java   (contents, props changed)
    sis/branches/JDK6/core/sis-feature/src/test/java/org/apache/sis/feature/DefaultAttributeTypeTest.java
    sis/branches/JDK6/core/sis-feature/src/test/java/org/apache/sis/feature/FeatureTestCase.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Identifier.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/RS_Identifier.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ReferenceSystemMetadata.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ServiceParameter.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/NameToIdentifier.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyInformation.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultSource.java
    sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyAccessorTest.java
    sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeTableFormatTest.java
    sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/ImmutableIdentifierTest.java
    sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/xml/AnchorMarshallingTest.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/Code.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/RS_Identifier.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/NilReferencingObject.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptor.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterBuilder.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterFormat.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterTableRow.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterValueList.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/TensorParameters.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractReferenceSystem.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/Builder.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/IdentifiedObjects.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/NameIterator.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/NamedIdentifier.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/Properties.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultCompoundCRS.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultEngineeringCRS.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeocentricCRS.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeographicCRS.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultImageCRS.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultTemporalCRS.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultVerticalCRS.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultAffineCS.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCartesianCS.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCompoundCS.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCylindricalCS.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCS.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultLinearCS.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultPolarCS.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultSphericalCS.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultTimeCS.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultUserDefinedCS.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultVerticalCS.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/AbstractDatum.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEngineeringDatum.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultImageDatum.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultVerticalDatum.java
    sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/internal/jaxb/referencing/CodeTest.java
    sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParametersTest.java
    sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/AbstractIdentifiedObjectTest.java
    sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/BuilderTest.java
    sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticObjectVerifier.java
    sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/NamedIdentifierTest.java
    sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultGeographicCRSTest.java
    sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapEntry.java
    sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/SpecializedIdentifier.java
    sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/simple/SimpleIdentifiedObject.java
    sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/util/DefinitionURI.java
    sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/io/IdentifiedObjectFormat.java
    sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecord.java
    sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/internal/util/DefinitionURITest.java
    sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/test/mock/IdentifiedObjectMock.java
    sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java
    sis/branches/JDK6/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/DirectReferenceSystem.java
    sis/branches/JDK6/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/IndirectReferenceSystem.java
    sis/branches/JDK6/storage/sis-shapefile/src/main/java/org/apache/sis/storage/shapefile/FieldDescriptor.java
    sis/branches/JDK6/storage/sis-shapefile/src/main/java/org/apache/sis/storage/shapefile/ShapeFile.java

Propchange: sis/branches/JDK6/
------------------------------------------------------------------------------
  Merged /sis/branches/JDK8:r1627891-1629469
  Merged /sis/branches/JDK7:r1627894-1629470

Modified: sis/branches/JDK6/core/sis-feature/pom.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-feature/pom.xml?rev=1629471&r1=1629470&r2=1629471&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-feature/pom.xml (original)
+++ sis/branches/JDK6/core/sis-feature/pom.xml Sun Oct  5 06:19:21 2014
@@ -58,7 +58,26 @@ Representations of geographic features.
         <role>developer</role>
       </roles>
     </developer>
+    <developer>
+      <name>Martin Desruisseaux</name>
+      <id>desruisseaux</id>
+      <email>desruisseaux@apache.org</email>
+      <organization>Geomatys</organization>
+      <organizationUrl>http://www.geomatys.com</organizationUrl>
+      <timezone>+1</timezone>
+      <roles>
+        <role>developer</role>
+      </roles>
+    </developer>
   </developers>
+  <contributors>
+    <contributor>
+      <name>Marc le Bihan</name>
+      <roles>
+        <role>developer</role>
+      </roles>
+    </contributor>
+  </contributors>
 
 
   <!-- ===========================================================

Modified: sis/branches/JDK6/core/sis-feature/src/main/java/org/apache/sis/feature/DenseFeature.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-feature/src/main/java/org/apache/sis/feature/DenseFeature.java?rev=1629471&r1=1629470&r2=1629471&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-feature/src/main/java/org/apache/sis/feature/DenseFeature.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-feature/src/main/java/org/apache/sis/feature/DenseFeature.java [UTF-8] Sun Oct  5 06:19:21 2014
@@ -36,6 +36,7 @@ import org.opengis.feature.FeatureAssoci
  * all (or almost all) elements in the array will be assigned a value.
  *
  * @author  Martin Desruisseaux (Geomatys)
+ * @author  Marc le Bihan
  * @since   0.5
  * @version 0.5
  * @module
@@ -101,17 +102,21 @@ final class DenseFeature extends Abstrac
     @Override
     public Property getProperty(final String name) throws IllegalArgumentException {
         ArgumentChecks.ensureNonNull("name", name);
-        final int index = getIndex(name);
-        if (properties instanceof Property[]) {
-            final Property property = ((Property[]) properties)[index];
-            if (property != null) {
-                return property;
-            }
-        } else {
+        final int index = getIndex(name); // Invoked first because this method checks name validity.
+
+        // Are the properties currently initialized? If not, wrap the values we can find.
+        if (!(properties instanceof Property[])) {
             wrapValuesInProperties();
         }
-        final Property property = createProperty(name);
-        properties[index] = property;
+
+        // Find the wanted property.
+        Property property = ((Property[]) properties)[index];
+
+        // If the property still have a null value, we create it, but we can only tell its type.
+        if (property == null) {
+            property = createProperty(name);
+            properties[index] = property;
+        }
         return property;
     }
 

Propchange: sis/branches/JDK6/core/sis-feature/src/main/java/org/apache/sis/feature/DenseFeature.java
            ('svn:mergeinfo' removed)

Modified: sis/branches/JDK6/core/sis-feature/src/test/java/org/apache/sis/feature/DefaultAttributeTypeTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-feature/src/test/java/org/apache/sis/feature/DefaultAttributeTypeTest.java?rev=1629471&r1=1629470&r2=1629471&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-feature/src/test/java/org/apache/sis/feature/DefaultAttributeTypeTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-feature/src/test/java/org/apache/sis/feature/DefaultAttributeTypeTest.java [UTF-8] Sun Oct  5 06:19:21 2014
@@ -91,9 +91,7 @@ public final strictfp class DefaultAttri
      * @return An attribute type for the name of the parliament in a capital.
      */
     public static DefaultAttributeType<String> parliament() {
-        return new DefaultAttributeType<String>(
-                singletonMap(DefaultAttributeType.NAME_KEY, "parliament"),
-                String.class, 1, 1, null);
+        return attribute("parliament");
     }
 
     /**
@@ -109,6 +107,15 @@ public final strictfp class DefaultAttri
     }
 
     /**
+     * Creates a mandatory attribute type of type {@link String}.
+     * This is the kind of attribute created by the ShapeFile reader.
+     */
+    static DefaultAttributeType<String> attribute(final String name) {
+        return new DefaultAttributeType<String>(singletonMap(DefaultAttributeType.NAME_KEY, name),
+                String.class, 1, 1, null);
+    }
+
+    /**
      * Tests the creation of a simple {@link DefaultAttributeType} instance for a mandatory singleton.
      */
     @Test

Modified: sis/branches/JDK6/core/sis-feature/src/test/java/org/apache/sis/feature/FeatureTestCase.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-feature/src/test/java/org/apache/sis/feature/FeatureTestCase.java?rev=1629471&r1=1629470&r2=1629471&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-feature/src/test/java/org/apache/sis/feature/FeatureTestCase.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-feature/src/test/java/org/apache/sis/feature/FeatureTestCase.java [UTF-8] Sun Oct  5 06:19:21 2014
@@ -36,6 +36,7 @@ import static org.apache.sis.test.Assert
  * Tests common to {@link DenseFeatureTest} and {@link SparseFeatureTest}.
  *
  * @author  Martin Desruisseaux (Geomatys)
+ * @author  Marc le Bihan
  * @since   0.5
  * @version 0.5
  * @module
@@ -129,11 +130,44 @@ public abstract strictfp class FeatureTe
     }
 
     /**
+     * Tests the {@link AbstractFeature#getProperty(String)} method. This test uses a very simple and
+     * straightforward {@code FeatureType} similar to the ones obtained when reading a ShapeFile.
+     *
+     * <div class="note">In a previous SIS version, the first property value was always {@code null}
+     * if the implementation was {@link DenseFeature} (see SIS-178). This test reproduced the bug,
+     * and now aim to avoid regression.</div>
+     *
+     * @see <a href="https://issues.apache.org/jira/browse/SIS-178">SIS-178</a>
+     */
+    @Test
+    public void testGetProperty() {
+        final DefaultFeatureType type = new DefaultFeatureType(
+                Collections.singletonMap(DefaultFeatureType.NAME_KEY, "My shapefile"), false, (DefaultFeatureType[]) null,
+                DefaultAttributeTypeTest.attribute("COMMUNE"),
+                DefaultAttributeTypeTest.attribute("REF_INSEE"),
+                DefaultAttributeTypeTest.attribute("CODE_POSTAL"));
+
+        feature = createFeature(type);
+        feature.setPropertyValue("COMMUNE",     "Bagneux");
+        feature.setPropertyValue("REF_INSEE",   "92007");
+        feature.setPropertyValue("CODE_POSTAL", "92220");
+
+        assertEquals("CODE_POSTAL", "92220",   feature.getProperty("CODE_POSTAL").getValue());
+        assertEquals("REF_INSEE",   "92007",   feature.getProperty("REF_INSEE")  .getValue());
+        assertEquals("COMMUNE",     "Bagneux", feature.getProperty("COMMUNE")    .getValue());
+
+        assertEquals("CODE_POSTAL", "92220",   feature.getPropertyValue("CODE_POSTAL"));
+        assertEquals("REF_INSEE",   "92007",   feature.getPropertyValue("REF_INSEE"));
+        assertEquals("COMMUNE",     "Bagneux", feature.getPropertyValue("COMMUNE"));
+    }
+
+    /**
      * Tests the {@link AbstractFeature#getPropertyValue(String)} method on a simple feature without super-types.
      * This method also tests that attempts to set a value of the wrong type throw an exception and leave the
      * previous value unchanged, that the feature is cloneable and that serialization works.
      */
     @Test
+    @DependsOnMethod("testGetProperty")
     public void testSimpleValues() {
         feature = createFeature(DefaultFeatureTypeTest.city());
         setAttributeValue("city", "Utopia", "Atlantide");

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Identifier.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Identifier.java?rev=1629471&r1=1629470&r2=1629471&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Identifier.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Identifier.java [UTF-8] Sun Oct  5 06:19:21 2014
@@ -18,10 +18,8 @@ package org.apache.sis.internal.jaxb.met
 
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlElementRef;
-
 import org.opengis.metadata.Identifier;
 import org.opengis.referencing.ReferenceIdentifier;
-
 import org.apache.sis.metadata.iso.DefaultIdentifier;
 import org.apache.sis.metadata.iso.ImmutableIdentifier;
 import org.apache.sis.internal.jaxb.gco.PropertyType;
@@ -34,7 +32,7 @@ import org.apache.sis.internal.jaxb.gco.
  * @author  Cédric Briançon (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3 (derived from geotk-2.5)
- * @version 0.3
+ * @version 0.5
  * @module
  */
 public final class MD_Identifier extends PropertyType<MD_Identifier, Identifier> {
@@ -76,6 +74,14 @@ public final class MD_Identifier extends
     }
 
     /**
+     * Returns {@code true} if the identifier should be marshalled as a
+     * {@code RS_Identifier} instead than {@code MD_Identifier}.
+     */
+    private boolean isRS() {
+        return (metadata instanceof ReferenceIdentifier) || (metadata instanceof ImmutableIdentifier);
+    }
+
+    /**
      * Invoked by JAXB at marshalling time for getting the actual metadata to write
      * inside the {@code <gmd:MD_Identifier>} XML element.
      * This is the value or a copy of the value given in argument to the {@code wrap} method.
@@ -84,11 +90,7 @@ public final class MD_Identifier extends
      */
     @XmlElementRef
     public DefaultIdentifier getElement() {
-        final Identifier metadata = this.metadata;
-        if (metadata instanceof ReferenceIdentifier) {
-            return null;
-        }
-        return DefaultIdentifier.castOrCopy(metadata);
+        return isRS() ? null : DefaultIdentifier.castOrCopy(metadata);
     }
 
     /**
@@ -109,11 +111,7 @@ public final class MD_Identifier extends
      */
     @XmlElement(name = "RS_Identifier")
     public ImmutableIdentifier getReferenceIdentifier() {
-        final Identifier metadata = this.metadata;
-        if (metadata instanceof ReferenceIdentifier) {
-            return ImmutableIdentifier.castOrCopy((ReferenceIdentifier) metadata);
-        }
-        return null;
+        return isRS() ? ImmutableIdentifier.castOrCopy(metadata) : null;
     }
 
     /**

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/RS_Identifier.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/RS_Identifier.java?rev=1629471&r1=1629470&r2=1629471&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/RS_Identifier.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/RS_Identifier.java [UTF-8] Sun Oct  5 06:19:21 2014
@@ -17,13 +17,13 @@
 package org.apache.sis.internal.jaxb.metadata;
 
 import javax.xml.bind.annotation.XmlElementRef;
-import org.opengis.referencing.ReferenceIdentifier;
+import org.opengis.metadata.Identifier;
 import org.apache.sis.metadata.iso.ImmutableIdentifier;
 import org.apache.sis.internal.jaxb.gco.PropertyType;
 
 
 /**
- * JAXB adapter mapping the GeoAPI {@link ReferenceIdentifier} to an implementation class that can
+ * JAXB adapter mapping the GeoAPI {@link Identifier} to an implementation class that can
  * be marshalled. See the package documentation for more information about JAXB and interfaces.
  *
  * <p>The XML produced by this adapter shall be compliant to the ISO 19139 syntax.</p>
@@ -37,7 +37,7 @@ import org.apache.sis.internal.jaxb.gco.
  * @version 0.3
  * @module
  */
-public final class RS_Identifier extends PropertyType<RS_Identifier, ReferenceIdentifier> {
+public final class RS_Identifier extends PropertyType<RS_Identifier, Identifier> {
     /**
      * Empty constructor for JAXB only.
      */
@@ -49,17 +49,17 @@ public final class RS_Identifier extends
      * This method is indirectly invoked by the private constructor
      * below, so it shall not depend on the state of this object.
      *
-     * @return {@code ReferenceIdentifier.class}
+     * @return {@code Identifier.class}
      */
     @Override
-    protected Class<ReferenceIdentifier> getBoundType() {
-        return ReferenceIdentifier.class;
+    protected Class<Identifier> getBoundType() {
+        return Identifier.class;
     }
 
     /**
      * Constructor for the {@link #wrap} method only.
      */
-    private RS_Identifier(final ReferenceIdentifier metadata) {
+    private RS_Identifier(final Identifier metadata) {
         super(metadata);
     }
 
@@ -71,7 +71,7 @@ public final class RS_Identifier extends
      * @return A {@code PropertyType} wrapping the given the metadata element.
      */
     @Override
-    protected RS_Identifier wrap(ReferenceIdentifier metadata) {
+    protected RS_Identifier wrap(Identifier metadata) {
         return new RS_Identifier(metadata);
     }
 
@@ -84,7 +84,7 @@ public final class RS_Identifier extends
      */
     @XmlElementRef
     public ImmutableIdentifier getElement() {
-        final ReferenceIdentifier metadata = this.metadata;
+        final Identifier metadata = this.metadata;
         if (metadata == null) {
             return null;
         } else if (metadata instanceof ImmutableIdentifier) {

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ReferenceSystemMetadata.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ReferenceSystemMetadata.java?rev=1629471&r1=1629470&r2=1629471&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ReferenceSystemMetadata.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ReferenceSystemMetadata.java [UTF-8] Sun Oct  5 06:19:21 2014
@@ -18,8 +18,8 @@ package org.apache.sis.internal.jaxb.met
 
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
+import org.opengis.metadata.Identifier;
 import org.opengis.referencing.ReferenceSystem;
-import org.opengis.referencing.ReferenceIdentifier;
 import org.apache.sis.internal.simple.SimpleIdentifiedObject;
 import org.apache.sis.util.ComparisonMode;
 
@@ -73,7 +73,7 @@ public class ReferenceSystemMetadata ext
      *
      * @param name The primary name by which this object is identified.
      */
-    public ReferenceSystemMetadata(final ReferenceIdentifier name) {
+    public ReferenceSystemMetadata(final Identifier name) {
         super(name);
     }
 
@@ -84,7 +84,7 @@ public class ReferenceSystemMetadata ext
      */
     @Override
     @XmlElement(name = "referenceSystemIdentifier")
-    public final ReferenceIdentifier getName() {
+    public final Identifier getName() {
         return super.getName();
     }
 
@@ -93,7 +93,7 @@ public class ReferenceSystemMetadata ext
      *
      * @param name The new primary name.
      */
-    public final void setName(final ReferenceIdentifier name) {
+    public final void setName(final Identifier name) {
         this.name = name;
     }
 

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ServiceParameter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ServiceParameter.java?rev=1629471&r1=1629470&r2=1629471&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ServiceParameter.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ServiceParameter.java [UTF-8] Sun Oct  5 06:19:21 2014
@@ -26,10 +26,10 @@ import org.opengis.util.TypeName;
 import org.opengis.util.MemberName;
 import org.opengis.util.GenericName;
 import org.opengis.util.InternationalString;
+import org.opengis.metadata.Identifier;
 import org.opengis.parameter.ParameterValue;
 import org.opengis.parameter.ParameterDirection;
 import org.opengis.parameter.ParameterDescriptor;
-import org.opengis.referencing.ReferenceIdentifier;
 import org.apache.sis.internal.simple.SimpleIdentifiedObject;
 import org.apache.sis.internal.jaxb.metadata.direct.GO_MemberName;
 import org.apache.sis.internal.metadata.ReferencingServices;
@@ -176,7 +176,7 @@ public final class ServiceParameter exte
      */
     public static MemberName getMemberName(final ParameterDescriptor<?> parameter) {
         if (parameter != null) {
-            final ReferenceIdentifier id = parameter.getName();
+            final Identifier id = parameter.getName();
             if (id instanceof MemberName) {
                 return (MemberName) id;
             }
@@ -207,10 +207,10 @@ public final class ServiceParameter exte
      * @return The parameter name as an identifier (the type specified by ISO 19111).
      */
     @Override
-    public synchronized ReferenceIdentifier getName() {
+    public synchronized Identifier getName() {
         if (name == null && memberName != null) {
-            if (memberName instanceof ReferenceIdentifier) {
-                name = (ReferenceIdentifier) memberName;
+            if (memberName instanceof Identifier) {
+                name = (Identifier) memberName;
             } else {
                 name = new NameToIdentifier(memberName);
             }
@@ -365,7 +365,7 @@ public final class ServiceParameter exte
      * Null-safe string representation of the given identifier, for comparison purpose.
      * We ignore codespace because they can not be represented in ISO 19139 XML documents.
      */
-    private static String toString(final ReferenceIdentifier identifier) {
+    private static String toString(final Identifier identifier) {
         return (identifier != null) ? identifier.toString() : null;
     }
 }

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/NameToIdentifier.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/NameToIdentifier.java?rev=1629471&r1=1629470&r2=1629471&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/NameToIdentifier.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/NameToIdentifier.java [UTF-8] Sun Oct  5 06:19:21 2014
@@ -21,8 +21,8 @@ import org.opengis.util.NameSpace;
 import org.opengis.util.ScopedName;
 import org.opengis.util.GenericName;
 import org.opengis.util.InternationalString;
+import org.opengis.metadata.Identifier;
 import org.opengis.metadata.citation.Citation;
-import org.opengis.referencing.ReferenceIdentifier;
 import org.apache.sis.metadata.iso.citation.Citations;
 import org.apache.sis.util.iso.DefaultNameSpace;
 
@@ -33,14 +33,14 @@ import org.apache.sis.internal.jdk7.Obje
 
 
 /**
- * Does the unobvious mapping between {@link ReferenceIdentifier} properties and {@link GenericName} ones.
+ * Does the unobvious mapping between {@link Identifier} properties and {@link GenericName} ones.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.4
  * @version 0.5
  * @module
  */
-public final class NameToIdentifier implements ReferenceIdentifier {
+public final class NameToIdentifier implements Identifier {
     /**
      * The name from which to infer the identifier attributes.
      */
@@ -126,7 +126,7 @@ public final class NameToIdentifier impl
     }
 
     /**
-     * Names are not versioned.
+     * Returns {@code null} since names are not versioned.
      */
     @Override
     public String getVersion() {
@@ -134,6 +134,16 @@ public final class NameToIdentifier impl
     }
 
     /**
+     * Returns {@code null} since we do not provide natural language description.
+     *
+     * @since 0.5
+     */
+    @Override
+    public InternationalString getDescription() {
+        return null;
+    }
+
+    /**
      * Returns a hash code value for this object.
      */
     @Override

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java?rev=1629471&r1=1629470&r2=1629471&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java [UTF-8] Sun Oct  5 06:19:21 2014
@@ -38,6 +38,7 @@ import javax.measure.unit.UnitFormat;
 import javax.measure.quantity.Quantity;
 
 import org.opengis.util.InternationalString;
+import org.opengis.metadata.Identifier;
 import org.opengis.metadata.citation.Citation;
 import org.opengis.metadata.extent.Extent;
 import org.opengis.metadata.extent.VerticalExtent;
@@ -45,7 +46,6 @@ import org.opengis.metadata.extent.Tempo
 import org.opengis.metadata.extent.GeographicBoundingBox;
 import org.opengis.parameter.GeneralParameterDescriptor;
 import org.opengis.referencing.IdentifiedObject;
-import org.opengis.referencing.ReferenceIdentifier;
 import org.opengis.referencing.ReferenceSystem;
 import org.opengis.referencing.datum.Datum;
 import org.opengis.referencing.operation.OperationMethod;
@@ -682,17 +682,17 @@ public class Formatter implements Locali
             appendForSubtypes(object);
         }
         if (showIDs) {
-            Collection<ReferenceIdentifier> identifiers = object.getIdentifiers();
+            Collection<? extends Identifier> identifiers = object.getIdentifiers();
             if (identifiers != null) { // Paranoiac check
                 if (filterID) {
-                    for (final ReferenceIdentifier id : identifiers) {
+                    for (final Identifier id : identifiers) {
                         if (Citations.identifierMatches(authority, id.getAuthority())) {
                             identifiers = Collections.singleton(id);
                             break;
                         }
                     }
                 }
-                for (ReferenceIdentifier id : identifiers) {
+                for (Identifier id : identifiers) {
                     if (!(id instanceof FormattableObject)) {
                         id = ImmutableIdentifier.castOrCopy(id);
                     }
@@ -1389,7 +1389,7 @@ public class Formatter implements Locali
         ArgumentChecks.ensureNonNull("unformattable", unformattable);
         if (invalidElement == null) {
             String name;
-            final ReferenceIdentifier id = unformattable.getName();
+            final Identifier id = unformattable.getName();
             if (id == null || (name = id.getCode()) == null) {
                 name = getName(unformattable.getClass());
             }

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java?rev=1629471&r1=1629470&r2=1629471&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java [UTF-8] Sun Oct  5 06:19:21 2014
@@ -27,9 +27,9 @@ import java.io.IOException;
 import java.io.Serializable;
 import java.io.ObjectInputStream;
 import java.lang.reflect.Field;
+import org.opengis.metadata.Identifier;
 import org.opengis.metadata.citation.Citation;
 import org.opengis.metadata.ExtendedElementInformation;
-import org.opengis.referencing.ReferenceIdentifier;
 import org.apache.sis.util.Debug;
 import org.apache.sis.util.Classes;
 import org.apache.sis.util.ComparisonMode;
@@ -661,11 +661,11 @@ public class MetadataStandard implements
      * <p>In the particular case of Apache SIS implementation, all values in the information map
      * additionally implement the following interfaces:</p>
      * <ul>
-     *   <li>{@link ReferenceIdentifier} with the following properties:
+     *   <li>{@link Identifier} with the following properties:
      *     <ul>
-     *       <li>The {@linkplain ReferenceIdentifier#getAuthority() authority} is this metadata standard {@linkplain #getCitation() citation}.</li>
-     *       <li>The {@linkplain ReferenceIdentifier#getCodeSpace() codespace} is the standard name of the interface that contain the property.</li>
-     *       <li>The {@linkplain ReferenceIdentifier#getCode() code} is the standard name of the property.</li>
+     *       <li>The {@linkplain Identifier#getAuthority() authority} is this metadata standard {@linkplain #getCitation() citation}.</li>
+     *       <li>The {@linkplain Identifier#getCodeSpace() codespace} is the standard name of the interface that contain the property.</li>
+     *       <li>The {@linkplain Identifier#getCode() code} is the standard name of the property.</li>
      *     </ul>
      *   </li>
      *   <li>{@link CheckedContainer} with the following properties:

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyInformation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyInformation.java?rev=1629471&r1=1629470&r2=1629471&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyInformation.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyInformation.java [UTF-8] Sun Oct  5 06:19:21 2014
@@ -28,7 +28,7 @@ import org.opengis.metadata.ExtendedElem
 import org.opengis.metadata.citation.Responsibility;
 import org.opengis.util.CodeList;
 import org.opengis.util.InternationalString;
-import org.apache.sis.internal.simple.SimpleReferenceIdentifier;
+import org.apache.sis.internal.simple.SimpleIdentifier;
 import org.apache.sis.measure.ValueRange;
 import org.apache.sis.util.iso.Types;
 import org.apache.sis.util.Numbers;
@@ -62,7 +62,7 @@ import org.apache.sis.util.logging.Loggi
  * @see MetadataStandard#asInformationMap(Class, KeyNamePolicy)
  * @see <a href="https://issues.apache.org/jira/browse/SIS-80">SIS-80</a>
  */
-final class PropertyInformation<E> extends SimpleReferenceIdentifier
+final class PropertyInformation<E> extends SimpleIdentifier
         implements ExtendedElementInformation, CheckedContainer<E>
 {
     /**

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java?rev=1629471&r1=1629470&r2=1629471&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java [UTF-8] Sun Oct  5 06:19:21 2014
@@ -21,6 +21,7 @@ import javax.xml.bind.annotation.XmlElem
 import javax.xml.bind.annotation.XmlRootElement;
 import org.opengis.metadata.Identifier;
 import org.opengis.metadata.citation.Citation;
+import org.opengis.util.InternationalString;
 
 
 /**
@@ -40,8 +41,7 @@ import org.opengis.metadata.citation.Cit
  * {@linkplain org.apache.sis.referencing.cs.DefaultCoordinateSystemAxis coordinate system axis},
  * {@linkplain org.apache.sis.referencing.datum.DefaultGeodeticDatum geodetic datum},
  * {@linkplain org.apache.sis.referencing.crs.DefaultGeographicCRS geographic CRS} and more
- * rather use an {@code Identifier} sub-interface, namely {@link org.opengis.referencing.ReferenceIdentifier}.
- * The later is implemented in SIS by {@link ImmutableIdentifier}, which is a class unrelated to the usual
+ * rather use the {@link ImmutableIdentifier} implementation, which is a class unrelated to the usual
  * {@code org.apache.metadata} hierarchy because of the immutable nature of referencing objects.</p>
  *
  * {@section Text, URN and XML representations}
@@ -76,7 +76,7 @@ import org.opengis.metadata.citation.Cit
  * @author  Touraïvane (IRD)
  * @author  Cédric Briançon (Geomatys)
  * @since   0.3 (derived from geotk-2.1)
- * @version 0.3
+ * @version 0.5
  * @module
  *
  * @see ImmutableIdentifier
@@ -98,6 +98,11 @@ public class DefaultIdentifier extends I
     private String code;
 
     /**
+     * Identifier or namespace in which the code is valid.
+     */
+    private String codeSpace;
+
+    /**
      * Identifier of the version of the associated code space or code, as specified
      * by the code space or code authority. This version is included only when the
      * {@linkplain #getCode code} uses versions. When appropriate, the edition is
@@ -106,6 +111,11 @@ public class DefaultIdentifier extends I
     private String version;
 
     /**
+     * Natural language description of the meaning of the code value.
+     */
+    private InternationalString description;
+
+    /**
      * Organization or party responsible for definition and maintenance of the
      * {@linkplain #getCode code}.
      */
@@ -152,8 +162,11 @@ public class DefaultIdentifier extends I
     public DefaultIdentifier(final Identifier object) {
         super(object);
         if (object != null) {
-            code      = object.getCode();
-            authority = object.getAuthority();
+            code        = object.getCode();
+            codeSpace   = object.getCodeSpace();
+            version     = object.getVersion();
+            description = object.getDescription();
+            authority   = object.getAuthority();
         }
     }
 
@@ -183,9 +196,9 @@ public class DefaultIdentifier extends I
     }
 
     /**
-     * Alphanumeric value identifying an instance in the namespace.
+     * Returns the alphanumeric value identifying an instance in the namespace.
      *
-     * @return Value identifying an instance in the namespace, or {@code null}.
+     * @return Value identifying an instance in the namespace.
      */
     @Override
     @XmlElement(name = "code", required = true)
@@ -204,6 +217,30 @@ public class DefaultIdentifier extends I
     }
 
     /**
+     * Returns the identifier or namespace in which the code is valid.
+     *
+     * @return The identifier code space, or {@code null} if none.
+     *
+     * @since 0.5
+     */
+    @Override
+    public String getCodeSpace() {
+        return codeSpace;
+    }
+
+    /**
+     * Sets the identifier or namespace in which the code is valid.
+     *
+     * @param newValue The new code space, or {@code null} if none.
+     *
+     * @since 0.5
+     */
+    public void setCodeSpace(final String newValue) {
+        checkWritePermission();
+        codeSpace = newValue;
+    }
+
+    /**
      * Identifier of the version of the associated code, as specified by the code space or
      * code authority. This version is included only when the {@linkplain #getCode() code}
      * uses versions. When appropriate, the edition is identified by the effective date,
@@ -211,6 +248,7 @@ public class DefaultIdentifier extends I
      *
      * @return The version, or {@code null} if not available.
      */
+    @Override
     public String getVersion() {
         return version;
     }
@@ -226,6 +264,30 @@ public class DefaultIdentifier extends I
     }
 
     /**
+     * Returns the natural language description of the meaning of the code value.
+     *
+     * @return The natural language description, or {@code null} if none.
+     *
+     * @since 0.5
+     */
+    @Override
+    public InternationalString getDescription() {
+        return description;
+    }
+
+    /**
+     * Sets the natural language description of the meaning of the code value.
+     *
+     * @param newValue The new natural language description, or {@code null} if none.
+     *
+     * @since 0.5
+     */
+    public void setDescription(final InternationalString newValue) {
+        checkWritePermission();
+        description = newValue;
+    }
+
+    /**
      * Organization or party responsible for definition and maintenance of the
      * {@linkplain #getCode() code}.
      *

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java?rev=1629471&r1=1629470&r2=1629471&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java [UTF-8] Sun Oct  5 06:19:21 2014
@@ -21,9 +21,9 @@ import java.util.Locale;
 import java.io.Serializable;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
+import org.opengis.metadata.Identifier;
 import org.opengis.metadata.citation.Citation;
 import org.opengis.parameter.InvalidParameterValueException;
-import org.opengis.referencing.ReferenceIdentifier;
 import org.opengis.util.InternationalString;
 import org.apache.sis.util.Deprecable;
 import org.apache.sis.util.resources.Errors;
@@ -123,13 +123,13 @@ import org.apache.sis.internal.jdk7.Obje
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3 (derived from geotk-3.03)
- * @version 0.4
+ * @version 0.5
  * @module
  *
  * @see DefaultIdentifier
  */
 @XmlRootElement(name = "RS_Identifier")
-public class ImmutableIdentifier extends FormattableObject implements ReferenceIdentifier, Deprecable, Serializable {
+public class ImmutableIdentifier extends FormattableObject implements Identifier, Deprecable, Serializable {
     /**
      * For cross-version compatibility.
      */
@@ -174,6 +174,11 @@ public class ImmutableIdentifier extends
     private final String version;
 
     /**
+     * Natural language description of the meaning of the code value.
+     */
+    private final InternationalString description;
+
+    /**
      * Comments on or information about this identifier, or {@code null} if none.
      *
      * @see #getRemarks()
@@ -184,11 +189,12 @@ public class ImmutableIdentifier extends
      * Empty constructor for JAXB.
      */
     private ImmutableIdentifier() {
-        code      = null;
-        codeSpace = null;
-        authority = null;
-        version   = null;
-        remarks   = null;
+        code        = null;
+        codeSpace   = null;
+        authority   = null;
+        version     = null;
+        description = null;
+        remarks     = null;
     }
 
     /**
@@ -198,12 +204,13 @@ public class ImmutableIdentifier extends
      *
      * @param identifier The identifier to copy.
      */
-    public ImmutableIdentifier(final ReferenceIdentifier identifier) {
+    public ImmutableIdentifier(final Identifier identifier) {
         ensureNonNull("identifier", identifier);
-        code      = identifier.getCode();
-        codeSpace = identifier.getCodeSpace();
-        authority = identifier.getAuthority();
-        version   = identifier.getVersion();
+        code        = identifier.getCode();
+        codeSpace   = identifier.getCodeSpace();
+        authority   = identifier.getAuthority();
+        version     = identifier.getVersion();
+        description = identifier.getDescription();
         if (identifier instanceof Deprecable) {
             remarks = ((Deprecable) identifier).getRemarks();
         } else {
@@ -251,11 +258,12 @@ public class ImmutableIdentifier extends
     public ImmutableIdentifier(final Citation authority, final String codeSpace,
             final String code, final String version, final InternationalString remarks)
     {
-        this.code      = code;
-        this.codeSpace = codeSpace;
-        this.authority = authority;
-        this.version   = version;
-        this.remarks   = remarks;
+        this.code        = code;
+        this.codeSpace   = codeSpace;
+        this.authority   = authority;
+        this.version     = version;
+        this.description = null;
+        this.remarks     = remarks;
         validate(null);
     }
 
@@ -278,7 +286,7 @@ public class ImmutableIdentifier extends
      *     <td>{@link #getCode()}</td>
      *   </tr>
      *   <tr>
-     *     <td>{@value org.opengis.referencing.ReferenceIdentifier#CODESPACE_KEY}</td>
+     *     <td>{@value org.opengis.metadata.Identifier#CODESPACE_KEY}</td>
      *     <td>{@link String}</td>
      *     <td>{@link #getCodeSpace()}</td>
      *   </tr>
@@ -288,11 +296,16 @@ public class ImmutableIdentifier extends
      *     <td>{@link #getAuthority()}</td>
      *   </tr>
      *   <tr>
-     *     <td>{@value org.opengis.referencing.ReferenceIdentifier#VERSION_KEY}</td>
+     *     <td>{@value org.opengis.metadata.Identifier#VERSION_KEY}</td>
      *     <td>{@link String}</td>
      *     <td>{@link #getVersion()}</td>
      *   </tr>
      *   <tr>
+     *     <td>{@value org.opengis.metadata.Identifier#DESCRIPTION_KEY}</td>
+     *     <td>{@link String} or {@link InternationalString}</td>
+     *     <td>{@link #getDescription()}</td>
+     *   </tr>
+     *   <tr>
      *     <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
      *     <td>{@link String} or {@link InternationalString}</td>
      *     <td>{@link #getRemarks()}</td>
@@ -320,9 +333,10 @@ public class ImmutableIdentifier extends
      */
     public ImmutableIdentifier(final Map<String,?> properties) throws IllegalArgumentException {
         ensureNonNull("properties", properties);
-        code    = trimWhitespaces(property(properties, CODE_KEY,    String.class));
-        version = trimWhitespaces(property(properties, VERSION_KEY, String.class));
-        remarks = Types.toInternationalString(properties, REMARKS_KEY);
+        code        = trimWhitespaces(  property (properties, CODE_KEY,    String.class));
+        version     = trimWhitespaces(  property (properties, VERSION_KEY, String.class));
+        description = Types.toInternationalString(properties, DESCRIPTION_KEY);
+        remarks     = Types.toInternationalString(properties, REMARKS_KEY);
         /*
          * Map String authority to one of the pre-defined constants (typically EPSG or OGC).
          */
@@ -381,8 +395,8 @@ public class ImmutableIdentifier extends
      *   <li>Otherwise if the given object is already an instance of
      *       {@code ImmutableIdentifier}, then it is returned unchanged.</li>
      *   <li>Otherwise a new {@code ImmutableIdentifier} instance is created using the
-     *       {@linkplain #ImmutableIdentifier(ReferenceIdentifier) copy constructor}
-     *       and returned. Note that this is a <cite>shallow</cite> copy operation, since the other
+     *       {@linkplain #ImmutableIdentifier(Identifier) copy constructor} and returned.
+     *       Note that this is a <cite>shallow</cite> copy operation, since the other
      *       metadata contained in the given object are not recursively copied.</li>
      * </ul>
      *
@@ -390,7 +404,7 @@ public class ImmutableIdentifier extends
      * @return A SIS implementation containing the values of the given object (may be the
      *         given object itself), or {@code null} if the argument was null.
      */
-    public static ImmutableIdentifier castOrCopy(final ReferenceIdentifier object) {
+    public static ImmutableIdentifier castOrCopy(final Identifier object) {
         if (object == null || object instanceof ImmutableIdentifier) {
             return (ImmutableIdentifier) object;
         }
@@ -400,6 +414,8 @@ public class ImmutableIdentifier extends
     /**
      * Identifier code or name, optionally from a controlled list or pattern.
      *
+     * <div class="note"><b>Example:</b> {@code "4326"}.</div>
+     *
      * @return The code, never {@code null}.
      *
      * @see org.apache.sis.referencing.NamedIdentifier#tip()
@@ -412,6 +428,8 @@ public class ImmutableIdentifier extends
     /**
      * Name or identifier of the person or organization responsible for namespace.
      *
+     * <div class="note"><b>Example:</b> {@code "EPSG"}.</div>
+     *
      * @return The code space, or {@code null} if not available.
      *
      * @see org.apache.sis.referencing.NamedIdentifier#head()
@@ -473,6 +491,8 @@ public class ImmutableIdentifier extends
      * uses versions. When appropriate, the edition is identified by the effective date,
      * coded using ISO 8601 date format.
      *
+     * <div class="note"><b>Example:</b> the version of the underlying EPSG database.</div>
+     *
      * @return The version, or {@code null} if not available.
      */
     @Override
@@ -481,8 +501,24 @@ public class ImmutableIdentifier extends
     }
 
     /**
+     * Natural language description of the meaning of the code value.
+     *
+     * <div class="note"><b>Example:</b> "World Geodetic System 1984".</div>
+     *
+     * @return The natural language description, or {@code null} if none.
+     *
+     * @since 0.5
+     */
+    @Override
+    public InternationalString getDescription() {
+        return description;
+    }
+
+    /**
      * Comments on or information about this identifier, or {@code null} if none.
      *
+     * <div class="note"><b>Example:</b> "superseded by code XYZ".</div>
+     *
      * @return Optional comments about this identifier, or {@code null} if none.
      */
     @Override

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultSource.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultSource.java?rev=1629471&r1=1629470&r2=1629471&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultSource.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultSource.java [UTF-8] Sun Oct  5 06:19:21 2014
@@ -342,11 +342,10 @@ public class DefaultSource extends ISOMe
 
     /**
      * Return the type and / or extent of the source.
+     * This information should be provided if the {@linkplain #getDescription() description} is not provided.
      *
      * @return Type and / or extent of the source, or {@code null} if none.
      *
-     * @condition Mandatory if the {@linkplain #getDescription() description} is not provided.
-     *
      * @since 0.5
      */
     @Override

Modified: sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyAccessorTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyAccessorTest.java?rev=1629471&r1=1629470&r2=1629471&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyAccessorTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyAccessorTest.java [UTF-8] Sun Oct  5 06:19:21 2014
@@ -43,7 +43,6 @@ import org.opengis.metadata.maintenance.
 import org.opengis.metadata.spatial.SpatialRepresentationType;
 import org.opengis.referencing.IdentifiedObject;
 import org.opengis.referencing.ReferenceSystem;
-import org.opengis.referencing.ReferenceIdentifier;
 import org.opengis.referencing.crs.GeodeticCRS;
 import org.opengis.referencing.crs.GeographicCRS;
 import org.opengis.referencing.datum.GeodeticDatum;
@@ -243,10 +242,10 @@ public final strictfp class PropertyAcce
         //……Declaring type……………………………Method……………………………………………JavaBeans……………………………UML identifier………………Sentence…………………………………Type…………………………………………………………
             GeographicCRS.class,    "getCoordinateSystem", "coordinateSystem", "coordinateSystem", "Coordinate system",  EllipsoidalCS.class,       // Covariant return type
             GeodeticCRS.class,      "getDatum",            "datum",            "datum",            "Datum",              GeodeticDatum.class,       // Covariant return type
-            IdentifiedObject.class, "getName",             "name",             "name",             "Name",               ReferenceIdentifier.class,
+            IdentifiedObject.class, "getName",             "name",             "name",             "Name",               Identifier.class,
             IdentifiedObject.class, "getAlias",            "alias",            "alias",            "Alias",              GenericName[].class,
             ReferenceSystem.class,  "getDomainOfValidity", "domainOfValidity", "domainOfValidity", "Domain of validity", Extent.class,
-            IdentifiedObject.class, "getIdentifiers",      "identifiers",      "identifier",       "Identifiers",        ReferenceIdentifier[].class,
+            IdentifiedObject.class, "getIdentifiers",      "identifiers",      "identifier",       "Identifiers",        Identifier[].class,
             IdentifiedObject.class, "getRemarks",          "remarks",          "remarks",          "Remarks",            InternationalString.class,
             ReferenceSystem.class,  "getScope",            "scope",            "SC_CRS.scope",     "Scope",              InternationalString.class);
     }

Modified: sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeTableFormatTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeTableFormatTest.java?rev=1629471&r1=1629470&r2=1629471&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeTableFormatTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeTableFormatTest.java [UTF-8] Sun Oct  5 06:19:21 2014
@@ -112,8 +112,9 @@ public final strictfp class TreeTableFor
             "  ├─Alternate title (2 of 2)…………………… Alt B\n" +
             "  ├─Identifier\n" +
             "  │   ├─Code……………………………………………………………… 9782505004509\n" +
-            "  │   └─Authority\n" +
-            "  │       └─Title………………………………………………… ISBN\n" +
+            "  │   ├─Authority\n" +
+            "  │   │   └─Title………………………………………………… ISBN\n" +
+            "  │   └─Code space……………………………………………… ISBN\n"+
             "  ├─Cited responsible party (1 of 2)\n" +
             "  │   ├─Party\n" +
             "  │   │   └─Name…………………………………………………… Testsuya Toyoda\n" +

Modified: sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/ImmutableIdentifierTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/ImmutableIdentifierTest.java?rev=1629471&r1=1629470&r2=1629471&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/ImmutableIdentifierTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/ImmutableIdentifierTest.java [UTF-8] Sun Oct  5 06:19:21 2014
@@ -32,7 +32,7 @@ import org.apache.sis.test.DependsOn;
 import org.junit.Test;
 
 import static org.apache.sis.test.MetadataAssert.*;
-import static org.opengis.referencing.ReferenceIdentifier.*;
+import static org.opengis.metadata.Identifier.*;
 
 
 /**

Modified: sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/xml/AnchorMarshallingTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/xml/AnchorMarshallingTest.java?rev=1629471&r1=1629470&r2=1629471&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/xml/AnchorMarshallingTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/xml/AnchorMarshallingTest.java [UTF-8] Sun Oct  5 06:19:21 2014
@@ -18,7 +18,7 @@ package org.apache.sis.xml;
 
 import javax.xml.bind.JAXBException;
 import org.opengis.metadata.citation.Address;
-import org.opengis.referencing.ReferenceIdentifier;
+import org.opengis.metadata.Identifier;
 import org.apache.sis.test.XMLTestCase;
 import org.junit.Test;
 
@@ -55,7 +55,7 @@ public final strictfp class AnchorMarsha
                 "    <gco:CharacterString>L101</gco:CharacterString>\n" +
                 "  </gmd:codeSpace>\n" +
                 "</gmd:RS_Identifier>";
-        final ReferenceIdentifier id = (ReferenceIdentifier) XML.unmarshal(expected);
+        final Identifier id = (Identifier) XML.unmarshal(expected);
         assertEquals("codespace", "L101", id.getCodeSpace());
         assertEquals("code", "EPSG:4326", id.getCode());
     }

Modified: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/Code.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/Code.java?rev=1629471&r1=1629470&r2=1629471&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/Code.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/Code.java [UTF-8] Sun Oct  5 06:19:21 2014
@@ -19,8 +19,8 @@ package org.apache.sis.internal.jaxb.ref
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlValue;
 import javax.xml.bind.annotation.XmlAttribute;
+import org.opengis.metadata.Identifier;
 import org.opengis.metadata.citation.Citation;
-import org.opengis.referencing.ReferenceIdentifier;
 import org.apache.sis.internal.util.DefinitionURI;
 import org.apache.sis.referencing.NamedIdentifier;
 import org.apache.sis.metadata.iso.citation.Citations;
@@ -72,7 +72,7 @@ public final class Code {
      *
      * @param identifier The identifier from which to get the values.
      */
-    Code(final ReferenceIdentifier identifier) {
+    Code(final Identifier identifier) {
         code      = identifier.getCode();
         codeSpace = identifier.getCodeSpace();
         String version = identifier.getVersion();
@@ -93,7 +93,7 @@ public final class Code {
      *
      * @return The identifier, or {@code null} if none.
      */
-    public ReferenceIdentifier getIdentifier() {
+    public Identifier getIdentifier() {
         String c = code;
         if (c == null) {
             return null;
@@ -130,11 +130,11 @@ public final class Code {
      * @param  identifiers The object identifiers, or {@code null} if none.
      * @return The {@code <gml:identifier>} as a {@code Code} instance, or {@code null} if none.
      */
-    public static Code forIdentifiedObject(final Class<?> type, final Iterable<? extends ReferenceIdentifier> identifiers) {
+    public static Code forIdentifiedObject(final Class<?> type, final Iterable<? extends Identifier> identifiers) {
         if (identifiers != null) {
             boolean isHTTP = false;
-            ReferenceIdentifier fallback = null;
-            for (final ReferenceIdentifier identifier : identifiers) {
+            Identifier fallback = null;
+            for (final Identifier identifier : identifiers) {
                 final String code = identifier.getCode();
                 if (code == null) continue; // Paranoiac check.
                 if (code.regionMatches(true, 0, "urn:", 0, 4)) {

Modified: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/RS_Identifier.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/RS_Identifier.java?rev=1629471&r1=1629470&r2=1629471&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/RS_Identifier.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/RS_Identifier.java [UTF-8] Sun Oct  5 06:19:21 2014
@@ -17,11 +17,11 @@
 package org.apache.sis.internal.jaxb.referencing;
 
 import javax.xml.bind.annotation.adapters.XmlAdapter;
-import org.opengis.referencing.ReferenceIdentifier;
+import org.opengis.metadata.Identifier;
 
 
 /**
- * JAXB adapter mapping the GeoAPI {@link ReferenceIdentifier} to an implementation class that can
+ * JAXB adapter mapping the GeoAPI {@link Identifier} to an implementation class that can
  * be marshalled. See the package documentation for more information about JAXB and interfaces.
  *
  * <p>Note that a class of the same name is defined in the {@link org.apache.sis.internal.jaxb.metadata}
@@ -36,7 +36,7 @@ import org.opengis.referencing.Reference
  *   <gml:identifier codeSpace="EPSG">4326</gml:identifier>
  * }
  *
- * If the {@code ReferenceIdentifier} to marshal contains a {@linkplain ReferenceIdentifier#getVersion() version},
+ * If the {@code Identifier} to marshal contains a {@linkplain Identifier#getVersion() version},
  * then this adapter concatenates the version to the codespace in a "URI-like" way like below:
  *
  * {@preformat xml
@@ -50,18 +50,18 @@ import org.opengis.referencing.Reference
  *   <gml:identifier codeSpace="OGP">urn:ogc:def:crs:EPSG::4326</gml:identifier>
  * }
  *
- * In such case this class takes the codespace as the {@linkplain ReferenceIdentifier#getAuthority() authority}
- * ("OGP" in above example), and the 3 last URI elements are parsed as the codespace, version (optional) and
- * code values respectively.
+ * In such case this class takes the codespace as the {@linkplain Identifier#getAuthority() authority}
+ * ("OGP" in above example), and the 3 last URI elements are parsed as the codespace, version (optional)
+ * and code values respectively.
  *
  * @author  Guilhem Legal (Geomatys)
  * @author  Cédric Briançon (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.4 (derived from geotk-3.00)
- * @version 0.4
+ * @version 0.5
  * @module
  */
-public final class RS_Identifier extends XmlAdapter<Code, ReferenceIdentifier> {
+public final class RS_Identifier extends XmlAdapter<Code, Identifier> {
     /**
      * Substitutes the wrapper value read from an XML stream by the object which will
      * represents the identifier. JAXB calls automatically this method at unmarshalling time.
@@ -70,7 +70,7 @@ public final class RS_Identifier extends
      * @return An identifier which represents the value.
      */
     @Override
-    public ReferenceIdentifier unmarshal(final Code value) {
+    public Identifier unmarshal(final Code value) {
         return (value != null) ? value.getIdentifier() : null;
     }
 
@@ -82,7 +82,7 @@ public final class RS_Identifier extends
      * @return The adapter for the given metadata.
      */
     @Override
-    public Code marshal(final ReferenceIdentifier value) {
+    public Code marshal(final Identifier value) {
         return (value != null) ? new Code(value) : null;
     }
 }

Modified: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/NilReferencingObject.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/NilReferencingObject.java?rev=1629471&r1=1629470&r2=1629471&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/NilReferencingObject.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/NilReferencingObject.java [UTF-8] Sun Oct  5 06:19:21 2014
@@ -21,7 +21,7 @@ import java.util.Collection;
 import org.opengis.util.GenericName;
 import org.opengis.util.InternationalString;
 import org.opengis.referencing.ReferenceSystem;
-import org.opengis.referencing.ReferenceIdentifier;
+import org.opengis.metadata.Identifier;
 import org.opengis.metadata.extent.Extent;
 import org.apache.sis.xml.NilReason;
 import org.apache.sis.xml.NilObject;
@@ -64,9 +64,9 @@ public final class NilReferencingObject 
      * Returning null for collection are okay in the particular case of SIS implementation,
      * because the constructor will replace empty collections by null references anyway.
      */
-    @Override public ReferenceIdentifier      getName()        {return null;}
+    @Override public Identifier               getName()        {return null;}
     @Override public Collection<GenericName>  getAlias()       {return null;}
-    @Override public Set<ReferenceIdentifier> getIdentifiers() {return null;}
+    @Override public Set<Identifier>          getIdentifiers() {return null;}
     @Override public InternationalString      getRemarks()     {return null;}
     @Override public InternationalString      getScope()       {return null;}
     @Override public Extent getDomainOfValidity()              {return null;}

Modified: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java?rev=1629471&r1=1629470&r2=1629471&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java [UTF-8] Sun Oct  5 06:19:21 2014
@@ -28,7 +28,6 @@ import org.apache.sis.io.wkt.Formattable
 import org.apache.sis.io.wkt.Formatter;
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.ComparisonMode;
-import org.apache.sis.util.iso.Types;
 import org.apache.sis.util.Debug;
 
 import static org.apache.sis.util.Utilities.deepEquals;
@@ -102,17 +101,6 @@ public abstract class AbstractParameterD
     private static final long serialVersionUID = -4346475760810353590L;
 
     /**
-     * Key for the {@value} property to be given to the constructor.
-     * This is used for setting the value to be returned by {@link #getDescription()}.
-     */
-    public static final String DESCRIPTION_KEY = "description";
-
-    /**
-     * A narrative explanation of the role of the parameter, or {@code null} if none.
-     */
-    private final InternationalString description;
-
-    /**
      * The minimum number of times that values for this parameter group are required, as an unsigned short.
      * We use a short because this value is usually either 0 or 1, or a very small number like 2 or 3.
      * A large number would be a bad idea with this parameter implementation.
@@ -142,7 +130,7 @@ public abstract class AbstractParameterD
      *   </tr>
      *   <tr>
      *     <td>{@value org.opengis.referencing.IdentifiedObject#NAME_KEY}</td>
-     *     <td>{@link org.opengis.referencing.ReferenceIdentifier} or {@link String}</td>
+     *     <td>{@link org.opengis.metadata.Identifier} or {@link String}</td>
      *     <td>{@link #getName()}</td>
      *   </tr>
      *   <tr>
@@ -152,15 +140,10 @@ public abstract class AbstractParameterD
      *   </tr>
      *   <tr>
      *     <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
-     *     <td>{@link org.opengis.referencing.ReferenceIdentifier} (optionally as array)</td>
+     *     <td>{@link org.opengis.metadata.Identifier} (optionally as array)</td>
      *     <td>{@link #getIdentifiers()}</td>
      *   </tr>
      *   <tr>
-     *     <td>{@value org.apache.sis.parameter.AbstractParameterDescriptor#DESCRIPTION_KEY}</td>
-     *     <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
-     *     <td>{@link #getDescription()}</td>
-     *   </tr>
-     *   <tr>
      *     <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
      *     <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
      *     <td>{@link #getRemarks()}</td>
@@ -177,7 +160,6 @@ public abstract class AbstractParameterD
             final int minimumOccurs, final int maximumOccurs)
     {
         super(properties);
-        this.description   = Types.toInternationalString(properties, DESCRIPTION_KEY);
         this.minimumOccurs = (short) minimumOccurs;
         this.maximumOccurs = (short) maximumOccurs;
         if (minimumOccurs < 0 || minimumOccurs > maximumOccurs || maximumOccurs == 0) {
@@ -201,7 +183,6 @@ public abstract class AbstractParameterD
      */
     protected AbstractParameterDescriptor(final GeneralParameterDescriptor descriptor) {
         super(descriptor);
-        description   = descriptor.getDescription();
         minimumOccurs = crop(descriptor.getMinimumOccurs());
         maximumOccurs = crop(descriptor.getMaximumOccurs());
     }
@@ -237,13 +218,15 @@ public abstract class AbstractParameterD
     }
 
     /**
-     * Returns a narrative explanation of the role of the parameter.
+     * Returns a narrative explanation of the role of the parameter. The default implementation returns
+     * the {@linkplain org.apache.sis.metadata.iso.ImmutableIdentifier#getDescription() description}
+     * provided by the parameter {@linkplain #getName() name}.
      *
      * @return A narrative explanation of the role of the parameter, or {@code null} if none.
      */
     @Override
     public InternationalString getDescription() {
-        return description;
+        return getName().getDescription();
     }
 
     /**
@@ -280,13 +263,13 @@ public abstract class AbstractParameterD
                 case STRICT: {
                     final AbstractParameterDescriptor that = (AbstractParameterDescriptor) object;
                     return minimumOccurs == that.minimumOccurs &&
-                           maximumOccurs == that.maximumOccurs &&
-                           Objects.equals(description, that.description);
+                           maximumOccurs == that.maximumOccurs;
                 }
                 default: {
                     final GeneralParameterDescriptor that = (GeneralParameterDescriptor) object;
                     return getMinimumOccurs() == that.getMinimumOccurs() &&
                            getMaximumOccurs() == that.getMaximumOccurs() &&
+                           Objects.equals(getDirection(), that.getDirection()) &&
                            deepEquals(getDescription(), that.getDescription(), mode);
                 }
             }

Modified: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptor.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptor.java?rev=1629471&r1=1629470&r2=1629471&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptor.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptor.java [UTF-8] Sun Oct  5 06:19:21 2014
@@ -127,7 +127,7 @@ public class DefaultParameterDescriptor<
      *   </tr>
      *   <tr>
      *     <td>{@value org.opengis.referencing.IdentifiedObject#NAME_KEY}</td>
-     *     <td>{@link org.opengis.referencing.ReferenceIdentifier} or {@link String}</td>
+     *     <td>{@link org.opengis.metadata.Identifier} or {@link String}</td>
      *     <td>{@link #getName()}</td>
      *   </tr>
      *   <tr>
@@ -137,7 +137,7 @@ public class DefaultParameterDescriptor<
      *   </tr>
      *   <tr>
      *     <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
-     *     <td>{@link org.opengis.referencing.ReferenceIdentifier} (optionally as array)</td>
+     *     <td>{@link org.opengis.metadata.Identifier} (optionally as array)</td>
      *     <td>{@link #getIdentifiers()}</td>
      *   </tr>
      *   <tr>

Modified: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java?rev=1629471&r1=1629470&r2=1629471&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java [UTF-8] Sun Oct  5 06:19:21 2014
@@ -115,7 +115,7 @@ public class DefaultParameterDescriptorG
      *   </tr>
      *   <tr>
      *     <td>{@value org.opengis.referencing.IdentifiedObject#NAME_KEY}</td>
-     *     <td>{@link org.opengis.referencing.ReferenceIdentifier} or {@link String}</td>
+     *     <td>{@link org.opengis.metadata.Identifier} or {@link String}</td>
      *     <td>{@link #getName()}</td>
      *   </tr>
      *   <tr>
@@ -125,7 +125,7 @@ public class DefaultParameterDescriptorG
      *   </tr>
      *   <tr>
      *     <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
-     *     <td>{@link org.opengis.referencing.ReferenceIdentifier} (optionally as array)</td>
+     *     <td>{@link org.opengis.metadata.Identifier} (optionally as array)</td>
      *     <td>{@link #getIdentifiers()}</td>
      *   </tr>
      *   <tr>

Modified: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterBuilder.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterBuilder.java?rev=1629471&r1=1629470&r2=1629471&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterBuilder.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterBuilder.java [UTF-8] Sun Oct  5 06:19:21 2014
@@ -101,22 +101,6 @@ public class ParameterBuilder extends Bu
     }
 
     /**
-     * Sets the parameter description as a {@code String} or {@code InternationalString} instance.
-     * Calls to this method overwrite any previous value.
-     *
-     * <p><b>Lifetime:</b>
-     * previous descriptions are discarded by calls to {@code setDescription(…)}.
-     * Descriptions are cleared after a {@code createXXX(…)} method has been invoked.</p>
-     *
-     * @param  description The description, or {@code null} if none.
-     * @return {@code this}, for method call chaining.
-     */
-    public ParameterBuilder setDescription(final CharSequence description) {
-        properties.put(AbstractParameterDescriptor.DESCRIPTION_KEY, description);
-        return this;
-    }
-
-    /**
      * Sets whether the parameter is mandatory or optional.
      * This property determines the {@linkplain DefaultParameterDescriptor#getMinimumOccurs() minimum number
      * of times} that values are required, which will be 0 for an optional parameter and 1 for a mandatory one.

Modified: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterFormat.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterFormat.java?rev=1629471&r1=1629470&r2=1629471&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterFormat.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterFormat.java [UTF-8] Sun Oct  5 06:19:21 2014
@@ -37,8 +37,8 @@ import javax.measure.unit.Unit;
 import org.opengis.parameter.*;
 import org.opengis.util.ScopedName;
 import org.opengis.util.GenericName;
+import org.opengis.metadata.Identifier;
 import org.opengis.referencing.IdentifiedObject;
-import org.opengis.referencing.ReferenceIdentifier;
 import org.opengis.referencing.operation.OperationMethod;
 
 import org.apache.sis.measure.Range;
@@ -321,7 +321,7 @@ public class ParameterFormat extends Tab
 
     /**
      * Filters names, aliases and identifiers by their code spaces. If the given array is non-null, then the only names,
-     * aliases and identifiers to be formatted are those having a {@link ReferenceIdentifier#getCodeSpace()},
+     * aliases and identifiers to be formatted are those having a {@link Identifier#getCodeSpace()},
      * {@link ScopedName#head()} or {@link GenericName#scope()} value in the given list, unless no name or alias
      * matches this criterion.
      *
@@ -390,7 +390,7 @@ public class ParameterFormat extends Tab
         final boolean isSummary = contentLevel == ContentLevel.NAME_SUMMARY;
         final ParameterDescriptorGroup descriptor;
         final ParameterValueGroup      values;
-        final ReferenceIdentifier      name;
+        final Identifier               name;
         if (object instanceof ParameterValueGroup) {
             values     = (ParameterValueGroup) object;
             descriptor = values.getDescriptor();
@@ -746,10 +746,10 @@ public class ParameterFormat extends Tab
              * Put the first identifier in the first column. If no identifier has a codespace in the list
              * supplied by the user, then we will use the first identifier (any codespace) as a fallback.
              */
-            final Set<ReferenceIdentifier> identifiers = object.getIdentifiers();
+            final Set<Identifier> identifiers = object.getIdentifiers();
             if (identifiers != null) { // Paranoiac check.
-                ReferenceIdentifier identifier = null;
-                for (final ReferenceIdentifier candidate : identifiers) {
+                Identifier identifier = null;
+                for (final Identifier candidate : identifiers) {
                     if (candidate != null) { // Paranoiac check.
                         if (isPreferredCodespace(candidate.getCodeSpace())) {
                             identifier = candidate;
@@ -770,7 +770,7 @@ public class ParameterFormat extends Tab
              * in the current row and clear the 'name' locale variable. Otherwise, keep the 'name'
              * locale variable in case we found no alias to format.
              */
-            ReferenceIdentifier name = object.getName();
+            Identifier name = object.getName();
             if (name != null) { // Paranoiac check.
                 final String codespace = name.getCodeSpace();
                 if (isPreferredCodespace(codespace)) {

Modified: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterTableRow.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterTableRow.java?rev=1629471&r1=1629470&r2=1629471&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterTableRow.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterTableRow.java [UTF-8] Sun Oct  5 06:19:21 2014
@@ -30,10 +30,10 @@ import java.io.IOException;
 import java.text.Format;
 import java.text.FieldPosition;
 import javax.measure.unit.Unit;
+import org.opengis.util.NameSpace;
 import org.opengis.util.GenericName;
+import org.opengis.metadata.Identifier;
 import org.opengis.referencing.IdentifiedObject;
-import org.opengis.referencing.ReferenceIdentifier;
-import org.opengis.util.NameSpace;
 import org.apache.sis.io.wkt.Colors;
 import org.apache.sis.io.wkt.ElementKind;
 import org.apache.sis.measure.Range;
@@ -61,7 +61,7 @@ final class ParameterTableRow {
      * <p>Values can be of two kinds:</p>
      * <ul>
      *   <li>{@link String} for names or aliases.</li>
-     *   <li>{@link ReferenceIdentifier} for identifiers.</li>
+     *   <li>{@link Identifier} for identifiers.</li>
      * </ul>
      *
      * @see #addIdentifier(String, Object)
@@ -120,7 +120,7 @@ final class ParameterTableRow {
         values = new ArrayList<Object>(2); // In the vast majority of cases, we will have only one value.
         units  = new ArrayList<Object>(2);
         identifiers = new LinkedHashMap<String,Set<Object>>();
-        ReferenceIdentifier name = object.getName();
+        Identifier name = object.getName();
         if (name != null) { // Paranoiac check.
             final String codespace = name.getCodeSpace();
             if (preferredCodespaces == null || preferredCodespaces.contains(codespace)) {
@@ -166,9 +166,9 @@ final class ParameterTableRow {
          * Add identifiers (detailed mode only).
          */
         if (!isBrief) {
-            final Collection<? extends ReferenceIdentifier> ids = object.getIdentifiers();
+            final Collection<? extends Identifier> ids = object.getIdentifiers();
             if (ids != null) { // Paranoiac check.
-                for (final ReferenceIdentifier id : ids) {
+                for (final Identifier id : ids) {
                     final String codespace = id.getCodeSpace();
                     if (preferredCodespaces == null || preferredCodespaces.contains(codespace)) {
                         addIdentifier(codespace, id); // No .getCode() here.
@@ -351,7 +351,7 @@ final class ParameterTableRow {
                 boolean hasIdentifiers = false;
                 while (it.hasNext()) {
                     final Object id = it.next();
-                    if (id instanceof ReferenceIdentifier) {
+                    if (id instanceof Identifier) {
                         out.append(hasIdentifiers ? ", " : " (");
                         writeColor(out, colors, ElementKind.IDENTIFIER);
                         out.append(toString(id));
@@ -376,8 +376,8 @@ final class ParameterTableRow {
      * Returns the string representation of the given parameter name.
      */
     private static String toString(Object parameter) {
-        if (parameter instanceof ReferenceIdentifier) {
-            parameter = ((ReferenceIdentifier) parameter).getCode();
+        if (parameter instanceof Identifier) {
+            parameter = ((Identifier) parameter).getCode();
         }
         return parameter.toString();
     }



Mime
View raw message