sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1678265 [2/2] - in /sis/branches/JDK7: ./ application/sis-console/src/main/java/org/apache/sis/console/ application/sis-console/src/test/java/org/apache/sis/console/ core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ core/si...
Date Thu, 07 May 2015 21:46:07 GMT
Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEngineeringDatum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEngineeringDatum.java?rev=1678265&r1=1678264&r2=1678265&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEngineeringDatum.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEngineeringDatum.java [UTF-8] Thu May  7 21:46:06 2015
@@ -23,6 +23,7 @@ import org.opengis.util.GenericName;
 import org.opengis.util.InternationalString;
 import org.opengis.metadata.Identifier;
 import org.opengis.referencing.datum.EngineeringDatum;
+import org.apache.sis.internal.metadata.WKTKeywords;
 import org.apache.sis.io.wkt.Formatter;
 
 
@@ -168,6 +169,8 @@ public class DefaultEngineeringDatum ext
      * Formats this datum as a <cite>Well Known Text</cite> {@code EngineeringDatum[…]} element.
      *
      * @return {@code "EngineeringDatum"} (WKT 2) or {@code "Local_Datum"} (WKT 1).
+     *
+     * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#76">WKT 2 specification</a>
      */
     @Override
     protected String formatTo(final Formatter formatter) {
@@ -180,8 +183,8 @@ public class DefaultEngineeringDatum ext
              * in WKT 1, but do not have any indication about what the values should be.
              */
             formatter.append(0);
-            return "Local_Datum";
+            return WKTKeywords.Local_Datum;
         }
-        return "EngineeringDatum";
+        return WKTKeywords.EngineeringDatum;
     }
 }

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java?rev=1678265&r1=1678264&r2=1678265&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java [UTF-8] Thu May  7 21:46:06 2015
@@ -33,6 +33,7 @@ import org.opengis.referencing.operation
 import org.apache.sis.referencing.operation.matrix.Matrices;
 import org.apache.sis.referencing.operation.matrix.NoninvertibleMatrixException;
 import org.apache.sis.metadata.iso.extent.Extents;
+import org.apache.sis.internal.metadata.WKTKeywords;
 import org.apache.sis.internal.referencing.ExtentSelector;
 import org.apache.sis.internal.util.CollectionsExt;
 import org.apache.sis.util.logging.Logging;
@@ -534,6 +535,8 @@ public class DefaultGeodeticDatum extend
      * as a separated element after the geodetic datum (for compatibility with WKT 1).
      *
      * @return {@code "Datum"}.
+     *
+     * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#51">WKT 2 specification</a>
      */
     @Override
     protected String formatTo(final Formatter formatter) {
@@ -557,6 +560,6 @@ public class DefaultGeodeticDatum extend
         }
         // For the WKT 2 case, the ANCHOR[…] element is added by Formatter itself.
         formatter.newLine(); // For writing the ID[…] element on its own line.
-        return "Datum";
+        return WKTKeywords.Datum;
     }
 }

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultImageDatum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultImageDatum.java?rev=1678265&r1=1678264&r2=1678265&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultImageDatum.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultImageDatum.java [UTF-8] Thu May  7 21:46:06 2015
@@ -25,6 +25,7 @@ import org.opengis.util.InternationalStr
 import org.opengis.metadata.Identifier;
 import org.opengis.referencing.datum.ImageDatum;
 import org.opengis.referencing.datum.PixelInCell;
+import org.apache.sis.internal.metadata.WKTKeywords;
 import org.apache.sis.io.wkt.Formatter;
 import org.apache.sis.io.wkt.Convention;
 import org.apache.sis.util.ComparisonMode;
@@ -239,6 +240,8 @@ public class DefaultImageDatum extends A
      * {@code ImageDatum} is defined in the WKT 2 specification only.</div>
      *
      * @return {@code "ImageDatum"}.
+     *
+     * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#81">WKT 2 specification</a>
      */
     @Override
     protected String formatTo(final Formatter formatter) {
@@ -249,6 +252,6 @@ public class DefaultImageDatum extends A
         } else if (convention.majorVersion() == 1) {
             formatter.setInvalidWKT(this, null);
         }
-        return "ImageDatum";
+        return WKTKeywords.ImageDatum;
     }
 }

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java?rev=1678265&r1=1678264&r2=1678265&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java [UTF-8] Thu May  7 21:46:06 2015
@@ -28,6 +28,7 @@ import org.opengis.util.InternationalStr
 import org.opengis.metadata.Identifier;
 import org.opengis.referencing.datum.PrimeMeridian;
 import org.apache.sis.referencing.AbstractIdentifiedObject;
+import org.apache.sis.internal.metadata.WKTKeywords;
 import org.apache.sis.internal.jaxb.gco.Measure;
 import org.apache.sis.internal.util.Numerics;
 import org.apache.sis.io.wkt.Formatter;
