sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1626013 - in /sis/branches/JDK7: ./ core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/ core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/ core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/...
Date Thu, 18 Sep 2014 15:59:38 GMT
Author: desruisseaux
Date: Thu Sep 18 15:59:38 2014
New Revision: 1626013

URL: http://svn.apache.org/r1626013
Log:
Merge from the JDK7 branch.

Modified:
    sis/branches/JDK7/   (props changed)
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultObjective.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultIndividual.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibility.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibleParty.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultTelephone.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/LegacyTelephones.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultBand.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultFeatureTypeInfo.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultSampleDimension.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultMedium.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultSpatialTemporalExtent.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultOperationChainMetadata.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultOperationMetadata.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/package-info.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValueGroup.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterBuilder.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameters.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java

Propchange: sis/branches/JDK7/
------------------------------------------------------------------------------
  Merged /sis/branches/JDK8:r1625175-1626012

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultObjective.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultObjective.java?rev=1626013&r1=1626012&r2=1626013&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultObjective.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultObjective.java
[UTF-8] Thu Sep 18 15:59:38 2014
@@ -268,7 +268,7 @@ public class DefaultObjective extends IS
     }
 
     /**
-     * Set the extent information including the bounding box, bounding polygon, vertical
and
+     * Sets the extent information including the bounding box, bounding polygon, vertical
and
      * temporal extent of the objective.
      *
      * @param newValues The new extents values.

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java?rev=1626013&r1=1626012&r2=1626013&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java
[UTF-8] Thu Sep 18 15:59:38 2014
@@ -139,7 +139,7 @@ public class DefaultCitation extends ISO
 
     /**
      * Roles, Name, contact, and position information for an individual or organization that
is responsible
-     * for the resource. Returns an empty collection if there is none.
+     * for the resource.
      */
     private Collection<Responsibility> citedResponsibleParties;
 

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultIndividual.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultIndividual.java?rev=1626013&r1=1626012&r2=1626013&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultIndividual.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultIndividual.java
[UTF-8] Thu Sep 18 15:59:38 2014
@@ -132,7 +132,7 @@ public class DefaultIndividual extends A
     }
 
     /**
-     * Set a new position of the individual in an organization.
+     * Sets a new position of the individual in an organization.
      *
      * @param newValue The new position of the individual in an organization.
      */

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibility.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibility.java?rev=1626013&r1=1626012&r2=1626013&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibility.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibility.java
[UTF-8] Thu Sep 18 15:59:38 2014
@@ -101,6 +101,7 @@ public class DefaultResponsibility exten
      * @see #castOrCopy(Responsibility)
      */
     public DefaultResponsibility(final Responsibility object) {
+        super(object);
         if (object != null) {
             this.role    = object.getRole();
             this.extents = copyCollection(object.getExtents(), Extent.class);

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibleParty.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibleParty.java?rev=1626013&r1=1626012&r2=1626013&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibleParty.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibleParty.java
[UTF-8] Thu Sep 18 15:59:38 2014
@@ -16,8 +16,8 @@
  */
 package org.apache.sis.metadata.iso.citation;
 
-import java.util.Collection;
 import java.util.Iterator;
+import java.util.Collection;
 import java.util.Collections;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultTelephone.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultTelephone.java?rev=1626013&r1=1626012&r2=1626013&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultTelephone.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultTelephone.java
[UTF-8] Thu Sep 18 15:59:38 2014
@@ -183,7 +183,7 @@ public class DefaultTelephone extends IS
     }
 
     /**
-     * Set the type of telephone number.
+     * Sets the type of telephone number.
      *
      * @param newValue The new type of telephone number.
      *

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/LegacyTelephones.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/LegacyTelephones.java?rev=1626013&r1=1626012&r2=1626013&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/LegacyTelephones.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/LegacyTelephones.java
[UTF-8] Thu Sep 18 15:59:38 2014
@@ -53,10 +53,7 @@ final class LegacyTelephones extends Leg
      */
     @Override
     protected Telephone wrap(final String value) {
-        final DefaultTelephone telephone = new DefaultTelephone();
-        telephone.setNumber(value);
-        telephone.setNumberType(type);
-        return telephone;
+        return new DefaultTelephone(value, type);
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultBand.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultBand.java?rev=1626013&r1=1626012&r2=1626013&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultBand.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultBand.java
[UTF-8] Thu Sep 18 15:59:38 2014
@@ -247,7 +247,7 @@ public class DefaultBand extends Default
     }
 
     /**
-     * Set a new units in which sensor wavelengths are expressed.
+     * Sets a new units in which sensor wavelengths are expressed.
      *
      * @param newValue the new unit.
      *

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultFeatureTypeInfo.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultFeatureTypeInfo.java?rev=1626013&r1=1626012&r2=1626013&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultFeatureTypeInfo.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultFeatureTypeInfo.java
[UTF-8] Thu Sep 18 15:59:38 2014
@@ -158,7 +158,7 @@ public class DefaultFeatureTypeInfo exte
     }
 
     /**
-     * Set a new number of occurrence of feature instances for this feature types.
+     * Sets a new number of occurrence of feature instances for this feature types.
      *
      * @param newValue the new number of occurrence.
      * @throws IllegalArgumentException if the given value is negative.

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultSampleDimension.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultSampleDimension.java?rev=1626013&r1=1626012&r2=1626013&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultSampleDimension.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultSampleDimension.java
[UTF-8] Thu Sep 18 15:59:38 2014
@@ -113,7 +113,7 @@ public class DefaultSampleDimension exte
     private RecordType otherPropertyType;
 
     /**
-     * Instance of other/attributeType that defines attributs not explicitly
+     * Instance of other/attributeType that defines attributes not explicitly
      * included in {@link CoverageContentType}.
      */
     private Record otherProperty;
@@ -220,7 +220,7 @@ public class DefaultSampleDimension exte
     }
 
     /**
-     * Set the maximum value of data values in each dimension included in the resource.
+     * Sets the maximum value of data values in each dimension included in the resource.
      *
      * @param newValue The new new maximum value.
      */
