sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1531919 - /sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/
Date Mon, 14 Oct 2013 14:42:56 GMT
Author: desruisseaux
Date: Mon Oct 14 14:42:55 2013
New Revision: 1531919

URL: http://svn.apache.org/r1531919
Log:
Javadoc uniformisation, and minor API simplification in constructors.

Modified:
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/AbstractDatum.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEngineeringDatum.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultImageDatum.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultVerticalDatum.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/Sphere.java

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/AbstractDatum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/AbstractDatum.java?rev=1531919&r1=1531918&r2=1531919&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/AbstractDatum.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/AbstractDatum.java
[UTF-8] Mon Oct 14 14:42:55 2013
@@ -100,7 +100,7 @@ public class AbstractDatum extends Abstr
     private final InternationalString scope;
 
     /**
-     * Constructs a new datum with the same values than the specified one.
+     * Creates a new datum with the same values than the specified one.
      * This copy constructor provides a way to convert an arbitrary implementation into a
SIS one
      * or a user-defined one (as a subclass), usually in order to leverage some implementation-specific
API.
      *
@@ -117,7 +117,7 @@ public class AbstractDatum extends Abstr
     }
 
     /**
-     * Constructs a datum from a set of properties.
+     * Creates a datum from a set of properties.
      * The properties given in argument follow the same rules than for the
      * {@linkplain AbstractIdentifiedObject#AbstractIdentifiedObject(Map) super-class constructor}.
      * Additionally, the following properties are understood by this constructor:

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java?rev=1531919&r1=1531918&r2=1531919&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java
[UTF-8] Mon Oct 14 14:42:55 2013
@@ -208,7 +208,7 @@ public class BursaWolfParameters extends
     public final GeodeticDatum targetDatum;
 
     /**
-     * Constructs a new instance with all parameters set to 0.
+     * Creates a new instance with all parameters set to 0.
      *
      * @param target The target datum for this set of parameters, or {@code null} if unspecified.
      */

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java?rev=1531919&r1=1531918&r2=1531919&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java
[UTF-8] Mon Oct 14 14:42:55 2013
@@ -178,27 +178,7 @@ public class DefaultEllipsoid extends Ab
     private Unit<Length> unit;
 
     /**
-     * Constructs a new ellipsoid with the same values than the specified one.
-     * This copy constructor provides a way to convert an arbitrary implementation into a
SIS one
-     * or a user-defined one (as a subclass), usually in order to leverage some implementation-specific
API.
-     *
-     * <p>This constructor performs a shallow copy, i.e. the properties are not cloned.</p>
-     *
-     * @param ellipsoid The ellipsoid to copy.
-     *
-     * @see #castOrCopy(Ellipsoid)
-     */
-    protected DefaultEllipsoid(final Ellipsoid ellipsoid) {
-        super(ellipsoid);
-        semiMajorAxis     = ellipsoid.getSemiMajorAxis();
-        semiMinorAxis     = ellipsoid.getSemiMinorAxis();
-        inverseFlattening = ellipsoid.getInverseFlattening();
-        ivfDefinitive     = ellipsoid.isIvfDefinitive();
-        unit              = ellipsoid.getAxisUnit();
-    }
-
-    /**
-     * Constructs a new ellipsoid using the specified axis length.
+     * Creates a new ellipsoid using the specified axis length.
      * The properties map is given unchanged to the
      * {@linkplain AbstractIdentifiedObject#AbstractIdentifiedObject(Map) super-class constructor}.
      *
@@ -232,30 +212,51 @@ public class DefaultEllipsoid extends Ab
     }
 
     /**
-     * Constructs a new ellipsoid using the specified name (without authority) and axis length.
+     * Creates a new ellipsoid with the same values than the specified one.
+     * This copy constructor provides a way to convert an arbitrary implementation into a
SIS one
+     * or a user-defined one (as a subclass), usually in order to leverage some implementation-specific
API.
+     *
+     * <p>This constructor performs a shallow copy, i.e. the properties are not cloned.</p>
+     *
+     * @param ellipsoid The ellipsoid to copy.
+     *
+     * @see #castOrCopy(Ellipsoid)
+     */
+    protected DefaultEllipsoid(final Ellipsoid ellipsoid) {
+        super(ellipsoid);
+        semiMajorAxis     = ellipsoid.getSemiMajorAxis();
+        semiMinorAxis     = ellipsoid.getSemiMinorAxis();
+        inverseFlattening = ellipsoid.getInverseFlattening();
+        ivfDefinitive     = ellipsoid.isIvfDefinitive();
+        unit              = ellipsoid.getAxisUnit();
+    }
+
+    /**
+     * Creates a new ellipsoid using the specified name and axis length in metres.
+     * This is a convenience method for {@link #createEllipsoid(Map, double, double, Unit)
createEllipsoid(Map, …)}
+     * with a map containing only the {@value org.opengis.referencing.IdentifiedObject#NAME_KEY}
property
+     * and the unit of measurement fixed to {@link SI#METRE}.
      *
      * @param name          The ellipsoid name.
-     * @param semiMajorAxis The equatorial radius.
-     * @param semiMinorAxis The polar radius.
-     * @param unit          The units of the semi-major and semi-minor axis values.
+     * @param semiMajorAxis The equatorial radius in metres.
+     * @param semiMinorAxis The polar radius in metres.
      * @return An ellipsoid with the given axis length.
      */
     public static DefaultEllipsoid createEllipsoid(final String name,
                                                    final double semiMajorAxis,
-                                                   final double semiMinorAxis,
-                                                   final Unit<Length> unit)
+                                                   final double semiMinorAxis)
     {
-        return createEllipsoid(Collections.singletonMap(NAME_KEY, name), semiMajorAxis, semiMinorAxis,
unit);
+        return createEllipsoid(Collections.singletonMap(NAME_KEY, name), semiMajorAxis, semiMinorAxis,
SI.METRE);
     }
 
     /**
-     * Constructs a new ellipsoid using the specified properties and axis length.
+     * Creates a new ellipsoid using the specified properties and axis length.
      * The properties map is given unchanged to the
      * {@linkplain AbstractIdentifiedObject#AbstractIdentifiedObject(Map) super-class constructor}.
      *
      * @param properties    Set of properties. Should contains at least {@code "name"}.
-     * @param semiMajorAxis The equatorial radius.
-     * @param semiMinorAxis The polar radius.
+     * @param semiMajorAxis The equatorial radius in the given unit.
+     * @param semiMinorAxis The polar radius in the given unit.
      * @param unit          The units of the semi-major and semi-minor axis values.
      * @return An ellipsoid with the given axis length.
      */