@@ -339,6 +340,8 @@ public class DefaultPrimeMeridian extend
      * Formats this prime meridian as a <cite>Well Known Text</cite> {@code PrimeMeridian[…]} element.
      *
      * @return {@code "PrimeMeridian"} (WKT 2) or {@code "PrimeM"} (WKT 1).
+     *
+     * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#53">WKT 2 specification</a>
      */
     @Override
     protected String formatTo(final Formatter formatter) {
@@ -351,12 +354,12 @@ public class DefaultPrimeMeridian extend
         }
         formatter.append(isWKT1 ? getGreenwichLongitude(targetUnit) : getGreenwichLongitude());
         if (isWKT1) {
-            return "PrimeM";
+            return WKTKeywords.PrimeM;
         }
         final Unit<Angle> angularUnit = getAngularUnit();   // Gives to users a chance to override properties.
         if (!convention.isSimplified() || !targetUnit.equals(angularUnit)) {
             formatter.append(angularUnit);
         }
-        return "PrimeMeridian";
+        return WKTKeywords.PrimeMeridian;
     }
 }

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java?rev=1678265&r1=1678264&r2=1678265&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java [UTF-8] Thu May  7 21:46:06 2015
@@ -26,6 +26,7 @@ import org.opengis.util.GenericName;
 import org.opengis.util.InternationalString;
 import org.opengis.metadata.Identifier;
 import org.opengis.referencing.datum.TemporalDatum;
+import org.apache.sis.internal.metadata.WKTKeywords;
 import org.apache.sis.internal.jaxb.gml.UniversalTimeAdapter;
 import org.apache.sis.internal.metadata.MetadataUtilities;
 import org.apache.sis.util.ComparisonMode;
@@ -285,6 +286,8 @@ public class DefaultTemporalDatum extend
      * {@code TimeDatum} is defined in the WKT 2 specification only.</div>
      *
      * @return {@code "TimeDatum"}.
+     *
+     * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#90">WKT 2 specification</a>
      */
     @Override
     protected String formatTo(final Formatter formatter) {
@@ -293,7 +296,7 @@ public class DefaultTemporalDatum extend
         if (formatter.getConvention().majorVersion() == 1) {
             formatter.setInvalidWKT(this, null);
         }
-        return "TimeDatum";
+        return WKTKeywords.TimeDatum;
     }
 
     /**
@@ -312,7 +315,7 @@ public class DefaultTemporalDatum extend
         @Override
         protected String formatTo(final Formatter formatter) {
             formatter.append(origin);
-            return "TimeOrigin";
+            return WKTKeywords.TimeOrigin;
         }
     }
 }

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultVerticalDatum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultVerticalDatum.java?rev=1678265&r1=1678264&r2=1678265&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultVerticalDatum.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultVerticalDatum.java [UTF-8] Thu May  7 21:46:06 2015
@@ -29,6 +29,7 @@ import org.apache.sis.io.wkt.Formatter;
 import org.apache.sis.util.ComparisonMode;
 import org.apache.sis.internal.jaxb.Context;
 import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.metadata.WKTKeywords;
 import org.apache.sis.internal.referencing.VerticalDatumTypes;
 
 import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
@@ -317,14 +318,16 @@ public class DefaultVerticalDatum extend
      * completely in ISO 19111:2007.</div>
      *
      * @return {@code "VerticalDatum"} (WKT 2) or {@code "Vert_Datum"} (WKT 1).
+     *
+     * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#71">WKT 2 specification</a>
      */
     @Override
     protected String formatTo(final Formatter formatter) {
         super.formatTo(formatter);
         if (formatter.getConvention().majorVersion() == 1) {
             formatter.append(VerticalDatumTypes.toLegacy(type().ordinal()));
-            return "Vert_Datum";
+            return WKTKeywords.Vert_Datum;
         }
-        return "VerticalDatum";
+        return WKTKeywords.VerticalDatum;
     }
 }

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java?rev=1678265&r1=1678264&r2=1678265&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java [UTF-8] Thu May  7 21:46:06 2015
@@ -23,13 +23,17 @@ import javax.xml.bind.annotation.XmlType
 import javax.xml.bind.annotation.XmlSeeAlso;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
+import javax.measure.converter.ConversionException;
+import org.opengis.util.FactoryException;
 import org.opengis.util.InternationalString;
 import org.opengis.metadata.extent.Extent;
 import org.opengis.metadata.quality.PositionalAccuracy;
 import org.opengis.referencing.crs.CoordinateReferenceSystem;
 import org.opengis.referencing.operation.CoordinateOperation;
 import org.opengis.referencing.operation.OperationMethod;