@@ -230,9 +230,9 @@ public class DefaultSampleDimension exte
     }
 
     /**
-     * Returns the units of data in each dimension included in the resource.
+     * Returns the units of data in the dimension.
      *
-     * @return The units of data in each dimension included in the resource, or {@code null}
if unspecified.
+     * @return The units of data in the dimension, or {@code null} if unspecified.
      */
     @Override
     @XmlElement(name = "units")
@@ -241,9 +241,9 @@ public class DefaultSampleDimension exte
     }
 
     /**
-     * Sets the units of data in each dimension included in the resource.
+     * Sets the units of data in the dimension.
      *
-     * @param newValue The new units of data in each dimension included in the resource.
+     * @param newValue The new units of data in the dimension.
      */
     public void setUnits(final Unit<?> newValue) {
         checkWritePermission();
@@ -262,7 +262,7 @@ public class DefaultSampleDimension exte
     }
 
     /**
-     * Set the scale factor which has been applied to the cell value.
+     * Sets the scale factor which has been applied to the cell value.
      *
      * @param newValue The new scale factor which has been applied to the cell value.
      */
@@ -325,7 +325,7 @@ public class DefaultSampleDimension exte
     }
 
     /**
-     * Set the number of values used in a thematic classification resource.
+     * Sets the number of values used in a thematic classification resource.
      *
      * @param newValues The new number of values used in a thematic classification resource.
      */
@@ -367,7 +367,7 @@ public class DefaultSampleDimension exte
     }
 
     /**
-     * Set a new type of other attribute description.
+     * Sets a new type of other attribute description.
      *
      * @param newValue The new type of other attribute description.
      */
