sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1679659 - in /sis/branches/JDK8/core: sis-referencing/src/main/java/org/apache/sis/internal/referencing/ sis-referencing/src/main/java/org/apache/sis/referencing/ sis-referencing/src/main/java/org/apache/sis/referencing/operation/ sis-refe...
Date Fri, 15 May 2015 23:14:51 GMT
Author: desruisseaux
Date: Fri May 15 23:14:51 2015
New Revision: 1679659

URL: http://svn.apache.org/r1679659
Log:
Referencing: starting the port of DefaultCoordinateOperationFactory.

Added:
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/MergedProperties.java
  (with props)
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java
  (with props)
Modified:
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/GeodeticObjectFactory.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConcatenatedOperation.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties

Added: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/MergedProperties.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/MergedProperties.java?rev=1679659&view=auto
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/MergedProperties.java
(added)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/MergedProperties.java
[UTF-8] Fri May 15 23:14:51 2015
@@ -0,0 +1,115 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.internal.referencing;
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.sis.internal.util.AbstractMap;
+
+
+/**
+ * A map which first looks for values in a user-supplied map, then looks in a default map
if no value where found
+ * in the user-supplied one. This map is for {@link org.apache.sis.referencing.GeodeticObjectFactory}
and other SIS
+ * factories internal usage only.
+ *
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.6
+ * @version 0.6
+ * @module
+ */
+public class MergedProperties extends AbstractMap<String,Object> {
+    /**
+     * The user-supplied properties.
+     */
+    private final Map<String,?> properties;
+
+    /**
+     * Fallback for values not found in {@link #properties}.
+     */
+    private final Map<String,?> defaultProperties;
+
+    /**
+     * A map containing the merge of user and default properties, or {@code null} if not
yet created.
+     * This map is normally never needed. It may be created only if the user creates his
own subclass
+     * of {@code GeodeticObjectFactory} or other factories and iterates on this map or asks
for its size.
+     */
+    private transient Map<String,Object> merge;
+
+    /**
+     * Creates a new map which will merge the given properties on the fly.
+     *
+     * @param properties The user-supplied properties.
+     * @param defaultProperties Fallback for values not found in {@code properties}.
+     */
+    public MergedProperties(final Map<String,?> properties, final Map<String,?>
defaultProperties) {
+        this.properties = properties;
+        this.defaultProperties = defaultProperties;
+    }
+
+    /**
+     * Returns an iterator over the user-supplied properties together with
+     * the default properties which were not specified in the user's ones.
+     *
+     * @return Iterator over merged properties.
+     */
+    @Override
+    protected EntryIterator<String,Object> entryIterator() {
+        if (merge == null) {
+            merge = new HashMap<>(defaultProperties);
+            merge.putAll(properties);
+            merge.remove(null);
+        }
+        return new IteratorAdapter<>(merge);    // That iterator will skip null values.
+    }
+
+    /**
+     * Returns the value for the given key by first looking in the user-supplied map,
+     * then by looking in the default properties if no value were specified in the user map.
+     * If there is no default value, invokes {@link #invisibleEntry(Object)} in last resort.
+     *
+     * @param  key The key for which to get the value.
+     * @return The value associated to the given key, or {@code null} if none.
+     */
+    @Override
+    public Object get(final Object key) {
+        Object value = properties.get(key);
+        if (value == null && !properties.containsKey(key)) {
+            value = defaultProperties.get(key);
+            if (value == null) {
+                value = invisibleEntry(key);
+            }
+        }
+        return value;
+    }
+
+    /**
+     * Returns the value for an "invisible" entry if no user-supplied values were found for
that key.
+     * This is used only for "secret" keys used for SIS internal purpose (not for public
API).
+     *
+     * <div class="note"><b>Example:</b>
+     * {@link org.apache.sis.referencing.GeodeticObjectFactory} handles the {@code "mtFactory"}
key in a special way
+     * since this is normally not needed for CRS, CS and datum objects, except when creating
the SIS implementation
+     * of derived or projected CRS (because of the way we implemented derived CRS). But this
is somewhat specific to
+     * SIS, so we do no want to expose this implementation details.</div>
+     *
+     * @param  key The key for which to get the value.
+     * @return The value associated to the given key, or {@code null} if none.
+     */
+    protected Object invisibleEntry(final Object key) {
+        return null;
+    }
+}