@@ -273,29 +274,30 @@ public class DefaultEllipsoid extends Ab
     }
 
     /**
-     * Constructs a new ellipsoid using the specified name (without authority), axis length
and inverse flattening value.
+     * Creates a new ellipsoid using the specified name, axis length in metres and inverse
flattening value. This is
+     * a convenience method for {@link #createFlattenedSphere(Map, double, double, Unit)
createFlattenedSphere(Map, …)}
+     * with a map containing only the {@value org.opengis.referencing.IdentifiedObject#NAME_KEY}
property and the unit
+     * of measurement fixed to {@link SI#METRE}.
      *
      * @param name              The ellipsoid name.
-     * @param semiMajorAxis     The equatorial radius.
+     * @param semiMajorAxis     The equatorial radius in metres.
      * @param inverseFlattening The inverse flattening value.
-     * @param unit              The units of the semi-major and semi-minor axis values.
      * @return An ellipsoid with the given axis length.
      */
     public static DefaultEllipsoid createFlattenedSphere(final String name,
                                                          final double semiMajorAxis,
-                                                         final double inverseFlattening,
-                                                         final Unit<Length> unit)
+                                                         final double inverseFlattening)
     {
-        return createFlattenedSphere(Collections.singletonMap(NAME_KEY, name), semiMajorAxis,
inverseFlattening, unit);
+        return createFlattenedSphere(Collections.singletonMap(NAME_KEY, name), semiMajorAxis,
inverseFlattening, SI.METRE);
     }
 
     /**
-     * Constructs a new ellipsoid using the specified properties, axis length and inverse
flattening value.
+     * Creates a new ellipsoid using the specified properties, axis length and inverse flattening
value.
      * The properties map is given unchanged to the
      * {@linkplain AbstractIdentifiedObject#AbstractIdentifiedObject(Map) super-class constructor}.
      *
      * @param properties        Set of properties. Should contains at least {@code "name"}.
-     * @param semiMajorAxis     The equatorial radius.
+     * @param semiMajorAxis     The equatorial radius in the given unit.
      * @param inverseFlattening The inverse flattening value.
      * @param unit              The units of the semi-major and semi-minor axis values.
      * @return An ellipsoid with the given axis length.

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=1531919&r1=1531918&r2=1531919&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] Mon Oct 14 14:42:55 2013
@@ -47,20 +47,9 @@ public class DefaultEngineeringDatum ext
     private static final long serialVersionUID = 1498304918725248637L;
 
     /**
-     * Constructs a new datum with the same values than the specified one.
-     * This copy constructor provides a way to convert an arbitrary implementation into a
SIS one
-     * or a user-defined one (as a subclass), usually in order to leverage some implementation-specific
API.
-     *
-     * <p>This constructor performs a shallow copy, i.e. the properties are not cloned.</p>
-     *
-     * @param datum The datum to copy.
-     */
-    public DefaultEngineeringDatum(final EngineeringDatum datum) {
-        super(datum);
-    }
-
-    /**
-     * Constructs an engineering datum from a name.
+     * Creates an engineering datum from a name. This is a convenience constructor for
+     * {@link #DefaultEngineeringDatum(Map)}
+     * with a map containing only the {@value org.opengis.referencing.IdentifiedObject#NAME_KEY}
property.
      *
      * @param name The datum name.
      */