@@ -389,7 +389,7 @@ public class DefaultSampleDimension exte
     }
 
     /**
-     * Set a new instance of other/attributeType that defines attributs not explicitly
+     * Sets a new instance of other/attributeType that defines attributes not explicitly
      * included in {@link CoverageContentType}.
      *
      * @param newValue The new instance of other/attributeType.

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultMedium.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultMedium.java?rev=1626013&r1=1626012&r2=1626013&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultMedium.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultMedium.java
[UTF-8] Thu Sep 18 15:59:38 2014
@@ -30,6 +30,7 @@ import org.opengis.metadata.distribution
 import org.opengis.metadata.distribution.MediumFormat;
 import org.apache.sis.measure.ValueRange;
 import org.apache.sis.metadata.iso.ISOMetadata;
+import org.apache.sis.internal.jaxb.NonMarshalledAuthority;
 import org.apache.sis.internal.metadata.LegacyPropertyAdapter;
 
 
@@ -99,11 +100,6 @@ public class DefaultMedium extends ISOMe
     private InternationalString mediumNote;
 
     /**
-     * Unique identifier for an instance of the medium.
-     */
-    private Identifier identifier;
-
-    /**
      * Constructs an initially empty medium.
      */
     public DefaultMedium() {
@@ -127,7 +123,7 @@ public class DefaultMedium extends ISOMe
             volumes       = object.getVolumes();
             mediumFormats = copyCollection(object.getMediumFormats(), MediumFormat.class);
             mediumNote    = object.getMediumNote();
-            identifier    = object.getIdentifier();
+            identifiers   = singleton(object.getIdentifier(), Identifier.class);
         }
     }
 
@@ -341,7 +337,7 @@ public class DefaultMedium extends ISOMe
     @Override
 /// @XmlElement(name = "identifier")
     public Identifier getIdentifier() {
-        return identifier;
+        return NonMarshalledAuthority.getMarshallable(identifiers);
     }
 
     /**
@@ -353,6 +349,7 @@ public class DefaultMedium extends ISOMe
      */
     public void setIdentifier(final Identifier newValue) {
         checkWritePermission();
-        identifier = newValue;
+        identifiers = nonNullCollection(identifiers, Identifier.class);
+        NonMarshalledAuthority.setMarshallable(identifiers, newValue);
     }
 }

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultSpatialTemporalExtent.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultSpatialTemporalExtent.java?rev=1626013&r1=1626012&r2=1626013&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultSpatialTemporalExtent.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultSpatialTemporalExtent.java
[UTF-8] Thu Sep 18 15:59:38 2014
@@ -169,7 +169,7 @@ public class DefaultSpatialTemporalExten
     }
 
     /**
-     * Set the vertical extent component.
+     * Sets the vertical extent component.
      *
      * @param newValue The new vertical extent component.
      *

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultOperationChainMetadata.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultOperationChainMetadata.java?rev=1626013&r1=1626012&r2=1626013&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultOperationChainMetadata.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultOperationChainMetadata.java
[UTF-8] Thu Sep 18 15:59:38 2014
@@ -143,7 +143,7 @@ public class DefaultOperationChainMetada
     }
 
     /**
-     * Set the name used by the service for this chain.
+     * Sets the name used by the service for this chain.
      *
      * @param newValue The new name used by the service for this chain.
      */

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultOperationMetadata.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultOperationMetadata.java?rev=1626013&r1=1626012&r2=1626013&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultOperationMetadata.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultOperationMetadata.java
[UTF-8] Thu Sep 18 15:59:38 2014
@@ -181,7 +181,7 @@ public class DefaultOperationMetadata ex
     }
 
     /**
-     * Set the unique identifier for this interface.
+     * Sets the unique identifier for this interface.
      *
      * @param newValue The new unique identifier for this interface.
      */
@@ -307,7 +307,7 @@ public class DefaultOperationMetadata ex
     }
 
     /**
-     * Set the list of operation that must be completed before current operation is invoked.
+     * Sets the list of operation that must be completed before current operation is invoked.
      *
      * @param newValues The new list of operation.
      */

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/package-info.java?rev=1626013&r1=1626012&r2=1626013&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/package-info.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/package-info.java
[UTF-8] Thu Sep 18 15:59:38 2014
@@ -30,33 +30,46 @@
  *   <th class="sep">Aggregation hierarchy</th>
  * </tr><tr><td style="width: 50%; white-space: nowrap">
  * {@linkplain org.apache.sis.metadata.iso.ISOMetadata ISO-19115 metadata}<br>
- * {@code  ├─}     {@linkplain org.apache.sis.metadata.iso.identification.AbstractIdentification
      Identification} «abstract»<br>
