sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1499771 [3/3] - in /sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso: ./ acquisition/ citation/ constraint/ content/ distribution/ extent/ identification/ lineage/ maintenance/ quality/ spatial/
Date Thu, 04 Jul 2013 14:43:02 GMT
Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultConformanceResult.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultConformanceResult.java?rev=1499771&r1=1499770&r2=1499771&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultConformanceResult.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultConformanceResult.java
[UTF-8] Thu Jul  4 14:42:59 2013
@@ -94,15 +94,17 @@ public class DefaultConformanceResult ex
      * This is a <cite>shallow</cite> copy constructor, since the other metadata
contained in the
      * given object are not recursively copied.
      *
-     * @param object The metadata to copy values from.
+     * @param object The metadata to copy values from, or {@code null} if none.
      *
      * @see #castOrCopy(ConformanceResult)
      */
     public DefaultConformanceResult(final ConformanceResult object) {
         super(object);
-        specification = object.getSpecification();
-        explanation   = object.getExplanation();
-        pass          = object.pass();
+        if (object != null) {
+            specification = object.getSpecification();
+            explanation   = object.getExplanation();
+            pass          = object.pass();
+        }
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultCoverageResult.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultCoverageResult.java?rev=1499771&r1=1499770&r2=1499771&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultCoverageResult.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultCoverageResult.java
[UTF-8] Thu Jul  4 14:42:59 2013
@@ -88,17 +88,19 @@ public class DefaultCoverageResult exten
      * This is a <cite>shallow</cite> copy constructor, since the other metadata
contained in the
      * given object are not recursively copied.
      *
-     * @param object The metadata to copy values from.
+     * @param object The metadata to copy values from, or {@code null} if none.
      *
      * @see #castOrCopy(CoverageResult)
      */
     public DefaultCoverageResult(final CoverageResult object) {
         super(object);
-        spatialRepresentationType   = object.getSpatialRepresentationType();
-        resultSpatialRepresentation = object.getResultSpatialRepresentation();
-        resultContentDescription    = object.getResultContentDescription();
-        resultFormat                = object.getResultFormat();
-        resultFile                  = object.getResultFile();
+        if (object != null) {
+            spatialRepresentationType   = object.getSpatialRepresentationType();
+            resultSpatialRepresentation = object.getResultSpatialRepresentation();
+            resultContentDescription    = object.getResultContentDescription();
+            resultFormat                = object.getResultFormat();
+            resultFile                  = object.getResultFile();
+        }
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultDataQuality.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultDataQuality.java?rev=1499771&r1=1499770&r2=1499771&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultDataQuality.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultDataQuality.java
[UTF-8] Thu Jul  4 14:42:59 2013
@@ -91,15 +91,17 @@ public class DefaultDataQuality extends 
      * This is a <cite>shallow</cite> copy constructor, since the other metadata
contained in the
      * given object are not recursively copied.
      *
-     * @param object The metadata to copy values from.
+     * @param object The metadata to copy values from, or {@code null} if none.
      *
      * @see #castOrCopy(DataQuality)
      */
     public DefaultDataQuality(final DataQuality object) {
         super(object);
-        scope   = object.getScope();
-        reports = copyCollection(object.getReports(), Element.class);
-        lineage = object.getLineage();
+        if (object != null) {
+            scope   = object.getScope();
+            reports = copyCollection(object.getReports(), Element.class);
+            lineage = object.getLineage();
+        }
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultDomainConsistency.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultDomainConsistency.java?rev=1499771&r1=1499770&r2=1499771&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultDomainConsistency.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultDomainConsistency.java
[UTF-8] Thu Jul  4 14:42:59 2013
@@ -49,7 +49,7 @@ public class DefaultDomainConsistency ex
      * This is a <cite>shallow</cite> copy constructor, since the other metadata
contained in the
      * given object are not recursively copied.
      *
-     * @param object The metadata to copy values from.
+     * @param object The metadata to copy values from, or {@code null} if none.
      *
      * @see #castOrCopy(DomainConsistency)
      */

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultFormatConsistency.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultFormatConsistency.java?rev=1499771&r1=1499770&r2=1499771&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultFormatConsistency.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultFormatConsistency.java
[UTF-8] Thu Jul  4 14:42:59 2013
@@ -50,7 +50,7 @@ public class DefaultFormatConsistency ex
      * This is a <cite>shallow</cite> copy constructor, since the other metadata
contained in the
      * given object are not recursively copied.
      *
-     * @param object The metadata to copy values from.
+     * @param object The metadata to copy values from, or {@code null} if none.
      *
      * @see #castOrCopy(FormatConsistency)
      */

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultGriddedDataPositionalAccuracy.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultGriddedDataPositionalAccuracy.java?rev=1499771&r1=1499770&r2=1499771&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultGriddedDataPositionalAccuracy.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultGriddedDataPositionalAccuracy.java
[UTF-8] Thu Jul  4 14:42:59 2013
@@ -51,7 +51,7 @@ public class DefaultGriddedDataPositiona
      * This is a <cite>shallow</cite> copy constructor, since the other metadata
contained in the
      * given object are not recursively copied.
      *
-     * @param object The metadata to copy values from.
+     * @param object The metadata to copy values from, or {@code null} if none.
      *
      * @see #castOrCopy(GriddedDataPositionalAccuracy)
      */

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultNonQuantitativeAttributeAccuracy.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultNonQuantitativeAttributeAccuracy.java?rev=1499771&r1=1499770&r2=1499771&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultNonQuantitativeAttributeAccuracy.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultNonQuantitativeAttributeAccuracy.java
[UTF-8] Thu Jul  4 14:42:59 2013
@@ -50,7 +50,7 @@ public class DefaultNonQuantitativeAttri
      * This is a <cite>shallow</cite> copy constructor, since the other metadata
contained in the
      * given object are not recursively copied.
      *
-     * @param object The metadata to copy values from.
+     * @param object The metadata to copy values from, or {@code null} if none.
      *
      * @see #castOrCopy(NonQuantitativeAttributeAccuracy)
      */

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultQuantitativeAttributeAccuracy.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultQuantitativeAttributeAccuracy.java?rev=1499771&r1=1499770&r2=1499771&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultQuantitativeAttributeAccuracy.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultQuantitativeAttributeAccuracy.java
[UTF-8] Thu Jul  4 14:42:59 2013
@@ -51,7 +51,7 @@ public class DefaultQuantitativeAttribut
      * This is a <cite>shallow</cite> copy constructor, since the other metadata
contained in the
      * given object are not recursively copied.
      *
-     * @param object The metadata to copy values from.
+     * @param object The metadata to copy values from, or {@code null} if none.
      *
      * @see #castOrCopy(QuantitativeAttributeAccuracy)
      */

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultQuantitativeResult.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultQuantitativeResult.java?rev=1499771&r1=1499770&r2=1499771&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultQuantitativeResult.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultQuantitativeResult.java
[UTF-8] Thu Jul  4 14:42:59 2013
@@ -79,16 +79,18 @@ public class DefaultQuantitativeResult e
      * This is a <cite>shallow</cite> copy constructor, since the other metadata
contained in the
      * given object are not recursively copied.
      *
-     * @param object The metadata to copy values from.
+     * @param object The metadata to copy values from, or {@code null} if none.
      *
      * @see #castOrCopy(QuantitativeResult)
      */
     public DefaultQuantitativeResult(final QuantitativeResult object) {
         super(object);
-        valueType      = object.getValueType();
-        valueUnit      = object.getValueUnit();
-        errorStatistic = object.getErrorStatistic();
-        values         = copyList(object.getValues(), Record.class);
+        if (object != null) {
+            valueType      = object.getValueType();
+            valueUnit      = object.getValueUnit();
+            errorStatistic = object.getErrorStatistic();
+            values         = copyList(object.getValues(), Record.class);
+        }
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultRelativeInternalPositionalAccuracy.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultRelativeInternalPositionalAccuracy.java?rev=1499771&r1=1499770&r2=1499771&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultRelativeInternalPositionalAccuracy.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultRelativeInternalPositionalAccuracy.java
[UTF-8] Thu Jul  4 14:42:59 2013
@@ -52,7 +52,7 @@ public class DefaultRelativeInternalPosi
      * This is a <cite>shallow</cite> copy constructor, since the other metadata
contained in the
      * given object are not recursively copied.
      *
-     * @param object The metadata to copy values from.
+     * @param object The metadata to copy values from, or {@code null} if none.
      *
      * @see #castOrCopy(RelativeInternalPositionalAccuracy)
      */

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultScope.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultScope.java?rev=1499771&r1=1499770&r2=1499771&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultScope.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultScope.java
[UTF-8] Thu Jul  4 14:42:59 2013
@@ -83,15 +83,17 @@ public class DefaultScope extends ISOMet
      * This is a <cite>shallow</cite> copy constructor, since the other metadata
contained in the
      * given object are not recursively copied.
      *
-     * @param object The metadata to copy values from.
+     * @param object The metadata to copy values from, or {@code null} if none.
      *
      * @see #castOrCopy(Scope)
      */
     public DefaultScope(final Scope object) {
         super(object);
-        level            = object.getLevel();
-        extent           = object.getExtent();
-        levelDescription = copyCollection(object.getLevelDescription(), ScopeDescription.class);
+        if (object != null) {
+            level            = object.getLevel();
+            extent           = object.getExtent();
+            levelDescription = copyCollection(object.getLevelDescription(), ScopeDescription.class);
+        }
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultTemporalConsistency.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultTemporalConsistency.java?rev=1499771&r1=1499770&r2=1499771&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultTemporalConsistency.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultTemporalConsistency.java
[UTF-8] Thu Jul  4 14:42:59 2013
@@ -49,7 +49,7 @@ public class DefaultTemporalConsistency 
      * This is a <cite>shallow</cite> copy constructor, since the other metadata
contained in the
      * given object are not recursively copied.
      *
-     * @param object The metadata to copy values from.
+     * @param object The metadata to copy values from, or {@code null} if none.
      *
      * @see #castOrCopy(TemporalConsistency)
      */

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultTemporalValidity.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultTemporalValidity.java?rev=1499771&r1=1499770&r2=1499771&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultTemporalValidity.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultTemporalValidity.java
[UTF-8] Thu Jul  4 14:42:59 2013
@@ -49,7 +49,7 @@ public class DefaultTemporalValidity ext
      * This is a <cite>shallow</cite> copy constructor, since the other metadata
contained in the
      * given object are not recursively copied.
      *
-     * @param object The metadata to copy values from.
+     * @param object The metadata to copy values from, or {@code null} if none.
      *
      * @see #castOrCopy(TemporalValidity)
      */

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultThematicClassificationCorrectness.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultThematicClassificationCorrectness.java?rev=1499771&r1=1499770&r2=1499771&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultThematicClassificationCorrectness.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultThematicClassificationCorrectness.java
[UTF-8] Thu Jul  4 14:42:59 2013
@@ -51,7 +51,7 @@ public class DefaultThematicClassificati
      * This is a <cite>shallow</cite> copy constructor, since the other metadata
contained in the
      * given object are not recursively copied.
      *
-     * @param object The metadata to copy values from.
+     * @param object The metadata to copy values from, or {@code null} if none.
      *
      * @see #castOrCopy(ThematicClassificationCorrectness)
      */

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultTopologicalConsistency.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultTopologicalConsistency.java?rev=1499771&r1=1499770&r2=1499771&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultTopologicalConsistency.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultTopologicalConsistency.java
[UTF-8] Thu Jul  4 14:42:59 2013
@@ -52,7 +52,7 @@ public class DefaultTopologicalConsisten
      * This is a <cite>shallow</cite> copy constructor, since the other metadata
contained in the
      * given object are not recursively copied.
      *
-     * @param object The metadata to copy values from.
+     * @param object The metadata to copy values from, or {@code null} if none.
      *
      * @see #castOrCopy(TopologicalConsistency)
      */

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultUsability.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultUsability.java?rev=1499771&r1=1499770&r2=1499771&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultUsability.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultUsability.java
[UTF-8] Thu Jul  4 14:42:59 2013
@@ -50,7 +50,7 @@ public class DefaultUsability extends Ab
      * This is a <cite>shallow</cite> copy constructor, since the other metadata
contained in the
      * given object are not recursively copied.
      *
-     * @param object The metadata to copy values from.
+     * @param object The metadata to copy values from, or {@code null} if none.
      *
      * @see #castOrCopy(Usability)
      */

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/AbstractGeolocationInformation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/AbstractGeolocationInformation.java?rev=1499771&r1=1499770&r2=1499771&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/AbstractGeolocationInformation.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/AbstractGeolocationInformation.java
[UTF-8] Thu Jul  4 14:42:59 2013
@@ -62,13 +62,15 @@ public class AbstractGeolocationInformat
      * This is a <cite>shallow</cite> copy constructor, since the other metadata
contained in the
      * given object are not recursively copied.
      *
-     * @param object The metadata to copy values from.
+     * @param object The metadata to copy values from, or {@code null} if none.
      *
      * @see #castOrCopy(GeolocationInformation)
      */
     public AbstractGeolocationInformation(final GeolocationInformation object) {
         super(object);
-        qualityInfo = copyCollection(object.getQualityInfo(), DataQuality.class);
+        if (object != null) {
+            qualityInfo = copyCollection(object.getQualityInfo(), DataQuality.class);
+        }
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/AbstractSpatialRepresentation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/AbstractSpatialRepresentation.java?rev=1499771&r1=1499770&r2=1499771&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/AbstractSpatialRepresentation.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/AbstractSpatialRepresentation.java
[UTF-8] Thu Jul  4 14:42:59 2013
@@ -58,7 +58,7 @@ public class AbstractSpatialRepresentati
      * This is a <cite>shallow</cite> copy constructor, since the other metadata
contained in the
      * given object are not recursively copied.
      *
-     * @param object The metadata to copy values from.
+     * @param object The metadata to copy values from, or {@code null} if none.
      *
      * @see #castOrCopy(SpatialRepresentation)
      */

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultDimension.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultDimension.java?rev=1499771&r1=1499770&r2=1499771&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultDimension.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultDimension.java
[UTF-8] Thu Jul  4 14:42:59 2013
@@ -86,15 +86,17 @@ public class DefaultDimension extends IS
      * This is a <cite>shallow</cite> copy constructor, since the other metadata
contained in the
      * given object are not recursively copied.
      *
-     * @param object The metadata to copy values from.
+     * @param object The metadata to copy values from, or {@code null} if none.
      *
      * @see #castOrCopy(Dimension)
      */
     public DefaultDimension(final Dimension object) {
         super(object);
-        dimensionName = object.getDimensionName();
-        dimensionSize = object.getDimensionSize();
-        resolution    = object.getResolution();
+        if (object != null) {
+            dimensionName = object.getDimensionName();
+            dimensionSize = object.getDimensionSize();
+            resolution    = object.getResolution();
+        }
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGCP.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGCP.java?rev=1499771&r1=1499770&r2=1499771&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGCP.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGCP.java
[UTF-8] Thu Jul  4 14:42:59 2013
@@ -68,14 +68,16 @@ public class DefaultGCP extends ISOMetad
      * This is a <cite>shallow</cite> copy constructor, since the other metadata
contained in the
      * given object are not recursively copied.
      *
-     * @param object The metadata to copy values from.
+     * @param object The metadata to copy values from, or {@code null} if none.
      *
      * @see #castOrCopy(GCP)
      */
     public DefaultGCP(final GCP object) {
         super(object);
-        accuracyReports       = copyCollection(object.getAccuracyReports(), Element.class);
-        geographicCoordinates = object.getGeographicCoordinates();
+        if (object != null) {
+            accuracyReports       = copyCollection(object.getAccuracyReports(), Element.class);
+            geographicCoordinates = object.getGeographicCoordinates();
+        }
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGCPCollection.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGCPCollection.java?rev=1499771&r1=1499770&r2=1499771&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGCPCollection.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGCPCollection.java
[UTF-8] Thu Jul  4 14:42:59 2013
@@ -80,16 +80,18 @@ public class DefaultGCPCollection extend
      * This is a <cite>shallow</cite> copy constructor, since the other metadata
contained in the
      * given object are not recursively copied.
      *
-     * @param object The metadata to copy values from.
+     * @param object The metadata to copy values from, or {@code null} if none.
      *
      * @see #castOrCopy(GCPCollection)
      */
     public DefaultGCPCollection(final GCPCollection object) {
         super(object);
-        collectionIdentification  = object.getCollectionIdentification();
-        collectionName            = object.getCollectionName();
-        coordinateReferenceSystem = object.getCoordinateReferenceSystem();
-        GCPs                      = copyCollection(object.getGCPs(), GCP.class);
+        if (object != null) {
+            collectionIdentification  = object.getCollectionIdentification();
+            collectionName            = object.getCollectionName();
+            coordinateReferenceSystem = object.getCoordinateReferenceSystem();
+            GCPs                      = copyCollection(object.getGCPs(), GCP.class);
+        }
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeometricObjects.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeometricObjects.java?rev=1499771&r1=1499770&r2=1499771&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeometricObjects.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeometricObjects.java
[UTF-8] Thu Jul  4 14:42:59 2013
@@ -77,14 +77,16 @@ public class DefaultGeometricObjects ext
      * This is a <cite>shallow</cite> copy constructor, since the other metadata
contained in the
      * given object are not recursively copied.
      *
-     * @param object The metadata to copy values from.
+     * @param object The metadata to copy values from, or {@code null} if none.
      *
      * @see #castOrCopy(GeometricObjects)
      */
     public DefaultGeometricObjects(final GeometricObjects object) {
         super(object);
-        geometricObjectType  = object.getGeometricObjectType();
-        geometricObjectCount = object.getGeometricObjectCount();
+        if (object != null) {
+            geometricObjectType  = object.getGeometricObjectType();
+            geometricObjectCount = object.getGeometricObjectCount();
+        }
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeorectified.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeorectified.java?rev=1499771&r1=1499770&r2=1499771&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeorectified.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeorectified.java
[UTF-8] Thu Jul  4 14:42:59 2013
@@ -127,23 +127,25 @@ public class DefaultGeorectified extends
      * This is a <cite>shallow</cite> copy constructor, since the other metadata
contained in the
      * given object are not recursively copied.
      *
-     * @param object The metadata to copy values from.
+     * @param object The metadata to copy values from, or {@code null} if none.
      *
      * @see #castOrCopy(Georectified)
      */
     public DefaultGeorectified(final Georectified object) {
         super(object);
-        checkPointDescription              = object.getCheckPointDescription();
-        cornerPoints                       = copyList(object.getCornerPoints(), Point.class);
-        centerPoint                        = object.getCenterPoint();
-        pointInPixel                       = object.getPointInPixel();
-        transformationDimensionDescription = object.getTransformationDimensionDescription();
-        transformationDimensionMapping     = copyCollection(object.getTransformationDimensionMapping(),
InternationalString.class);
-        checkPoints                        = copyCollection(object.getCheckPoints(), GCP.class);
-
-        // checkPointAvailability is required to be 'true' if there is a description.
-        if (checkPointDescription != null || object.isCheckPointAvailable()) {
-            booleans |= CHECK_POINT_MASK;
+        if (object != null) {
+            checkPointDescription              = object.getCheckPointDescription();
+            cornerPoints                       = copyList(object.getCornerPoints(), Point.class);
+            centerPoint                        = object.getCenterPoint();
+            pointInPixel                       = object.getPointInPixel();
+            transformationDimensionDescription = object.getTransformationDimensionDescription();
+            transformationDimensionMapping     = copyCollection(object.getTransformationDimensionMapping(),
InternationalString.class);
+            checkPoints                        = copyCollection(object.getCheckPoints(),
GCP.class);
+
+            // checkPointAvailability is required to be 'true' if there is a description.
+            if (checkPointDescription != null || object.isCheckPointAvailable()) {
+                booleans |= CHECK_POINT_MASK;
+            }
         }
     }
 

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeoreferenceable.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeoreferenceable.java?rev=1499771&r1=1499770&r2=1499771&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeoreferenceable.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeoreferenceable.java
[UTF-8] Thu Jul  4 14:42:59 2013
@@ -101,22 +101,24 @@ public class DefaultGeoreferenceable ext
      * This is a <cite>shallow</cite> copy constructor, since the other metadata
contained in the
      * given object are not recursively copied.
      *
-     * @param object The metadata to copy values from.
+     * @param object The metadata to copy values from, or {@code null} if none.
      *
      * @see #castOrCopy(Georeferenceable)
      */
     public DefaultGeoreferenceable(final Georeferenceable object) {
         super(object);
-        if (object.isControlPointAvailable()) {
-            booleans |= CONTROL_POINT_MASK;
-        }
-        if (object.isOrientationParameterAvailable()) {
-            booleans |= OPERATION_MASK;
+        if (object != null) {
+            if (object.isControlPointAvailable()) {
+                booleans |= CONTROL_POINT_MASK;
+            }
+            if (object.isOrientationParameterAvailable()) {
+                booleans |= OPERATION_MASK;
+            }
+            orientationParameterDescription = object.getOrientationParameterDescription();
+            parameterCitations              = copyCollection(object.getParameterCitations(),
Citation.class);
+            geolocationInformation          = copyCollection(object.getGeolocationInformation(),
GeolocationInformation.class);
+            georeferencedParameters         = object.getGeoreferencedParameters();
         }
-        orientationParameterDescription = object.getOrientationParameterDescription();
-        parameterCitations              = copyCollection(object.getParameterCitations(),
Citation.class);
-        geolocationInformation          = copyCollection(object.getGeolocationInformation(),
GeolocationInformation.class);
-        georeferencedParameters         = object.getGeoreferencedParameters();
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGridSpatialRepresentation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGridSpatialRepresentation.java?rev=1499771&r1=1499770&r2=1499771&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGridSpatialRepresentation.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGridSpatialRepresentation.java
[UTF-8] Thu Jul  4 14:42:59 2013
@@ -104,17 +104,19 @@ public class DefaultGridSpatialRepresent
      * This is a <cite>shallow</cite> copy constructor, since the other metadata
contained in the
      * given object are not recursively copied.
      *
-     * @param object The metadata to copy values from.
+     * @param object The metadata to copy values from, or {@code null} if none.
      *
      * @see #castOrCopy(GridSpatialRepresentation)
      */
     public DefaultGridSpatialRepresentation(final GridSpatialRepresentation object) {
         super(object);
-        numberOfDimensions      = object.getNumberOfDimensions();
-        axisDimensionProperties = copyList(object.getAxisDimensionProperties(), Dimension.class);
-        cellGeometry            = object.getCellGeometry();
-        if (object.isTransformationParameterAvailable()) {
-            booleans = TRANSFORMATION_MASK;
+        if (object != null) {
+            numberOfDimensions      = object.getNumberOfDimensions();
+            axisDimensionProperties = copyList(object.getAxisDimensionProperties(), Dimension.class);
+            cellGeometry            = object.getCellGeometry();
+            if (object.isTransformationParameterAvailable()) {
+                booleans = TRANSFORMATION_MASK;
+            }
         }
     }
 

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultVectorSpatialRepresentation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultVectorSpatialRepresentation.java?rev=1499771&r1=1499770&r2=1499771&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultVectorSpatialRepresentation.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultVectorSpatialRepresentation.java
[UTF-8] Thu Jul  4 14:42:59 2013
@@ -69,14 +69,16 @@ public class DefaultVectorSpatialReprese
      * This is a <cite>shallow</cite> copy constructor, since the other metadata
contained in the
      * given object are not recursively copied.
      *
-     * @param object The metadata to copy values from.
+     * @param object The metadata to copy values from, or {@code null} if none.
      *
      * @see #castOrCopy(VectorSpatialRepresentation)
      */
     public DefaultVectorSpatialRepresentation(final VectorSpatialRepresentation object) {
         super(object);
-        topologyLevel    = object.getTopologyLevel();
-        geometricObjects = copyCollection(object.getGeometricObjects(), GeometricObjects.class);
+        if (object != null) {
+            topologyLevel    = object.getTopologyLevel();
+            geometricObjects = copyCollection(object.getGeometricObjects(), GeometricObjects.class);
+        }
     }
 
     /**



Mime
View raw message