@@ -69,7 +58,7 @@ public class DefaultEngineeringDatum ext
     }
 
     /**
-     * Constructs an engineering datum from a set of properties. The properties map is given
+     * Creates an engineering datum from a set of properties. The properties map is given
      * unchanged to the {@linkplain AbstractDatum#AbstractDatum(Map) super-class constructor}.
      *
      * @param properties Set of properties. Shall contains at least {@code "name"}.
@@ -79,6 +68,21 @@ public class DefaultEngineeringDatum ext
     }
 
     /**
+     * Creates a new datum with the same values than the specified one.
+     * This copy constructor provides a way to convert an arbitrary implementation into a
SIS one
+     * or a user-defined one (as a subclass), usually in order to leverage some implementation-specific
API.
+     *
+     * <p>This constructor performs a shallow copy, i.e. the properties are not cloned.</p>
+     *
+     * @param datum The datum to copy.
+     *
+     * @see #castOrCopy(EngineeringDatum)
+     */
+    protected DefaultEngineeringDatum(final EngineeringDatum datum) {
+        super(datum);
+    }
+
+    /**
      * Returns a SIS datum implementation with the same values than the given arbitrary implementation.
      * If the given object is {@code null}, then this method returns {@code null}.
      * Otherwise if the given object is already a SIS implementation, then the given object
is returned unchanged.

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=1531919&r1=1531918&r2=1531919&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] Mon Oct 14 14:42:55 2013
@@ -57,21 +57,9 @@ public class DefaultImageDatum extends A
     private final PixelInCell pixelInCell;
 
     /**
-     * Constructs a new datum with the same values than the specified one.
-     * This copy constructor provides a way to convert an arbitrary implementation into a
SIS one
-     * or a user-defined one (as a subclass), usually in order to leverage some implementation-specific
API.
-     *
-     * <p>This constructor performs a shallow copy, i.e. the properties are not cloned.</p>
-     *
-     * @param datum The datum to copy.
-     */
-    public DefaultImageDatum(final ImageDatum datum) {
-        super(datum);
-        pixelInCell = datum.getPixelInCell();
-    }
-
-    /**
-     * Constructs an image datum from a name.
+     * Creates an image datum from a name. This is a convenience constructor for
+     * {@link #DefaultImageDatum(Map, PixelInCell) DefaultImageDatum(Map, …)}
+     * with a map containing only the {@value org.opengis.referencing.IdentifiedObject#NAME_KEY}
property.
      *
      * @param name The datum name.
      * @param pixelInCell the way the image grid is associated with the image data attributes.
@@ -81,7 +69,7 @@ public class DefaultImageDatum extends A
     }
 
     /**
-     * Constructs an image datum from a set of properties. The properties map is given
+     * Creates an image datum from a set of properties. The properties map is given
      * unchanged to the {@linkplain AbstractDatum#AbstractDatum(Map) super-class constructor}.
      *
      * @param properties  Set of properties. Should contains at least {@code "name"}.
@@ -94,6 +82,22 @@ public class DefaultImageDatum extends A
     }
 
     /**
+     * Creates a new datum with the same values than the specified one.
+     * This copy constructor provides a way to convert an arbitrary implementation into a
SIS one
+     * or a user-defined one (as a subclass), usually in order to leverage some implementation-specific
API.
+     *
+     * <p>This constructor performs a shallow copy, i.e. the properties are not cloned.</p>
+     *
+     * @param datum The datum to copy.
+     *
+     * @see #castOrCopy(ImageDatum)
+     */
+    protected DefaultImageDatum(final ImageDatum datum) {
+        super(datum);
+        pixelInCell = datum.getPixelInCell();
+    }
+
+    /**
      * Returns a SIS datum implementation with the same values than the given arbitrary implementation.
      * If the given object is {@code null}, then this method returns {@code null}.
      * Otherwise if the given object is already a SIS implementation, then the given object
is returned unchanged.

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=1531919&r1=1531918&r2=1531919&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] Mon Oct 14 14:42:55 2013
@@ -97,44 +97,21 @@ public class DefaultPrimeMeridian extend
     private final Unit<Angle> angularUnit;
 
     /**
-     * Constructs a new prime meridian with the same values than the specified one.
-     * This copy constructor provides a way to convert an arbitrary implementation into a
SIS one
-     * or a user-defined one (as a subclass), usually in order to leverage some implementation-specific
API.
-     *
-     * <p>This constructor performs a shallow copy, i.e. the properties are not cloned.</p>
-     *
-     * @param meridian The prime meridian to copy.
-     */
-    public DefaultPrimeMeridian(final PrimeMeridian meridian) {
-        super(meridian);
-        greenwichLongitude = meridian.getGreenwichLongitude();
-        angularUnit        = meridian.getAngularUnit();
-    }
-
-    /**
-     * Constructs a prime meridian from a name and Greenwich longitude.
-     * The {@code greenwichLongitude} value is assumed in {@linkplain NonSI#DEGREE_ANGLE
decimal degrees}.
-     *
-     * @param name The datum name.
-     * @param greenwichLongitude The longitude value relative to the Greenwich Meridian,
in degrees.
-     */
-    public DefaultPrimeMeridian(final String name, final double greenwichLongitude) {
-        this(name, greenwichLongitude, NonSI.DEGREE_ANGLE);
-    }
-
-    /**
-     * Constructs a prime meridian from a name, Greenwich longitude and angular unit.
+     * Creates a prime meridian from a name and Greenwich longitude in degrees. This is a
convenience
+     * constructor for {@link #DefaultPrimeMeridian(Map, double, Unit) DefaultPrimeMeridian(Map,
…)}
+     * with a map containing only the {@value org.opengis.referencing.IdentifiedObject#NAME_KEY}
property,
+     * and with the unit of measurement fixed to {@link NonSI#DEGREE_ANGLE}.
      *
      * @param name                The datum name.
-     * @param greenwichLongitude  The longitude value relative to the Greenwich Meridian.
-     * @param angularUnit         The angular unit of the longitude, in degrees.
+     * @param greenwichLongitude  The longitude value relative to the Greenwich Meridian,
in degrees.
+     *                            Positive values are east of Greenwich.
      */