- * {@code  │   ├─} {@linkplain org.apache.sis.metadata.iso.identification.DefaultDataIdentification
   Data identification}<br>
- * {@code  │   └─} {@linkplain org.apache.sis.metadata.iso.identification.DefaultServiceIdentification
Service identification}<br>
- * {@code  ├─}     {@linkplain org.apache.sis.metadata.iso.identification.DefaultResolution
           Resolution}<br>
- * {@code  ├─}     {@linkplain org.apache.sis.metadata.iso.identification.DefaultBrowseGraphic
        Browse graphic}<br>
- * {@code  ├─}     {@linkplain org.apache.sis.metadata.iso.identification.DefaultKeywords
             Keywords}<br>
- * {@code  ├─}     {@linkplain org.apache.sis.metadata.iso.identification.DefaultUsage
                Usage}<br>
- * {@code  └─}     {@linkplain org.apache.sis.metadata.iso.identification.DefaultAggregateInformation
 Aggregate information}<br>
+ * {@code  ├─}     {@linkplain org.apache.sis.metadata.iso.identification.AbstractIdentification
       Identification} «abstract»<br>
+ * {@code  │   ├─} {@linkplain org.apache.sis.metadata.iso.identification.DefaultDataIdentification
    Data identification}<br>
+ * {@code  │   └─} {@linkplain org.apache.sis.metadata.iso.identification.DefaultServiceIdentification
 Service identification}<br>
+ * {@code  ├─}     {@linkplain org.apache.sis.metadata.iso.identification.DefaultResolution
            Resolution}<br>
+ * {@code  ├─}     {@linkplain org.apache.sis.metadata.iso.identification.DefaultBrowseGraphic
         Browse graphic}<br>
+ * {@code  ├─}     {@linkplain org.apache.sis.metadata.iso.identification.DefaultKeywords
              Keywords}<br>
+ * {@code  ├─}     {@linkplain org.apache.sis.metadata.iso.identification.DefaultUsage
                 Usage}<br>
+ * {@code  ├─}     {@linkplain org.apache.sis.metadata.iso.identification.DefaultAggregateInformation
  Aggregate information}<br>
+ * {@code  ├─}     {@linkplain org.apache.sis.metadata.iso.identification.DefaultCoupledResource
       Coupled resource}<br>
+ * {@code  ├─}     {@linkplain org.apache.sis.metadata.iso.identification.DefaultOperationMetadata
     Operation metadata}<br>
+ * {@code  └─}     {@linkplain org.apache.sis.metadata.iso.identification.DefaultOperationChainMetadata
Operation chain metadata}<br>
  * {@linkplain org.opengis.util.CodeList Code list}<br>
  * {@code  ├─} {@linkplain org.opengis.metadata.identification.Progress        Progress}<br>
  * {@code  ├─} {@linkplain org.opengis.metadata.identification.KeywordType     Keyword
type}<br>
  * {@code  ├─} {@linkplain org.opengis.metadata.identification.AssociationType Association
type}<br>
  * {@code  ├─} {@linkplain org.opengis.metadata.identification.InitiativeType  Initiative
type}<br>
- * {@code  └─} {@linkplain org.opengis.metadata.identification.TopicCategory   Topic
category}<br>
+ * {@code  ├─} {@linkplain org.opengis.metadata.identification.TopicCategory   Topic
category}<br>
+ * {@code  ├─} {@linkplain org.opengis.metadata.identification.CouplingType    Coupling
type}<br>
+ * {@code  └─} {@linkplain org.opengis.metadata.identification.DistributedComputingPlatform
Distributed computing platform}<br>
  * </td><td class="sep" style="width: 50%; white-space: nowrap">
- *                 {@linkplain org.apache.sis.metadata.iso.identification.AbstractIdentification
      Identification} «abstract»<br>
- * {@code  ├─}     {@linkplain org.apache.sis.metadata.iso.identification.DefaultResolution
           Resolution}<br>
- * {@code  ├─}     {@linkplain org.opengis.metadata.identification.TopicCategory   
                   Topic category} «code list»<br>
- * {@code  ├─}     {@linkplain org.opengis.metadata.identification.Progress        
                   Progress} «code list»<br>
- * {@code  ├─}     {@linkplain org.apache.sis.metadata.iso.identification.DefaultBrowseGraphic
        Browse graphic}<br>
