sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1600777 - in /sis/branches/JDK6: ./ core/sis-feature/src/main/java/org/apache/sis/feature/ core/sis-metadata/src/main/java/org/apache/sis/io/wkt/ core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ core/sis-referencing/src/main/ja...
Date Thu, 05 Jun 2014 21:58:35 GMT
Author: desruisseaux
Date: Thu Jun  5 21:58:34 2014
New Revision: 1600777

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

Added:
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/DirectPositionView.java
      - copied unchanged from r1600775, sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/DirectPositionView.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Semaphores.java
      - copied, changed from r1600775, sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Semaphores.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/j2d/
      - copied from r1600775, sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/j2d/
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameterized.java
      - copied unchanged from r1600775, sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameterized.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/provider/
      - copied from r1600775, sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/provider/
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java
      - copied, changed from r1600775, sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform1D.java
      - copied unchanged from r1600775, sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform1D.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform2D.java
      - copied unchanged from r1600775, sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform2D.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java
      - copied, changed from r1600775, sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform1D.java
      - copied unchanged from r1600775, sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform1D.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform2D.java
      - copied unchanged from r1600775, sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform2D.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransformDirect.java
      - copied unchanged from r1600775, sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransformDirect.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransformDirect1D.java
      - copied unchanged from r1600775, sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransformDirect1D.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransformDirect2D.java
      - copied unchanged from r1600775, sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransformDirect2D.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConstantTransform1D.java
      - copied unchanged from r1600775, sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConstantTransform1D.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CopyTransform.java
      - copied unchanged from r1600775, sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CopyTransform.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/IdentityTransform.java
      - copied unchanged from r1600775, sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/IdentityTransform.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/IdentityTransform1D.java
      - copied unchanged from r1600775, sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/IdentityTransform1D.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/IterationStrategy.java
      - copied unchanged from r1600775, sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/IterationStrategy.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LinearTransform1D.java
      - copied unchanged from r1600775, sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LinearTransform1D.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MathTransforms.java
      - copied unchanged from r1600775, sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MathTransforms.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PassThroughTransform.java
      - copied unchanged from r1600775, sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PassThroughTransform.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PassThroughTransform2D.java
      - copied unchanged from r1600775, sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PassThroughTransform2D.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ProjectiveTransform.java
      - copied unchanged from r1600775, sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ProjectiveTransform.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ProjectiveTransform2D.java
      - copied unchanged from r1600775, sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ProjectiveTransform2D.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/formulas.html
      - copied unchanged from r1600775, sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/formulas.html
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/package-info.java
      - copied unchanged from r1600775, sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/package-info.java
    sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/
      - copied from r1600775, sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/
Modified:
    sis/branches/JDK6/   (props changed)
    sis/branches/JDK6/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAssociation.java
    sis/branches/JDK6/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractIdentifiedType.java
    sis/branches/JDK6/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAssociationRole.java
    sis/branches/JDK6/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeatureType.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Formulas.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/package-info.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java
    sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LinearTransform.java
    sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/RandomFailureTransform.java
    sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
    sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
    sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
    sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
    sis/branches/JDK6/pom.xml

Propchange: sis/branches/JDK6/
------------------------------------------------------------------------------
  Merged /sis/branches/JDK8:r1599169-1600774
  Merged /sis/branches/JDK7:r1599171-1600775

