sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1675079 - in /sis/branches/JDK8/core: sis-metadata/src/main/java/org/apache/sis/metadata/ sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/ sis-referencing/src/main/java/org/apache/sis/parameter/ sis-utility/src/main/java/or...
Date Tue, 21 Apr 2015 10:16:57 GMT
Author: desruisseaux
Date: Tue Apr 21 10:16:57 2015
New Revision: 1675079

URL: http://svn.apache.org/r1675079
Log:
Remove some of the deprecated methods.

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/citation/Citations.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptor.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java
    sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/util/CharSequencesTest.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=1675079&r1=1675078&r2=1675079&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] Tue Apr 21 10:16:57 2015
@@ -134,15 +134,6 @@ public class MetadataStandard implements
     public static final MetadataStandard ISO_19115;
 
     /**
-     * An instance working on ISO 19119 standard as defined by GeoAPI interfaces
-     * in the {@code org.opengis.service} package and sub-packages.
-     *
-     * @deprecated as of ISO 19115:2014 revision, merged with {@link #ISO_19115}.
-     */
-    @Deprecated
-    public static final MetadataStandard ISO_19119;
-
-    /**
      * An instance working on ISO 19123 standard as defined by GeoAPI interfaces
      * in the {@link org.opengis.coverage} package and sub-packages.
      */
