sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1709036 [1/2] - in /sis/branches/JDK8/core: sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/ sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ sis-referencing/src/main/java/org/apache/sis/pa...
Date Fri, 16 Oct 2015 15:16:24 GMT
Author: desruisseaux
Date: Fri Oct 16 15:16:23 2015
New Revision: 1709036

URL: http://svn.apache.org/viewvc?rev=1709036&view=rev
Log:
Allow user to override the properties to be marshalled, and do some verification on the integrity of unmarshalled CRS objects (SIS-295).

Modified:
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_Conversion.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_CoordinateOperation.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_Ellipsoid.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_GeodeticDatum.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_PrimeMeridian.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_TemporalDatum.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CS_CoordinateSystem.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CS_CoordinateSystemAxis.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/SC_CRS.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/SC_SingleCRS.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AbstractLambert.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AbstractMercator.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AbstractProvider.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AbstractStereographic.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Affine.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Equirectangular.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformal1SP.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformal2SP.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformalBelgium.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformalMichigan.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformalWest.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LongitudeRotation.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/MapProjection.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Mercator1SP.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Mercator2SP.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/MercatorSpherical.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/MillerCylindrical.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ObliqueStereographic.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicA.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicB.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicC.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicNorth.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicSouth.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PseudoMercator.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/RegionalMercator.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercator.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercatorSouth.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/package-info.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionDescriptor.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/TensorValues.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractReferenceSystem.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractDerivedCRS.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultCompoundCRS.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultDerivedCRS.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultEngineeringCRS.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeodeticCRS.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultImageCRS.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultProjectedCRS.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultTemporalCRS.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultVerticalCRS.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCompoundCS.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/package-info.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/AbstractDatum.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultImageDatum.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/package-info.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractSingleOperation.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConcatenatedOperation.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultOperationMethod.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultPassThroughOperation.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/package-info.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/package-info.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/PropertyType.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/SC_VerticalCRS.java

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_Conversion.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_Conversion.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_Conversion.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_Conversion.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -30,7 +30,7 @@ import org.apache.sis.referencing.operat
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.6
- * @version 0.6
+ * @version 0.7
  * @module
  */
 public final class CC_Conversion extends PropertyType<CC_Conversion, Conversion> {
@@ -100,6 +100,7 @@ public final class CC_Conversion extends
     public void setElement(final DefaultConversion conversion) {
         metadata = conversion;
         Context.setWrapper(Context.current(), this);
+        if (conversion.getMethod() == null) incomplete("method");
     }
 
     /**

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_CoordinateOperation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_CoordinateOperation.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_CoordinateOperation.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_CoordinateOperation.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -18,6 +18,8 @@ package org.apache.sis.internal.jaxb.ref
 
 import javax.xml.bind.annotation.XmlElementRef;
 import org.opengis.referencing.operation.CoordinateOperation;
+import org.opengis.referencing.operation.PassThroughOperation;
+import org.opengis.referencing.operation.SingleOperation;
 import org.apache.sis.internal.jaxb.gco.PropertyType;
 import org.apache.sis.referencing.operation.AbstractCoordinateOperation;
 
@@ -84,9 +86,14 @@ public final class CC_CoordinateOperatio
     /**
      * Invoked by JAXB at unmarshalling time for storing the result temporarily.
      *
-     * @param conversion The unmarshalled element.
+     * @param operation The unmarshalled element.
      */
-    public void setElement(final AbstractCoordinateOperation conversion) {
-        metadata = conversion;
+    public void setElement(final AbstractCoordinateOperation operation) {
+        metadata = operation;
+        if ((operation instanceof PassThroughOperation) && ((PassThroughOperation) operation).getOperation() == null) {
+            incomplete("coordOperation");
+        } else if ((operation instanceof SingleOperation) && ((SingleOperation) operation).getMethod() == null) {
+            incomplete("method");
+        }
     }
 }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_Ellipsoid.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_Ellipsoid.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_Ellipsoid.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_Ellipsoid.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -29,7 +29,7 @@ import org.apache.sis.referencing.datum.
  * @author  Cédric Briançon (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.4
- * @version 0.4
+ * @version 0.7
  * @module
  */
 public final class CD_Ellipsoid extends PropertyType<CD_Ellipsoid, Ellipsoid> {
@@ -89,5 +89,7 @@ public final class CD_Ellipsoid extends
      */
     public void setElement(final DefaultEllipsoid ellipsoid) {
         metadata = ellipsoid;
+        if (!(ellipsoid.getSemiMajorAxis() > 0)) incomplete("semiMajorAxis");   // Use '!' for catching NaN.
+        if (!(ellipsoid.getSemiMinorAxis() > 0)) incomplete("semiMinorAxis");
     }
 }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_GeodeticDatum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_GeodeticDatum.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_GeodeticDatum.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_GeodeticDatum.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -29,7 +29,7 @@ import org.apache.sis.referencing.datum.
  * @author  Cédric Briançon (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.4
- * @version 0.4
+ * @version 0.7
  * @module
  */
 public final class CD_GeodeticDatum extends PropertyType<CD_GeodeticDatum, GeodeticDatum> {
@@ -89,5 +89,7 @@ public final class CD_GeodeticDatum exte
      */
     public void setElement(final DefaultGeodeticDatum datum) {
         metadata = datum;
+        if (datum.getEllipsoid()     == null) incomplete("ellipsoid");
+        if (datum.getPrimeMeridian() == null) incomplete("primeMeridian");
     }
 }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_PrimeMeridian.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_PrimeMeridian.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_PrimeMeridian.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_PrimeMeridian.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -89,5 +89,6 @@ public final class CD_PrimeMeridian exte
      */
     public void setElement(final DefaultPrimeMeridian datum) {
         metadata = datum;
+        if (datum.getAngularUnit() == null) incomplete("angularUnit");
     }
 }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_TemporalDatum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_TemporalDatum.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_TemporalDatum.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_TemporalDatum.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -29,7 +29,7 @@ import org.apache.sis.referencing.datum.
  * @author  Cédric Briançon (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.4
- * @version 0.4
+ * @version 0.7
  * @module
  */
 public final class CD_TemporalDatum extends PropertyType<CD_TemporalDatum, TemporalDatum> {
@@ -89,5 +89,6 @@ public final class CD_TemporalDatum exte
      */
     public void setElement(final DefaultTemporalDatum datum) {
         metadata = datum;
+        if (datum.getOrigin() == null) incomplete("origin");
     }
 }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CS_CoordinateSystem.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CS_CoordinateSystem.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CS_CoordinateSystem.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CS_CoordinateSystem.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -88,5 +88,6 @@ public final class CS_CoordinateSystem e
      */
     public void setElement(final AbstractCS cs) {
         metadata = cs;
+        if (cs.getDimension() == 0) incomplete("axis");
     }
 }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CS_CoordinateSystemAxis.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CS_CoordinateSystemAxis.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CS_CoordinateSystemAxis.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CS_CoordinateSystemAxis.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -29,7 +29,7 @@ import org.apache.sis.internal.jaxb.gco.
  * @author  Guilhem Legal (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.4
- * @version 0.4
+ * @version 0.7
  * @module
  */
 public final class CS_CoordinateSystemAxis extends PropertyType<CS_CoordinateSystemAxis, CoordinateSystemAxis> {
@@ -89,5 +89,7 @@ public final class CS_CoordinateSystemAx
      */
     public void setElement(final DefaultCoordinateSystemAxis axis) {
         metadata = axis;
+        if (axis.getDirection() == null) incomplete("axisDirection");
+        if (axis.getUnit()      == null) incomplete("unit");
     }
 }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/SC_CRS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/SC_CRS.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/SC_CRS.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/SC_CRS.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -17,6 +17,8 @@
 package org.apache.sis.internal.jaxb.referencing;
 
 import javax.xml.bind.annotation.XmlElementRef;
+import org.opengis.referencing.crs.SingleCRS;
+import org.opengis.referencing.crs.CompoundCRS;
 import org.opengis.referencing.crs.CoordinateReferenceSystem;
 import org.apache.sis.referencing.crs.AbstractCRS;
 import org.apache.sis.internal.jaxb.gco.PropertyType;
@@ -28,7 +30,7 @@ import org.apache.sis.internal.jaxb.gco.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.6
- * @version 0.6
+ * @version 0.7
  * @module
  */
 public final class SC_CRS extends PropertyType<SC_CRS, CoordinateReferenceSystem> {
@@ -95,5 +97,11 @@ public final class SC_CRS extends Proper
      */
     public void setElement(final AbstractCRS crs) {
         metadata = crs;
+        if (crs.getCoordinateSystem() == null) {
+            incomplete((crs instanceof CompoundCRS) ? "componentReferenceSystem" : "coordinateSystem");
+        }
+        if (crs instanceof SingleCRS && ((SingleCRS) crs).getDatum() == null) {
+            incomplete("datum");
+        }
     }
 }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/SC_SingleCRS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/SC_SingleCRS.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/SC_SingleCRS.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/SC_SingleCRS.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -94,10 +94,12 @@ public final class SC_SingleCRS extends
      * @throws IllegalArgumentException if the unmarshalled CRS is not a single CRS.
      */
     public void setElement(final AbstractCRS crs) {
-        if (crs != null && !(crs instanceof SingleCRS)) {
+        if (!(crs instanceof SingleCRS)) {
             throw new IllegalArgumentException(Errors.format(Errors.Keys.UnexpectedValueInElement_2,
                     "baseCRS", IdentifiedObjects.getName(crs, null)));
         }
         metadata = (SingleCRS) crs;
+        if (crs.getCoordinateSystem()    == null) incomplete("coordinateSystem");
+        if (((SingleCRS) crs).getDatum() == null) incomplete("datum");
     }
 }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AbstractLambert.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AbstractLambert.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AbstractLambert.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AbstractLambert.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.internal.referencing.provider;
 
+import javax.xml.bind.annotation.XmlTransient;
 import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.parameter.ParameterDescriptorGroup;
 import org.opengis.referencing.operation.ConicProjection;
@@ -32,6 +33,7 @@ import org.apache.sis.referencing.operat
  * @version 0.6
  * @module
  */
+@XmlTransient
 class AbstractLambert extends MapProjection {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AbstractMercator.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AbstractMercator.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AbstractMercator.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AbstractMercator.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -17,6 +17,7 @@
 package org.apache.sis.internal.referencing.provider;
 
 import java.util.List;
+import javax.xml.bind.annotation.XmlTransient;
 import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.parameter.ParameterDescriptorGroup;
 import org.opengis.parameter.GeneralParameterDescriptor;
@@ -34,6 +35,7 @@ import org.apache.sis.referencing.operat
  * @version 0.6
  * @module
  */
+@XmlTransient
 class AbstractMercator extends MapProjection {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AbstractProvider.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AbstractProvider.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AbstractProvider.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AbstractProvider.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -22,6 +22,7 @@ import java.util.Collection;
 import javax.measure.unit.Unit;
 import javax.measure.unit.SI;
 import javax.measure.unit.NonSI;
+import javax.xml.bind.annotation.XmlTransient;
 import org.opengis.util.GenericName;
 import org.opengis.metadata.Identifier;
 import org.opengis.parameter.ParameterDescriptor;
@@ -48,6 +49,7 @@ import org.apache.sis.util.Workaround;
  * @version 0.6
  * @module
  */
+@XmlTransient
 abstract class AbstractProvider extends DefaultOperationMethod implements MathTransformProvider {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AbstractStereographic.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AbstractStereographic.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AbstractStereographic.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AbstractStereographic.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.internal.referencing.provider;
 
+import javax.xml.bind.annotation.XmlTransient;
 import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.parameter.ParameterDescriptorGroup;
 import org.opengis.parameter.ParameterNotFoundException;
@@ -33,6 +34,7 @@ import org.apache.sis.referencing.operat
  * @version 0.6
  * @module
  */
+@XmlTransient
 abstract class AbstractStereographic extends MapProjection {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Affine.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Affine.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Affine.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Affine.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -19,6 +19,7 @@ package org.apache.sis.internal.referenc
 import java.util.Map;
 import java.util.Arrays;
 import java.util.Collections;
+import javax.xml.bind.annotation.XmlTransient;
 import org.opengis.parameter.ParameterValueGroup;
 import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.parameter.ParameterNotFoundException;
@@ -60,6 +61,7 @@ import org.apache.sis.referencing.operat
  * @version 0.6
  * @module
  */
+@XmlTransient
 public final class Affine extends AbstractProvider {
     /**
      * Serial number for inter-operability with different versions.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Equirectangular.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Equirectangular.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Equirectangular.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Equirectangular.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -17,6 +17,7 @@
 package org.apache.sis.internal.referencing.provider;
 
 import java.awt.geom.AffineTransform;
+import javax.xml.bind.annotation.XmlTransient;
 import org.opengis.util.FactoryException;
 import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.parameter.ParameterDescriptorGroup;
@@ -70,6 +71,7 @@ import static java.lang.Math.*;
  *
  * @see <a href="http://www.remotesensing.org/geotiff/proj_list/equirectangular.html">Equirectangular on RemoteSensing.org</a>
  */
+@XmlTransient
 public final class Equirectangular extends AbstractProvider {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformal1SP.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformal1SP.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformal1SP.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformal1SP.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.internal.referencing.provider;
 
+import javax.xml.bind.annotation.XmlTransient;
 import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.parameter.ParameterDescriptorGroup;
 import org.apache.sis.parameter.ParameterBuilder;
@@ -33,6 +34,7 @@ import org.apache.sis.metadata.iso.citat
  *
  * @see <a href="http://www.remotesensing.org/geotiff/proj_list/lambert_conic_conformal_1sp.html">Lambert Conic Conformal 1SP on RemoteSensing.org</a>
  */
+@XmlTransient
 public final class LambertConformal1SP extends AbstractLambert {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformal2SP.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformal2SP.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformal2SP.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformal2SP.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.internal.referencing.provider;
 
+import javax.xml.bind.annotation.XmlTransient;
 import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.parameter.ParameterDescriptorGroup;
 import org.apache.sis.internal.util.Constants;
@@ -34,6 +35,7 @@ import org.apache.sis.metadata.iso.citat
  *
  * @see <a href="http://www.remotesensing.org/geotiff/proj_list/lambert_conic_conformal_2sp.html">Lambert Conic Conformal 2SP on RemoteSensing.org</a>
  */
+@XmlTransient
 public final class LambertConformal2SP extends AbstractLambert {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformalBelgium.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformalBelgium.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformalBelgium.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformalBelgium.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.internal.referencing.provider;
 
+import javax.xml.bind.annotation.XmlTransient;
 import org.opengis.parameter.ParameterDescriptorGroup;
 import org.apache.sis.parameter.ParameterBuilder;
 import org.apache.sis.metadata.iso.citation.Citations;
@@ -32,6 +33,7 @@ import org.apache.sis.metadata.iso.citat
  *
  * @see <a href="http://www.remotesensing.org/geotiff/proj_list/lambert_conic_conformal_2sp_belgium.html">Lambert Conic Conformal 2SP (Belgium) on RemoteSensing.org</a>
  */
+@XmlTransient
 public final class LambertConformalBelgium extends AbstractLambert {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformalMichigan.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformalMichigan.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformalMichigan.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformalMichigan.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.internal.referencing.provider;
 
+import javax.xml.bind.annotation.XmlTransient;
 import javax.measure.unit.Unit;
 import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.parameter.ParameterDescriptorGroup;
@@ -30,6 +31,7 @@ import org.apache.sis.parameter.Paramete
  * @version 0.6
  * @module
  */
+@XmlTransient
 public final class LambertConformalMichigan extends AbstractLambert {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformalWest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformalWest.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformalWest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformalWest.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.internal.referencing.provider;
 
+import javax.xml.bind.annotation.XmlTransient;
 import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.parameter.ParameterDescriptorGroup;
 import org.apache.sis.parameter.ParameterBuilder;
@@ -40,6 +41,7 @@ import org.apache.sis.util.resources.Mes
  * @version 0.6
  * @module
  */
+@XmlTransient
 public final class LambertConformalWest extends AbstractLambert {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LongitudeRotation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LongitudeRotation.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LongitudeRotation.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LongitudeRotation.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.internal.referencing.provider;
 
+import javax.xml.bind.annotation.XmlTransient;
 import org.opengis.parameter.ParameterValueGroup;
 import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.parameter.ParameterDescriptorGroup;
@@ -49,6 +50,7 @@ import org.apache.sis.parameter.Paramete
  * @version 0.6
  * @module
  */
+@XmlTransient
 public final class LongitudeRotation extends AbstractProvider {
     /**
      * Serial number for inter-operability with different versions.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/MapProjection.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/MapProjection.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/MapProjection.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/MapProjection.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -19,6 +19,7 @@ package org.apache.sis.internal.referenc
 import java.util.Map;
 import java.util.HashMap;
 import java.util.NoSuchElementException;
+import javax.xml.bind.annotation.XmlTransient;
 import javax.measure.unit.SI;
 import org.opengis.util.FactoryException;
 import org.opengis.util.InternationalString;
@@ -57,6 +58,7 @@ import static org.opengis.metadata.Ident
  * @version 0.6
  * @module
  */
+@XmlTransient
 public abstract class MapProjection extends AbstractProvider {
     /**
      * Serial number for inter-operability with different versions.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Mercator1SP.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Mercator1SP.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Mercator1SP.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Mercator1SP.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.internal.referencing.provider;
 
+import javax.xml.bind.annotation.XmlTransient;
 import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.parameter.ParameterDescriptorGroup;
 import org.apache.sis.internal.util.Constants;
@@ -35,6 +36,7 @@ import org.apache.sis.metadata.iso.citat
  *
  * @see <a href="http://www.remotesensing.org/geotiff/proj_list/mercator_1sp.html">Mercator 1SP on RemoteSensing.org</a>
  */
+@XmlTransient
 public final class Mercator1SP extends AbstractMercator {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Mercator2SP.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Mercator2SP.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Mercator2SP.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Mercator2SP.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.internal.referencing.provider;
 
+import javax.xml.bind.annotation.XmlTransient;
 import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.parameter.ParameterDescriptorGroup;
 import org.opengis.util.InternationalString;
@@ -36,6 +37,7 @@ import org.apache.sis.metadata.iso.citat
  *
  * @see <a href="http://www.remotesensing.org/geotiff/proj_list/mercator_2sp.html">Mercator 2SP on RemoteSensing.org</a>
  */
+@XmlTransient
 public final class Mercator2SP extends AbstractMercator {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/MercatorSpherical.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/MercatorSpherical.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/MercatorSpherical.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/MercatorSpherical.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.internal.referencing.provider;
 
+import javax.xml.bind.annotation.XmlTransient;
 import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.parameter.ParameterDescriptorGroup;
 import org.apache.sis.parameter.ParameterBuilder;
@@ -32,6 +33,7 @@ import org.apache.sis.parameter.Paramete
  * @version 0.6
  * @module
  */
+@XmlTransient
 public final class MercatorSpherical extends AbstractMercator {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/MillerCylindrical.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/MillerCylindrical.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/MillerCylindrical.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/MillerCylindrical.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.internal.referencing.provider;
 
+import javax.xml.bind.annotation.XmlTransient;
 import org.opengis.parameter.ParameterDescriptorGroup;
 import org.apache.sis.internal.util.Constants;
 import org.apache.sis.parameter.ParameterBuilder;
@@ -51,6 +52,7 @@ import org.apache.sis.metadata.iso.citat
  *
  * @see <a href="http://www.remotesensing.org/geotiff/proj_list/miller_cylindrical.html">Miller Cylindrical on RemoteSensing.org</a>
  */
+@XmlTransient
 public final class MillerCylindrical extends AbstractMercator {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ObliqueStereographic.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ObliqueStereographic.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ObliqueStereographic.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ObliqueStereographic.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.internal.referencing.provider;
 
+import javax.xml.bind.annotation.XmlTransient;
 import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.parameter.ParameterDescriptorGroup;
 import org.opengis.parameter.ParameterNotFoundException;
@@ -31,11 +32,12 @@ import org.apache.sis.referencing.operat
  * @author  Rueben Schulz (UBC)
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.6
- * @version 0.6
+ * @version 0.7
  * @module
  *
  * @see <a href="http://www.remotesensing.org/geotiff/proj_list/oblique_stereographic.html">Oblique Stereographic on RemoteSensing.org</a>
  */
+@XmlTransient
 public final class ObliqueStereographic extends AbstractStereographic {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicA.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicA.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicA.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicA.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.internal.referencing.provider;
 
+import javax.xml.bind.annotation.XmlTransient;
 import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.parameter.ParameterDescriptorGroup;
 import org.apache.sis.metadata.iso.citation.Citations;
@@ -33,6 +34,7 @@ import org.apache.sis.parameter.Paramete
  *
  * @see <a href="http://www.remotesensing.org/geotiff/proj_list/polar_stereographic.html">Polar Stereographic on RemoteSensing.org</a>
  */
+@XmlTransient
 public final class PolarStereographicA extends AbstractStereographic {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicB.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicB.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicB.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicB.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.internal.referencing.provider;
 
+import javax.xml.bind.annotation.XmlTransient;
 import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.parameter.ParameterDescriptorGroup;
 import org.apache.sis.metadata.iso.citation.Citations;
@@ -33,6 +34,7 @@ import org.apache.sis.parameter.Paramete
  * @version 0.6
  * @module
  */
+@XmlTransient
 public final class PolarStereographicB extends AbstractStereographic {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicC.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicC.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicC.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicC.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.internal.referencing.provider;
 
+import javax.xml.bind.annotation.XmlTransient;
 import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.parameter.ParameterDescriptorGroup;
 
@@ -29,6 +30,7 @@ import org.opengis.parameter.ParameterDe
  * @version 0.6
  * @module
  */
+@XmlTransient
 public final class PolarStereographicC extends AbstractStereographic {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicNorth.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicNorth.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicNorth.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicNorth.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -18,6 +18,7 @@ package org.apache.sis.internal.referenc
 
 import java.util.List;
 import javax.measure.unit.NonSI;
+import javax.xml.bind.annotation.XmlTransient;
 import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.parameter.ParameterDescriptorGroup;
 import org.opengis.parameter.GeneralParameterDescriptor;
@@ -35,6 +36,7 @@ import org.apache.sis.measure.Latitude;
  * @version 0.6
  * @module
  */
+@XmlTransient
 public final class PolarStereographicNorth extends AbstractStereographic {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicSouth.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicSouth.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicSouth.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicSouth.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -17,6 +17,7 @@
 package org.apache.sis.internal.referencing.provider;
 
 import javax.measure.unit.NonSI;
+import javax.xml.bind.annotation.XmlTransient;
 import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.parameter.ParameterDescriptorGroup;
 import org.apache.sis.metadata.iso.citation.Citations;
@@ -33,6 +34,7 @@ import org.apache.sis.measure.Latitude;
  * @version 0.6
  * @module
  */
+@XmlTransient
 public final class PolarStereographicSouth extends AbstractStereographic {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PseudoMercator.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PseudoMercator.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PseudoMercator.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PseudoMercator.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.internal.referencing.provider;
 
+import javax.xml.bind.annotation.XmlTransient;
 import org.opengis.parameter.ParameterDescriptorGroup;
 import org.apache.sis.parameter.ParameterBuilder;
 
@@ -30,6 +31,7 @@ import org.apache.sis.parameter.Paramete
  * @version 0.6
  * @module
  */
+@XmlTransient
 public final class PseudoMercator extends AbstractMercator {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/RegionalMercator.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/RegionalMercator.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/RegionalMercator.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/RegionalMercator.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.internal.referencing.provider;
 
+import javax.xml.bind.annotation.XmlTransient;
 import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.parameter.ParameterDescriptorGroup;
 import org.apache.sis.metadata.iso.citation.Citations;
@@ -36,6 +37,7 @@ import org.apache.sis.parameter.Paramete
  * @version 0.6
  * @module
  */
+@XmlTransient
 public class RegionalMercator extends AbstractMercator {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercator.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercator.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercator.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercator.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.internal.referencing.provider;
 
+import javax.xml.bind.annotation.XmlTransient;
 import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.parameter.ParameterDescriptorGroup;
 import org.apache.sis.parameter.ParameterBuilder;
@@ -35,6 +36,7 @@ import org.apache.sis.referencing.operat
  *
  * @see <a href="http://www.remotesensing.org/geotiff/proj_list/transverse_mercator.html">Transverse Mercator on RemoteSensing.org</a>
  */
+@XmlTransient
 public final class TransverseMercator extends AbstractMercator {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercatorSouth.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercatorSouth.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercatorSouth.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercatorSouth.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.internal.referencing.provider;
 
+import javax.xml.bind.annotation.XmlTransient;
 import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.parameter.ParameterDescriptorGroup;
 import org.apache.sis.metadata.iso.citation.Citations;
@@ -38,6 +39,7 @@ import org.apache.sis.util.resources.Mes
  *
  * @see <a href="http://www.remotesensing.org/geotiff/proj_list/transverse_mercator_south_oriented.html">Transverse Mercator (South Oriented) on RemoteSensing.org</a>
  */
+@XmlTransient
 public final class TransverseMercatorSouth extends AbstractMercator {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/package-info.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/package-info.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/package-info.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -22,7 +22,7 @@
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.6
- * @version 0.6
+ * @version 0.7
  * @module
  *
  * @see org.apache.sis.referencing.operation.transform.MathTransformProvider

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionDescriptor.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionDescriptor.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionDescriptor.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionDescriptor.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -17,6 +17,7 @@
 package org.apache.sis.parameter;
 
 import java.util.Map;
+import javax.xml.bind.annotation.XmlTransient;
 import org.opengis.util.GenericName;
 import org.opengis.parameter.ParameterValueGroup;
 import org.opengis.parameter.ParameterDescriptor;
@@ -51,6 +52,7 @@ import org.apache.sis.util.Workaround;
  *
  * @see <a href="http://www.unidata.ucar.edu/software/netcdf-java/reference/StandardCoordinateTransforms.html">NetCDF projection parameters</a>
  */
+@XmlTransient
 final class MapProjectionDescriptor extends DefaultParameterDescriptorGroup {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/TensorValues.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/TensorValues.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/TensorValues.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/TensorValues.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -22,6 +22,7 @@ import java.util.Arrays;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.lang.reflect.Array;
+import javax.xml.bind.annotation.XmlTransient;
 import org.opengis.referencing.operation.Matrix;
 import org.opengis.parameter.ParameterValue;
 import org.opengis.parameter.ParameterValueGroup;
@@ -58,6 +59,7 @@ import org.apache.sis.util.resources.Err
  * @version 0.6
  * @module
  */
+@XmlTransient
 final class TensorValues<E> extends AbstractParameterDescriptor
         implements ParameterDescriptorGroup, ParameterValueGroup, Cloneable
 {
@@ -144,6 +146,7 @@ final class TensorValues<E> extends Abst
      * Returns a clone of this group.
      */
     @Override
+    @SuppressWarnings("CloneDoesntCallSuperClone")
     public ParameterValueGroup clone() {
         return new TensorValues<>(this, true);
     }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -122,7 +122,7 @@ import java.util.Objects;
  * @version 0.7
  * @module
  */
-@XmlType(name="IdentifiedObjectType", propOrder={
+@XmlType(name = "IdentifiedObjectType", propOrder = {
     "description",
     "identifier",
     "names",
@@ -524,7 +524,7 @@ public class AbstractIdentifiedObject ex
      *
      * @since 0.6
      */
-    @XmlElement
+    @XmlElement(name = "description")
     public InternationalString getDescription() {
         return (name != null) ? name.getDescription() : null;
     }
@@ -537,7 +537,7 @@ public class AbstractIdentifiedObject ex
      * @return The remarks, or {@code null} if none.
      */
     @Override
-    @XmlElement
+    @XmlElement(name = "remarks")
     public InternationalString getRemarks() {
         return remarks;
     }
@@ -1082,7 +1082,11 @@ public class AbstractIdentifiedObject ex
      *
      * @see #getRemarks()
      */
-    private void setRemarks(final InternationalString remarks) {
-        this.remarks = remarks;
+    private void setRemarks(final InternationalString value) {
+        if (remarks == null) {
+            remarks = value;
+        } else {
+            ReferencingUtilities.propertyAlreadySet(AbstractIdentifiedObject.class, "setRemarks", "remarks");
+        }
     }
 }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractReferenceSystem.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractReferenceSystem.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractReferenceSystem.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractReferenceSystem.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -19,13 +19,17 @@ package org.apache.sis.referencing;
 import java.util.Map;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import org.opengis.util.GenericName;
 import org.opengis.util.InternationalString;
 import org.opengis.referencing.ReferenceSystem;
 import org.opengis.metadata.Identifier;
 import org.opengis.metadata.extent.Extent;
+import org.apache.sis.util.Workaround;
 import org.apache.sis.util.ComparisonMode;
 import org.apache.sis.util.iso.Types;
+import org.apache.sis.internal.jaxb.metadata.EX_Extent;
+import org.apache.sis.internal.referencing.ReferencingUtilities;
 
 import static org.apache.sis.util.Utilities.deepEquals;
 import static org.apache.sis.util.collection.Containers.property;
@@ -62,7 +66,7 @@ import java.util.Objects;
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4
- * @version 0.4
+ * @version 0.7
  * @module
  */
 @XmlTransient
@@ -75,18 +79,23 @@ public class AbstractReferenceSystem ext
     /**
      * Area for which the (coordinate) reference system is valid.
      *
+     * <p><b>Consider this field as final!</b>
+     * This field is modified only at unmarshalling time by {@link #setDomainOfValidity(Extent)}</p>
+     *
      * @see #getDomainOfValidity()
      */
-    private final Extent domainOfValidity;
+    private Extent domainOfValidity;
 
     /**
      * Description of domain of usage, or limitations of usage,
      * for which this (coordinate) reference system object is valid.
      *
+     * <p><b>Consider this field as final!</b>
+     * This field is modified only at unmarshalling time by {@link #setScope(InternationalString)}</p>
+     *
      * @see #getScope()
      */
-    @XmlElement(required = true)
-    private final InternationalString scope;
+    private InternationalString scope;
 
     /**
      * Constructs a reference system from the given properties.
@@ -172,14 +181,17 @@ public class AbstractReferenceSystem ext
     }
 
     /**
-     * Returns the region or timeframe in which this reference system is valid,
-     * or {@code null} if unspecified.
+     * Returns the region or timeframe in which this reference system is valid, or {@code null} if unspecified.
      *
      * @return Area or region or timeframe in which this (coordinate) reference system is valid, or {@code null}.
      *
      * @see org.apache.sis.metadata.iso.extent.DefaultExtent
      */
     @Override
+    @XmlElement(name = "domainOfValidity")
+    // For an unknown reason, JAXB does not take the adapter declared in package-info for this particular property.
+    @Workaround(library = "JDK", version = "1.8")
+    @XmlJavaTypeAdapter(EX_Extent.class)
     public Extent getDomainOfValidity() {
         return domainOfValidity;
     }
@@ -191,6 +203,7 @@ public class AbstractReferenceSystem ext
      *         (coordinate) reference system object is valid, or {@code null}.
      */
     @Override
+    @XmlElement(name ="scope", required = true)
     public InternationalString getScope() {
         return scope;
     }
@@ -263,7 +276,31 @@ public class AbstractReferenceSystem ext
      * reserved to JAXB, which will assign values to the fields using reflexion.
      */
     AbstractReferenceSystem() {
-        domainOfValidity = null;
-        scope = null;
+    }
+
+    /**
+     * Invoked by JAXB only at unmarshalling time.
+     *
+     * @see #getDomainOfValidity()
+     */
+    private void setDomainOfValidity(final Extent value) {
+        if (domainOfValidity == null) {
+            domainOfValidity = value;
+        } else {
+            ReferencingUtilities.propertyAlreadySet(AbstractReferenceSystem.class, "setDomainOfValidity", "domainOfValidity");
+        }
+    }
+
+    /**
+     * Invoked by JAXB only at unmarshalling time.
+     *
+     * @see #getScope()
+     */
+    private void setScope(final InternationalString value) {
+        if (scope == null) {
+            scope = value;
+        } else {
+            ReferencingUtilities.propertyAlreadySet(AbstractReferenceSystem.class, "setScope", "scope");
+        }
     }
 }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -80,13 +80,16 @@ import java.util.Objects;
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4
- * @version 0.6
+ * @version 0.7
  * @module
  *
  * @see AbstractCS
  * @see org.apache.sis.referencing.datum.AbstractDatum
  */
-@XmlType(name="AbstractCRSType")
+@XmlType(name = "AbstractCRSType", propOrder = {
+    "domainOfValidity",
+    "scope"
+})
 @XmlRootElement(name = "AbstractCRS")
 @XmlSeeAlso({
     AbstractDerivedCRS.class,
@@ -511,6 +514,12 @@ public class AbstractCRS extends Abstrac
      */
     AbstractCRS() {
         super(org.apache.sis.internal.referencing.NilReferencingObject.INSTANCE);
+        /*
+         * The coordinate system is mandatory for SIS working. We do not verify its presence here
+         * because the verification would have to be done in an 'afterMarshal(…)' method and throwing
+         * an exception in that method causes the whole unmarshalling to fail. But the SC_CRS adapter
+         * does some verifications.
+         */
     }
 
     /**

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractDerivedCRS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractDerivedCRS.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractDerivedCRS.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractDerivedCRS.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -59,7 +59,7 @@ import static org.apache.sis.util.Utilit
  * @version 0.6
  * @module
  */
-@XmlType(name="AbstractGeneralDerivedCRSType")
+@XmlType(name = "AbstractGeneralDerivedCRSType")
 @XmlRootElement(name = "AbstractGeneralDerivedCRS")
 @XmlSeeAlso({
     DefaultDerivedCRS.class,
@@ -312,7 +312,7 @@ abstract class AbstractDerivedCRS<C exte
                 ReferencingUtilities.propertyAlreadySet(AbstractDerivedCRS.class, "setBaseCRS", name);
             }
         } else {
-            throw new IllegalStateException(Errors.format(Errors.Keys.MissingValueForProperty_1, "conversion"));
+            throw new IllegalStateException(Errors.format(Errors.Keys.MissingComponentInElement_2, getInterface(), "conversion"));
         }
     }
 

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultCompoundCRS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultCompoundCRS.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultCompoundCRS.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultCompoundCRS.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -20,6 +20,7 @@ import java.util.Map;
 import java.util.List;
 import java.util.Arrays;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.io.IOException;
 import java.io.ObjectInputStream;
 import javax.xml.bind.annotation.XmlType;
@@ -112,7 +113,7 @@ import static org.apache.sis.internal.re
  * @version 0.7
  * @module
  */
-@XmlType(name="CompoundCRSType")
+@XmlType(name = "CompoundCRSType")
 @XmlRootElement(name = "CompoundCRS")
 public class DefaultCompoundCRS extends AbstractCRS implements CompoundCRS {
     /**
@@ -341,6 +342,7 @@ public class DefaultCompoundCRS extends
     @SuppressWarnings("unchecked")
     private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException {
         in.defaultReadObject();
+        final List<? extends CoordinateReferenceSystem> components = this.components;
         if (components instanceof CheckedContainer<?>) {
             final Class<?> type = ((CheckedContainer<?>) components).getElementType();
             if (type == SingleCRS.class) {
@@ -538,13 +540,11 @@ public class DefaultCompoundCRS extends
             crs = getSingleComponents();
             isStandardCompliant = isStandardCompliant(crs);
         }
-        if (crs != null) {    // Should never be null, except e.g. if unmarshalling invalid GML.
-            for (final CoordinateReferenceSystem element : crs) {
-                formatter.newLine();
-                formatter.append(toFormattable(element));
-            }
-            formatter.newLine();    // For writing the ID[…] element on its own line.
+        for (final CoordinateReferenceSystem element : crs) {
+            formatter.newLine();
+            formatter.append(toFormattable(element));
         }
+        formatter.newLine();    // For writing the ID[…] element on its own line.
         if (!isStandardCompliant) {
             formatter.setInvalidWKT(this, null);
         }
@@ -566,11 +566,19 @@ public class DefaultCompoundCRS extends
     //////////////////////////////////////////////////////////////////////////////////////////////////
 
     /**
-     * Constructs a new object in which every attributes are set to a null value.
-     * <strong>This is not a valid object.</strong> This constructor is strictly
-     * reserved to JAXB, which will assign values to the fields using reflexion.
+     * Constructs a new object in which every attributes are set to a null or empty value.
+     * <strong>This is not a valid object.</strong> This constructor is strictly reserved
+     * to JAXB, which will assign values to the fields using reflexion.
      */
     private DefaultCompoundCRS() {
+        components = Collections.emptyList();
+        singles    = Collections.emptyList();
+        /*
+         * At least one component CRS is mandatory for SIS working. We do not verify their presence here
+         * because the verification would have to be done in an 'afterMarshal(…)' method and throwing an
+         * exception in that method causes the whole unmarshalling to fail.  But the SC_CRS adapter does
+         * some verifications (indirectly, by testing for coordinate system existence).
+         */
     }
 
     /**
@@ -590,7 +598,7 @@ public class DefaultCompoundCRS extends
     @XmlElement(name = "componentReferenceSystem", required = true)
     private CoordinateReferenceSystem[] getXMLComponents() {
         final List<SingleCRS> crs = getSingleComponents();
-        return (crs != null) ? crs.toArray(new CoordinateReferenceSystem[crs.size()]) : null;
+        return crs.toArray(new CoordinateReferenceSystem[crs.size()]);
     }
 
     /**

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultDerivedCRS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultDerivedCRS.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultDerivedCRS.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultDerivedCRS.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -454,7 +454,7 @@ public class DefaultDerivedCRS extends A
      * @return The coordinate system.
      */
     @Override
-    @XmlElement(name="coordinateSystem", required = true)
+    @XmlElement(name = "coordinateSystem", required = true)
     @XmlJavaTypeAdapter(CS_CoordinateSystem.class)
     public CoordinateSystem getCoordinateSystem() {
         return super.getCoordinateSystem();

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultEngineeringCRS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultEngineeringCRS.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultEngineeringCRS.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultEngineeringCRS.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -26,6 +26,7 @@ import org.opengis.referencing.crs.Engin
 import org.opengis.referencing.datum.EngineeringDatum;
 import org.apache.sis.referencing.cs.*;
 import org.apache.sis.referencing.AbstractReferenceSystem;
+import org.apache.sis.internal.referencing.ReferencingUtilities;
 import org.apache.sis.internal.metadata.WKTKeywords;
 import org.apache.sis.io.wkt.Formatter;
 
@@ -58,7 +59,7 @@ import static org.apache.sis.util.Argume
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4
- * @version 0.6
+ * @version 0.7
  * @module
  */
 @XmlType(name = "EngineeringCRSType", propOrder = {
@@ -74,9 +75,13 @@ public class DefaultEngineeringCRS exten
 
     /**
      * The datum.
+     *
+     * <p><b>Consider this field as final!</b>
+     * This field is modified only at unmarshalling time by {@link #setDatum(EngineeringDatum)}</p>
+     *
+     * @see #getDatum()
      */
-    @XmlElement(name = "engineeringDatum", required = true)
-    private final EngineeringDatum datum;
+    private EngineeringDatum datum;
 
     /**
      * Creates a coordinate reference system from the given properties, datum and coordinate system.
@@ -189,7 +194,8 @@ public class DefaultEngineeringCRS exten
      * @return The datum.
      */
     @Override
-    public final EngineeringDatum getDatum() {
+    @XmlElement(name = "engineeringDatum", required = true)
+    public EngineeringDatum getDatum() {
         return datum;
     }
 
@@ -265,7 +271,25 @@ public class DefaultEngineeringCRS exten
      * reserved to JAXB, which will assign values to the fields using reflexion.
      */
     private DefaultEngineeringCRS() {
-        datum = null;
+        /*
+         * The datum and the coordinate system are mandatory for SIS working. We do not verify their presence
+         * here because the verification would have to be done in an 'afterMarshal(…)' method and throwing an
+         * exception in that method causes the whole unmarshalling to fail.  But the SC_CRS adapter does some
+         * verifications.
+         */
+    }
+
+    /**
+     * Invoked by JAXB at unmarshalling time.
+     *
+     * @see #getDatum()
+     */
+    private void setDatum(final EngineeringDatum value) {
+        if (datum == null) {
+            datum = value;
+        } else {
+            ReferencingUtilities.propertyAlreadySet(DefaultEngineeringCRS.class, "setDatum", "engineeringDatum");
+        }
     }
 
     /**

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeodeticCRS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeodeticCRS.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeodeticCRS.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeodeticCRS.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -55,7 +55,7 @@ import static org.apache.sis.util.Argume
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4
- * @version 0.4
+ * @version 0.7
  * @module
  */
 @XmlType(name = "GeodeticCRSType", propOrder = {
@@ -73,9 +73,13 @@ class DefaultGeodeticCRS extends Abstrac
 
     /**
      * The datum.
+     *
+     * <p><b>Consider this field as final!</b>
+     * This field is modified only at unmarshalling time by {@link #setDatum(GeodeticDatum)}</p>
+     *
+     * @see #getDatum()
      */
-    @XmlElement(name = "geodeticDatum", required = true)
-    private final GeodeticDatum datum;
+    private GeodeticDatum datum;
 
     /**
      * Creates a coordinate reference system from the given properties, datum and coordinate system.
@@ -126,13 +130,15 @@ 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.
+     * 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 could remove
+     * the overridden methods.
      *
      * @return The datum.
      */
     @Override
+    @XmlElement(name = "geodeticDatum", required = true)
     public GeodeticDatum getDatum() {
         return datum;
     }
@@ -251,7 +257,25 @@ class DefaultGeodeticCRS extends Abstrac
      * reserved to JAXB, which will assign values to the fields using reflexion.
      */
     DefaultGeodeticCRS() {
-        datum = null;
+        /*
+         * The datum and the coordinate system are mandatory for SIS working. We do not verify their presence
+         * here because the verification would have to be done in an 'afterMarshal(…)' method and throwing an
+         * exception in that method causes the whole unmarshalling to fail.  But the SC_CRS adapter does some
+         * verifications.
+         */
+    }
+
+    /**
+     * Invoked by JAXB at unmarshalling time.
+     *
+     * @see #getDatum()
+     */
+    private void setDatum(final GeodeticDatum value) {
+        if (datum == null) {
+            datum = value;
+        } else {
+            ReferencingUtilities.propertyAlreadySet(DefaultGeodeticCRS.class, "setDatum", "geodeticDatum");
+        }
     }
 
     /**

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultImageCRS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultImageCRS.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultImageCRS.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultImageCRS.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -26,6 +26,7 @@ import org.opengis.referencing.crs.Image
 import org.opengis.referencing.cs.CartesianCS;
 import org.opengis.referencing.datum.ImageDatum;
 import org.apache.sis.internal.metadata.WKTKeywords;
+import org.apache.sis.internal.referencing.ReferencingUtilities;
 import org.apache.sis.referencing.cs.AxesConvention;
 import org.apache.sis.referencing.AbstractReferenceSystem;
 import org.apache.sis.io.wkt.Formatter;
@@ -50,7 +51,7 @@ import static org.apache.sis.util.Argume
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4
- * @version 0.4
+ * @version 0.7
  * @module
  */
 @XmlType(name = "ImageCRSType", propOrder = {
@@ -67,9 +68,13 @@ public class DefaultImageCRS extends Abs
 
     /**
      * The datum.
+     *
+     * <p><b>Consider this field as final!</b>
+     * This field is modified only at unmarshalling time by {@link #setDatum(ImageDatum)}</p>
+     *
+     * @see #getDatum()
      */
-    @XmlElement(name = "imageDatum", required = true)
-    private final ImageDatum datum;
+    private ImageDatum datum;
 
     /**
      * Creates a coordinate reference system from the given properties, datum and coordinate system.
@@ -182,7 +187,8 @@ public class DefaultImageCRS extends Abs
      * @return The datum.
      */
     @Override
-    public final ImageDatum getDatum() {
+    @XmlElement(name = "imageDatum", required = true)
+    public ImageDatum getDatum() {
         return datum;
     }
 
@@ -253,7 +259,25 @@ public class DefaultImageCRS extends Abs
      * reserved to JAXB, which will assign values to the fields using reflexion.
      */
     private DefaultImageCRS() {
-        datum = null;
+        /*
+         * The datum and the coordinate system are mandatory for SIS working. We do not verify their presence
+         * here because the verification would have to be done in an 'afterMarshal(…)' method and throwing an
+         * exception in that method causes the whole unmarshalling to fail.  But the SC_CRS adapter does some
+         * verifications.
+         */
+    }
+
+    /**
+     * Invoked by JAXB at unmarshalling time.
+     *
+     * @see #getDatum()
+     */
+    private void setDatum(final ImageDatum value) {
+        if (datum == null) {
+            datum = value;
+        } else {
+            ReferencingUtilities.propertyAlreadySet(DefaultImageCRS.class, "setDatum", "imageDatum");
+        }
     }
 
     /**

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultProjectedCRS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultProjectedCRS.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultProjectedCRS.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultProjectedCRS.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -256,7 +256,7 @@ public class DefaultProjectedCRS extends
      * Returns the coordinate system.
      */
     @Override
-    @XmlElement(name="cartesianCS", required = true)
+    @XmlElement(name = "cartesianCS", required = true)
     public final CartesianCS getCoordinateSystem() {
         // See AbstractDerivedCRS.createConversionFromBase(…) for
         // an explanation about why this method is declared final.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultTemporalCRS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultTemporalCRS.java?rev=1709036&r1=1709035&r2=1709036&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultTemporalCRS.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultTemporalCRS.java [UTF-8] Fri Oct 16 15:16:23 2015
@@ -29,6 +29,7 @@ import org.opengis.referencing.crs.Tempo
 import org.opengis.referencing.datum.TemporalDatum;
 import org.apache.sis.referencing.cs.AxesConvention;
 import org.apache.sis.referencing.AbstractReferenceSystem;
+import org.apache.sis.internal.referencing.ReferencingUtilities;
 import org.apache.sis.internal.metadata.WKTKeywords;
 import org.apache.sis.io.wkt.Formatter;
 import org.apache.sis.measure.Units;
@@ -56,7 +57,7 @@ import static org.apache.sis.util.Argume
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4
- * @version 0.6
+ * @version 0.7
  * @module
  *
  * @see org.apache.sis.referencing.datum.DefaultTemporalDatum
@@ -75,9 +76,13 @@ public class DefaultTemporalCRS extends
 
     /**
      * The datum.
+     *
+     * <p><b>Consider this field as final!</b>
+     * This field is modified only at unmarshalling time by {@link #setDatum(TemporalDatum)}</p>
+     *
+     * @see #getDatum()
      */
-    @XmlElement(name = "temporalDatum", required = true)
-    private final TemporalDatum datum;
+    private TemporalDatum datum;
 
     /**
      * A converter from values in this CRS to values in milliseconds.
@@ -211,7 +216,8 @@ public class DefaultTemporalCRS extends
      * @return The datum.
      */
     @Override
-    public final TemporalDatum getDatum() {
+    @XmlElement(name = "temporalDatum", required = true)
+    public TemporalDatum getDatum() {
         return datum;
     }
 
@@ -321,7 +327,25 @@ public class DefaultTemporalCRS extends
      * reserved to JAXB, which will assign values to the fields using reflexion.
      */
     private DefaultTemporalCRS() {
-        datum = null;
+        /*
+         * The datum and the coordinate system are mandatory for SIS working. We do not verify their presence
+         * here because the verification would have to be done in an 'afterMarshal(…)' method and throwing an
+         * exception in that method causes the whole unmarshalling to fail.  But the SC_CRS adapter does some
+         * verifications.
+         */
+    }
+
+    /**
+     * Invoked by JAXB at unmarshalling time.
+     *
+     * @see #getDatum()
+     */
+    private void setDatum(final TemporalDatum value) {
+        if (datum == null) {
+            datum = value;
+        } else {
+            ReferencingUtilities.propertyAlreadySet(DefaultVerticalCRS.class, "setDatum", "temporalDatum");
+        }
     }
 
     /**




Mime
View raw message