+import org.opengis.referencing.operation.Matrix;
 import org.opengis.referencing.operation.MathTransform;
+import org.opengis.referencing.operation.MathTransformFactory;
 import org.opengis.metadata.Identifier;
 import org.apache.sis.parameter.Parameterized;
 import org.opengis.parameter.ParameterDescriptorGroup;
@@ -43,10 +47,13 @@ import org.apache.sis.util.ComparisonMod
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.collection.Containers;
 import org.apache.sis.util.UnsupportedImplementationException;
+import org.apache.sis.referencing.cs.CoordinateSystems;
 import org.apache.sis.referencing.AbstractIdentifiedObject;
 import org.apache.sis.referencing.operation.transform.PassThroughTransform;
 import org.apache.sis.internal.referencing.OperationMethods;
 import org.apache.sis.internal.referencing.WKTUtilities;
+import org.apache.sis.internal.system.DefaultFactories;
+import org.apache.sis.internal.metadata.WKTKeywords;
 import org.apache.sis.internal.util.CollectionsExt;
 import org.apache.sis.internal.system.Semaphores;
 
@@ -168,23 +175,24 @@ public class AbstractCoordinateOperation
      */
     AbstractCoordinateOperation() {
         super(org.apache.sis.internal.referencing.NilReferencingObject.INSTANCE);
-        sourceCRS = null;
-        targetCRS = null;
-        interpolationCRS = null;
-        operationVersion = null;
+        sourceCRS                   = null;
+        targetCRS                   = null;
+        interpolationCRS            = null;
+        operationVersion            = null;
         coordinateOperationAccuracy = null;
-        domainOfValidity = null;
-        scope = null;
-        transform = null;
+        domainOfValidity            = null;
+        scope                       = null;
+        transform                   = null;
     }
 
     /**
      * Constructs a new coordinate operation with the same values than the specified defining conversion,
      * together with the specified source and target CRS. This constructor is used by {@link DefaultConversion} only.
      */