Propchange: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/MergedProperties.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/MergedProperties.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/GeodeticObjectFactory.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/GeodeticObjectFactory.java?rev=1679659&r1=1679658&r2=1679659&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/GeodeticObjectFactory.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/GeodeticObjectFactory.java
[UTF-8] Fri May 15 23:14:51 2015
@@ -39,8 +39,8 @@ import org.apache.sis.referencing.cs.*;
 import org.apache.sis.referencing.crs.*;
 import org.apache.sis.referencing.datum.*;
 import org.apache.sis.internal.referencing.OperationMethods;
+import org.apache.sis.internal.referencing.MergedProperties;
 import org.apache.sis.internal.system.DefaultFactories;
-import org.apache.sis.internal.util.AbstractMap;
 import org.apache.sis.internal.util.CollectionsExt;
 import org.apache.sis.util.collection.WeakHashSet;
 import org.apache.sis.util.iso.AbstractFactory;
@@ -194,7 +194,7 @@ public class GeodeticObjectFactory exten
     private volatile MathTransformFactory mtFactory;
 
     /**
-     * Weak references to existing objects (identifiers, CRS, Datum, whatever).
+     * Weak references to existing objects (CRS, CS, Datum, Ellipsoid or PrimeMeridian).
      * This set is used in order to return a pre-existing object instead of creating a new
one.
      */
     private final WeakHashSet<IdentifiedObject> pool;