- * {@code  ├─}     {@linkplain org.apache.sis.metadata.iso.identification.DefaultKeywords
             Keywords}<br>
- * {@code  │   └─} {@linkplain org.opengis.metadata.identification.KeywordType
                        Keyword type} «code list»<br>
- * {@code  ├─}     {@linkplain org.apache.sis.metadata.iso.identification.DefaultUsage
                Usage}<br>
- * {@code  └─}     {@linkplain org.apache.sis.metadata.iso.identification.DefaultAssociatedResource
   Associated resource}<br>
- * {@code      ├─} {@linkplain org.opengis.metadata.identification.AssociationType
                    Association type} «code list»<br>
- * {@code      └─} {@linkplain org.opengis.metadata.identification.InitiativeType
                     Initiative type} «code list»<br>
- *                 {@linkplain org.apache.sis.metadata.iso.identification.DefaultDataIdentification
   Data identification}<br>
+ *                 {@linkplain org.apache.sis.metadata.iso.identification.AbstractIdentification
       Identification} «abstract»<br>
+ * {@code  ├─}     {@linkplain org.apache.sis.metadata.iso.identification.DefaultResolution
            Resolution}<br>
+ * {@code  ├─}     {@linkplain org.opengis.metadata.identification.TopicCategory   
                    Topic category} «code list»<br>
+ * {@code  ├─}     {@linkplain org.opengis.metadata.identification.Progress        
                    Progress} «code list»<br>
+ * {@code  ├─}     {@linkplain org.apache.sis.metadata.iso.identification.DefaultBrowseGraphic
         Browse graphic}<br>
+ * {@code  ├─}     {@linkplain org.apache.sis.metadata.iso.identification.DefaultKeywords
              Keywords}<br>
+ * {@code  │   └─} {@linkplain org.opengis.metadata.identification.KeywordType
                         Keyword type} «code list»<br>
+ * {@code  ├─}     {@linkplain org.apache.sis.metadata.iso.identification.DefaultUsage
                 Usage}<br>
+ * {@code  └─}     {@linkplain org.apache.sis.metadata.iso.identification.DefaultAssociatedResource
    Associated resource}<br>
+ * {@code      ├─} {@linkplain org.opengis.metadata.identification.AssociationType
                     Association type} «code list»<br>
+ * {@code      └─} {@linkplain org.opengis.metadata.identification.InitiativeType
                      Initiative type} «code list»<br>
+ *                 {@linkplain org.apache.sis.metadata.iso.identification.DefaultDataIdentification
    Data identification}<br>
+ *                 {@linkplain org.apache.sis.metadata.iso.identification.DefaultServiceIdentification
 Service identification}<br>
+ * {@code  ├─}     {@linkplain org.opengis.metadata.identification.CouplingType    
                    Coupling type} «code list»<br>
+ * {@code  ├─}     {@linkplain org.apache.sis.metadata.iso.identification.DefaultCoupledResource
       Coupled resource}<br>
+ * {@code  ├─}     {@linkplain org.apache.sis.metadata.iso.identification.DefaultOperationMetadata
     Operation metadata}<br>
+ * {@code  │   ├─} {@linkplain org.opengis.metadata.identification.DistributedComputingPlatform
        Distributed computing platform} «code list»<br>
+ * {@code  │   └─} {@linkplain org.apache.sis.parameter.DefaultParameterDescriptor
                     Parameter descriptor}<br>
+ * {@code  │       └─} {@linkplain org.opengis.parameter.ParameterDirection
                            Parameter direction} «enum»<br>
+ * {@code  └─}     {@linkplain org.apache.sis.metadata.iso.identification.DefaultOperationChainMetadata
Operation chain metadata}<br>
  * </td></tr></table>
  *
  * <p>In addition to the standard properties, SIS provides the following methods:</p>

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java?rev=1626013&r1=1626012&r2=1626013&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java
[UTF-8] Thu Sep 18 15:59:38 2014
@@ -43,50 +43,50 @@ import java.util.Objects;
  * Service Metadata (ISO 19115) and Web Processing Services (WPS) standards.
  * The main information are:
  *