@@ -153,12 +144,10 @@ public class MetadataStandard implements
         // If new StandardImplementation instances are added below, please update StandardImplementation.readResolve().
         ISO_19115 = new StandardImplementation("ISO 19115", "org.opengis.metadata.", "org.apache.sis.metadata.iso.",
null, null);
         ISO_19111 = new StandardImplementation("ISO 19111", "org.opengis.referencing.", "org.apache.sis.referencing.",
acronyms, new MetadataStandard[] {ISO_19115});
-        ISO_19119 = new MetadataStandard      ("ISO 19119", "org.opengis.service.", ISO_19111.dependencies);
         ISO_19123 = new MetadataStandard      ("ISO 19123", "org.opengis.coverage.", new
MetadataStandard[] {ISO_19111});
         INSTANCES = new MetadataStandard[] {
             ISO_19111,
             ISO_19115,
-            ISO_19119,
             ISO_19123
         };
         SystemListener.add(new SystemListener(Modules.METADATA) {

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java?rev=1675079&r1=1675078&r2=1675079&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java
[UTF-8] Tue Apr 21 10:16:57 2015
@@ -72,7 +72,7 @@ public final class Citations extends Sta
      *
      * @since 0.4
      *
-     * @deprecated The OGP organization is now known as IOGP. This citation will be removed
in SIS 0.6
+     * @deprecated The OGP organization is now known as IOGP. This citation will be removed
in SIS 0.7
      *             because of this name change and for avoiding confusion with {@link #EPSG}
citation.
      */
     @Deprecated

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptor.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptor.java?rev=1675079&r1=1675078&r2=1675079&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptor.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptor.java
[UTF-8] Tue Apr 21 10:16:57 2015
@@ -251,33 +251,6 @@ public class DefaultParameterDescriptor<
     }
 
     /**
-     * Creates an optional or mandatory parameter. As a consequence of the merge with ISO
19115 {@code SV_Parameter},
-     * {@code DefaultParameterDescriptor} has been generalized to accept an arbitrary amount
of occurrences.
-     *
-     * @param properties   The properties to be given to the identified object.
-     * @param valueClass   The class that describes the type of the parameter value.
-     * @param valueDomain  The minimum value, maximum value and unit of measurement, or {@code
null} if none.
-     * @param validValues  The list of valid values, or {@code null} if there is no restriction.
-     *                     This property is mostly for restricting values to a {@linkplain
CodeList code list}
-     *                     or enumeration subset. It is not necessary to provide this property
when all values
-     *                     from the code list or enumeration are valid.
-     * @param defaultValue The default value for the parameter, or {@code null} if none.
-     * @param required     {@code true} if this parameter is mandatory, or {@code false}
if it is optional.
-     *
-     * @deprecated Replaced by the constructor with explicit minimum and maximum number of
occurrences.
-     */
-    @Deprecated
-    public DefaultParameterDescriptor(final Map<String,?> properties,
-                                      final Class<T>      valueClass,
-                                      final Range<?>      valueDomain,
-                                      final T[]           validValues,
-                                      final T             defaultValue,
-                                      final boolean       required)
-    {
-        this(properties, required ? 1 : 0, 1, valueClass, valueDomain, validValues, defaultValue);
-    }
-
-    /**
      * Creates a new descriptor with the same values than the specified one.
      * This copy constructor provides a way to convert an arbitrary implementation into a
SIS one or a
      * user-defined one (as a subclass), usually in order to leverage some implementation-specific
API.

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java?rev=1675079&r1=1675078&r2=1675079&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java
[UTF-8] Tue Apr 21 10:16:57 2015
@@ -18,7 +18,6 @@ package org.apache.sis.util;
 
 import java.util.Arrays;
 import java.nio.CharBuffer;
-import java.util.StringJoiner;
 import org.opengis.metadata.citation.Citation;      // For javadoc
 import org.opengis.referencing.IdentifiedObject;    // For javadoc
 
@@ -919,55 +918,6 @@ search:     for (; fromIndex <= toIndex;
     }
 
     /**
-     * Formats the given elements as a (typically) comma-separated list. This method is similar
to
-     * {@link java.util.AbstractCollection#toString()} or {@link java.util.Arrays#toString(Object[])}
-     * except for the following:
-     *
-     * <ul>
-     *   <li>There is no leading {@code '['} or trailing {@code ']'} characters.</li>
-     *   <li>Null elements are ignored instead than formatted as {@code "null"}.</li>
-     *   <li>If the {@code collection} argument is null or contains only null elements,
-     *       then this method returns {@code null}.</li>
-     *   <li>In the common case where the collection contains a single {@link String}
element,
-     *       that string is returned directly (no object duplication).</li>
-     * </ul>
-     *
-     * @param  collection The elements to format in a (typically) comma-separated list, or
{@code null}.
-     * @param  separator  The element separator, which is usually {@code ", "}.
-     * @return The (typically) comma-separated list, or {@code null} if the given {@code
collection}
-     *         was null or contains only null elements.
-     *
-     * @see java.util.StringJoiner
-     * @see java.util.Arrays#toString(Object[])
-     *
-     * @deprecated As of JDK8, use {@link StringJoiner} instead.
-     */
-    @Deprecated
-    public static String toString(final Iterable<?> collection, final String separator)
{
-        ArgumentChecks.ensureNonNull("separator", separator);
-        String list = null;
-        if (collection != null) {
-            StringJoiner buffer = null;
-            for (final Object element : collection) {
-                if (element != null) {
-                    if (list == null) {
-                        list = element.toString();
-                    } else {
-                        if (buffer == null) {
-                            buffer = new StringJoiner(separator).add(list);
-                        }
-                        buffer.add(element.toString());
-                    }
-                }
-            }
-            if (buffer != null) {
-                list = buffer.toString();
-            }
-        }
-        return list;
-    }
-
-    /**
      * Replaces some Unicode characters by ASCII characters on a "best effort basis".
      * For example the {@code 'é'} character is replaced by {@code 'e'} (without accent).
      *

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java?rev=1675079&r1=1675078&r2=1675079&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java [UTF-8]
(original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java [UTF-8]
Tue Apr 21 10:16:57 2015
@@ -31,11 +31,8 @@ import java.lang.reflect.InvocationTarge
 import java.lang.reflect.UndeclaredThrowableException;
 import org.opengis.annotation.UML;
 import org.opengis.util.CodeList;
-import org.opengis.util.NameFactory;
-import org.opengis.util.GenericName;
 import org.opengis.util.InternationalString;
 import org.opengis.util.Enumerated;
-import org.opengis.metadata.Identifier;
 import org.apache.sis.util.Static;
 import org.apache.sis.util.Locales;
 import org.apache.sis.util.CharSequences;
@@ -43,7 +40,6 @@ import org.apache.sis.util.ArgumentCheck
 import org.apache.sis.util.logging.Logging;
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.collection.BackingStoreException;
-import org.apache.sis.internal.system.DefaultFactories;
 
 
 /**
@@ -751,41 +747,4 @@ public final class Types extends Static
         }
         return copy;
     }
-
-    /**
-     * Converts the given value to an array of generic names. If the given value is an instance
of
-     * {@link GenericName}, {@link String} or any other type enumerated below, then it is
converted
-     * and returned in an array of length 1. If the given value is an array or a collection,
then an
-     * array of same length is returned where each element has been converted.
-     *
-     * <p>Allowed types or element types are:</p>
-     * <ul>
-     *   <li>{@link GenericName}, to be casted and returned as-is.</li>
-     *   <li>{@link CharSequence} (usually a {@link String} or an {@link InternationalString}),
-     *       to be parsed as a generic name using the {@link DefaultNameSpace#DEFAULT_SEPARATOR
':'} separator.</li>
-     *   <li>{@link Identifier}, its {@linkplain Identifier#getCode() code} to be parsed
as a generic name
-     *       using the {@link DefaultNameSpace#DEFAULT_SEPARATOR ':'} separator.</li>
-     * </ul>
-     *
-     * If {@code value} is an array or a collection containing {@code null} elements,
-     * then the corresponding element in the returned array will also be {@code null}.
-     *
-     * @param  value The object to cast into an array of generic names, or {@code null}.
-     * @param  factory The factory to use for creating names, or {@code null} for the default.
-     * @return The generic names, or {@code null} if the given {@code value} was null.
-     *         Note that it may be the {@code value} reference itself casted to {@code GenericName[]}.
-     * @throws ClassCastException if {@code value} can't be casted.
-     *
-     * @deprecated Moved to {@link DefaultNameFactory#toGenericNames(Object)}.
-     */
-    @Deprecated
-    public static GenericName[] toGenericNames(Object value, NameFactory factory) throws
ClassCastException {
-        if (value == null) {
-            return null;
-        }
-        if (!(factory instanceof DefaultNameFactory)) {
-            factory = DefaultFactories.forBuildin(NameFactory.class);
-        }
-       return ((DefaultNameFactory) factory).toGenericNames(value);
-    }
 }

Modified: sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/util/CharSequencesTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/util/CharSequencesTest.java?rev=1675079&r1=1675078&r2=1675079&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/util/CharSequencesTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/util/CharSequencesTest.java
[UTF-8] Tue Apr 21 10:16:57 2015
@@ -232,17 +232,6 @@ public final strictfp class CharSequence
     }
 
     /**
-     * Tests the {@link CharSequences#toString(Iterable, String)} method.
-     */
-    @Test
-    @SuppressWarnings("deprecation")
-    public void testToString() {
-        assertEquals("4, 8, 12, 9", CharSequences.toString(Arrays.asList(4, 8, 12, 9), ",
"));
-        assertSame  ("singleton",   CharSequences.toString(Arrays.asList("singleton"), ",
"));
-        assertNull  (               CharSequences.toString(null, ", "));
-    }
-
-    /**
      * Tests the {@link CharSequences#toASCII(CharSequence)} method.
      */
     @Test



Mime
View raw message