Modified: sis/branches/JDK6/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAssociation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAssociation.java?rev=1600777&r1=1600776&r2=1600777&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAssociation.java
[UTF-8] (original)
+++ sis/branches/JDK6/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAssociation.java
[UTF-8] Thu Jun  5 21:58:34 2014
@@ -33,7 +33,7 @@ import org.opengis.feature.FeatureAssoci
 
 
 /**
- * Indicates the role played by the association between two features.
+ * An instance of an {@linkplain DefaultAssociationRole feature association role} containing
the associated feature.
  *
  * {@section Limitations}
  * <ul>

Modified: sis/branches/JDK6/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractIdentifiedType.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractIdentifiedType.java?rev=1600777&r1=1600776&r2=1600777&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractIdentifiedType.java
[UTF-8] (original)
+++ sis/branches/JDK6/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractIdentifiedType.java
[UTF-8] Thu Jun  5 21:58:34 2014
@@ -19,6 +19,7 @@ package org.apache.sis.feature;
 import java.util.Map;
 import java.util.Locale;
 import java.io.Serializable;
+import org.opengis.util.NameFactory;
 import org.opengis.util.GenericName;
 import org.opengis.util.InternationalString;
 import org.apache.sis.internal.system.DefaultFactories;
@@ -164,14 +165,16 @@ public class AbstractIdentifiedType impl
      * @param  identification The name and other information to be given to this identified
type.
      * @throws IllegalArgumentException if a property has an invalid value.
      */