-    AbstractCoordinateOperation(final CoordinateOperation       definition,
+    AbstractCoordinateOperation(final CoordinateOperation definition,
                                 final CoordinateReferenceSystem sourceCRS,
-                                final CoordinateReferenceSystem targetCRS)
+                                final CoordinateReferenceSystem targetCRS,
+                                final MathTransformFactory factory)
     {
         super(definition);
         this.sourceCRS                   = sourceCRS;
@@ -194,11 +202,50 @@ public class AbstractCoordinateOperation
         this.coordinateOperationAccuracy = definition.getCoordinateOperationAccuracy();
         this.domainOfValidity            = definition.getDomainOfValidity();
         this.scope                       = definition.getScope();
-        this.transform                   = definition.getMathTransform();
+        MathTransform mt = definition.getMathTransform();
+        mt = swapAndScaleAxes(mt, sourceCRS, definition.getSourceCRS(), true,  factory);
+        mt = swapAndScaleAxes(mt, definition.getTargetCRS(), targetCRS, false, factory);
+        transform = mt;
         checkDimensions();
     }
 
     /**
+     * Concatenates to the given transform the operation needed for swapping and scaling the axes.
+     * The two coordinate systems must implement the same GeoAPI coordinate system interface.
+     * For example if {@code sourceCRS} uses a {@code CartesianCS}, then {@code targetCRS} must use
+     * a {@code CartesianCS} too.
+     *
+     * @param transform The transform to which to concatenate axis changes.
+     * @param sourceCRS The first CRS of the pair for which to check for axes changes.
+     * @param targetCRS The second CRS of the pair for which to check for axes changes.
+     * @param isSource  {@code true} for pre-concatenating the changes, or {@code false} for post-concatenating.
+     * @param factory   The factory to use if some axis changes are needed, or {@code null} for the default.
+     */
+    private static MathTransform swapAndScaleAxes(MathTransform transform,
+            final CoordinateReferenceSystem sourceCRS,
+            final CoordinateReferenceSystem targetCRS,
+            final boolean isSource, MathTransformFactory factory)
+    {
+        if (sourceCRS != null && targetCRS != null && sourceCRS != targetCRS) try {
+            final Matrix m = CoordinateSystems.swapAndScaleAxes(sourceCRS.getCoordinateSystem(),
+                                                                targetCRS.getCoordinateSystem());
+            if (!m.isIdentity()) {
+                if (factory == null) {
+                    factory = DefaultFactories.forBuildin(MathTransformFactory.class);
+                }
+                final MathTransform s = factory.createAffineTransform(m);
+                transform = factory.createConcatenatedTransform(isSource ? s : transform,
+                                                                isSource ? transform : s);
+            }
+        } catch (ConversionException | FactoryException e) {
+            throw new IllegalArgumentException(Errors.format(Errors.Keys.IllegalArgumentValue_2,
+                    (isSource ? "sourceCRS" : "targetCRS"),
+                    (isSource ?  sourceCRS  :  targetCRS).getName()), e);
+        }
+        return transform;
+    }
+
+    /**
      * Creates a coordinate operation from the given properties.
      * The properties given in argument follow the same rules than for the
      * {@linkplain AbstractIdentifiedObject#AbstractIdentifiedObject(Map) super-class constructor}.
@@ -721,27 +768,29 @@ public class AbstractCoordinateOperation
      *
      * @param  formatter The formatter to use.
      * @return {@code "CoordinateOperation"}.
+     *
+     * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#113">WKT 2 specification</a>
      */
     @Override
     protected String formatTo(final Formatter formatter) {
         super.formatTo(formatter);
-        append(formatter, getSourceCRS(), "SourceCRS");
-        append(formatter, getTargetCRS(), "TargetCRS");
+        append(formatter, getSourceCRS(), WKTKeywords.SourceCRS);
+        append(formatter, getTargetCRS(), WKTKeywords.TargetCRS);
         formatter.append(DefaultOperationMethod.castOrCopy(getMethod()));
-        append(formatter, getInterpolationCRS(), "InterpolationCRS");
+        append(formatter, getInterpolationCRS(), WKTKeywords.InterpolationCRS);
         final double accuracy = getLinearAccuracy();
         if (accuracy > 0) {
             formatter.append(new FormattableObject() {
                 @Override protected String formatTo(final Formatter formatter) {
                     formatter.append(accuracy);
-                    return "OperationAccuracy";
+                    return WKTKeywords.OperationAccuracy;
                 }
             });
         }
         if (formatter.getConvention().majorVersion() == 1) {
             formatter.setInvalidWKT(this, null);
         }
-        return "CoordinateOperation";
+        return WKTKeywords.CoordinateOperation;
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractSingleOperation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractSingleOperation.java?rev=1678265&r1=1678264&r2=1678265&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractSingleOperation.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractSingleOperation.java [UTF-8] Thu May  7 21:46:06 2015
@@ -26,6 +26,7 @@ import org.opengis.referencing.operation
 import org.opengis.referencing.operation.SingleOperation;
 import org.opengis.referencing.operation.OperationMethod;
 import org.opengis.referencing.operation.MathTransform;
+import org.opengis.referencing.operation.MathTransformFactory;
 import org.opengis.referencing.crs.CoordinateReferenceSystem;
 import org.apache.sis.parameter.Parameterized;
 import org.apache.sis.referencing.operation.transform.MathTransforms;
@@ -113,11 +114,12 @@ class AbstractSingleOperation extends Ab
      * specified source and target CRS. While the source operation can be an arbitrary one, it is
      * typically a defining conversion.
      */
-    AbstractSingleOperation(final SingleOperation           definition,
+    AbstractSingleOperation(final SingleOperation definition,
                             final CoordinateReferenceSystem sourceCRS,
-                            final CoordinateReferenceSystem targetCRS)
+                            final CoordinateReferenceSystem targetCRS,
+                            final MathTransformFactory factory)
     {
-        super(definition, sourceCRS, targetCRS);
+        super(definition, sourceCRS, targetCRS, factory);
         method = definition.getMethod();
         parameters = (definition instanceof AbstractSingleOperation) ?
                 ((AbstractSingleOperation) definition).parameters : definition.getParameterValues();

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConicProjection.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConicProjection.java?rev=1678265&r1=1678264&r2=1678265&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConicProjection.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConicProjection.java [UTF-8] Thu May  7 21:46:06 2015
@@ -19,6 +19,7 @@ package org.apache.sis.referencing.opera
 import javax.xml.bind.annotation.XmlTransient;
 import org.opengis.referencing.operation.Conversion;
 import org.opengis.referencing.operation.ConicProjection;
+import org.opengis.referencing.operation.MathTransformFactory;
 import org.opengis.referencing.crs.CoordinateReferenceSystem;
 
 
@@ -48,12 +49,14 @@ final class DefaultConicProjection exten
      * @param definition The defining conversion.
      * @param sourceCRS  The source CRS.
      * @param targetCRS  The target CRS.
+     * @param factory    The factory to use if some axis changes are needed, or {@code null} for the default.
      */
-    DefaultConicProjection(final Conversion                definition,
+    DefaultConicProjection(final Conversion definition,
                            final CoordinateReferenceSystem sourceCRS,
-                           final CoordinateReferenceSystem targetCRS)
+                           final CoordinateReferenceSystem targetCRS,
+                           final MathTransformFactory factory)
     {
-        super(definition, sourceCRS, targetCRS);
+        super(definition, sourceCRS, targetCRS, factory);
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConversion.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConversion.java?rev=1678265&r1=1678264&r2=1678265&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConversion.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConversion.java [UTF-8] Thu May  7 21:46:06 2015
@@ -23,6 +23,7 @@ import org.opengis.referencing.operation
 import org.opengis.referencing.operation.OperationMethod;
 import org.opengis.referencing.operation.MathTransform;
 import org.opengis.referencing.crs.CoordinateReferenceSystem;
+import org.opengis.referencing.operation.MathTransformFactory;
 import org.apache.sis.util.ArgumentChecks;
 
 
@@ -155,12 +156,14 @@ public class DefaultConversion extends A
      * @param definition The defining conversion.
      * @param sourceCRS  The source CRS.
      * @param targetCRS  The target CRS.
+     * @param factory    The factory to use if some axis changes are needed, or {@code null} for the default.
      */
-    DefaultConversion(final Conversion                definition,
+    DefaultConversion(final Conversion definition,
                       final CoordinateReferenceSystem sourceCRS,
-                      final CoordinateReferenceSystem targetCRS)
+                      final CoordinateReferenceSystem targetCRS,
+                      final MathTransformFactory factory)
     {
-        super(definition, sourceCRS, targetCRS);
+        super(definition, sourceCRS, targetCRS, factory);
     }
 
     /**
@@ -255,6 +258,6 @@ public class DefaultConversion extends A
         ArgumentChecks.ensureNonNull("baseType",  baseType);
         ArgumentChecks.ensureNonNull("sourceCRS", sourceCRS);
         ArgumentChecks.ensureNonNull("targetCRS", targetCRS);
-        return SubTypes.create(baseType, this, sourceCRS, targetCRS);
+        return SubTypes.create(baseType, this, sourceCRS, targetCRS, null);
     }
 }

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCylindricalProjection.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCylindricalProjection.java?rev=1678265&r1=1678264&r2=1678265&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCylindricalProjection.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCylindricalProjection.java [UTF-8] Thu May  7 21:46:06 2015
@@ -19,6 +19,7 @@ package org.apache.sis.referencing.opera
 import javax.xml.bind.annotation.XmlTransient;
 import org.opengis.referencing.operation.Conversion;
 import org.opengis.referencing.operation.CylindricalProjection;
+import org.opengis.referencing.operation.MathTransformFactory;
 import org.opengis.referencing.crs.CoordinateReferenceSystem;
 
 
@@ -48,12 +49,14 @@ final class DefaultCylindricalProjection
      * @param definition The defining conversion.
      * @param sourceCRS  The source CRS.
      * @param targetCRS  The target CRS.
+     * @param factory    The factory to use if some axis changes are needed, or {@code null} for the default.
      */
-    DefaultCylindricalProjection(final Conversion                definition,
+    DefaultCylindricalProjection(final Conversion definition,
                                  final CoordinateReferenceSystem sourceCRS,
-                                 final CoordinateReferenceSystem targetCRS)
+                                 final CoordinateReferenceSystem targetCRS,
+                                 final MathTransformFactory factory)
     {
-        super(definition, sourceCRS, targetCRS);
+        super(definition, sourceCRS, targetCRS, factory);
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultFormula.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultFormula.java?rev=1678265&r1=1678264&r2=1678265&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultFormula.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultFormula.java [UTF-8] Thu May  7 21:46:06 2015
@@ -20,6 +20,7 @@ import java.io.Serializable;
 import org.opengis.util.InternationalString;
 import org.opengis.metadata.citation.Citation;
 import org.opengis.referencing.operation.Formula;
+import org.apache.sis.internal.metadata.WKTKeywords;
 import org.apache.sis.io.wkt.ElementKind;
 import org.apache.sis.io.wkt.FormattableObject;
 import org.apache.sis.io.wkt.Formatter;
@@ -191,6 +192,6 @@ public class DefaultFormula extends Form
             formatter.append(text.toString(formatter.getLocale()), ElementKind.REMARKS);
         }
         formatter.setInvalidWKT(Formula.class, null);
-        return "Formula";
+        return WKTKeywords.Formula;
     }
 }

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultOperationMethod.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultOperationMethod.java?rev=1678265&r1=1678264&r2=1678265&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultOperationMethod.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultOperationMethod.java [UTF-8] Thu May  7 21:46:06 2015
@@ -33,6 +33,7 @@ import org.apache.sis.util.ComparisonMod
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.resources.Vocabulary;
 import org.apache.sis.internal.util.Citations;
+import org.apache.sis.internal.metadata.WKTKeywords;
 import org.apache.sis.parameter.Parameterized;
 import org.apache.sis.referencing.NamedIdentifier;
 import org.apache.sis.referencing.IdentifiedObjects;
@@ -637,6 +638,8 @@ public class DefaultOperationMethod exte
      * Formats this operation as a <cite>Well Known Text</cite> {@code Method[…]} element.
      *
      * @return {@code "Method"} (WKT 2) or {@code "Projection"} (WKT 1).
+     *
+     * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#118">WKT 2 specification</a>
      */
     @Override
     protected String formatTo(final Formatter formatter) {
@@ -660,10 +663,10 @@ public class DefaultOperationMethod exte
              */
             final Class<? extends SingleOperation> type = getOperationType();
             if (Projection.class.isAssignableFrom(type) || type.isAssignableFrom(Projection.class)) {
-                return "Projection";
+                return WKTKeywords.Projection;
             }
             formatter.setInvalidWKT(this, null);
         }
-        return "Method";
+        return WKTKeywords.Method;
     }
 }

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultPlanarProjection.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultPlanarProjection.java?rev=1678265&r1=1678264&r2=1678265&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultPlanarProjection.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultPlanarProjection.java [UTF-8] Thu May  7 21:46:06 2015
@@ -19,6 +19,7 @@ package org.apache.sis.referencing.opera
 import javax.xml.bind.annotation.XmlTransient;
 import org.opengis.referencing.operation.Conversion;
 import org.opengis.referencing.operation.PlanarProjection;
