sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1570735 - in /sis/trunk: ./ core/sis-build-helper/ core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ core/sis-metadata/src/main/java/org/apache/sis/io/wkt/ core/sis-referencing/src/main/java/org/apache/sis/internal/referenc...
Date Fri, 21 Feb 2014 22:47:00 GMT
Author: desruisseaux
Date: Fri Feb 21 22:47:00 2014
New Revision: 1570735

URL: http://svn.apache.org/r1570735
Log:
Merge from the JDK6 branch.

Modified:
    sis/trunk/   (props changed)
    sis/trunk/core/sis-build-helper/pom.xml
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ReferencingServices.java
    sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/WKTUtilities.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultCompoundCRS.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeocentricCRS.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeodeticCRS.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeographicCRS.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
    sis/trunk/ide-project/NetBeans/nbproject/project.properties
    sis/trunk/pom.xml
    sis/trunk/storage/sis-netcdf/pom.xml

Propchange: sis/trunk/
------------------------------------------------------------------------------
  Merged /sis/branches/JDK7:r1569944-1570732
  Merged /sis/branches/JDK6:r1569945-1570733

Modified: sis/trunk/core/sis-build-helper/pom.xml
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-build-helper/pom.xml?rev=1570735&r1=1570734&r2=1570735&view=diff
==============================================================================
--- sis/trunk/core/sis-build-helper/pom.xml (original)
+++ sis/trunk/core/sis-build-helper/pom.xml Fri Feb 21 22:47:00 2014
@@ -86,12 +86,12 @@ Define Maven Mojos and Javadoc taglets f
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-core</artifactId>
-      <version>3.0.5</version>
+      <version>3.1.1</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
-      <version>3.0.5</version>
+      <version>3.1.1</version>
     </dependency>
      <dependency>
       <groupId>org.sonatype.plexus</groupId>

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ReferencingServices.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ReferencingServices.java?rev=1570735&r1=1570734&r2=1570735&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ReferencingServices.java
[UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ReferencingServices.java
[UTF-8] Fri Feb 21 22:47:00 2014
@@ -28,6 +28,7 @@ import org.apache.sis.metadata.iso.exten
 import org.apache.sis.metadata.iso.extent.DefaultSpatialTemporalExtent;
 import org.apache.sis.internal.system.SystemListener;
 import org.apache.sis.internal.system.Modules;
+import org.apache.sis.io.wkt.FormattableObject;
 import org.apache.sis.util.resources.Errors;
 
 
@@ -126,7 +127,7 @@ public abstract class ReferencingService
      *
      * @since 0.4
      */
-    public abstract IdentifiedObject toFormattableObject(IdentifiedObject object);
+    public abstract FormattableObject toFormattableObject(IdentifiedObject object);
 
     /**
      * Sets a geographic bounding box from the specified envelope. If the envelope contains

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java?rev=1570735&r1=1570734&r2=1570735&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java [UTF-8]
(original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java [UTF-8]
Fri Feb 21 22:47:00 2014
@@ -751,23 +751,6 @@ public class Formatter implements Locali
     }
 
     /**
-     * Appends the given {@code IdentifiedObject}.
-     *
-     * <p>The default implementation delegates to {@link #append(FormattableObject)},
-     * after wrapping the given object in an adapter if necessary.</p>
-     *
-     * @param object The identified object to append to the WKT, or {@code null} if none.
-     */
-    public void append(IdentifiedObject object) {
-        if (object != null) {
-            if (!(object instanceof FormattableObject)) {
-                object = ReferencingServices.getInstance().toFormattableObject(object);
-            }
-            append((FormattableObject) object);
-        }
-    }
-
-    /**
      * Appends the given geographic bounding box in a {@code BBOX[…]} element.
      * Longitude and latitude values will be formatted in decimal degrees.
      * Longitudes are relative to the Greenwich meridian, with values increasing toward East.
@@ -1174,8 +1157,11 @@ public class Formatter implements Locali
      * @return {@code true} on success, or {@code false} if the given type is not recognized.
      */
     final boolean appendElement(final Object value) {
-             if (value instanceof FormattableObject)     append((FormattableObject)     value);
-        else if (value instanceof IdentifiedObject)      append((IdentifiedObject)      value);
+        if (value instanceof FormattableObject) {
+            append((FormattableObject) value);
+        } else if (value instanceof IdentifiedObject) {
+            append(ReferencingServices.getInstance().toFormattableObject((IdentifiedObject)
value));
+        }
         else if (value instanceof GeographicBoundingBox) append((GeographicBoundingBox) value,
BBOX_ACCURACY);
         else if (value instanceof MathTransform)         append((MathTransform)         value);
         else if (value instanceof Matrix)                append((Matrix)                value);

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/WKTUtilities.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/WKTUtilities.java?rev=1570735&r1=1570734&r2=1570735&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/WKTUtilities.java
[UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/WKTUtilities.java
[UTF-8] Fri Feb 21 22:47:00 2014
@@ -20,7 +20,21 @@ import org.opengis.parameter.ParameterVa
 import org.opengis.parameter.ParameterValueGroup;
 import org.opengis.parameter.GeneralParameterValue;
 import org.opengis.referencing.IdentifiedObject;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+import org.opengis.referencing.cs.CoordinateSystem;
+import org.opengis.referencing.cs.CoordinateSystemAxis;
+import org.opengis.referencing.datum.Datum;
+import org.opengis.referencing.datum.GeodeticDatum;
+import org.opengis.referencing.datum.PrimeMeridian;
+import org.opengis.referencing.datum.Ellipsoid;
 import org.apache.sis.referencing.IdentifiedObjects;
+import org.apache.sis.referencing.crs.AbstractCRS;
+import org.apache.sis.referencing.cs.AbstractCS;
+import org.apache.sis.referencing.cs.DefaultCoordinateSystemAxis;
+import org.apache.sis.referencing.datum.AbstractDatum;
+import org.apache.sis.referencing.datum.DefaultGeodeticDatum;
+import org.apache.sis.referencing.datum.DefaultPrimeMeridian;
+import org.apache.sis.referencing.datum.DefaultEllipsoid;
 import org.apache.sis.parameter.DefaultParameterValue;
 import org.apache.sis.io.wkt.ElementKind;
 import org.apache.sis.io.wkt.FormattableObject;
@@ -32,6 +46,11 @@ import org.apache.sis.util.resources.Voc
 /**
  * Utility methods for referencing WKT formatting.
  *
+ * This class provides a set of {@code toFormattable(…)} for various {@link IdentifiedObject}
subtypes.
+ * It is important to <strong>not</strong> provide a generic {@code toFormattable(IdentifiedObject)}
+ * method, because the user may choose to implement more than one GeoAPI interface for the
same object.
+ * We need to be specific in order to select the right "aspect" of the given object.
+ *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.4
  * @version 0.4
@@ -45,6 +64,104 @@ public final class WKTUtilities extends 
     }
 
     /**
+     * Returns the given coordinate reference system as a formattable object.
+     *
+     * @param  object The coordinate reference system, or {@code null}.
+     * @return The given coordinate reference system as a formattable object, or {@code null}.
+     */
+    public static FormattableObject toFormattable(final CoordinateReferenceSystem object)
{
+        if (object instanceof FormattableObject) {
+            return (FormattableObject) object;
+        } else {
+            return AbstractCRS.castOrCopy(object);
+        }
+    }
+
+    /**
+     * Returns the given coordinate system as a formattable object.
+     *
+     * @param  object The coordinate system, or {@code null}.
+     * @return The given coordinate system as a formattable object, or {@code null}.
+     */
+    public static FormattableObject toFormattable(final CoordinateSystem object) {
+        if (object instanceof FormattableObject) {
+            return (FormattableObject) object;
+        } else {
+            return AbstractCS.castOrCopy(object);
+        }
+    }
+
+    /**
+     * Returns the given coordinate system axis as a formattable object.
+     *
+     * @param  object The coordinate system axis, or {@code null}.
+     * @return The given coordinate system axis as a formattable object, or {@code null}.
+     */
+    public static FormattableObject toFormattable(final CoordinateSystemAxis object) {
+        if (object instanceof FormattableObject) {
+            return (FormattableObject) object;
+        } else {
+            return DefaultCoordinateSystemAxis.castOrCopy(object);
+        }
+    }
+
+    /**
+     * Returns the given datum as a formattable object.
+     *
+     * @param  object The datum, or {@code null}.
+     * @return The given datum as a formattable object, or {@code null}.
+     */
+    public static FormattableObject toFormattable(final Datum object) {
+        if (object instanceof FormattableObject) {
+            return (FormattableObject) object;
+        } else {
+            return AbstractDatum.castOrCopy(object);
+        }
+    }
+
+    /**
+     * Returns the given geodetic datum as a formattable object.
+     *
+     * @param  object The datum, or {@code null}.
+     * @return The given datum as a formattable object, or {@code null}.
+     */
+    public static FormattableObject toFormattable(final GeodeticDatum object) {
+        if (object instanceof FormattableObject) {
+            return (FormattableObject) object;
+        } else {
+            return DefaultGeodeticDatum.castOrCopy(object);
+        }
+    }
+
+    /**
+     * Returns the ellipsoid as a formattable object.
+     *
+     * @param  object The ellipsoid, or {@code null}.
+     * @return The given ellipsoid as a formattable object, or {@code null}.
+     */
+    public static FormattableObject toFormattable(final Ellipsoid object) {
+        if (object instanceof FormattableObject) {
+            return (FormattableObject) object;
+        } else {
+            return DefaultEllipsoid.castOrCopy(object);
+        }
+    }
+
+    /**
+     * Returns the given prime meridian as a formattable object.
+     *
+     * @param  object The prime meridian, or {@code null}.
+     * @return The given prime meridian as a formattable object, or {@code null}.
+     */
+    public static FormattableObject toFormattable(final PrimeMeridian object) {
+        if (object instanceof FormattableObject) {
+            return (FormattableObject) object;
+        } else {
+            return DefaultPrimeMeridian.castOrCopy(object);
+        }
+    }
+
+    /**
      * Appends the name of the given object to the formatter.
      *
      * @param object    The object from which to get the name.

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java?rev=1570735&r1=1570734&r2=1570735&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java
[UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java
[UTF-8] Fri Feb 21 22:47:00 2014
@@ -38,6 +38,7 @@ import org.apache.sis.io.wkt.Formatter;
 
 import static org.apache.sis.util.Utilities.deepEquals;
 import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
+import static org.apache.sis.internal.referencing.WKTUtilities.toFormattable;
 import static org.apache.sis.internal.metadata.MetadataUtilities.canSetProperty;
 
 // Related to JDK7
@@ -424,7 +425,7 @@ public class AbstractCRS extends Abstrac
         final Unit<?> unit    = ReferencingUtilities.getUnit(cs);
         final Unit<?> oldUnit = formatter.addContextualUnit(unit);
         formatter.newLine();
-        formatter.append(getDatum());
+        formatter.append(toFormattable(getDatum()));
         formatter.newLine();
         if (isWKT1) { // WKT 1 writes unit before axes, while WKT 2 writes them after axes.
             formatter.append(unit);
@@ -432,13 +433,13 @@ public class AbstractCRS extends Abstrac
                 formatter.setInvalidWKT(this, null);
             }
         } else {
-            formatter.append(cs); // The concept of CoordinateSystem was not explicit in
WKT 1.
+            formatter.append(toFormattable(cs)); // The concept of CoordinateSystem was not
explicit in WKT 1.
             formatter.indent(+1);
         }
         final int dimension = cs.getDimension();
         for (int i=0; i<dimension; i++) {
             formatter.newLine();
-            formatter.append(cs.getAxis(i));
+            formatter.append(toFormattable(cs.getAxis(i)));
         }
         if (!isWKT1) { // WKT 2 writes unit after axes, while WKT 1 wrote them before axes.
             formatter.newLine();

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultCompoundCRS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultCompoundCRS.java?rev=1570735&r1=1570734&r2=1570735&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultCompoundCRS.java
[UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultCompoundCRS.java
[UTF-8] Fri Feb 21 22:47:00 2014
@@ -44,6 +44,7 @@ import org.apache.sis.io.wkt.Convention;
 
 import static org.apache.sis.util.ArgumentChecks.*;
 import static org.apache.sis.util.Utilities.deepEquals;
+import static org.apache.sis.internal.referencing.WKTUtilities.toFormattable;
 
 
 /**
@@ -408,7 +409,7 @@ public class DefaultCompoundCRS extends 
                 (isWKT1 || convention == Convention.INTERNAL) ? components : singles)
         {
             formatter.newLine();
-            formatter.append(element);
+            formatter.append(toFormattable(element));
         }
         formatter.newLine(); // For writing the ID[…] element on its own line.
         return isWKT1 ? "Compd_CS" : "CompoundCRS";

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeocentricCRS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeocentricCRS.java?rev=1570735&r1=1570734&r2=1570735&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeocentricCRS.java
[UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeocentricCRS.java
[UTF-8] Fri Feb 21 22:47:00 2014
@@ -191,6 +191,17 @@ public class DefaultGeocentricCRS extend
     }
 
     /**
+     * Returns the geodetic datum associated to this geocentric CRS.
+     * This is the datum given at construction time.
+     *
+     * @return The geodetic datum associated to this geocentric CRS.
+     */
+    @Override
+    public final GeodeticDatum getDatum() {
+        return super.getDatum();
+    }
+
+    /**
      * {@inheritDoc}
      *
      * @return {@inheritDoc}
@@ -244,10 +255,6 @@ public class DefaultGeocentricCRS extend
      */
     @Override
     protected String formatTo(final Formatter formatter) {
-        String keyword = super.formatTo(formatter);
-        if (keyword == null) {
-            keyword = "GeocCS"; // WKT 1
-        }
-        return keyword;
+        return super.formatTo(formatter);
     }
 }

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeodeticCRS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeodeticCRS.java?rev=1570735&r1=1570734&r2=1570735&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeodeticCRS.java
[UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeodeticCRS.java
[UTF-8] Fri Feb 21 22:47:00 2014
@@ -33,6 +33,7 @@ import org.apache.sis.referencing.Abstra
 import org.apache.sis.io.wkt.Formatter;
 
 import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
+import static org.apache.sis.internal.referencing.WKTUtilities.toFormattable;
 
 
 /**
@@ -58,7 +59,7 @@ import static org.apache.sis.util.Argume
     "datum"
 })
 @XmlRootElement(name = "GeodeticCRS")
-class DefaultGeodeticCRS extends AbstractCRS implements GeodeticCRS {
+class DefaultGeodeticCRS extends AbstractCRS implements GeodeticCRS { // If made public,
see comment in getDatum().
     /**
      * Serial number for inter-operability with different versions.
      */
@@ -128,10 +129,14 @@ class DefaultGeodeticCRS extends Abstrac
     /**
      * Returns the datum.
      *
+     * This method is overridden is subclasses for documentation purpose only, mostly for
showing this method in
+     * the appropriate position in javadoc (instead than at the bottom of the page). If {@code
DefaultGeodeticCRS}
+     * is made public in a future SIS version, then we should make this method final and
remove the overridden methods.
+     *
      * @return The datum.
      */
     @Override
-    public final GeodeticDatum getDatum() {
+    public GeodeticDatum getDatum() {
         return datum;
     }
 
@@ -160,9 +165,8 @@ class DefaultGeodeticCRS extends Abstrac
 
     /**
      * Formats this CRS as a <cite>Well Known Text</cite> {@code GeodeticCRS[…]}
element.
-     * It is subclasses responsibility to overwrite this method for returning the proper
keyword in WKT 1 case.
      *
-     * @return {@code "GeodeticCRS"} (WKT 2) or {@code null} (WKT 1).
+     * @return {@code "GeodeticCRS"} (WKT 2) or {@code "GeogCS"}/{@code "GeocCS"} (WKT 1).
      */
     @Override
     protected String formatTo(final Formatter formatter) {
@@ -171,10 +175,10 @@ class DefaultGeodeticCRS extends Abstrac
         final Unit<?> unit    = getUnit();
         final Unit<?> oldUnit = formatter.addContextualUnit(unit);
         formatter.newLine();
-        formatter.append(datum);
+        formatter.append(toFormattable(datum));
         formatter.newLine();
         formatter.indent(isWKT1 ? 0 : +1);
-        formatter.append(datum.getPrimeMeridian());
+        formatter.append(toFormattable(datum.getPrimeMeridian()));
         formatter.indent(isWKT1 ? 0 : -1);
         formatter.newLine();
         CoordinateSystem cs = super.getCoordinateSystem();
@@ -197,13 +201,13 @@ class DefaultGeodeticCRS extends Abstrac
                 }
             }
         } else {
-            formatter.append(cs); // The concept of CoordinateSystem was not explicit in
WKT 1.
+            formatter.append(toFormattable(cs)); // The concept of CoordinateSystem was not
explicit in WKT 1.
             formatter.indent(+1);
         }
         final int dimension = cs.getDimension();
         for (int i=0; i<dimension; i++) {
             formatter.newLine();
-            formatter.append(cs.getAxis(i));
+            formatter.append(toFormattable(cs.getAxis(i)));
         }
         if (!isWKT1) { // WKT 2 writes unit after axes, while WKT 1 wrote them before axes.
             formatter.newLine();
@@ -213,6 +217,16 @@ class DefaultGeodeticCRS extends Abstrac
         formatter.removeContextualUnit(unit);
         formatter.addContextualUnit(oldUnit);
         formatter.newLine(); // For writing the ID[…] element on its own line.
-        return isWKT1 ? null : "GeodeticCRS";
+        if (!isWKT1) {
+            return "GeodeticCRS";
+        }
+        /*
+         * For WKT1, the keyword depends on the subclass: "GeogCS" for GeographicCRS,
+         * or 'GeocCS" for GeocentricCRS. However we can not rely on the subclass for
+         * choosing the keyword, because in some situations (after XML unmarhaling)
+         * we only have a GeodeticCRS. We need to make the choice here. The CS type
+         * is a sufficient criterion.
+         */
+        return (cs instanceof EllipsoidalCS) ? "GeogCS" : "GeocCS";
     }
 }

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeographicCRS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeographicCRS.java?rev=1570735&r1=1570734&r2=1570735&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeographicCRS.java
[UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeographicCRS.java
[UTF-8] Fri Feb 21 22:47:00 2014
@@ -162,6 +162,17 @@ public class DefaultGeographicCRS extend
     }
 
     /**
+     * Returns the geodetic datum associated to this geographic CRS.
+     * This is the datum given at construction time.
+     *
+     * @return The geodetic datum associated to this geographic CRS.
+     */
+    @Override
+    public final GeodeticDatum getDatum() {
+        return super.getDatum();
+    }
+
+    /**
      * Returns the coordinate system.
      *
      * @return The coordinate system.
@@ -228,10 +239,6 @@ public class DefaultGeographicCRS extend
      */
     @Override
     protected String formatTo(final Formatter formatter) {
-        String keyword = super.formatTo(formatter);
-        if (keyword == null) {
-            keyword = "GeogCS"; // WKT 1
-        }
-        return keyword;
+        return super.formatTo(formatter);
     }
 }

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java?rev=1570735&r1=1570734&r2=1570735&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
[UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
[UTF-8] Fri Feb 21 22:47:00 2014
@@ -38,11 +38,11 @@ import org.apache.sis.internal.util.Coll
 import org.apache.sis.util.logging.Logging;
 import org.apache.sis.util.ComparisonMode;
 import org.apache.sis.io.wkt.Formatter;
-import org.apache.sis.io.wkt.FormattableObject;
 
 import static org.apache.sis.util.Utilities.deepEquals;
 import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
 import static org.apache.sis.util.ArgumentChecks.ensureNonNullElement;
+import static org.apache.sis.internal.referencing.WKTUtilities.toFormattable;
 
 // Related to JDK7
 import org.apache.sis.internal.jdk7.Objects;
@@ -522,8 +522,7 @@ public class DefaultGeodeticDatum extend
     protected String formatTo(final Formatter formatter) {
         super.formatTo(formatter);
         formatter.newLine();
-        formatter.append(ellipsoid instanceof FormattableObject ? (FormattableObject) ellipsoid
:
-                         DefaultEllipsoid.castOrCopy(ellipsoid));
+        formatter.append(toFormattable(ellipsoid));
         if (formatter.getConvention().majorVersion() == 1) {
             /*
              * Note that at the different of other datum (in particular vertical datum),

Modified: sis/trunk/ide-project/NetBeans/nbproject/project.properties
URL: http://svn.apache.org/viewvc/sis/trunk/ide-project/NetBeans/nbproject/project.properties?rev=1570735&r1=1570734&r2=1570735&view=diff
==============================================================================
--- sis/trunk/ide-project/NetBeans/nbproject/project.properties [ISO-8859-1] (original)
+++ sis/trunk/ide-project/NetBeans/nbproject/project.properties [ISO-8859-1] Fri Feb 21 22:47:00
2014
@@ -74,7 +74,7 @@ geoapi.version       = 3.0.0
 unit-api.version     = 0.6.1
 jsr275.version       = 0.9.3
 jama.version         = 1.0.3
-geometry.version     = 1.0
+geometry.version     = 1.1
 georss.version       = 0.9.8
 rome.version         = 0.9
 jdom1.version        = 1.0
@@ -85,7 +85,7 @@ netcdf.version       = 4.3.20
 joda-time.version    = 2.0
 httpclient.version   = 3.1
 slf4j.version        = 1.6.4
-junit.version        = 4.10
+junit.version        = 4.11
 
 #
 # Classpaths for compilation, execution and tests.

Modified: sis/trunk/pom.xml
URL: http://svn.apache.org/viewvc/sis/trunk/pom.xml?rev=1570735&r1=1570734&r2=1570735&view=diff
==============================================================================
--- sis/trunk/pom.xml (original)
+++ sis/trunk/pom.xml Fri Feb 21 22:47:00 2014
@@ -28,7 +28,7 @@
   <parent>
     <groupId>org.apache</groupId>
     <artifactId>apache</artifactId>
-    <version>13</version>
+    <version>13</version> <!-- See the "TODO" in this file. -->
   </parent>
 
 
@@ -431,6 +431,7 @@ Apache SIS is a free software, Java lang
       <!-- Compile -->
       <plugin>
         <artifactId>maven-compiler-plugin</artifactId>
+        <version>3.1</version> <!-- TODO: Remove after parent pom.xml has
upgraded. -->
         <configuration>
           <source>${maven.compile.source}</source>
           <target>${maven.compile.target}</target>
@@ -442,6 +443,7 @@ Apache SIS is a free software, Java lang
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
+        <version>2.16</version> <!-- TODO: Remove after parent pom.xml has
upgraded. -->
         <configuration>
           <includes>
             <include>**/*TestSuite.java</include>
@@ -486,6 +488,7 @@ Apache SIS is a free software, Java lang
       <!-- Set "*-source-release.zip" filename prefix to "sis-*" instead of "parent-*"
-->
       <plugin>
         <artifactId>maven-assembly-plugin</artifactId>
+        <version>2.4</version> <!-- TODO: Remove after parent pom.xml has
upgraded. -->
         <executions>
           <execution>
             <id>source-release-assembly</id>
@@ -555,6 +558,7 @@ Apache SIS is a free software, Java lang
            we disable links relativization for avoiding confusing behavior. -->
       <plugin>
         <artifactId>maven-site-plugin</artifactId>
+        <version>3.3</version> <!-- TODO: Remove after parent pom.xml has
upgraded. -->
         <configuration>
           <locales>${website.locale}</locales>
           <inputEncoding>${project.build.sourceEncoding}</inputEncoding>
@@ -742,6 +746,13 @@ Apache SIS is a free software, Java lang
       <plugin>
         <artifactId>maven-surefire-report-plugin</artifactId>
         <version>2.16</version>
+        <reportSets> <!-- Workaround for http://jira.codehaus.org/browse/SUREFIRE-257
-->
+          <reportSet>
+            <reports>
+              <report>report-only</report>
+            </reports>
+          </reportSet>
+        </reportSets>
       </plugin>
 
       <!-- "Release Audit" report (checks license headers etc.) -->
@@ -792,15 +803,6 @@ Apache SIS is a free software, Java lang
     </pluginRepository>
   </pluginRepositories>
 
-  <repositories>
-    <!--  UCAR repository from which to download the NetCDF library. -->
-    <repository>
-      <id>UCAR</id>
-      <name>UCAR repository</name>
-      <url>https://artifacts.unidata.ucar.edu/content/repositories/unidata-releases</url>
-    </repository>
-  </repositories>
-
 
   <!-- ==============================================================
          Group of modules to build in approximate dependency order.

Modified: sis/trunk/storage/sis-netcdf/pom.xml
URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-netcdf/pom.xml?rev=1570735&r1=1570734&r2=1570735&view=diff
==============================================================================
--- sis/trunk/storage/sis-netcdf/pom.xml (original)
+++ sis/trunk/storage/sis-netcdf/pom.xml Fri Feb 21 22:47:00 2014
@@ -125,4 +125,16 @@ Bridge between NetCDF Climate and Foreca
     </dependency>
   </dependencies>
 
+  <!--  UCAR repository from which to download the NetCDF library. -->
+  <repositories>
+    <repository>
+      <id>UCAR</id>
+      <name>UCAR repository</name>
+      <url>https://artifacts.unidata.ucar.edu/content/repositories/unidata-releases</url>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
+    </repository>
+  </repositories>
+
 </project>



Mime
View raw message