-    protected AbstractIdentifiedType(final Map<String,?> identification) throws IllegalArgumentException
{
+    protected AbstractIdentifiedType(final Map<String,?> identification)
+            throws IllegalArgumentException
+    {
         ensureNonNull("identification", identification);
         Object value = identification.get(NAME_KEY);
         if (value == null) {
             throw new IllegalArgumentException(Errors.getResources(identification)
                     .getString(Errors.Keys.MissingValueForProperty_1, NAME_KEY));
         } else if (value instanceof String) {
-            name = DefaultFactories.NAMES.createLocalName(null, (String) value);
+            name = createName(DefaultFactories.NAMES, (String) value);
         } else if (value instanceof GenericName) {
             name = (GenericName) value;
         } else {
@@ -184,6 +187,14 @@ public class AbstractIdentifiedType impl
     }
 
     /**
+     * Creates a name from the given string. This method is invoked at construction time,
+     * so it should not use any field in this {@code AbtractIdentifiedObject} instance.
+     */
+    GenericName createName(final NameFactory factory, final String value) {
+        return factory.createLocalName(null, value);
+    }
+
+    /**
      * Returns the name of this type.
      * The namespace can be either explicit
      * ({@linkplain org.apache.sis.util.iso.DefaultScopedName scoped name}) or implicit

Modified: sis/branches/JDK6/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAssociationRole.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAssociationRole.java?rev=1600777&r1=1600776&r2=1600777&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAssociationRole.java
[UTF-8] (original)
+++ sis/branches/JDK6/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAssociationRole.java
[UTF-8] Thu Jun  5 21:58:34 2014
@@ -77,8 +77,8 @@ public class DefaultAssociationRole exte
     private volatile transient String titleProperty;
 
     /**
-     * Constructs an association role from the given properties. The properties map is given
unchanged
-     * to the {@linkplain AbstractIdentifiedType#AbstractIdentifiedType(Map) super-class
constructor}.
+     * Constructs an association role from the given properties. The properties map is given
unchanged to
+     * the {@linkplain AbstractIdentifiedType#AbstractIdentifiedType(Map) super-class constructor}.
      * The following table is a reminder of main (not all) recognized map entries:
      *
      * <table class="sis">

Modified: sis/branches/JDK6/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeatureType.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeatureType.java?rev=1600777&r1=1600776&r2=1600777&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeatureType.java
[UTF-8] (original)
+++ sis/branches/JDK6/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeatureType.java
[UTF-8] Thu Jun  5 21:58:34 2014
@@ -27,6 +27,7 @@ import java.util.Collection;
 import java.util.Collections;
 import java.io.IOException;
 import java.io.ObjectInputStream;
+import org.opengis.util.NameFactory;
 import org.opengis.util.GenericName;
 import org.opengis.util.InternationalString;
 import org.apache.sis.util.ArgumentChecks;
@@ -221,6 +222,15 @@ public class DefaultFeatureType extends 
     }
 
     /**
+     * Creates a name from the given string. This method is invoked at construction time,
+     * so it should not use any field in this {@code AbtractIdentifiedObject} instance.
+     */
+    @Override
+    GenericName createName(final NameFactory factory, final String value) {
+        return factory.createTypeName(null, value);
+    }
+
+    /**
      * Invoked on deserialization for restoring the {@link #byName} and other transient fields.
      *
      * @param  in The input stream from which to deserialize a feature type.

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java?rev=1600777&r1=1600776&r2=1600777&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java
[UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java
[UTF-8] Thu Jun  5 21:58:34 2014
@@ -84,7 +84,7 @@ import org.apache.sis.metadata.iso.exten
  * </ul>
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
- * @since   0.4 (derived from geotk-2.0)
+ * @since   0.5 (derived from geotk-2.0)
  * @version 0.4
  * @module
  */
@@ -1174,6 +1174,32 @@ public class Formatter implements Locali
     }
 
     /**
+     * Delegates the formatting to another {@link FormattableObject} implementation.
+     * Invoking this method is equivalent to first verifying the {@code other} class,
+     * then delegating as below:
+     *
+     * {@preformat
+     *     return other.formatTo(this);
+     * }
+     *
+     * This method is useful for {@code FormattableObject} which are wrapper around another
object.
+     * It allows to delegate the WKT formatting to the wrapped object.
+     *
+     * @param  other The object to format with this formatter.
+     * @return The value returned by {@link FormattableObject#formatTo(Formatter)}.
+     *
+     * @since 0.5
+     */
+    public String delegateTo(final Object other) throws UnformattableObjectException {
+        ArgumentChecks.ensureNonNull("other", other);
+        if (other instanceof FormattableObject) {
+            return ((FormattableObject) other).formatTo(this);
+        }
+        throw new UnformattableObjectException(Errors.format(
+                Errors.Keys.IllegalClass_2, FormattableObject.class, other.getClass()));
+    }
+
+    /**
      * Returns the enclosing WKT element, or {@code null} if element being formatted is the
root.
      * This method can be invoked by child elements having some aspects that depend on the
enclosing element.
      *

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java?rev=1600777&r1=1600776&r2=1600777&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java
[UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java
[UTF-8] Thu Jun  5 21:58:34 2014
@@ -31,6 +31,7 @@ import org.apache.sis.xml.IdentifiedObje
 import org.apache.sis.metadata.MetadataStandard;
 import org.apache.sis.metadata.ModifiableMetadata;
 import org.apache.sis.internal.jaxb.IdentifierMapWithSpecialCases;
+import org.apache.sis.util.collection.Containers;
 import org.apache.sis.util.logging.Logging;
 import org.apache.sis.util.CharSequences;
 
@@ -82,6 +83,21 @@ public class ISOMetadata extends Modifia
      */
     protected ISOMetadata(final Object object) {
         if (object instanceof IdentifiedObject) {
+            if (object instanceof ISOMetadata && Containers.isNullOrEmpty(((ISOMetadata)
object).identifiers)) {
+                /*
+                 * If the other object is an ISOMetadata instance,  take a look at its 'identifiers'
collection
+                 * before to invoke object.getIdentifiers() in order to avoid unnecessary
initialization of its
+                 * backing collection. We do this optimization because the vast majority
of metadata objects do
+                 * not have 'identifiers' collection.
+                 *
+                 * Actually this optimization is a little bit dangerous, since users could
override getIdentifiers()
+                 * without invoking super.getIdentifiers(), in which case their identifiers
will not be copied.
+                 * For safety, we will do this optimization only if the implementation is
an Apache SIS one.
+                 */
+                if (object.getClass().getName().startsWith("org.apache.sis.")) {
+                    return;
+                }
+            }
             identifiers = copyCollection(((IdentifiedObject) object).getIdentifiers(), Identifier.class);
         }
     }

Modified: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Formulas.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Formulas.java?rev=1600777&r1=1600776&r2=1600777&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Formulas.java
[UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Formulas.java
[UTF-8] Thu Jun  5 21:58:34 2014
@@ -95,8 +95,12 @@ public final class Formulas extends Stat
      * @see org.apache.sis.referencing.datum.DefaultEllipsoid#getAuthalicRadius()
      */
     public static double getAuthalicRadius(final double a, final double b) {
-        final double f = 1 - b/a;
-        final double e = sqrt(2*f - f*f);
-        return sqrt(0.5 * (a*a + b*b*atanh(e)/e));
+        if (a != b) {
+            final double f = 1 - b/a;
+            final double e = sqrt(2*f - f*f);
+            return sqrt(0.5 * (a*a + b*b*atanh(e)/e));
+        } else {
+            return a;
+        }
     }
 }

Copied: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Semaphores.java
(from r1600775, sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Semaphores.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Semaphores.java?p2=sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Semaphores.java&p1=sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Semaphores.java&r1=1600775&r2=1600777&rev=1600777&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Semaphores.java
[UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Semaphores.java
[UTF-8] Thu Jun  5 21:58:34 2014
@@ -48,7 +48,7 @@ public final class Semaphores {
     /**
      * The flags per running thread.
      */
-    private static final ThreadLocal<Semaphores> FLAGS = new ThreadLocal<>();
+    private static final ThreadLocal<Semaphores> FLAGS = new ThreadLocal<Semaphores>();
 
     /**
      * The bit flags.

Modified: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/package-info.java?rev=1600777&r1=1600776&r2=1600777&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/package-info.java
[UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/package-info.java
[UTF-8] Thu Jun  5 21:58:34 2014
@@ -18,7 +18,7 @@
 /**
  * A set of helper classes for the SIS implementation.
  *
- * <STRONG>Do not use!</STRONG>
+ * <strong>Do not use!</strong>
  *
  * This package is for internal use by SIS only. Classes in this package
  * may change in incompatible ways in any future version without notice.

Modified: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java?rev=1600777&r1=1600776&r2=1600777&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java
[UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java
[UTF-8] Thu Jun  5 21:58:34 2014
@@ -534,7 +534,7 @@ public final class Matrices extends Stat
      * @throws IllegalArgumentException if a value of {@code selectedDimensions} is lower
than 0
      *         or not smaller than {@code sourceDimensions}.
      *
-     * @see org.apache.sis.referencing.operation.MathTransforms#dimensionFilter(int, int[])
+     * @see org.apache.sis.referencing.operation.transform.MathTransforms#dimensionFilter(int,
int[])
      */
     public static MatrixSIS createDimensionSelect(final int sourceDimensions, final int[]
selectedDimensions) {
         final int numTargetDim = selectedDimensions.length;

Copied: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java
(from r1600775, sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java?p2=sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java&p1=sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java&r1=1600775&r2=1600777&rev=1600777&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java
[UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java
[UTF-8] Thu Jun  5 21:58:34 2014
@@ -405,7 +405,6 @@ public abstract class AbstractMathTransf
                     failure = exception; // Keep only the first failure.
                     blockStart = srcOff;
                 } else {
-                    failure.addSuppressed(exception);
                     if (Math.abs(srcOff - blockStart) > MAXIMUM_BUFFER_SIZE) {
                         failureCount = 0; // We started a new block of coordinates.
                         blockStart = srcOff;
@@ -541,8 +540,6 @@ public abstract class AbstractMathTransf
                     throw exception;
                 } else if (failure == null) {
                     failure = exception; // Keep only the first exception.
-                } else {
-                    failure.addSuppressed(exception);
                 }
             }
             for (int i=0; i<dstStop; i++) {
@@ -605,8 +602,6 @@ public abstract class AbstractMathTransf
                     throw exception;
                 } else if (failure == null) {
                     failure = exception;
-                } else {
-                    failure.addSuppressed(exception);
                 }
             }
             for (int i=0; i<dstLength; i++) {
@@ -680,8 +675,6 @@ public abstract class AbstractMathTransf
                     throw exception;
                 } else if (failure == null) {
                     failure = exception;
-                } else {
-                    failure.addSuppressed(exception);
                 }
             }
             dstOff += dstLength;

Copied: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java
(from r1600775, sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java?p2=sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java&p1=sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java&r1=1600775&r2=1600777&rev=1600777&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java
[UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java
[UTF-8] Thu Jun  5 21:58:34 2014
@@ -398,7 +398,7 @@ class ConcatenatedTransform extends Abst
      * @see MathTransforms#getSteps(MathTransform)
      */
     public final List<MathTransform> getSteps() {
-        final List<MathTransform> transforms = new ArrayList<>(5);
+        final List<MathTransform> transforms = new ArrayList<MathTransform>(5);
         getSteps(transforms);
         return transforms;
     }
@@ -410,7 +410,7 @@ class ConcatenatedTransform extends Abst
      * (<var>projection</var>) elements, which does not need to be instances
of {@link MathTransform}.
      */
     private List<MathTransform> getPseudoSteps() {
-        final List<MathTransform> transforms = new ArrayList<>();
+        final List<MathTransform> transforms = new ArrayList<MathTransform>();
         getSteps(transforms);
         /*
          * Pre-process the transforms before to format. Some steps may be* merged, or new

Modified: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LinearTransform.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LinearTransform.java?rev=1600777&r1=1600776&r2=1600777&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LinearTransform.java
[UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LinearTransform.java
[UTF-8] Thu Jun  5 21:58:34 2014
@@ -21,11 +21,14 @@ import org.opengis.referencing.operation
 
 
 /**
- * A {@link MathTransform} which convert coordinates using only linear equations.
- * Such transform can be represented by a {@linkplain #getMatrix() matrix}.
- * Those transforms are often affine, but not necessarily.
+ * A usually affine, or otherwise a projective transform, which convert coordinates using
only linear equations.
+ * A projective transform is capable of mapping an arbitrary quadrilateral into another arbitrary
quadrilateral,
+ * while preserving the straightness of lines. In the special case where the transform is
affine, the parallelism
+ * of lines in the source is preserved in the output.
+ *
+ * <p>Such a coordinate transformation can be represented by a matrix of arbitrary
size, which is given by the
+ * {@link #getMatrix()} method. The relationship between matrix size and transform dimensions
is as below:</p>
  *
- * <p>Relationships:</p>
  * <ul>
  *   <li>The {@linkplain Matrix#getNumCol() number of columns} in the matrix is equal
to
  *       the number of {@linkplain #getSourceDimensions() source dimensions} plus 1</li>
@@ -33,26 +36,42 @@ import org.opengis.referencing.operation
  *       the number of {@linkplain #getTargetDimensions() target dimensions} plus 1.</li>
  * </ul>
  *
+ * {@section Affine transform}
+ * In most cases the transform in affine. For such transforms, the last matrix row contains
only zero values
+ * except in the last column, which contains 1. For example a conversion from projected coordinates
(metres)
+ * to display coordinates (pixel) can be done as below:
+ *
+ * <center><p>
+ * <img src="../matrix/doc-files/AffineTransform.png" alt="Matrix representation of an
affine transform">
+ * </p></center>
+ *
+ * {@section Projective transform}
+ * If the last matrix row does not met the above constraints, then the transform is not affine.
+ * A <cite>projective</cite> transform can be used as a generalization of affine
transforms.
+ * In such case the computation performed by SIS is similar to {@code PerspectiveTransform}
+ * in <cite>Java Advanced Imaging</cite>.
+ *
+ * <p>For example a square matrix of size 4×4 is used for transforming three-dimensional
coordinates.
+ * The transformed points {@code (x',y',z')} are computed as below:</p>
+ *
+ * <blockquote>{@include formulas.html#ProjectiveTransform}</blockquote>
+ *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4 (derived from geotk-2.0)
  * @version 0.4
  * @module
  *
- * @see org.apache.sis.referencing.operation.MathTransforms
+ * @see <a href="http://mathworld.wolfram.com/AffineTransformation.html">Affine transformation
on MathWorld</a>
  */
 public interface LinearTransform extends MathTransform {
     /**
      * Returns the coefficients of this linear transform as a matrix.
      * Converting a coordinate with this {@code MathTransform} is equivalent to multiplying
the
      * returned matrix by a vector containing the ordinate values with an additional 1 in
the last row.
-     * For example if this transform converts projected coordinates (metres) to display coordinates
(pixel),
-     * then the same conversions can be done by the returned matrix as below:
-     *
-     * <center><p>
-     * <img src="../matrix/doc-files/AffineTransform.png" alt="Matrix representation of
an affine transform">
-     * </p></center>
      *
      * @return The coefficients of this linear transform as a matrix.
+     *
+     * @see MathTransforms#getMatrix(MathTransform)
      */
     Matrix getMatrix();
 }

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/RandomFailureTransform.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/RandomFailureTransform.java?rev=1600777&r1=1600775&r2=1600777&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/RandomFailureTransform.java
[UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/RandomFailureTransform.java
[UTF-8] Thu Jun  5 21:58:34 2014
@@ -71,7 +71,7 @@ final strictfp class RandomFailureTransf
         super(4,3);
         this.denominator = denominator;
         random = new Random(891914828L * denominator);
-        failures = new HashSet<>();
+        failures = new HashSet<Integer>();
     }
 
     /**

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java?rev=1600777&r1=1600776&r2=1600777&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
[UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
[UTF-8] Thu Jun  5 21:58:34 2014
@@ -40,6 +40,8 @@ import org.junit.BeforeClass;
     org.apache.sis.referencing.operation.matrix.NonSquareMatrixTest.class, // Expected to
be last MatrixTestCase - see javadoc.
     org.apache.sis.referencing.operation.matrix.MatricesTest.class,
     org.apache.sis.referencing.operation.matrix.AffineTransforms2DTest.class,
+    org.apache.sis.referencing.operation.transform.IterationStrategyTest.class,
+    org.apache.sis.referencing.operation.transform.AbstractMathTransformTest.class,
 
     org.apache.sis.internal.referencing.FormulasTest.class,
     org.apache.sis.internal.referencing.VerticalDatumTypesTest.class,
@@ -60,6 +62,7 @@ import org.junit.BeforeClass;
     org.apache.sis.parameter.ParameterFormatTest.class,
     org.apache.sis.parameter.TensorParametersTest.class,
     org.apache.sis.parameter.TensorValuesTest.class,
+
     org.apache.sis.referencing.datum.BursaWolfParametersTest.class,
     org.apache.sis.referencing.datum.TimeDependentBWPTest.class,
     org.apache.sis.referencing.datum.DefaultEllipsoidTest.class,

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java?rev=1600777&r1=1600776&r2=1600777&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
[UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
[UTF-8] Thu Jun  5 21:58:34 2014
@@ -85,6 +85,11 @@ public final class Errors extends Indexe
         public static final short CanNotComputeDerivative = 1;
 
         /**
+         * Can not concatenate transforms “{0}” and “{1}”.
+         */
+        public static final short CanNotConcatenateTransforms_2 = 160;
+
+        /**
          * Can not connect to “{0}”.
          */
         public static final short CanNotConnectTo_1 = 2;

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties?rev=1600777&r1=1600776&r2=1600777&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
[ISO-8859-1] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
[ISO-8859-1] Thu Jun  5 21:58:34 2014
@@ -27,6 +27,7 @@
 AbstractType_1                    = Type \u2018{0}\u2019 is abstract.
 AmbiguousName_3                   = Name \u201c{2}\u201d is ambiguous because it can be understood
as either \u201c{0}\u201d or \u201c{1}\u201d.
 CanNotAddToExclusiveSet_2         = No element can be added to this set because properties
\u2018{0}\u2019 and \u2018{1}\u2019 are mutually exclusive.
+CanNotConcatenateTransforms_2     = Can not concatenate transforms \u201c{0}\u201d and \u201c{1}\u201d.
 CanNotConnectTo_1                 = Can not connect to \u201c{0}\u201d.
 CanNotConvertFromType_2           = Can not convert from type \u2018{0}\u2019 to type \u2018{1}\u2019.
 CanNotConvertValue_2              = Can not convert value \u201c{0}\u201d to type \u2018{1}\u2019.

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties?rev=1600777&r1=1600776&r2=1600777&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
[ISO-8859-1] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
[ISO-8859-1] Thu Jun  5 21:58:34 2014
@@ -17,6 +17,7 @@
 AbstractType_1                    = Le type \u2018{0}\u2019 est abstrait.
 AmbiguousName_3                   = Le nom \u00ab\u202f{2}\u202f\u00bb est ambigu\u00eb car
il peut \u00eatre interpr\u00e9t\u00e9 comme \u00ab\u202f{0}\u202f\u00bb ou \u00ab\u202f{1}\u202f\u00bb.
 CanNotAddToExclusiveSet_2         = Aucun \u00e9l\u00e9ment ne peut \u00eatre ajout\u00e9
\u00e0 cet ensemble car les propri\u00e9t\u00e9s \u2018{0}\u2019 et \u2018{1}\u2019 sont mutuellement
exclusives.
+CanNotConcatenateTransforms_2     = Les transformations \u00ab\u202f{0}\u202f\u00bb et \u00ab\u202f{1}\u202f\u00bb
ne peuvent pas \u00eatre combin\u00e9es.
 CanNotConnectTo_1                 = Ne peut pas se connecter \u00e0 \u00ab\u202f{0}\u202f\u00bb.
 CanNotConvertFromType_2           = Ne peut pas convertir du type \u2018{0}\u2019 vers le
type \u2018{1}\u2019.
 CanNotConvertValue_2              = La valeur \u00ab\u202f{0}\u202f\u00bb ne peut pas \u00eatre
convertie vers le type \u2018{1}\u2019.

Modified: sis/branches/JDK6/pom.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/pom.xml?rev=1600777&r1=1600776&r2=1600777&view=diff
==============================================================================
--- sis/branches/JDK6/pom.xml (original)
+++ sis/branches/JDK6/pom.xml Thu Jun  5 21:58:34 2014
@@ -435,6 +435,7 @@ Apache SIS is a free software, Java lang
           <source>${maven.compile.source}</source>
           <target>${maven.compile.target}</target>
           <encoding>${project.build.sourceEncoding}</encoding>
+          <useIncrementalCompilation>false</useIncrementalCompilation> <!--
https://jira.codehaus.org/browse/MCOMPILER-209 -->
         </configuration>
       </plugin>
 
@@ -591,7 +592,6 @@ Apache SIS is a free software, Java lang
           -->
 
           <additionalparam>
-              -link http://www.geoapi.org/snapshot/javadoc/
               -link http://www.geoapi.org/snapshot/pending/
           </additionalparam>
 
@@ -632,7 +632,7 @@ Apache SIS is a free software, Java lang
           </groups>
 
           <!-- Internal packages to hide from javadoc. -->
-          <excludePackageNames>org.apache.sis.internal:org.apache.sis.util.resources:com</excludePackageNames>
+          <excludePackageNames>org.apache.sis.internal:org.apache.sis.util.resources:org.apache.sis.referencing.operation.provider:com</excludePackageNames>
 
           <!-- Custom taglets, some of them implemented in Java. -->
           <tags>



Mime
View raw message