+import org.opengis.referencing.operation.MathTransformFactory;
 import org.opengis.referencing.crs.CoordinateReferenceSystem;
 
 
@@ -48,12 +49,14 @@ final class DefaultPlanarProjection exte
      * @param definition The defining conversion.
      * @param sourceCRS  The source CRS.
      * @param targetCRS  The target CRS.
+     * @param factory    The factory to use if some axis changes are needed, or {@code null} for the default.
      */
-    DefaultPlanarProjection(final Conversion                definition,
+    DefaultPlanarProjection(final Conversion definition,
                             final CoordinateReferenceSystem sourceCRS,
-                            final CoordinateReferenceSystem targetCRS)
+                            final CoordinateReferenceSystem targetCRS,
+                            final MathTransformFactory factory)
     {
-        super(definition, sourceCRS, targetCRS);
+        super(definition, sourceCRS, targetCRS, factory);
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultProjection.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultProjection.java?rev=1678265&r1=1678264&r2=1678265&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultProjection.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultProjection.java [UTF-8] Thu May  7 21:46:06 2015
@@ -19,6 +19,7 @@ package org.apache.sis.referencing.opera
 import javax.xml.bind.annotation.XmlTransient;
 import org.opengis.referencing.operation.Conversion;
 import org.opengis.referencing.operation.Projection;
+import org.opengis.referencing.operation.MathTransformFactory;
 import org.opengis.referencing.crs.ProjectedCRS;
 import org.opengis.referencing.crs.GeographicCRS;
 import org.opengis.referencing.crs.CoordinateReferenceSystem;
@@ -63,12 +64,14 @@ class DefaultProjection extends DefaultC
      * @param definition The defining conversion.
      * @param sourceCRS  The source CRS.
      * @param targetCRS  The target CRS.
+     * @param factory    The factory to use if some axis changes are needed, or {@code null} for the default.
      */
-    DefaultProjection(final Conversion                definition,
+    DefaultProjection(final Conversion definition,
                       final CoordinateReferenceSystem sourceCRS,
-                      final CoordinateReferenceSystem targetCRS)
+                      final CoordinateReferenceSystem targetCRS,
+                      final MathTransformFactory factory)
     {
-        super(definition, sourceCRS, targetCRS);
+        super(definition, sourceCRS, targetCRS, factory);
         ArgumentChecks.ensureCanCast("sourceCRS", GeographicCRS.class, sourceCRS);
         ArgumentChecks.ensureCanCast("targetCRS", ProjectedCRS .class, targetCRS);
     }

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/SubTypes.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/SubTypes.java?rev=1678265&r1=1678264&r2=1678265&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/SubTypes.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/SubTypes.java [UTF-8] Thu May  7 21:46:06 2015
@@ -119,13 +119,15 @@ final class SubTypes {
      * @param  definition The defining conversion.
      * @param  sourceCRS  The source CRS.
      * @param  targetCRS  The target CRS.
+     * @param  factory    The factory to use if some axis changes are needed, or {@code null} for the default.
      * @return The conversion of the given type between the given CRS.
      * @throws ClassCastException if a contradiction is found between the given {@code baseType},
      *         the defining {@linkplain DefaultConversion#getInterface() conversion type} and
      *         the {@linkplain DefaultOperationMethod#getOperationType() method operation type}.
      */
     static <T extends Conversion> T create(final Class<T> baseType, final Conversion definition,
-            final CoordinateReferenceSystem sourceCRS, final CoordinateReferenceSystem targetCRS)
+            final CoordinateReferenceSystem sourceCRS, final CoordinateReferenceSystem targetCRS,
+            final MathTransformFactory factory)
     {
         Class<? extends T> type = baseType;
         if (definition instanceof AbstractIdentifiedObject) {
@@ -143,15 +145,15 @@ final class SubTypes {
         }
         final Conversion conversion;
         if (CylindricalProjection.class.isAssignableFrom(type)) {
-            conversion = new DefaultCylindricalProjection(definition, sourceCRS, targetCRS);
+            conversion = new DefaultCylindricalProjection(definition, sourceCRS, targetCRS, factory);
         } else if (ConicProjection.class.isAssignableFrom(type)) {
-            conversion = new DefaultConicProjection(definition, sourceCRS, targetCRS);
+            conversion = new DefaultConicProjection(definition, sourceCRS, targetCRS, factory);
         } else if (PlanarProjection.class.isAssignableFrom(type)) {
-            conversion = new DefaultPlanarProjection(definition, sourceCRS, targetCRS);
+            conversion = new DefaultPlanarProjection(definition, sourceCRS, targetCRS, factory);
         } else if (Projection.class.isAssignableFrom(type)) {
-            conversion = new DefaultProjection(definition, sourceCRS, targetCRS);
+            conversion = new DefaultProjection(definition, sourceCRS, targetCRS, factory);
         } else {
-            conversion = new DefaultConversion(definition, sourceCRS, targetCRS);
+            conversion = new DefaultConversion(definition, sourceCRS, targetCRS, factory);
         }
         return type.cast(conversion);
     }

Modified: 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/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java?rev=1678265&r1=1678264&r2=1678265&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java [UTF-8] Thu May  7 21:46:06 2015
@@ -37,6 +37,7 @@ import org.apache.sis.referencing.operat
 import org.apache.sis.io.wkt.Formatter;
 import org.apache.sis.io.wkt.FormattableObject;
 import org.apache.sis.internal.referencing.WKTUtilities;
+import org.apache.sis.internal.metadata.WKTKeywords;
 import org.apache.sis.util.Utilities;
 import org.apache.sis.util.ComparisonMode;
 import org.apache.sis.util.LenientComparable;
@@ -956,7 +957,7 @@ public abstract class AbstractMathTransf
     @Override
     protected String formatTo(final Formatter formatter) {
         WKTUtilities.appendParamMT(getParameterValues(), formatter);
-        return "Param_MT";
+        return WKTKeywords.Param_MT;
     }
 
     /**
@@ -1117,10 +1118,10 @@ public abstract class AbstractMathTransf
             final ParameterValueGroup parameters = getParameterValues();
             if (parameters != null) {
                 WKTUtilities.appendParamMT(parameters, formatter);
-                return "Param_MT";
+                return WKTKeywords.Param_MT;
             } else {
                 formatter.append((FormattableObject) AbstractMathTransform.this);
-                return "Inverse_MT";
+                return WKTKeywords.Inverse_MT;
             }
         }
     }

Modified: 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/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java?rev=1678265&r1=1678264&r2=1678265&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java [UTF-8] Thu May  7 21:46:06 2015
@@ -31,6 +31,7 @@ import org.opengis.referencing.operation
 import org.opengis.referencing.operation.NoninvertibleTransformException;
 import org.apache.sis.parameter.Parameterized;
 import org.apache.sis.referencing.operation.matrix.Matrices;
+import org.apache.sis.internal.metadata.WKTKeywords;
 import org.apache.sis.internal.system.Semaphores;
 import org.apache.sis.util.Classes;
 import org.apache.sis.util.LenientComparable;
@@ -918,6 +919,6 @@ class ConcatenatedTransform extends Abst
                 formatter.append((MathTransform) step);
             }
         }
-        return "Concat_MT";
+        return WKTKeywords.Concat_MT;
     }
 }

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ContextualParameters.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ContextualParameters.java?rev=1678265&r1=1678264&r2=1678265&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ContextualParameters.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ContextualParameters.java [UTF-8] Thu May  7 21:46:06 2015
@@ -37,6 +37,7 @@ import org.opengis.referencing.operation
 import org.opengis.referencing.operation.MathTransformFactory;
 import org.apache.sis.internal.referencing.ExtendedPrecisionMatrix;
 import org.apache.sis.internal.referencing.WKTUtilities;
+import org.apache.sis.internal.metadata.WKTKeywords;
 import org.apache.sis.internal.util.DoubleDouble;
 import org.apache.sis.internal.util.UnmodifiableArrayList;
 import org.apache.sis.parameter.Parameters;
@@ -626,10 +627,10 @@ public class ContextualParameters extend
         protected String formatTo(final Formatter formatter) {
             if (inverse) {
                 formatter.append(new WKT(false));
-                return "Inverse_MT";
+                return WKTKeywords.Inverse_MT;
             } else {
                 WKTUtilities.appendParamMT(ContextualParameters.this, formatter);
-                return "Param_MT";
+                return WKTKeywords.Param_MT;
             }
         }
     }

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PassThroughTransform.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PassThroughTransform.java?rev=1678265&r1=1678264&r2=1678265&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PassThroughTransform.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PassThroughTransform.java [UTF-8] Thu May  7 21:46:06 2015
@@ -26,6 +26,7 @@ import org.opengis.referencing.operation
 import org.apache.sis.referencing.operation.matrix.Matrices;
 import org.apache.sis.referencing.operation.matrix.MatrixSIS;
 import org.apache.sis.internal.referencing.DirectPositionView;
+import org.apache.sis.internal.metadata.WKTKeywords;
 import org.apache.sis.geometry.GeneralDirectPosition;
 import org.apache.sis.io.wkt.Formatter;
 import org.apache.sis.util.ComparisonMode;
@@ -630,6 +631,6 @@ public class PassThroughTransform extend
             formatter.setInvalidWKT(PassThroughTransform.class, null);
         }
         formatter.append(subTransform);
-        return "PassThrough_MT";
+        return WKTKeywords.PassThrough_MT;
     }
 }

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DirectionAlongMeridianTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DirectionAlongMeridianTest.java?rev=1678265&r1=1678264&r2=1678265&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DirectionAlongMeridianTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DirectionAlongMeridianTest.java [UTF-8] Thu May  7 21:46:06 2015
@@ -107,7 +107,7 @@ public final strictfp class DirectionAlo
     }
 
     /**
-     * Test Well Known Text formatting.
+     * Tests Well Known Text formatting.
      */
     @Test
     public void testWKT() {

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java?rev=1678265&r1=1678264&r2=1678265&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java [UTF-8] Thu May  7 21:46:06 2015
@@ -126,9 +126,10 @@ import org.junit.BeforeClass;
     org.apache.sis.referencing.crs.DefaultGeodeticCRSTest.class,
     org.apache.sis.referencing.crs.DefaultGeocentricCRSTest.class,
     org.apache.sis.referencing.crs.DefaultGeographicCRSTest.class,
-    org.apache.sis.referencing.crs.DefaultProjectedCRSTest.class,
     org.apache.sis.referencing.crs.DefaultVerticalCRSTest.class,
     org.apache.sis.referencing.crs.DefaultTemporalCRSTest.class,
+    org.apache.sis.referencing.crs.DefaultProjectedCRSTest.class,
+    org.apache.sis.referencing.crs.DefaultDerivedCRSTest.class,
     org.apache.sis.referencing.crs.SubTypesTest.class,
     org.apache.sis.referencing.crs.DefaultCompoundCRSTest.class,
     org.apache.sis.referencing.crs.HardCodedCRSTest.class,

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/system/DefaultFactories.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/system/DefaultFactories.java?rev=1678265&r1=1678264&r2=1678265&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/system/DefaultFactories.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/system/DefaultFactories.java [UTF-8] Thu May  7 21:46:06 2015
@@ -25,11 +25,14 @@ import java.util.ServiceConfigurationErr
 /**
  * Default factories defined in the {@code sis-utility} module.
  * This is a temporary placeholder until we leverage the "dependency injection" pattern.
+ * A candidate replacement is JSR-330.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
  * @version 0.6
  * @module
+ *
+ * @see <a href="https://jcp.org/en/jsr/detail?id=330">JSR-330</a>
  */
 public final class DefaultFactories extends SystemListener {
     /**

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/Classes.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/Classes.java?rev=1678265&r1=1678264&r2=1678265&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/Classes.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/Classes.java [UTF-8] Thu May  7 21:46:06 2015
@@ -522,15 +522,17 @@ next:       for (final Class<?> candidat
      * of interfaces. Only interfaces assignable to {@code baseInterface} are compared.
      * Declaration order doesn't matter.
      *
-     * For example in ISO 19111, different interfaces exist for different coordinate system (CS)
-     * geometries ({@code CartesianCS}, {@code PolarCS}, etc.). One can check if two implementations
-     * have the same geometry with the following code:
+     * <div class="note"><b>Example:</b>
+     * in ISO 19111, different interfaces exist for different coordinate system (CS) geometries
+     * ({@code CartesianCS}, {@code PolarCS}, etc.). One can check if two implementations have
+     * the same geometry with the following code:
      *
      * {@preformat java
      *     if (implementSameInterfaces(cs1, cs2, CoordinateSystem.class)) {
      *         // The two Coordinate System are of the same kind.
      *     }
      * }
+     * </div>
      *
      * @param object1 The first object to check for interfaces.
      * @param object2 The second object to check for interfaces.



Mime
View raw message