- * <table class="ogc">
+ * <table class="sis">
  *   <caption>Main parameter properties</caption>
  *   <tr>
  *     <th>Getter method</th>
- *     <th>ISO 19111</th>
- *     <th>WPS</th>
- *     <th>ISO 19115</th>
+ *     <th class="sep">ISO 19111</th>
+ *     <th class="sep">WPS</th>
+ *     <th class="sep">ISO 19115</th>
  *     <th class="sep">Remarks</th>
  *   </tr>
  *   <tr>
- *      <td>{@link #getName()}</td>
- *      <td>{@code name}</td>
- *      <td>{@code Identifier}</td>
- *      <td>{@code name}</td>
- *      <td class="sep">See {@linkplain #getName() method javadoc} for {@code MemberName}
↔ {@code Identifier} mapping.</td>
+ *     <td>{@link #getName() getName()}</td>
+ *     <td class="sep">{@code name}</td>
+ *     <td class="sep">{@code Identifier}</td>
+ *     <td class="sep">{@code name}</td>
+ *     <td class="sep">See {@link Parameters#getMemberName(ParameterDescriptor)} for
{@code MemberName} ↔ {@code Identifier} mapping.</td>
  *   </tr>
  *   <!-- "Title" (WPS) equivalent to "designation" (Feature), but not yet provided. -->
  *   <tr>
- *      <td>{@link #getDescription()}</td>
- *      <td></td>
- *      <td>{@code Abstract}</td>
- *      <td>{@code description}</td>
- *      <td class="sep">Also known as “definition”.</td>
+ *     <td>{@link #getDescription()}</td>
+ *     <td class="sep"></td>
+ *     <td class="sep">{@code Abstract}</td>
+ *     <td class="sep">{@code description}</td>
+ *     <td class="sep">Also known as “definition”.</td>
  *   </tr>
  *   <tr>
- *      <td>{@link #getDirection()}</td>
- *      <td></td>
- *      <td></td>
- *      <td>{@code direction}</td>
- *      <td class="sep">Tells if the parameter is a WPS {@code Input} or {@code Output}
structure.</td>
+ *     <td>{@link #getDirection()}</td>
+ *     <td class="sep"></td>
+ *     <td class="sep"></td>
+ *     <td class="sep">{@code direction}</td>
+ *     <td class="sep">Tells if the parameter is a WPS {@code Input} or {@code Output}
structure.</td>
  *   </tr>
  *   <tr>
- *      <td>{@link #getMinimumOccurs()}</td>
- *      <td>{@code minimumOccurs}</td>
- *      <td>{@code MinOccurs}</td>
- *      <td>{@code optionality}</td>
- *      <td class="sep">{@code optionality   = (minimumOccurs > 0)}</td>
+ *     <td>{@link #getMinimumOccurs()}</td>
+ *     <td class="sep">{@code minimumOccurs}</td>
+ *     <td class="sep">{@code MinOccurs}</td>
+ *     <td class="sep">{@code optionality}</td>
+ *     <td class="sep">{@code optionality   = (minimumOccurs > 0)}</td>
  *   </tr>
  *   <tr>
- *      <td>{@link #getMaximumOccurs()}</td>
- *      <td>{@code maximumOccurs}</td>
- *      <td>{@code MaxOccurs}</td>
- *      <td>{@code repeatability}</td>
- *      <td class="sep">{@code repeatability = (maximumOccurs > 1)}</td>
+ *     <td>{@link #getMaximumOccurs()}</td>
+ *     <td class="sep">{@code maximumOccurs}</td>
+ *     <td class="sep">{@code MaxOccurs}</td>
+ *     <td class="sep">{@code repeatability}</td>
+ *     <td class="sep">{@code repeatability = (maximumOccurs > 1)}</td>
  *   </tr>
  * </table>
  *

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java?rev=1626013&r1=1626012&r2=1626013&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java
[UTF-8] Thu Sep 18 15:59:38 2014
@@ -36,9 +36,12 @@ import org.apache.sis.io.wkt.ElementKind
 import org.apache.sis.internal.referencing.WKTUtilities;
 import org.apache.sis.internal.util.Numerics;
 import org.apache.sis.util.Numbers;
+import org.apache.sis.util.ComparisonMode;
+import org.apache.sis.util.LenientComparable;
 import org.apache.sis.util.resources.Errors;
 
 import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
+import static org.apache.sis.util.Utilities.deepEquals;
 
 // Branch-dependent imports
 import java.util.Objects;
@@ -110,7 +113,9 @@ import java.nio.file.Path;
  * @see DefaultParameterDescriptor
  * @see DefaultParameterValueGroup
  */
-public class DefaultParameterValue<T> extends FormattableObject implements ParameterValue<T>,
Serializable, Cloneable {
+public class DefaultParameterValue<T> extends FormattableObject implements ParameterValue<T>,
+        LenientComparable, Serializable, Cloneable
+{
     /**
      * Serial number for inter-operability with different versions.
      */
@@ -228,7 +233,7 @@ public class DefaultParameterValue<T> ex
     public boolean booleanValue() throws IllegalStateException {
         final T value = getValue();
         if (value instanceof Boolean) {
-            return ((Boolean) value).booleanValue();
+            return (Boolean) value;
         }
         throw incompatibleValue(value);
     }
@@ -680,26 +685,55 @@ public class DefaultParameterValue<T> ex
 
     /**
      * Compares the specified object with this parameter for equality.
+     * The strictness level is controlled by the second argument.
      *
      * @param  object The object to compare to {@code this}.
-     * @return {@code true} if both objects are equal.
+     * @param  mode The strictness level of the comparison.
+     * @return {@code true} if both objects are equal according the given comparison mode.
      */
     @Override
-    public boolean equals(final Object object) {
+    public boolean equals(final Object object, final ComparisonMode mode) {
         if (object == this) {
             // Slight optimization
             return true;
         }
-        if (object != null && getClass() == object.getClass()) {
-            final DefaultParameterValue<?> that = (DefaultParameterValue<?>)
object;
-            return Objects.equals(descriptor, that.descriptor) &&
-                   Objects.equals(value,      that.value) &&
-                   Objects.equals(unit,       that.unit);
+        if (object != null) {
+            if (mode == ComparisonMode.STRICT) {
+                if (getClass() == object.getClass()) {
+                    final DefaultParameterValue<?> that = (DefaultParameterValue<?>)
object;
+                    return Objects.equals(descriptor, that.descriptor) &&
+                           Objects.equals(value,      that.value) &&
+                           Objects.equals(unit,       that.unit);
+                }
+            } else if (object instanceof ParameterValue<?>) {
+                final ParameterValue<?> that = (ParameterValue<?>) object;
+                return deepEquals(getDescriptor(), that.getDescriptor(), mode) &&
+                       Objects.equals(getValue(),  that.getValue()) &&
+                       Objects.equals(getUnit(),   that.getUnit());
+            }
         }
         return false;
     }
 
     /**
+     * Compares the specified object with this parameter for equality.
+     * This method is implemented as below:
+     *
+     * {@preformat java
+     *     return equals(other, ComparisonMode.STRICT);
+     * }
+     *
+     * Subclasses shall override {@link #equals(Object, ComparisonMode)} instead than this
method.
+     *
+     * @param  object The object to compare to {@code this}.
+     * @return {@code true} if both objects are equal.
+     */
+    @Override
+    public final boolean equals(final Object object) {
+        return equals(object, ComparisonMode.STRICT);
+    }
+
+    /**
      * Returns a hash value for this parameter.
      *
      * @return The hash code value. This value doesn't need to be the same

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValueGroup.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValueGroup.java?rev=1626013&r1=1626012&r2=1626013&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValueGroup.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValueGroup.java
[UTF-8] Thu Sep 18 15:59:38 2014
@@ -27,10 +27,13 @@ import org.opengis.parameter.GeneralPara
 import org.opengis.parameter.GeneralParameterDescriptor;
 import org.opengis.parameter.ParameterNotFoundException;
 import org.opengis.parameter.InvalidParameterCardinalityException;
+import org.apache.sis.util.LenientComparable;
+import org.apache.sis.util.ComparisonMode;
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.Debug;
 
+import static org.apache.sis.util.Utilities.deepEquals;
 import static org.apache.sis.referencing.IdentifiedObjects.isHeuristicMatchForName;
 
 // Branch-dependent imports
@@ -100,7 +103,9 @@ import java.util.Objects;
  * @see DefaultParameterDescriptorGroup
  * @see DefaultParameterValue
  */
-public class DefaultParameterValueGroup implements ParameterValueGroup, Serializable, Cloneable
{
+public class DefaultParameterValueGroup implements ParameterValueGroup,
+        LenientComparable, Serializable, Cloneable
+{
     /**
      * Serial number for inter-operability with different versions.
      */
@@ -318,24 +323,53 @@ public class DefaultParameterValueGroup 
 
     /**
      * Compares the specified object with this parameter for equality.
+     * The strictness level is controlled by the second argument.
      *
      * @param  object The object to compare to {@code this}.
-     * @return {@code true} if both objects are equal.
+     * @param  mode The strictness level of the comparison.
+     * @return {@code true} if both objects are equal according the given comparison mode.
      */
     @Override
-    public boolean equals(final Object object) {
+    public boolean equals(final Object object, final ComparisonMode mode) {
         if (object == this) {
+            // Slight optimization
             return true;
         }
-        if (object != null && getClass() == object.getClass()) {
-            final DefaultParameterValueGroup that = (DefaultParameterValueGroup) object;
-            return Objects.equals(values.descriptor, that.values.descriptor) &&
-                   Objects.equals(values, that.values);
+        if (object != null) {
+            if (mode == ComparisonMode.STRICT) {
+                if (getClass() == object.getClass()) {
+                    final DefaultParameterValueGroup that = (DefaultParameterValueGroup)
object;
+                    return Objects.equals(values.descriptor, that.values.descriptor) &&
+                           Objects.equals(values, that.values);
+                }
+            } else if (object instanceof ParameterValueGroup) {
+                final ParameterValueGroup that = (ParameterValueGroup) object;
+                return deepEquals(getDescriptor(), that.getDescriptor(), mode) &&
+                       deepEquals(values(), that.values(), mode);
+            }
         }
         return false;
     }
 
     /**
+     * Compares the specified object with this parameter for equality.
+     * This method is implemented as below:
+     *
+     * {@preformat java
+     *     return equals(other, ComparisonMode.STRICT);
+     * }
+     *
+     * Subclasses shall override {@link #equals(Object, ComparisonMode)} instead than this
method.
+     *
+     * @param  object The object to compare to {@code this}.
+     * @return {@code true} if both objects are equal.
+     */
+    @Override
+    public final boolean equals(final Object object) {
+        return equals(object, ComparisonMode.STRICT);
+    }
+
+    /**
      * Returns a hash value for this parameter.
      *
      * @return The hash code value. This value doesn't need to be the same

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterBuilder.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterBuilder.java?rev=1626013&r1=1626012&r2=1626013&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterBuilder.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterBuilder.java
[UTF-8] Thu Sep 18 15:59:38 2014
@@ -101,6 +101,22 @@ 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/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameters.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameters.java?rev=1626013&r1=1626012&r2=1626013&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameters.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameters.java
[UTF-8] Thu Sep 18 15:59:38 2014
@@ -144,7 +144,7 @@ public final class Parameters extends St
      * This method performs the following checks:
      *
      * <ul>
-     *   <li>If the {@linkplain DefaultParameterDescriptor#getName()} primary name
is an instance of {@code MemberName},
+     *   <li>If the {@linkplain DefaultParameterDescriptor#getName() primary name}
is an instance of {@code MemberName},
      *       returns that primary name.</li>
      *   <li>Otherwise this method searches for the first {@linkplain DefaultParameterDescriptor#getAlias()
alias}
      *       which is an instance of {@code MemberName}. If found, that alias is returned.</li>

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java?rev=1626013&r1=1626012&r2=1626013&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java [UTF-8]
(original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java [UTF-8]
Thu Sep 18 15:59:38 2014
@@ -247,7 +247,7 @@ public final class Types extends Static 
      * @return The description, or {@code null} if none or if the given code is null.
      *
      * @see #getCodeTitle(Enumerated)
-     * @see #getDescription(Enumerated)
+     * @see #getDescription(Class)
      */
     public static InternationalString getDescription(final Enumerated code) {
         if (code != null) {



Mime
View raw message