@@ -237,46 +237,19 @@ public class GeodeticObjectFactory exten
      */
     protected Map<String,?> complete(final Map<String,?> properties) {
         ArgumentChecks.ensureNonNull("properties", properties);
-        return new AbstractMap<String,Object>() {
+        return new MergedProperties(properties, defaultProperties) {
             /**
-             * A map containing the merge of user and default properties, or {@code null}
if not yet created.
-             * This map is normally never needed. It may be created only if the user create
his own subclass
-             * of {@link GeodeticObjectFactory} and iterate on this map or ask for its size.
-             */
-            private Map<String,Object> merge;
-
-            /**
-             * Returns an iterator over the user-supplied properties together with
-             * the default properties which were not specified in the user's ones.
-             */
-            @Override
-            protected EntryIterator<String,Object> entryIterator() {
-                if (merge == null) {
-                    merge = new HashMap<>(defaultProperties);
-                    merge.putAll(properties);
-                    merge.remove(null);
-                }
-                return new IteratorAdapter<>(merge);    // That iterator will skip
null values.
-            }
-
-            /**
-             * Returns the value for the given key by first looking in the user-supplied
map,
-             * then by looking in the default properties if no value were specified in the
user map.
-             * We handle the "mtFactory" key in a special way since this is normally not
needed for
-             * {@link GeodeticObjectFactory}, except when creating the SIS implementation
of derived
-             * or projected CRS (because of the way we implemented derived CRS, but this
is somewhat
-             * specific to SIS).
+             * Handles the {@code "mtFactory"} key in a special way since this is normally
not needed for
+             * {@link GeodeticObjectFactory}, except when creating the SIS implementation
of derived or
+             * projected CRS (because of the way we implemented derived CRS, but this is
specific to SIS).
              */
             @Override
-            public Object get(final Object key) {
-                Object value = properties.get(key);
-                if (value == null && !properties.containsKey(key)) {
-                    value = defaultProperties.get(key);
-                    if (value == null && OperationMethods.MT_FACTORY.equals(key))
{
-                        value = getMathTransformFactory();
-                    }
+            protected Object invisibleEntry(final Object key) {
+                if (OperationMethods.MT_FACTORY.equals(key)) {
+                    return getMathTransformFactory();
+                } else {
+                    return super.invisibleEntry(key);
                 }
-                return value;
             }
         };
     }
@@ -1343,8 +1316,8 @@ public class GeodeticObjectFactory exten
         if (object instanceof CoordinateReferenceSystem) {
             return (CoordinateReferenceSystem) object;
         } else {
-            throw new FactoryException(Errors.format(Errors.Keys.IllegalClass_2,
-                    CoordinateReferenceSystem.class, object.getClass()));
+            throw new FactoryException(Errors.getResources(defaultProperties).getString(
+                    Errors.Keys.IllegalClass_2, CoordinateReferenceSystem.class, object.getClass()));
         }
     }
 

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConcatenatedOperation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConcatenatedOperation.java?rev=1679659&r1=1679658&r2=1679659&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConcatenatedOperation.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConcatenatedOperation.java
[UTF-8] Fri May 15 23:14:51 2015
@@ -56,7 +56,7 @@ import java.util.Objects;
  * @version 0.6
  * @module
  */
-public class DefaultConcatenatedOperation extends AbstractCoordinateOperation implements
ConcatenatedOperation {
+final class DefaultConcatenatedOperation extends AbstractCoordinateOperation implements ConcatenatedOperation
{
     /**
      * Serial number for inter-operability with different versions.
      */

Added: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java?rev=1679659&view=auto
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java
(added)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java
[UTF-8] Fri May 15 23:14:51 2015
@@ -0,0 +1,293 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.referencing.operation;
+
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Collections;
+import org.opengis.util.FactoryException;
+import org.opengis.util.NoSuchIdentifierException;
+import org.opengis.parameter.ParameterValueGroup;
+import org.opengis.parameter.ParameterDescriptorGroup;
+import org.opengis.referencing.operation.*;
+import org.opengis.referencing.IdentifiedObject;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+import org.apache.sis.internal.referencing.MergedProperties;
+import org.apache.sis.internal.referencing.OperationMethods;
+import org.apache.sis.internal.system.DefaultFactories;
+import org.apache.sis.internal.util.CollectionsExt;
+import org.apache.sis.referencing.IdentifiedObjects;
+import org.apache.sis.referencing.operation.transform.DefaultMathTransformFactory;
+import org.apache.sis.util.collection.WeakHashSet;
+import org.apache.sis.util.collection.Containers;
+import org.apache.sis.util.iso.AbstractFactory;
+import org.apache.sis.util.resources.Errors;
+import org.apache.sis.util.ArgumentChecks;
+
+
+/**
+ * Creates {@linkplain AbstractCoordinateOperation coordinate operations}.
+ * This factory is capable to find coordinate {@linkplain DefaultConversion conversions}
+ * or {@linkplain DefaultTransformation transformations} between two
+ * {@linkplain org.apache.sis.referencing.crs.AbstractCRS coordinate reference systems}.
+ *
+ * @author  Martin Desruisseaux (IRD, Geomatys)
+ * @since   0.6
+ * @version 0.6
+ * @module
+ */
+public class DefaultCoordinateOperationFactory extends AbstractFactory implements CoordinateOperationFactory
{
+    /**
+     * The default properties, or an empty map if none. This map shall not change after construction
in
+     * order to allow usage without synchronization in multi-thread context. But we do not
need to wrap
+     * in a unmodifiable map since {@code DefaultCoordinateOperationFactory} does not provide
public
+     * access to it.
+     */
+    private final Map<String,?> defaultProperties;
+
+    /**
+     * The math transform factory. Will be created only when first needed.
+     *
+     * @see #getMathTransformFactory()
+     */
+    private volatile MathTransformFactory mtFactory;
+
+    /**
+     * Weak references to existing objects.
+     * This set is used in order to return a pre-existing object instead of creating a new
one.
+     */
+    private final WeakHashSet<IdentifiedObject> pool;
+
+    /**
+     * Constructs a factory with no default properties.
+     */
+    public DefaultCoordinateOperationFactory() {
+        this(null);
+    }
+
+    /**
+     * Constructs a factory with the given default properties.
+     * {@code DefaultCoordinateOperationFactory} will fallback on the map given to this constructor
+     * for any property not present in the map provided to a {@code createFoo(Map<String,?>,
…)} method.
+     *
+     * @param properties The default properties, or {@code null} if none.
+     */
+    public DefaultCoordinateOperationFactory(Map<String,?> properties) {
+        if (properties == null || properties.isEmpty()) {
+            properties = Collections.emptyMap();
+        } else {
+            properties = CollectionsExt.compact(new HashMap<String,Object>(properties));
+        }
+        defaultProperties = properties;
+        mtFactory = Containers.property(properties, OperationMethods.MT_FACTORY, MathTransformFactory.class);
+        pool = new WeakHashSet<>(IdentifiedObject.class);
+    }
+
+    /**
+     * Returns the union of the given {@code properties} map with the default properties
+     * given at {@linkplain #DefaultCoordinateOperationFactory(Map) construction time}.
+     * Entries in the given properties map have precedence, even if their
+     * {@linkplain java.util.Map.Entry#getValue() value} is {@code null}
+     * (i.e. a null value "erase" the default property value).
+     * Entries with null value after the union will be omitted.
+     *
+     * <p>This method is invoked by all {@code createFoo(Map<String,?>, …)}
methods.</p>
+     *
+     * @param  properties The user-supplied properties.
+     * @return The union of the given properties with the default properties.
+     */
+    protected Map<String,?> complete(final Map<String,?> properties) {
+        ArgumentChecks.ensureNonNull("properties", properties);
+        return new MergedProperties(properties, defaultProperties);
+    }
+
+    /**
+     * Returns the underlying math transform factory. This factory is used for constructing
{@link MathTransform}
+     * dependencies for all {@linkplain AbstractCoordinateOperation coordinate operations}
instances.
+     *
+     * @return The underlying math transform factory.
+     */
+    private MathTransformFactory getMathTransformFactory() {
+        MathTransformFactory factory = mtFactory;
+        if (factory == null) {
+            mtFactory = factory = DefaultFactories.forBuildin(MathTransformFactory.class);
+        }
+        return factory;
+    }
+
+    /**
+     * Returns the operation method of the given name.
+     *
+     * @param  name The name of the operation method to fetch.
+     * @return The operation method of the given name.
+     * @throws FactoryException if the requested operation method can not be fetched.
+     *
+     * @see DefaultMathTransformFactory#getOperationMethod(String)
+     */
+    @Override
+    public OperationMethod getOperationMethod(final String name) throws FactoryException
{
+        final MathTransformFactory mtFactory = getMathTransformFactory();
+        if (mtFactory instanceof DefaultMathTransformFactory) {
+            return ((DefaultMathTransformFactory) mtFactory).getOperationMethod(name);
+        }
+        for (final OperationMethod method : mtFactory.getAvailableMethods(SingleOperation.class))
{
+            if (IdentifiedObjects.isHeuristicMatchForName(method, name)) {
+                return method;
+            }
+        }
+        throw new NoSuchIdentifierException(Errors.getResources(defaultProperties)
+                .getString(Errors.Keys.NoSuchOperationMethod_1, name), name);
+    }
+
+    /**
+     * Constructs a defining conversion.
+     *
+     * @param  properties The properties to be given to the identified object.
+     * @param  method     The operation method.
+     * @param  parameters The parameter values.
+     * @return The defining conversion created from the given arguments.
+     * @throws FactoryException if the object creation failed.
+     *
+     * @see DefaultConversion#DefaultConversion(Map, OperationMethod, MathTransform, ParameterValueGroup)
+     */
+    @Override
+    public Conversion createDefiningConversion(
+            final Map<String,?>       properties,
+            final OperationMethod     method,
+            final ParameterValueGroup parameters) throws FactoryException
+    {
+        final Conversion conversion;
+        try {
+            conversion = new DefaultConversion(properties, method, null, parameters);
+        } catch (IllegalArgumentException exception) {
+            throw new FactoryException(exception);
+        }
+        return pool.unique(conversion);
+    }
+
+    /**
+     * Creates an operation method from a set of properties and a descriptor group.
+     * The source and target dimensions may be {@code null} if the method can work
+     * with any number of dimensions (e.g. <cite>Affine Transform</cite>).
+     *
+     * @param  properties       Set of properties. Shall contain at least {@code "name"}.
+     * @param  sourceDimensions Number of dimensions in the source CRS of this operation
method, or {@code null}.
+     * @param  targetDimensions Number of dimensions in the target CRS of this operation
method, or {@code null}.
+     * @param  parameters       Description of parameters expected by this operation.
+     * @return The operation method created from the given arguments.
+     * @throws FactoryException if the object creation failed.
+     *
+     * @see DefaultOperationMethod#DefaultOperationMethod(Map, Integer, Integer, ParameterDescriptorGroup)
+     */
+    @Override
+    public OperationMethod createOperationMethod(final Map<String,?> properties,
+            final Integer sourceDimensions, final Integer targetDimensions,
+            ParameterDescriptorGroup parameters) throws FactoryException
+    {
+        final OperationMethod method;
+        try {
+            method = new DefaultOperationMethod(properties, sourceDimensions, targetDimensions,
parameters);
+        } catch (IllegalArgumentException exception) {
+            throw new FactoryException(exception);
+        }
+        return pool.unique(method);
+    }
+
+    /**
+     * Creates an ordered sequence of two or more single coordinate operations.
+     * The sequence of operations is constrained by the requirement that the source coordinate
reference system
+     * of step (<var>n</var>+1) must be the same as the target coordinate reference
system of step (<var>n</var>).
+     * The source coordinate reference system of the first step and the target coordinate
reference system of the
+     * last step are the source and target coordinate reference system associated with the
concatenated operation.
+     *
+     * <p>The properties given in argument follow the same rules than for any other
+     * {@linkplain AbstractCoordinateOperation#AbstractCoordinateOperation(Map, CoordinateReferenceSystem,
+     * CoordinateReferenceSystem, CoordinateReferenceSystem, MathTransform) coordinate operation}.
+     * The following table is a reminder of main (not all) properties:</p>
+     *
+     * <table class="sis">
+     *   <caption>Recognized properties (non exhaustive list)</caption>
+     *   <tr>
+     *     <th>Property name</th>
+     *     <th>Value type</th>
+     *     <th>Returned by</th>
+     *   </tr>
+     *   <tr>
+     *     <td>{@value org.opengis.referencing.IdentifiedObject#NAME_KEY}</td>
+     *     <td>{@link org.opengis.metadata.Identifier} or {@link String}</td>
+     *     <td>{@link AbstractCoordinateOperation#getName()}</td>
+     *   </tr>
+     *   <tr>
+     *     <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
+     *     <td>{@link org.opengis.metadata.Identifier} (optionally as array)</td>
+     *     <td>{@link AbstractCoordinateOperation#getIdentifiers()}</td>
+     *   </tr>
+     * </table>
+     *
+     * @param  properties The properties to be given to the identified object.
+     * @param  operations The sequence of operations. Shall contains at least two operations.
+     * @return The concatenated operation created from the given arguments.
+     * @throws FactoryException if the object creation failed.
+     */
+    @Override
+    public CoordinateOperation createConcatenatedOperation(final Map<String,?> properties,
+            final CoordinateOperation... operations) throws FactoryException
+    {
+        final CoordinateOperation op;
+        try {
+            op = new DefaultConcatenatedOperation(properties, operations, getMathTransformFactory());
+        } catch (IllegalArgumentException exception) {
+            throw new FactoryException(exception);
+        }
+        return pool.unique(op);
+    }
+
+    /**
+     * Not yet implemented.
+     *
+     * @param  sourceCRS Input coordinate reference system.
+     * @param  targetCRS Output coordinate reference system.
+     * @param  method the algorithmic method for conversion or transformation.
+     * @return A coordinate operation from {@code sourceCRS} to {@code targetCRS}.
+     * @throws FactoryException if the operation creation failed.
+     */
+    @Override
+    public CoordinateOperation createOperation(final CoordinateReferenceSystem sourceCRS,
+                                               final CoordinateReferenceSystem targetCRS,
+                                               final OperationMethod method)
+            throws FactoryException
+    {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    /**
+     * Not yet implemented.
+     *
+     * @param  sourceCRS Input coordinate reference system.
+     * @param  targetCRS Output coordinate reference system.
+     * @return A coordinate operation from {@code sourceCRS} to {@code targetCRS}.
+     * @throws OperationNotFoundException if no operation path was found from {@code sourceCRS}
to {@code targetCRS}.
+     * @throws FactoryException if the operation creation failed for some other reason.
+     */
+    @Override
+    public CoordinateOperation createOperation(final CoordinateReferenceSystem sourceCRS,
+                                               final CoordinateReferenceSystem targetCRS)
+            throws OperationNotFoundException, FactoryException
+    {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+}

Propchange: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8

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=1679659&r1=1679658&r2=1679659&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 May 15 23:14:51 2015
@@ -356,6 +356,8 @@ public class DefaultMathTransformFactory
      * @param  identifier The name or identifier of the operation method to search.
      * @return The coordinate operation method for the given name or identifier.
      * @throws NoSuchIdentifierException if there is no operation method registered for the
specified identifier.
+     *
+     * @see org.apache.sis.referencing.operation.DefaultCoordinateOperationFactory#getOperationMethod(String)
      */
     public OperationMethod getOperationMethod(String identifier) throws NoSuchIdentifierException
{
         identifier = CharSequences.trimWhitespaces(identifier);

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java?rev=1679659&r1=1679658&r2=1679659&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
[UTF-8] Fri May 15 23:14:51 2015
@@ -616,7 +616,7 @@ public final class Errors extends Indexe
         public static final short NoSuchAuthorityCode_3 = 137;
 
         /**
-         * No operation method found for name of identifier “{0}”.
+         * No operation method found for name or identifier “{0}”.
          */
         public static final short NoSuchOperationMethod_1 = 179;
 

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties?rev=1679659&r1=1679658&r2=1679659&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
[ISO-8859-1] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
[ISO-8859-1] Fri May 15 23:14:51 2015
@@ -156,7 +156,7 @@ NotASkewSymmetricMatrix           = Matr
 NotAUnicodeIdentifier_1           = Text \u201c{0}\u201d is not a Unicode identifier.
 NotComparableClass_1              = Class \u2018{0}\u2019 is not a comparable.
 NoSuchAuthorityCode_3             = No code \u201c{2}\u201d from authority \u201c{0}\u201d
found for object of type \u2018{1}\u2019.
-NoSuchOperationMethod_1           = No operation method found for name of identifier \u201c{0}\u201d.
+NoSuchOperationMethod_1           = No operation method found for name or identifier \u201c{0}\u201d.
 NoUnit                            = No unit of measurement has been specified.
 NullArgument_1                    = Argument \u2018{0}\u2019 shall not be null.
 NullCollectionElement_1           = \u2018{0}\u2019 collection does not accept null elements.



Mime
View raw message