-    public DefaultPrimeMeridian(final String name, final double greenwichLongitude, final
Unit<Angle> angularUnit) {
-        this(Collections.singletonMap(NAME_KEY, name), greenwichLongitude, angularUnit);
+    public DefaultPrimeMeridian(final String name, final double greenwichLongitude) {
+        this(Collections.singletonMap(NAME_KEY, name), greenwichLongitude, NonSI.DEGREE_ANGLE);
     }
 
     /**
-     * Constructs a prime meridian from a set of properties. The properties map is given
+     * Creates a prime meridian from a set of properties. The properties map is given
      * unchanged to the {@linkplain AbstractIdentifiedObject#AbstractIdentifiedObject(Map)
      * super-class constructor}.
      *
@@ -153,6 +130,23 @@ public class DefaultPrimeMeridian extend
     }
 
     /**
+     * Creates a new prime meridian with the same values than the specified one.
+     * This copy constructor provides a way to convert an arbitrary implementation into a
SIS one
+     * or a user-defined one (as a subclass), usually in order to leverage some implementation-specific
API.
+     *
+     * <p>This constructor performs a shallow copy, i.e. the properties are not cloned.</p>
+     *
+     * @param meridian The prime meridian to copy.
+     *
+     * @see #castOrCopy(PrimeMeridian)
+     */
+    protected DefaultPrimeMeridian(final PrimeMeridian meridian) {
+        super(meridian);
+        greenwichLongitude = meridian.getGreenwichLongitude();
+        angularUnit        = meridian.getAngularUnit();
+    }
+
+    /**
      * Returns a SIS prime meridian implementation with the same values than the given arbitrary
implementation.
      * If the given object is {@code null}, then this method returns {@code null}.
      * Otherwise if the given object is already a SIS implementation, then the given object
is returned unchanged.

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=1531919&r1=1531918&r2=1531919&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java
(original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java
Mon Oct 14 14:42:55 2013
@@ -80,21 +80,9 @@ public class DefaultTemporalDatum extend
     private final long origin;
 
     /**
-     * Constructs a new datum with the same values than the specified one.
-     * This copy constructor provides a way to convert an arbitrary implementation into a
SIS one
-     * or a user-defined one (as a subclass), usually in order to leverage some implementation-specific
API.
-     *
-     * <p>This constructor performs a shallow copy, i.e. the properties are not cloned.</p>
-     *
-     * @param datum The datum to copy.
-     */
-    public DefaultTemporalDatum(final TemporalDatum datum) {
-        super(datum);
-        origin = datum.getOrigin().getTime();
-    }
-
-    /**
-     * Constructs a temporal datum from a name.
+     * Creates a temporal datum from a name. This is a convenience constructor for
+     * {@link #DefaultTemporalDatum(Map, Date) DefaultTemporalDatum(Map, …)}
+     * with a map containing only the {@value org.opengis.referencing.IdentifiedObject#NAME_KEY}
property.
      *
      * @param name   The datum name.
      * @param origin The date and time origin of this temporal datum.
@@ -104,7 +92,7 @@ public class DefaultTemporalDatum extend
     }
 
     /**
-     * Constructs a temporal datum from a set of properties. The properties map is given
+     * Creates a temporal datum from a set of properties. The properties map is given
      * unchanged to the {@linkplain AbstractDatum#AbstractDatum(Map) super-class constructor}.
      *
      * @param properties Set of properties. Should contains at least {@code "name"}.
@@ -117,6 +105,22 @@ public class DefaultTemporalDatum extend
     }
 
     /**
+     * Creates a new datum with the same values than the specified one.
+     * This copy constructor provides a way to convert an arbitrary implementation into a
SIS one
+     * or a user-defined one (as a subclass), usually in order to leverage some implementation-specific
API.
+     *
+     * <p>This constructor performs a shallow copy, i.e. the properties are not cloned.</p>
+     *
+     * @param datum The datum to copy.
+     *
+     * @see #castOrCopy(TemporalDatum)
+     */
+    protected DefaultTemporalDatum(final TemporalDatum datum) {
+        super(datum);
+        origin = datum.getOrigin().getTime();
+    }
+
+    /**
      * Returns a SIS datum implementation with the same values than the given arbitrary implementation.
      * If the given object is {@code null}, then this method returns {@code null}.
      * Otherwise if the given object is already a SIS implementation, then the given object
is returned unchanged.

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=1531919&r1=1531918&r2=1531919&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] Mon Oct 14 14:42:55 2013
@@ -95,7 +95,9 @@ public class DefaultVerticalDatum extend
             new DefaultVerticalDatum(name(Vocabulary.Keys.OtherSurface), VerticalDatumType.OTHER_SURFACE);
 
     /**
-     * Constructs a vertical datum from a name.
+     * Creates a vertical datum from a name. This is a convenience constructor for
+     * {@link #DefaultVerticalDatum(Map, VerticalDatumType) DefaultTemporalDatum(Map, …)}
+     * with a map containing only the {@value org.opengis.referencing.IdentifiedObject#NAME_KEY}
property.
      *
      * @param name The datum name.
      * @param type The type of this vertical datum.
@@ -105,21 +107,7 @@ public class DefaultVerticalDatum extend
     }
 
     /**
-     * Constructs a new datum with the same values than the specified one.
-     * This copy constructor provides a way to convert an arbitrary implementation into a
SIS one
-     * or a user-defined one (as a subclass), usually in order to leverage some implementation-specific
API.
-     *
-     * <p>This constructor performs a shallow copy, i.e. the properties are not cloned.</p>
-     *
-     * @param datum The datum to copy.
-     */
-    public DefaultVerticalDatum(final VerticalDatum datum) {
-        super(datum);
-        type = datum.getVerticalDatumType();
-    }
-
-    /**
-     * Constructs a vertical datum from a set of properties. The properties map is given
+     * Creates a vertical datum from a set of properties. The properties map is given
      * unchanged to the {@linkplain AbstractDatum#AbstractDatum(Map) super-class constructor}.
      *
      * @param properties Set of properties. Should contains at least {@code "name"}.
@@ -132,6 +120,22 @@ public class DefaultVerticalDatum extend
     }
 
     /**
+     * Creates a new datum with the same values than the specified one.
+     * This copy constructor provides a way to convert an arbitrary implementation into a
SIS one
+     * or a user-defined one (as a subclass), usually in order to leverage some implementation-specific
API.
+     *
+     * <p>This constructor performs a shallow copy, i.e. the properties are not cloned.</p>
+     *
+     * @param datum The datum to copy.
+     *
+     * @see #castOrCopy(VerticalDatum)
+     */
+    protected DefaultVerticalDatum(final VerticalDatum datum) {
+        super(datum);
+        type = datum.getVerticalDatumType();
+    }
+
+    /**
      * Returns a SIS datum implementation with the same values than the given arbitrary implementation.
      * If the given object is {@code null}, then this method returns {@code null}.
      * Otherwise if the given object is already a SIS implementation, then the given object
is returned unchanged.

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/Sphere.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/Sphere.java?rev=1531919&r1=1531918&r2=1531919&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/Sphere.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/Sphere.java
[UTF-8] Mon Oct 14 14:42:55 2013
@@ -43,7 +43,7 @@ final class Sphere extends DefaultEllips
     private static final long serialVersionUID = 7867565381280669821L;
 
     /**
-     * Constructs a new sphere using the specified radius.
+     * Creates a new sphere using the specified radius.
      *
      * @param properties    Set of properties. Should contains at least {@code "name"}.
      * @param radius        The equatorial and polar radius.



Mime
View raw message