sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1814231 - in /sis/branches/JDK8: core/sis-metadata/src/main/java/org/apache/sis/metadata/ core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/ core/sis-metadata/src/test/java/org/apache/sis/metadata/ core/sis-referenci...
Date Fri, 03 Nov 2017 18:15:10 GMT
Author: desruisseaux
Date: Fri Nov  3 18:15:10 2017
New Revision: 1814231

URL: http://svn.apache.org/viewvc?rev=1814231&view=rev
Log:
Remove some deprecated methods on 1.0 development branch. Those methods will still on the
0.8 branch.

Removed:
    sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/index/GeoHashCoder.java
Modified:
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultFormat.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataStandardTest.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/ValueMapTest.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/GeodeticObjectBuilder.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/builder/LinearTransformBuilder.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CoordinateSystemTransform.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/builder/LinearTransformBuilderTest.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
    sis/branches/JDK8/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/AttributeNames.java
    sis/branches/JDK8/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStore.java

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java?rev=1814231&r1=1814230&r2=1814231&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java
[UTF-8] Fri Nov  3 18:15:10 2017
@@ -835,23 +835,6 @@ public class MetadataStandard implements
     }
 
     /**
-     * @deprecated Replaced by {@link #asValueMap(Object, Class, KeyNamePolicy, ValueExistencePolicy)}
-     * (i.e. a {@code Class} argument has been inserted after the metadata value).
-     *
-     * @param  metadata     the metadata object to view as a map.
-     * @param  keyPolicy    determines the string representation of map keys.
-     * @param  valuePolicy  whether the entries having null value or empty collection shall
be included in the map.
-     * @return a map view over the metadata object.
-     * @throws ClassCastException if the metadata object does not implement a metadata interface
of the expected package.
-     */
-    @Deprecated
-    public Map<String,Object> asValueMap(final Object metadata, final KeyNamePolicy
keyPolicy,
-            final ValueExistencePolicy valuePolicy) throws ClassCastException
-    {
-        return asValueMap(metadata, null, keyPolicy, valuePolicy);
-    }
-
-    /**
      * Returns the specified metadata object as a tree table.
      * The tree table is backed by the metadata object using Java reflection, so changes
in the
      * underlying metadata object are immediately reflected in the tree table and conversely.
@@ -933,20 +916,6 @@ public class MetadataStandard implements
     }
 
     /**
-     * @deprecated Replaced by {@link #asTreeTable(Object, Class, ValueExistencePolicy)}
-     * (i.e. a {@code Class} argument has been inserted after the metadata value).
-     *
-     * @param  metadata     the metadata object to view as a tree table.
-     * @param  valuePolicy  whether the property having null value or empty collection shall
be included in the tree.
-     * @return a tree table representation of the specified metadata.
-     * @throws ClassCastException if the metadata object does not implement a metadata interface
of the expected package.
-     */
-    @Deprecated
-    public TreeTable asTreeTable(final Object metadata, final ValueExistencePolicy valuePolicy)
throws ClassCastException {
-        return asTreeTable(metadata, null, valuePolicy);
-    }
-
-    /**
      * Replaces every properties in the specified metadata by their
      * {@linkplain ModifiableMetadata#unmodifiable() unmodifiable variant}.
      *

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultFormat.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultFormat.java?rev=1814231&r1=1814230&r2=1814231&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultFormat.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultFormat.java
[UTF-8] Fri Nov  3 18:15:10 2017
@@ -17,7 +17,6 @@
 package org.apache.sis.metadata.iso.distribution;
 
 import java.util.Collection;
-import java.util.Collections;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
@@ -30,7 +29,6 @@ import org.apache.sis.internal.metadata.
 import org.apache.sis.internal.metadata.LegacyPropertyAdapter;
 import org.apache.sis.metadata.iso.citation.DefaultCitation;
 import org.apache.sis.metadata.iso.ISOMetadata;
-import org.apache.sis.util.iso.Types;
 
 // Branch-dependent imports
 import java.util.function.BiConsumer;
@@ -132,27 +130,6 @@ public class DefaultFormat extends ISOMe
     }
 
     /**
-     * Creates a format initialized to the given name and version.
-     * The given name should be a short name or abbreviation, for example "JPEG" or "GeoTIFF".
-     *
-     * @param  name     the abbreviated name of the data transfer format, or {@code null}.
-     * @param  version  the version of the format (date, number, <i>etc.</i>),
or {@code null}.
-     *
-     * @deprecated This constructor had a straightforward meaning in ISO 19115:2003, but
became confusing
-     *             with the ISO 19115:2014 update because of differences in the {@code Format}
model.
-     *             Consider using {@link org.apache.sis.metadata.sql.MetadataSource#lookup(Class,
String)} instead.
-     */
-    @Deprecated
-    public DefaultFormat(CharSequence name, final CharSequence version) {
-        final DefaultCitation citation = new DefaultCitation();
-        if (name != null) {
-            citation.setAlternateTitles(Collections.singleton(Types.toInternationalString(name)));
-        }
-        citation.setEdition(Types.toInternationalString(version));
-        formatSpecificationCitation = citation;
-    }
-
-    /**
      * Constructs a new instance initialized with the values from the specified metadata
object.
      * This is a <cite>shallow</cite> copy constructor, since the other metadata
contained in the
      * given object are not recursively copied.

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataStandardTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataStandardTest.java?rev=1814231&r1=1814230&r2=1814231&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataStandardTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataStandardTest.java
[UTF-8] Fri Nov  3 18:15:10 2017
@@ -249,7 +249,7 @@ public final strictfp class MetadataStan
     }
 
     /**
-     * Tests the {@link MetadataStandard#asValueMap(Object, KeyNamePolicy, ValueExistencePolicy)}
implementation.
+     * Tests the {@link MetadataStandard#asValueMap(Object, Class, KeyNamePolicy, ValueExistencePolicy)}
implementation.
      * This test duplicates {@link ValueMapTest}, but is done here again as an integration
test and because many
      * {@code MetadataStandard} methods depend on it ({@code equals}, {@code hashCode}, {@code
prune}, <i>etc.</i>).
      */

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/ValueMapTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/ValueMapTest.java?rev=1814231&r1=1814230&r2=1814231&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/ValueMapTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/ValueMapTest.java
[UTF-8] Fri Nov  3 18:15:10 2017
@@ -42,7 +42,7 @@ import static org.apache.sis.test.TestUt
 
 /**
  * Tests the {@link ValueMap} class on instances created by
- * {@link MetadataStandard#asValueMap(Object, KeyNamePolicy, ValueExistencePolicy)}.
+ * {@link MetadataStandard#asValueMap(Object, Class, KeyNamePolicy, ValueExistencePolicy)}.
  * Unless otherwise specified, all tests use the {@link MetadataStandard#ISO_19115} constant.
  *
  * @author  Martin Desruisseaux (Geomatys)

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/GeodeticObjectBuilder.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/GeodeticObjectBuilder.java?rev=1814231&r1=1814230&r2=1814231&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/GeodeticObjectBuilder.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/GeodeticObjectBuilder.java
[UTF-8] Fri Nov  3 18:15:10 2017
@@ -252,7 +252,7 @@ public class GeodeticObjectBuilder exten
      * @return {@code this}, for method calls chaining.
      * @throws FactoryException if the operation method for the Transverse Mercator projection
can not be obtained.
      *
-     * @see CommonCRS#UTM(double, double)
+     * @see CommonCRS#universal(double, double)
      */
     public GeodeticObjectBuilder setTransverseMercator(TransverseMercator.Zoner zoner, double
latitude, double longitude)
             throws FactoryException

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java?rev=1814231&r1=1814230&r2=1814231&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java
[UTF-8] Fri Nov  3 18:15:10 2017
@@ -973,24 +973,6 @@ public enum CommonCRS {
      */
 
     /**
-     * Returns a Universal Transverse Mercator (UTM) projection for the zone containing the
given point.
-     * There is a total of 120 UTM zones, with 60 zones in the North hemisphere and 60 zones
in the South hemisphere.
-     *
-     * @param  latitude  a latitude in the desired UTM projection zone.
-     * @param  longitude a longitude in the desired UTM projection zone.
-     * @return a Universal Transverse Mercator projection for the zone containing the given
point.
-     *
-     * @since 0.7
-     *
-     * @deprecated Generalized by {@link #universal(double, double)},
-     *             which can also return a UPS projection when appropriate.
-     */
-    @Deprecated
-    public ProjectedCRS UTM(final double latitude, final double longitude) {
-        return universal(Math.signum(latitude), longitude);
-    }
-
-    /**
      * Returns a Universal Transverse Mercator (UTM) or a Universal Polar Stereographic (UPS)
projection
      * for the zone containing the given point.
      * There is a total of 120 UTM zones, with 60 zones in the North hemisphere and 60 zones
in the South hemisphere.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/builder/LinearTransformBuilder.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/builder/LinearTransformBuilder.java?rev=1814231&r1=1814230&r2=1814231&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/builder/LinearTransformBuilder.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/builder/LinearTransformBuilder.java
[UTF-8] Fri Nov  3 18:15:10 2017
@@ -110,7 +110,7 @@ public class LinearTransformBuilder exte
     private int numPoints;
 
     /**
-     * The transform created by the last call to {@link #create()}.
+     * The transform created by the last call to {@link #create(MathTransformFactory)}.
      * This is reset to {@code null} when coordinates are modified.
      */
     private transient LinearTransform transform;
@@ -373,8 +373,6 @@ search: for (int j=0; j<numPoints; j++)
             throws MismatchedDimensionException
     {
         ArgumentChecks.ensureNonNull("sourceToTarget", sourceToTarget);
-        pendingSources = null;
-        pendingTargets = null;
         transform   = null;
         correlation = null;
         sources     = null;
@@ -513,7 +511,6 @@ search: for (int j=0; j<numPoints; j++)
      * @since 0.8
      */
     public double[] getControlPoint(final int[] source) {
-        processPendings();
         ArgumentChecks.ensureNonNull("source", source);
         verifySourceDimension(source.length);
         if (targets == null) {
@@ -551,97 +548,6 @@ search: for (int j=0; j<numPoints; j++)
     }
 
     /**
-     * Sets the source points, overwriting any previous setting. The number of source points
will need to be the same
-     * than the number of {@linkplain #setTargetPoints target points} when the {@link #create()}
method will be invoked.
-     * In current Apache SIS implementation, the source points must be one or two-dimensional.
-     *
-     * <p>If this builder has been created with the {@link #LinearTransformBuilder(int...)}
constructor,
-     * then all given points must be two-dimensional and all ordinate values must be integers
in the
-     * [0 … <var>width</var>-1] or [0 … <var>height</var>-1]
range for the first and second dimension
-     * respectively. This constraint does not apply if this builder has been created with
the
-     * {@link #LinearTransformBuilder()} constructor.</p>
-     *
-     * <p>It is caller's responsibility to ensure that no source point is duplicated.
-     * If the same source point is repeated twice, then {@code LinearTransformBuilder} behavior
is undefined.</p>
-     *
-     * @param  points  the source points, assumed precise.
-     * @throws MismatchedDimensionException if at least one point does not have the expected
number of dimensions.
-     *
-     * @deprecated Replaced by {@link #setControlPoints(Map)}.
-     */
-    @Deprecated
-    public void setSourcePoints(final DirectPosition... points) throws MismatchedDimensionException
{
-        ArgumentChecks.ensureNonNull("points", points);
-        transform   = null;
-        correlation = null;
-        sources     = null;
-        targets     = null;
-        numPoints   = 0;
-        pendingSources = points.clone();
-    }
-
-    /**
-     * Sets the target points, overwriting any previous setting. The number of target points
will need to be the same
-     * than the number of {@linkplain #setSourcePoints source points} when the {@link #create()}
method will be invoked.
-     * Target points can have any number of dimensions (not necessarily 2), but all points
shall have
-     * the same number of dimensions.
-     *
-     * @param  points  the target points, assumed uncertain.
-     * @throws MismatchedDimensionException if not all points have the same number of dimensions.
-     *
-     * @deprecated Replaced by {@link #setControlPoints(Map)}.
-     */
-    @Deprecated
-    public void setTargetPoints(final DirectPosition... points) throws MismatchedDimensionException
{
-        ArgumentChecks.ensureNonNull("points", points);
-        transform   = null;
-        correlation = null;
-        sources     = null;
-        targets     = null;
-        numPoints   = 0;
-        pendingTargets = points.clone();
-    }
-
-    @Deprecated
-    private transient DirectPosition[] pendingSources, pendingTargets;
-
-    @Deprecated
-    private void processPendings() {
-        if (pendingSources != null || pendingTargets != null) {
-            if (pendingSources == null || pendingTargets == null) {
-                throw new IllegalStateException(Errors.format(
-                        Errors.Keys.MissingValueForProperty_1, (pendingSources == null) ?
"sources" : "targets"));
-            }
-            final int length = pendingSources.length;
-            if (pendingTargets.length != length) {
-                throw new IllegalStateException(Errors.format(Errors.Keys.MismatchedArrayLengths));
-            }
-            final Map<DirectPosition,DirectPosition> sourceToTarget = new java.util.HashMap<>(length);
-            for (int i=0; i<length; i++) {
-                sourceToTarget.put(pendingSources[i], pendingTargets[i]);
-            }
-            setControlPoints(sourceToTarget);
-        }
-    }
-
-    /**
-     * Creates a linear transform approximation from the source positions to the target positions.
-     * This method assumes that source positions are precise and that all uncertainty is
in the target positions.
-     *
-     * @return the fitted linear transform.
-     *
-     * @deprecated Replaced by {@link #create(MathTransformFactory)}.
-     */
-    @Deprecated
-    public LinearTransform create() {
-        try {
-            return create(null);
-        } catch (FactoryException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    /**
      * Creates a linear transform approximation from the source positions to the target positions.
      * This method assumes that source positions are precise and that all uncertainty is
in the target positions.
      *
@@ -658,7 +564,6 @@ search: for (int j=0; j<numPoints; j++)
     @SuppressWarnings("serial")
     public LinearTransform create(final MathTransformFactory factory) throws FactoryException
{
         if (transform == null) {
-            processPendings();
             final double[][] sources = this.sources;                    // Protect from changes.
             final double[][] targets = this.targets;
             if (targets == null) {
@@ -731,7 +636,7 @@ search: for (int j=0; j<numPoints; j++)
     }
 
     /**
-     * Returns the correlation coefficients of the last transform created by {@link #create()},
+     * Returns the correlation coefficients of the last transform created by {@link #create
create(…)},
      * or {@code null} if none. If non-null, the array length is equals to the number of
target
      * dimensions.
      *

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CoordinateSystemTransform.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CoordinateSystemTransform.java?rev=1814231&r1=1814230&r2=1814231&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CoordinateSystemTransform.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CoordinateSystemTransform.java
[UTF-8] Fri Nov  3 18:15:10 2017
@@ -157,9 +157,9 @@ abstract class CoordinateSystemTransform
     }
 
     /**
-     * Implementation of {@link DefaultMathTransformFactory#createCoordinateSystemChange(CoordinateSystem,
CoordinateSystem)},
-     * defined here for reducing the {@code DefaultMathTransformFactory} weight in the common
case where the conversions
-     * handled by this class are not needed.
+     * Implementation of {@link DefaultMathTransformFactory#createCoordinateSystemChange(CoordinateSystem,
+     * CoordinateSystem, Ellipsoid)}, defined here for reducing the {@code DefaultMathTransformFactory}
+     * weight in the common case where the conversions handled by this class are not needed.
      */
     static MathTransform create(final MathTransformFactory factory, final CoordinateSystem
source,
             final CoordinateSystem target) throws FactoryException

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java?rev=1814231&r1=1814230&r2=1814231&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java
[UTF-8] Fri Nov  3 18:15:10 2017
@@ -1203,25 +1203,6 @@ public class DefaultMathTransformFactory
     }
 
     /**
-     * Creates a math transform that represent a change of coordinate system.
-     *
-     * @param  source  the source coordinate system.
-     * @param  target  the target coordinate system.
-     * @return a conversion from the given source to the given target coordinate system.
-     * @throws FactoryException if the conversion can not be created.
-     *
-     * @deprecated Replaced by {@link #createCoordinateSystemChange(CoordinateSystem, CoordinateSystem,
Ellipsoid)}
-     *
-     * @since 0.7
-     */
-    @Deprecated
-    public MathTransform createCoordinateSystemChange(final CoordinateSystem source, final
CoordinateSystem target)
-            throws FactoryException
-    {
-        return createCoordinateSystemChange(source, target, null);
-    }
-
-    /**
      * Creates a math transform that represent a change of coordinate system. If exactly
one argument is
      * an {@linkplain org.apache.sis.referencing.cs.DefaultEllipsoidalCS ellipsoidal coordinate
systems},
      * then the {@code ellipsoid} argument is mandatory. In all other cases (including the
case where both

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/builder/LinearTransformBuilderTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/builder/LinearTransformBuilderTest.java?rev=1814231&r1=1814230&r2=1814231&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/builder/LinearTransformBuilderTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/builder/LinearTransformBuilderTest.java
[UTF-8] Fri Nov  3 18:15:10 2017
@@ -74,15 +74,12 @@ public final strictfp class LinearTransf
      */
     @Test
     public void testMinimalist2D() throws FactoryException {
+        final Map<DirectPosition2D,DirectPosition2D> pos = new HashMap<>(8);
+        assertNull(pos.put(new DirectPosition2D(1, 1), new DirectPosition2D(3, 2)));
+        assertNull(pos.put(new DirectPosition2D(1, 2), new DirectPosition2D(3, 5)));
+        assertNull(pos.put(new DirectPosition2D(2, 2), new DirectPosition2D(5, 5)));
         final LinearTransformBuilder builder = new LinearTransformBuilder();
-        builder.setSourcePoints(
-                new DirectPosition2D(1, 1),
-                new DirectPosition2D(1, 2),
-                new DirectPosition2D(2, 2));
-        builder.setTargetPoints(
-                new DirectPosition2D(3, 2),
-                new DirectPosition2D(3, 5),
-                new DirectPosition2D(5, 5));
+        builder.setControlPoints(pos);
 
         assertArrayEquals(new double[] {3, 2}, builder.getControlPoint(new int[] {1, 1}),
STRICT);
         assertArrayEquals(new double[] {3, 5}, builder.getControlPoint(new int[] {1, 2}),
STRICT);

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java?rev=1814231&r1=1814230&r2=1814231&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java [UTF-8]
(original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java [UTF-8]
Fri Nov  3 18:15:10 2017
@@ -27,18 +27,14 @@ import org.opengis.geometry.DirectPositi
 import org.opengis.referencing.cs.AxisDirection;    // For javadoc
 
 import org.apache.sis.util.Static;
-import org.apache.sis.util.Workaround;
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.internal.util.Constants;
 
-import static java.lang.Math.PI;
-import static java.lang.Math.abs;
 import static org.apache.sis.measure.UnitRegistry.SI;
 import static org.apache.sis.measure.UnitRegistry.ACCEPTED;
 import static org.apache.sis.measure.UnitRegistry.IMPERIAL;
 import static org.apache.sis.measure.UnitRegistry.OTHER;
 import static org.apache.sis.measure.UnitRegistry.PREFIXABLE;
-import static org.apache.sis.measure.SexagesimalConverter.EPS;
 
 
 /**
@@ -1474,51 +1470,6 @@ public final class Units extends Static
     }
 
     /**
-     * Multiplies the given unit by the given factor. For example multiplying {@link #METRE}
-     * by 1000 gives {@link #KILOMETRE}. Invoking this method is equivalent to invoking
-     * {@link Unit#multiply(double)} except for the following:
-     *
-     * <ul>
-     *   <li>A small tolerance factor is applied for a few factors commonly used in
GIS.
-     *       For example {@code multiply(RADIANS, 0.0174532925199...)} will return {@link
#DEGREE}
-     *       even if the given numerical value is slightly different than {@linkplain Math#PI
π}/180.
-     *       The tolerance factor and the set of units handled especially may change in future
SIS versions.</li>
-     *   <li>This method tries to returns unique instances for some common units.</li>
-     * </ul>
-     *
-     * @param  <Q>     the quantity measured by the unit.
-     * @param  unit    the unit to multiply.
-     * @param  factor  the multiplication factor.
-     * @return the unit multiplied by the given factor.
-     *
-     * @deprecated Replaced by Apache SIS implementation of {@link Unit#multiply(double)}.
-     */
-    @Deprecated
-    @Workaround(library="JSR-275", version="0.9.3")
-    @SuppressWarnings("unchecked")
-    public static <Q extends Quantity<Q>> Unit<Q> multiply(Unit<Q>
unit, final double factor) {
-        if (RADIAN.equals(unit)) {
-            if (abs(factor - (PI / 180)) <= (EPS * PI/180)) {
-                return (Unit<Q>) DEGREE;
-            }
-            if (abs(factor - (PI / 200)) <= (EPS * PI/200)) {
-                return (Unit<Q>) GRAD;
-            }
-        } else if (METRE.equals(unit)) {
-            if (abs(factor - 0.3048) <= (EPS * 0.3048)) {
-                return (Unit<Q>) FOOT;
-            }
-            if (abs(factor - (1200.0/3937)) <= (EPS * (1200.0/3937))) {
-                return (Unit<Q>) US_SURVEY_FOOT;
-            }
-        }
-        if (abs(factor - 1) > EPS) {
-            unit = unit.multiply(factor);
-        }
-        return unit;
-    }
-
-    /**
      * Returns the factor by which to multiply the standard unit in order to get the given
unit.
      * The "standard" unit is usually the SI unit on which the given unit is based, as given
by
      * {@link Unit#getSystemUnit()}.

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java?rev=1814231&r1=1814230&r2=1814231&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
[UTF-8] Fri Nov  3 18:15:10 2017
@@ -483,28 +483,6 @@ public class IndexedResourceBundle exten
     }
 
     /**
-     * Gets a string for the given key and appends ":" to it.
-     * A space may or may not be added before ":", depending on the locale.
-     * No space is added after the string; it is up to the caller to add such space if needed.
-     *
-     * @param  key  the key for the desired string.
-     * @return the string for the given key.
-     * @throws MissingResourceException if no object for the given key can be found.
-     *
-     * @deprecated Replaced by {@link #appendLabel(short, Appendable)}.
-     */
-    @Deprecated
-    public final String getLabel(final short key) throws MissingResourceException {
-        String label = getString(key);
-        if (Locale.FRENCH.getLanguage().equals(getLocale().getLanguage())) {
-            label += "\u00A0:";
-        } else {
-            label += ':';
-        }
-        return label;
-    }
-
-    /**
      * Gets a string for the given key from this resource bundle or one of its parents.
      *
      * @param  key  the key for the desired string.

Modified: sis/branches/JDK8/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/AttributeNames.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/AttributeNames.java?rev=1814231&r1=1814230&r2=1814231&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/AttributeNames.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/AttributeNames.java
[UTF-8] Fri Nov  3 18:15:10 2017
@@ -109,7 +109,6 @@ import org.opengis.metadata.extent.Geogr
  * {@value     #METADATA_CREATION}<br>
  * {@value     #METADATA_LINK}<br>
  * {@linkplain #TITLE "name"}<br>
- * {@value     #NAMING_AUTHORITY}<br>
  * {@value     #PROCESSING_LEVEL}<br>
  * {@value     #PRODUCT_VERSION}<br>
  * {@linkplain #PROGRAM   "program"}<br>
@@ -276,28 +275,6 @@ public class AttributeNames {
     public static final Term IDENTIFIER = new Term(ACDD.id, ACDD.naming_authority);
 
     /**
-     * The {@value} attribute name for the identifier authority (<em>Recommended</em>).
-     * The combination of the {@value} and the {@code "id"} should be a globally
-     * unique identifier for the dataset.
-     *
-     * <p><b>Path in ISO 19115:</b></p> <ul><li>{@link
Metadata} /
-     * {@link Metadata#getFileIdentifier() fileIdentifier}</li>
-     * <li>{@link Metadata} /
-     * {@link Metadata#getIdentificationInfo() identificationInfo} /
-     * {@link DataIdentification#getCitation() citation} /
-     * {@link Citation#getIdentifiers() identifier} /
-     * {@link Identifier#getAuthority() authority} /
-     * {@link Citation#getTitle() title}</li></ul>
-     *
-     * @see #IDENTIFIER
-     * @see <a href="http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery#naming_authority">ESIP
reference</a>
-     *
-     * @deprecated Moved to {@code IDENTIFIER.VOCABULARY}.
-     */
-    @Deprecated
-    public static final String NAMING_AUTHORITY = ACDD.naming_authority;
-
-    /**
      * The set of attribute names for a long descriptive name for the variable taken from
a controlled
      * vocabulary of variable names. This is actually a {@linkplain VariableSimpleIF variable}
attribute,
      * but sometime appears also in {@linkplain NetcdfFile#findGlobalAttribute(String) global
attributes}.
@@ -318,25 +295,6 @@ public class AttributeNames {
     public static final Term STANDARD_NAME = new Term(CF.STANDARD_NAME, ACDD.standard_name_vocabulary);
 
     /**
-     * The {@value} attribute name for indicating which controlled list of variable names
has been
-     * used in the {@code "standard_name"} attribute.
-     *
-     * <p><b>Path in ISO 19115:</b></p> <ul><li>{@link
Metadata} /
-     * {@link Metadata#getIdentificationInfo() identificationInfo} /
-     * {@link DataIdentification#getDescriptiveKeywords() descriptiveKeywords} /
-     * {@link Keywords#getThesaurusName() thesaurusName} /
-     * {@link Citation#getTitle() title}</li></ul>
-     *
-     * @see #STANDARD_NAME
-     * @see #VOCABULARY
-     * @see <a href="http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery#standard_name_vocabulary">ESIP
reference</a>
-     *
-     * @deprecated Moved to {@code STANDARD_NAME.VOCABULARY}.
-     */
-    @Deprecated
-    public static final String STANDARD_NAME_VOCABULARY = ACDD.standard_name_vocabulary;
-
-    /**
      * The set of attribute names for a comma separated list of key words and phrases
      * (<em>Highly Recommended</em>).
      *
@@ -356,25 +314,6 @@ public class AttributeNames {
     public static final Term KEYWORDS = new Term(ACDD.keywords, ACDD.keywords_vocabulary);
 
     /**
-     * The {@value} attribute name for the guideline for the words/phrases in the
-     * {@code "keyword"} attribute (<em>Recommended</em>).
-     *
-     * <p><b>Path in ISO 19115:</b></p> <ul><li>{@link
Metadata} /
-     * {@link Metadata#getIdentificationInfo() identificationInfo} /
-     * {@link DataIdentification#getDescriptiveKeywords() descriptiveKeywords} /
-     * {@link Keywords#getThesaurusName() thesaurusName} /
-     * {@link Citation#getTitle() title}</li></ul>
-     *
-     * @see #KEYWORDS
-     * @see #STANDARD_NAME_VOCABULARY
-     * @see <a href="http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery#keywords_vocabulary">ESIP
reference</a>
-     *
-     * @deprecated Moved to {@code KEYWORDS.VOCABULARY}.
-     */
-    @Deprecated
-    public static final String VOCABULARY = ACDD.keywords_vocabulary;
-
-    /**
      * The {@value} attribute name for a high-level geographic data thematic classification.
      * Typical values are {@code "farming"}, {@code "biota"}, {@code "boundaries"},
      * {@code "climatology meteorology atmosphere"}, {@code "economy"}, {@code "elevation"},
@@ -721,16 +660,6 @@ public class AttributeNames {
         public final Role DEFAULT_ROLE;
 
         /**
-         * @deprecated replaced by the constructor with one more argument (the type).
-         */
-        @Deprecated
-        public Responsible(final String name, final String institution, final String url,
final String email,
-                final String role, final Role defaultRole)
-        {
-            this(name, null, institution, url, email, role, defaultRole);
-        }
-
-        /**
          * Creates a new set of attribute names. Any argument can be {@code null} if not
applicable.
          *
          * @param name         the attribute name for the responsible's name.
@@ -864,11 +793,6 @@ public class AttributeNames {
     public static final String ACKNOWLEDGEMENT = ACDD.acknowledgement;
 
     /**
-     * @deprecated Renamed {@link #ACKNOWLEDGEMENT}.
-     */
-    public static final String ACKNOWLEDGMENT = "acknowledgment";
-
-    /**
      * The {@value} attribute name for a description of the restrictions to data access
      * and distribution (<em>Recommended</em>).
      *

Modified: sis/branches/JDK8/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStore.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStore.java?rev=1814231&r1=1814230&r2=1814231&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStore.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStore.java
[UTF-8] Fri Nov  3 18:15:10 2017
@@ -80,21 +80,6 @@ public class NetcdfStore extends DataSto
      * This constructor invokes {@link StorageConnector#closeAllExcept(Object)}, keeping
open only the
      * needed resource.
      *
-     * @param  connector information about the storage (URL, stream, {@link ucar.nc2.NetcdfFile}
instance, <i>etc</i>).
-     * @throws DataStoreException if an error occurred while opening the netCDF file.
-     *
-     * @deprecated Replaced by {@link #NetcdfStore(NetcdfStoreProvider, StorageConnector)}.
-     */
-    @Deprecated
-    public NetcdfStore(final StorageConnector connector) throws DataStoreException {
-        this(null, connector);
-    }
-
-    /**
-     * Creates a new netCDF store from the given file, URL, stream or {@link ucar.nc2.NetcdfFile}
object.
-     * This constructor invokes {@link StorageConnector#closeAllExcept(Object)}, keeping
open only the
-     * needed resource.
-     *
      * @param  provider   the factory that created this {@code DataStore} instance, or {@code
null} if unspecified.
      * @param  connector  information about the storage (URL, stream, {@link ucar.nc2.NetcdfFile}
instance, <i>etc</i>).
      * @throws DataStoreException if an error occurred while opening the netCDF file.



Mime
View raw message