sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1499824 [1/3] - in /sis/branches/0.3: ./ core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/ core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition...
Date Thu, 04 Jul 2013 17:45:37 GMT
Author: desruisseaux
Date: Thu Jul  4 17:45:34 2013
New Revision: 1499824

URL: http://svn.apache.org/r1499824
Log:
Merge a last-minute bug fixes from trunk (<gmd:distance> element was randomly missing, extension mechanism for VerticalCRS was not working).

Modified:
    sis/branches/0.3/   (props changed)
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/SC_VerticalCRS.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultApplicationSchemaInformation.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultExtendedElementInformation.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultFeatureTypeList.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadataExtensionInformation.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultPortrayalCatalogueReference.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultAcquisitionInformation.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultEnvironmentalRecord.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultEvent.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultInstrument.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultObjective.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultOperation.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultPlan.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultPlatform.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultPlatformPass.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultRequestedDate.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultRequirement.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultAddress.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitationDate.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultContact.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultOnlineResource.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibleParty.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultSeries.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultTelephone.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultConstraints.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultLegalConstraints.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultSecurityConstraints.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/AbstractContentInformation.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultBand.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultCoverageDescription.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultFeatureCatalogueDescription.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultImageDescription.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultRangeDimension.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultRangeElementDescription.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/package-info.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultDataFile.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultDigitalTransferOptions.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultDistribution.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultDistributor.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultFormat.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultMedium.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultStandardOrderProcess.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/AbstractGeographicExtent.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultBoundingPolygon.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultExtent.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBox.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultGeographicDescription.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultSpatialTemporalExtent.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultTemporalExtent.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultVerticalExtent.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/AbstractIdentification.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultBrowseGraphic.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultDataIdentification.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultKeywords.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultRepresentativeFraction.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultResolution.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentification.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultUsage.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/package-info.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultAlgorithm.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultLineage.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultNominalResolution.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultProcessStep.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultProcessStepReport.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultProcessing.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultSource.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultScopeDescription.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractCompleteness.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractElement.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractLogicalConsistency.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractPositionalAccuracy.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractResult.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractTemporalAccuracy.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractThematicAccuracy.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultAbsoluteExternalPositionalAccuracy.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultAccuracyOfATimeMeasurement.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultCompletenessCommission.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultCompletenessOmission.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultConceptualConsistency.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultConformanceResult.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultCoverageResult.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultDataQuality.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultDomainConsistency.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultFormatConsistency.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultGriddedDataPositionalAccuracy.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultNonQuantitativeAttributeAccuracy.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultQuantitativeAttributeAccuracy.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultQuantitativeResult.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultRelativeInternalPositionalAccuracy.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultScope.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultTemporalConsistency.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultTemporalValidity.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultThematicClassificationCorrectness.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultTopologicalConsistency.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultUsability.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/AbstractGeolocationInformation.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/AbstractSpatialRepresentation.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultDimension.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGCP.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGCPCollection.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeometricObjects.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeorectified.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeoreferenceable.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGridSpatialRepresentation.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultVectorSpatialRepresentation.java
    sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/package-info.java
    sis/branches/0.3/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/identification/DefaultResolutionTest.java

Propchange: sis/branches/0.3/
------------------------------------------------------------------------------
  Merged /sis/trunk:r1499444-1499821
  Merged /sis/branches/JDK7:r1499442-1499816
  Merged /sis/branches/JDK6:r1499443-1499819

Modified: sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/SC_VerticalCRS.java
URL: http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/SC_VerticalCRS.java?rev=1499824&r1=1499823&r2=1499824&view=diff
==============================================================================
--- sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/SC_VerticalCRS.java [UTF-8] (original)
+++ sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/SC_VerticalCRS.java [UTF-8] Thu Jul  4 17:45:34 2013
@@ -16,8 +16,13 @@
  */
 package org.apache.sis.internal.jaxb.gml;
 
+import java.util.logging.Level;
+import java.util.logging.LogRecord;
+import javax.xml.bind.annotation.XmlAnyElement;
 import org.opengis.referencing.crs.VerticalCRS;
 import org.apache.sis.internal.jaxb.gco.PropertyType;
+import org.apache.sis.internal.jaxb.Context;
+import org.apache.sis.util.resources.Errors;
 
 
 /**
@@ -25,9 +30,11 @@ import org.apache.sis.internal.jaxb.gco.
  * complying with OGC/ISO standard. Note that the CRS is formatted using the GML schema,
  * not the ISO 19139 one.
  *
- * <p>This implementation does not contain any WML element, because doing so would require
- * the {@code sis-referencing} module. Module capable to provide an element shall create a
- * subclass like below:</p>
+ * <p>This wrapper does not declare directly the XML element, because doing so would require
+ * the implementation classes in the {@code sis-referencing} module. Instead, this wrapper
+ * declares an {@code Object} property annotated with {@code XmlAnyElement}, with a default
+ * implementation returning {@code null}. Modules capable to provide an instance shall create
+ * a subclass like below:</p>
  *
  * {@preformat java
  *     public final class MyClass extends SC_VerticalCRS implements AdapterReplacement {
@@ -36,19 +43,22 @@ import org.apache.sis.internal.jaxb.gco.
  *             marshaller.setAdapter(SC_VerticalCRS.class, this);
  *         }
  *
- *         &#64;XmlElement(name = "VerticalCRS")
+ *         &#64;Override
  *         public DefaultVerticalCRS getElement() {
  *             return skip() ? null : DefaultVerticalCRS.castOrCopy(metadata);
  *         }
- *
- *         public void setElement(final DefaultVerticalCRS metadata) {
- *             this.metadata = metadata;
- *         }
  *     }
  * }
  *
- * The path to {@code MyClass} shall be provided in the module
- * {@code META-INF/services/org.apache.sis.internal.jaxb.AdapterReplacement} file.
+ * Next, the module shall provides the following:
+ * <ul>
+ *   <li>The path to {@code MyClass} shall be provided in the module
+ *       {@code META-INF/services/org.apache.sis.internal.jaxb.AdapterReplacement} file.</li>
+ *   <li>The {@code DefaultVerticalCRS} class shall have the
+ *       {@code XmlRootElement(name = "VerticalCRS")} annotation.</li>
+ *   <li>The {@code DefaultVerticalCRS} class shall be declared by a
+ *       {@link org.apache.sis.internal.jaxb.TypeRegistration} implementation provided by the module.</li>
+ * </ul>
  *
  * @author  Guilhem Legal (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
@@ -92,4 +102,39 @@ public class SC_VerticalCRS extends Prop
     protected final Class<VerticalCRS> getBoundType() {
         return VerticalCRS.class;
     }
+
+    /**
+     * Returns the {@code DefaultVerticalCRS} generated from the metadata value.
+     * The default implementation returns {@code null}. Subclasses shall override
+     * this method like below:
+     *
+     * {@preformat java
+     *   return skip() ? null : DefaultVerticalCRS.castOrCopy(metadata);
+     * }
+     *
+     * @return The metadata to be marshalled.
+     */
+    @XmlAnyElement(lax = true)
+    public Object getElement() {
+        final LogRecord record = new LogRecord(Level.WARNING, Errors.format(
+                Errors.Keys.MissingRequiredModule_1, "sis-referencing"));
+        record.setSourceClassName(SC_VerticalCRS.class.getName());
+        record.setSourceMethodName("getElement");
+        final Context context = Context.current();
+        context.warningOccured(context, metadata, record);
+        return null;
+    }
+
+    /**
+     * Sets the value for the given {@code DefaultVerticalCRS}. If the given value is an instance
+     * of {@link VerticalCRS}, then this method assigns that value to the {@link #metadata} field.
+     * Otherwise this method does nothing.
+     *
+     * @param metadata The unmarshalled metadata.
+     */
+    public final void setElement(final Object metadata) {
+        if (metadata instanceof VerticalCRS) {
+            this.metadata = (VerticalCRS) metadata;
+        }
+    }
 }

Modified: sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultApplicationSchemaInformation.java
URL: http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultApplicationSchemaInformation.java?rev=1499824&r1=1499823&r2=1499824&view=diff
==============================================================================
--- sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultApplicationSchemaInformation.java [UTF-8] (original)
+++ sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultApplicationSchemaInformation.java [UTF-8] Thu Jul  4 17:45:34 2013
@@ -114,19 +114,21 @@ public class DefaultApplicationSchemaInf
      * 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(ApplicationSchemaInformation)
      */
     public DefaultApplicationSchemaInformation(final ApplicationSchemaInformation object) {
         super(object);
-        name                          = object.getName();
-        schemaLanguage                = object.getSchemaLanguage();
-        constraintLanguage            = object.getConstraintLanguage();
-        schemaAscii                   = object.getSchemaAscii();
-        graphicsFile                  = object.getGraphicsFile();
-        softwareDevelopmentFile       = object.getSoftwareDevelopmentFile();
-        softwareDevelopmentFileFormat = object.getSoftwareDevelopmentFileFormat();
+        if (object != null) {
+            name                          = object.getName();
+            schemaLanguage                = object.getSchemaLanguage();
+            constraintLanguage            = object.getConstraintLanguage();
+            schemaAscii                   = object.getSchemaAscii();
+            graphicsFile                  = object.getGraphicsFile();
+            softwareDevelopmentFile       = object.getSoftwareDevelopmentFile();
+            softwareDevelopmentFileFormat = object.getSoftwareDevelopmentFileFormat();
+        }
     }
 
     /**

Modified: sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultExtendedElementInformation.java
URL: http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultExtendedElementInformation.java?rev=1499824&r1=1499823&r2=1499824&view=diff
==============================================================================
--- sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultExtendedElementInformation.java [UTF-8] (original)
+++ sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultExtendedElementInformation.java [UTF-8] Thu Jul  4 17:45:34 2013
@@ -180,25 +180,27 @@ public class DefaultExtendedElementInfor
      * 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(ExtendedElementInformation)
      */
     public DefaultExtendedElementInformation(final ExtendedElementInformation object) {
         super(object);
-        name              = object.getName();
-        shortName         = object.getShortName();
-        domainCode        = object.getDomainCode();
-        definition        = object.getDefinition();
-        obligation        = object.getObligation();
-        condition         = object.getCondition();
-        dataType          = object.getDataType();
-        maximumOccurrence = object.getMaximumOccurrence();
-        domainValue       = object.getDomainValue();
-        parentEntity      = copyCollection(object.getParentEntity(), String.class);
-        rule              = object.getRule();
-        rationales        = copyCollection(object.getRationales(), InternationalString.class);
-        sources           = copyCollection(object.getSources(), ResponsibleParty.class);
+        if (object != null) {
+            name              = object.getName();
+            shortName         = object.getShortName();
+            domainCode        = object.getDomainCode();
+            definition        = object.getDefinition();
+            obligation        = object.getObligation();
+            condition         = object.getCondition();
+            dataType          = object.getDataType();
+            maximumOccurrence = object.getMaximumOccurrence();
+            domainValue       = object.getDomainValue();
+            parentEntity      = copyCollection(object.getParentEntity(), String.class);
+            rule              = object.getRule();
+            rationales        = copyCollection(object.getRationales(), InternationalString.class);
+            sources           = copyCollection(object.getSources(), ResponsibleParty.class);
+        }
     }
 
     /**

Modified: sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultFeatureTypeList.java
URL: http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultFeatureTypeList.java?rev=1499824&r1=1499823&r2=1499824&view=diff
==============================================================================
--- sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultFeatureTypeList.java [UTF-8] (original)
+++ sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultFeatureTypeList.java [UTF-8] Thu Jul  4 17:45:34 2013
@@ -75,14 +75,16 @@ public class DefaultFeatureTypeList exte
      * 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(FeatureTypeList)
      */
     public DefaultFeatureTypeList(final FeatureTypeList object) {
         super(object);
-        spatialObject     = object.getSpatialObject();
-        spatialSchemaName = object.getSpatialSchemaName();
+        if (object != null) {
+            spatialObject     = object.getSpatialObject();
+            spatialSchemaName = object.getSpatialSchemaName();
+        }
     }
 
     /**

Modified: sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java
URL: http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java?rev=1499824&r1=1499823&r2=1499824&view=diff
==============================================================================
--- sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java [UTF-8] (original)
+++ sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java [UTF-8] Thu Jul  4 17:45:34 2013
@@ -99,14 +99,16 @@ public class DefaultIdentifier extends I
      * 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(Identifier)
      */
     public DefaultIdentifier(final Identifier object) {
         super(object);
-        code      = object.getCode();
-        authority = object.getAuthority();
+        if (object != null) {
+            code      = object.getCode();
+            authority = object.getAuthority();
+        }
     }
 
     /**

Modified: sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java
URL: http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java?rev=1499824&r1=1499823&r2=1499824&view=diff
==============================================================================
--- sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java [UTF-8] (original)
+++ sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java [UTF-8] Thu Jul  4 17:45:34 2013
@@ -146,7 +146,7 @@ public class DefaultMetadata extends ISO
      * Date that the metadata was created, in milliseconds elapsed since January 1st, 1970.
      * If not defined, then then value is {@link Long#MIN_VALUE}.
      */
-    private long dateStamp;
+    private long dateStamp = Long.MIN_VALUE;
 
     /**
      * Name of the metadata standard (including profile name) used.
@@ -228,7 +228,6 @@ public class DefaultMetadata extends ISO
      * Creates an initially empty metadata.
      */
     public DefaultMetadata() {
-        dateStamp = Long.MIN_VALUE;
     }
 
     /**
@@ -253,36 +252,38 @@ public class DefaultMetadata extends ISO
      * 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(Metadata)
      */
     public DefaultMetadata(final Metadata object) {
         super(object);
-        fileIdentifier            = object.getFileIdentifier();
-        language                  = object.getLanguage();
-        characterSet              = object.getCharacterSet();
-        parentIdentifier          = object.getParentIdentifier();
-        hierarchyLevels           = copyCollection(object.getHierarchyLevels(), ScopeCode.class);
-        hierarchyLevelNames       = copyCollection(object.getHierarchyLevelNames(), String.class);
-        contacts                  = copyCollection(object.getContacts(), ResponsibleParty.class);
-        dateStamp                 = toMilliseconds(object.getDateStamp());
-        metadataStandardName      = object.getMetadataStandardName();
-        metadataStandardVersion   = object.getMetadataStandardVersion();
-        dataSetUri                = object.getDataSetUri();
-        locales                   = copyCollection(object.getLocales(), Locale.class);
-        spatialRepresentationInfo = copyCollection(object.getSpatialRepresentationInfo(), SpatialRepresentation.class);
-        referenceSystemInfo       = copyCollection(object.getReferenceSystemInfo(), ReferenceSystem.class);
-        metadataExtensionInfo     = copyCollection(object.getMetadataExtensionInfo(), MetadataExtensionInformation.class);
-        identificationInfo        = copyCollection(object.getIdentificationInfo(), Identification.class);
-        contentInfo               = copyCollection(object.getContentInfo(), ContentInformation.class);
-        distributionInfo          = object.getDistributionInfo();
-        dataQualityInfo           = copyCollection(object.getDataQualityInfo(), DataQuality.class);
-        portrayalCatalogueInfo    = copyCollection(object.getPortrayalCatalogueInfo(), PortrayalCatalogueReference.class);
-        metadataConstraints       = copyCollection(object.getMetadataConstraints(), Constraints.class);
-        applicationSchemaInfo     = copyCollection(object.getApplicationSchemaInfo(), ApplicationSchemaInformation.class);
-        metadataMaintenance       = object.getMetadataMaintenance();
-        acquisitionInformation    = copyCollection(object.getAcquisitionInformation(), AcquisitionInformation.class);
+        if (object != null) {
+            fileIdentifier            = object.getFileIdentifier();
+            language                  = object.getLanguage();
+            characterSet              = object.getCharacterSet();
+            parentIdentifier          = object.getParentIdentifier();
+            hierarchyLevels           = copyCollection(object.getHierarchyLevels(), ScopeCode.class);
+            hierarchyLevelNames       = copyCollection(object.getHierarchyLevelNames(), String.class);
+            contacts                  = copyCollection(object.getContacts(), ResponsibleParty.class);
+            dateStamp                 = toMilliseconds(object.getDateStamp());
+            metadataStandardName      = object.getMetadataStandardName();
+            metadataStandardVersion   = object.getMetadataStandardVersion();
+            dataSetUri                = object.getDataSetUri();
+            locales                   = copyCollection(object.getLocales(), Locale.class);
+            spatialRepresentationInfo = copyCollection(object.getSpatialRepresentationInfo(), SpatialRepresentation.class);
+            referenceSystemInfo       = copyCollection(object.getReferenceSystemInfo(), ReferenceSystem.class);
+            metadataExtensionInfo     = copyCollection(object.getMetadataExtensionInfo(), MetadataExtensionInformation.class);
+            identificationInfo        = copyCollection(object.getIdentificationInfo(), Identification.class);
+            contentInfo               = copyCollection(object.getContentInfo(), ContentInformation.class);
+            distributionInfo          = object.getDistributionInfo();
+            dataQualityInfo           = copyCollection(object.getDataQualityInfo(), DataQuality.class);
+            portrayalCatalogueInfo    = copyCollection(object.getPortrayalCatalogueInfo(), PortrayalCatalogueReference.class);
+            metadataConstraints       = copyCollection(object.getMetadataConstraints(), Constraints.class);
+            applicationSchemaInfo     = copyCollection(object.getApplicationSchemaInfo(), ApplicationSchemaInformation.class);
+            metadataMaintenance       = object.getMetadataMaintenance();
+            acquisitionInformation    = copyCollection(object.getAcquisitionInformation(), AcquisitionInformation.class);
+        }
     }
 
     /**

Modified: sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadataExtensionInformation.java
URL: http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadataExtensionInformation.java?rev=1499824&r1=1499823&r2=1499824&view=diff
==============================================================================
--- sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadataExtensionInformation.java [UTF-8] (original)
+++ sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadataExtensionInformation.java [UTF-8] Thu Jul  4 17:45:34 2013
@@ -71,14 +71,16 @@ public class DefaultMetadataExtensionInf
      * 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(MetadataExtensionInformation)
      */
     public DefaultMetadataExtensionInformation(final MetadataExtensionInformation object) {
         super(object);
-        extensionOnLineResource    = object.getExtensionOnLineResource();
-        extendedElementInformation = copyCollection(object.getExtendedElementInformation(), ExtendedElementInformation.class);
+        if (object != null) {
+            extensionOnLineResource    = object.getExtensionOnLineResource();
+            extendedElementInformation = copyCollection(object.getExtendedElementInformation(), ExtendedElementInformation.class);
+        }
     }
 
     /**

Modified: sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultPortrayalCatalogueReference.java
URL: http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultPortrayalCatalogueReference.java?rev=1499824&r1=1499823&r2=1499824&view=diff
==============================================================================
--- sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultPortrayalCatalogueReference.java [UTF-8] (original)
+++ sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultPortrayalCatalogueReference.java [UTF-8] Thu Jul  4 17:45:34 2013
@@ -69,13 +69,15 @@ public class DefaultPortrayalCatalogueRe
      * 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(PortrayalCatalogueReference)
      */
     public DefaultPortrayalCatalogueReference(final PortrayalCatalogueReference object) {
         super(object);
-        portrayalCatalogueCitations = copyCollection(object.getPortrayalCatalogueCitations(), Citation.class);
+        if (object != null) {
+            portrayalCatalogueCitations = copyCollection(object.getPortrayalCatalogueCitations(), Citation.class);
+        }
     }
 
     /**

Modified: sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java
URL: http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java?rev=1499824&r1=1499823&r2=1499824&view=diff
==============================================================================
--- sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java [UTF-8] (original)
+++ sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java [UTF-8] Thu Jul  4 17:45:34 2013
@@ -34,7 +34,6 @@ import org.apache.sis.metadata.Modifiabl
 import org.apache.sis.internal.jaxb.IdentifierMapWithSpecialCases;
 import org.apache.sis.internal.jaxb.Context;
 import org.apache.sis.util.logging.Logging;
-import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.CharSequences;
 import org.apache.sis.util.ThreadSafe;
 
@@ -82,10 +81,9 @@ public class ISOMetadata extends Modifia
      * If the given object is an instance of {@link IdentifiedObject}, then this constructor
      * copies the {@linkplain #identifiers collection of identifiers}.
      *
-     * @param object The metadata to copy values from.
+     * @param object The metadata to copy values from, or {@code null} if none.
      */
     protected ISOMetadata(final Object object) {
-        ArgumentChecks.ensureNonNull("object", object);
         if (object instanceof IdentifiedObject) {
             identifiers = copyCollection(((IdentifiedObject) object).getIdentifiers(), Identifier.class);
         }

Modified: sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultAcquisitionInformation.java
URL: http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultAcquisitionInformation.java?rev=1499824&r1=1499823&r2=1499824&view=diff
==============================================================================
--- sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultAcquisitionInformation.java [UTF-8] (original)
+++ sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultAcquisitionInformation.java [UTF-8] Thu Jul  4 17:45:34 2013
@@ -103,19 +103,21 @@ public class DefaultAcquisitionInformati
      * 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(AcquisitionInformation)
      */
     public DefaultAcquisitionInformation(final AcquisitionInformation object) {
         super(object);
-        acquisitionPlans        = copyCollection(object.getAcquisitionPlans(), Plan.class);
-        acquisitionRequirements = copyCollection(object.getAcquisitionRequirements(), Requirement.class);
-        environmentalConditions = object.getEnvironmentalConditions();
-        instruments             = copyCollection(object.getInstruments(), Instrument.class);
-        objectives              = copyCollection(object.getObjectives(), Objective.class);
-        operations              = copyCollection(object.getOperations(), Operation.class);
-        platforms               = copyCollection(object.getPlatforms(), Platform.class);
+        if (object != null) {
+            acquisitionPlans        = copyCollection(object.getAcquisitionPlans(), Plan.class);
+            acquisitionRequirements = copyCollection(object.getAcquisitionRequirements(), Requirement.class);
+            environmentalConditions = object.getEnvironmentalConditions();
+            instruments             = copyCollection(object.getInstruments(), Instrument.class);
+            objectives              = copyCollection(object.getObjectives(), Objective.class);
+            operations              = copyCollection(object.getOperations(), Operation.class);
+            platforms               = copyCollection(object.getPlatforms(), Platform.class);
+        }
     }
 
     /**

Modified: sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultEnvironmentalRecord.java
URL: http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultEnvironmentalRecord.java?rev=1499824&r1=1499823&r2=1499824&view=diff
==============================================================================
--- sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultEnvironmentalRecord.java [UTF-8] (original)
+++ sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultEnvironmentalRecord.java [UTF-8] Thu Jul  4 17:45:34 2013
@@ -78,16 +78,18 @@ public class DefaultEnvironmentalRecord 
      * 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(EnvironmentalRecord)
      */
     public DefaultEnvironmentalRecord(final EnvironmentalRecord object) {
         super(object);
-        averageAirTemperature    = object.getAverageAirTemperature();
-        maxRelativeHumidity      = object.getMaxRelativeHumidity();
-        maxAltitude              = object.getMaxAltitude();
-        meteorologicalConditions = object.getMeteorologicalConditions();
+        if (object != null) {
+            averageAirTemperature    = object.getAverageAirTemperature();
+            maxRelativeHumidity      = object.getMaxRelativeHumidity();
+            maxAltitude              = object.getMaxAltitude();
+            meteorologicalConditions = object.getMeteorologicalConditions();
+        }
     }
 
     /**

Modified: sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultEvent.java
URL: http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultEvent.java?rev=1499824&r1=1499823&r2=1499824&view=diff
==============================================================================
--- sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultEvent.java [UTF-8] (original)
+++ sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultEvent.java [UTF-8] Thu Jul  4 17:45:34 2013
@@ -80,7 +80,7 @@ public class DefaultEvent extends ISOMet
     /**
      * Time the event occurred, or {@link Long#MIN_VALUE} if none.
      */
-    private long time;
+    private long time = Long.MIN_VALUE;
 
     /**
      * Objective or objectives satisfied by an event.
@@ -101,7 +101,6 @@ public class DefaultEvent extends ISOMet
      * Constructs an initially empty acquisition information.
      */
     public DefaultEvent() {
-        time = Long.MIN_VALUE;
     }
 
     /**
@@ -109,20 +108,22 @@ public class DefaultEvent 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(Event)
      */
     public DefaultEvent(final Event object) {
         super(object);
-        identifiers        = singleton(object.getIdentifier(), Identifier.class);
-        trigger            = object.getTrigger();
-        context            = object.getContext();
-        sequence           = object.getSequence();
-        time               = toMilliseconds(object.getTime());
-        expectedObjectives = copyCollection(object.getExpectedObjectives(), Objective.class);
-        relatedPass        = object.getRelatedPass();
-        relatedSensors     = copyCollection(object.getRelatedSensors(), Instrument.class);
+        if (object != null) {
+            identifiers        = singleton(object.getIdentifier(), Identifier.class);
+            trigger            = object.getTrigger();
+            context            = object.getContext();
+            sequence           = object.getSequence();
+            time               = toMilliseconds(object.getTime());
+            expectedObjectives = copyCollection(object.getExpectedObjectives(), Objective.class);
+            relatedPass        = object.getRelatedPass();
+            relatedSensors     = copyCollection(object.getRelatedSensors(), Instrument.class);
+        }
     }
 
     /**

Modified: sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultInstrument.java
URL: http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultInstrument.java?rev=1499824&r1=1499823&r2=1499824&view=diff
==============================================================================
--- sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultInstrument.java [UTF-8] (original)
+++ sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultInstrument.java [UTF-8] Thu Jul  4 17:45:34 2013
@@ -83,17 +83,19 @@ public class DefaultInstrument extends I
      * 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(Instrument)
      */
     public DefaultInstrument(final Instrument object) {
         super(object);
-        citations   = copyCollection(object.getCitations(), Citation.class);
-        identifiers = singleton(object.getIdentifier(), Identifier.class);
-        type        = object.getType();
-        description = object.getDescription();
-        mountedOn   = object.getMountedOn();
+        if (object != null) {
+            citations   = copyCollection(object.getCitations(), Citation.class);
+            identifiers = singleton(object.getIdentifier(), Identifier.class);
+            type        = object.getType();
+            description = object.getDescription();
+            mountedOn   = object.getMountedOn();
+        }
     }
 
     /**

Modified: sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultObjective.java
URL: http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultObjective.java?rev=1499824&r1=1499823&r2=1499824&view=diff
==============================================================================
--- sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultObjective.java [UTF-8] (original)
+++ sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultObjective.java [UTF-8] Thu Jul  4 17:45:34 2013
@@ -106,20 +106,22 @@ public class DefaultObjective 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(Objective)
      */
     public DefaultObjective(final Objective object) {
         super(object);
-        identifiers         = copyCollection(object.getIdentifiers(), Identifier.class);
-        priority            = object.getPriority();
-        types               = copyCollection(object.getTypes(), ObjectiveType.class);
-        functions           = copyCollection(object.getFunctions(), InternationalString.class);
-        extents             = copyCollection(object.getExtents(), Extent.class);
-        objectiveOccurences = copyCollection(object.getObjectiveOccurences(), Event.class);
-        pass                = copyCollection(object.getPass(), PlatformPass.class);
-        sensingInstruments  = copyCollection(object.getSensingInstruments(), Instrument.class);
+        if (object != null) {
+            identifiers         = copyCollection(object.getIdentifiers(), Identifier.class);
+            priority            = object.getPriority();
+            types               = copyCollection(object.getTypes(), ObjectiveType.class);
+            functions           = copyCollection(object.getFunctions(), InternationalString.class);
+            extents             = copyCollection(object.getExtents(), Extent.class);
+            objectiveOccurences = copyCollection(object.getObjectiveOccurences(), Event.class);
+            pass                = copyCollection(object.getPass(), PlatformPass.class);
+            sensingInstruments  = copyCollection(object.getSensingInstruments(), Instrument.class);
+        }
     }
 
     /**

Modified: sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultOperation.java
URL: http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultOperation.java?rev=1499824&r1=1499823&r2=1499824&view=diff
==============================================================================
--- sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultOperation.java [UTF-8] (original)
+++ sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultOperation.java [UTF-8] Thu Jul  4 17:45:34 2013
@@ -125,23 +125,25 @@ public class DefaultOperation 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(Operation)
      */
     public DefaultOperation(final Operation object) {
         super(object);
-        description       = object.getDescription();
-        citation          = object.getCitation();
-        identifiers       = singleton(object.getIdentifier(), Identifier.class);
-        status            = object.getStatus();
-        type              = object.getType();
-        childOperations   = copyCollection(object.getChildOperations(), Operation.class);
-        objectives        = copyCollection(object.getObjectives(), Objective.class);
-        parentOperation   = object.getParentOperation();
-        plan              = object.getPlan();
-        platforms         = copyCollection(object.getPlatforms(), Platform.class);
-        significantEvents = copyCollection(object.getSignificantEvents(), Event.class);
+        if (object != null) {
+            description       = object.getDescription();
+            citation          = object.getCitation();
+            identifiers       = singleton(object.getIdentifier(), Identifier.class);
+            status            = object.getStatus();
+            type              = object.getType();
+            childOperations   = copyCollection(object.getChildOperations(), Operation.class);
+            objectives        = copyCollection(object.getObjectives(), Objective.class);
+            parentOperation   = object.getParentOperation();
+            plan              = object.getPlan();
+            platforms         = copyCollection(object.getPlatforms(), Platform.class);
+            significantEvents = copyCollection(object.getSignificantEvents(), Event.class);
+        }
     }
 
     /**

Modified: sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultPlan.java
URL: http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultPlan.java?rev=1499824&r1=1499823&r2=1499824&view=diff
==============================================================================
--- sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultPlan.java [UTF-8] (original)
+++ sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultPlan.java [UTF-8] Thu Jul  4 17:45:34 2013
@@ -88,17 +88,19 @@ public class DefaultPlan extends ISOMeta
      * 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(Plan)
      */
     public DefaultPlan(final Plan object) {
         super(object);
-        type                  = object.getType();
-        status                = object.getStatus();
-        citation              = object.getCitation();
-        operations            = copyCollection(object.getOperations(), Operation.class);
-        satisfiedRequirements = copyCollection(object.getSatisfiedRequirements(), Requirement.class);
+        if (object != null) {
+            type                  = object.getType();
+            status                = object.getStatus();
+            citation              = object.getCitation();
+            operations            = copyCollection(object.getOperations(), Operation.class);
+            satisfiedRequirements = copyCollection(object.getSatisfiedRequirements(), Requirement.class);
+        }
     }
 
     /**

Modified: sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultPlatform.java
URL: http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultPlatform.java?rev=1499824&r1=1499823&r2=1499824&view=diff
==============================================================================
--- sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultPlatform.java [UTF-8] (original)
+++ sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultPlatform.java [UTF-8] Thu Jul  4 17:45:34 2013
@@ -84,17 +84,19 @@ public class DefaultPlatform extends ISO
      * 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(Platform)
      */
     public DefaultPlatform(final Platform object) {
         super(object);
-        citation    = object.getCitation();
-        identifiers = singleton(object.getIdentifier(), Identifier.class);
-        description = object.getDescription();
-        sponsors    = copyCollection(object.getSponsors(), ResponsibleParty.class);
-        instruments = copyCollection(object.getInstruments(), Instrument.class);
+        if (object != null) {
+            citation    = object.getCitation();
+            identifiers = singleton(object.getIdentifier(), Identifier.class);
+            description = object.getDescription();
+            sponsors    = copyCollection(object.getSponsors(), ResponsibleParty.class);
+            instruments = copyCollection(object.getInstruments(), Instrument.class);
+        }
     }
 
     /**

Modified: sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultPlatformPass.java
URL: http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultPlatformPass.java?rev=1499824&r1=1499823&r2=1499824&view=diff
==============================================================================
--- sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultPlatformPass.java [UTF-8] (original)
+++ sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultPlatformPass.java [UTF-8] Thu Jul  4 17:45:34 2013
@@ -70,15 +70,17 @@ public class DefaultPlatformPass 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(PlatformPass)
      */
     public DefaultPlatformPass(final PlatformPass object) {
         super(object);
-        identifiers   = singleton(object.getIdentifier(), Identifier.class);
-        extent        = object.getExtent();
-        relatedEvents = copyCollection(object.getRelatedEvents(), Event.class);
+        if (object != null) {
+            identifiers   = singleton(object.getIdentifier(), Identifier.class);
+            extent        = object.getExtent();
+            relatedEvents = copyCollection(object.getRelatedEvents(), Event.class);
+        }
     }
 
     /**

Modified: sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultRequestedDate.java
URL: http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultRequestedDate.java?rev=1499824&r1=1499823&r2=1499824&view=diff
==============================================================================
--- sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultRequestedDate.java [UTF-8] (original)
+++ sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultRequestedDate.java [UTF-8] Thu Jul  4 17:45:34 2013
@@ -51,20 +51,18 @@ public class DefaultRequestedDate extend
      * Preferred date and time of collection,
      * or {@link Long#MIN_VALUE} if none.
      */
-    private long requestedDateOfCollection;
+    private long requestedDateOfCollection = Long.MIN_VALUE;
 
     /**
      * Latest date and time collection must be completed,
      * or {@link Long#MIN_VALUE} if none.
      */
-    private long latestAcceptableDate;
+    private long latestAcceptableDate = Long.MIN_VALUE;
 
     /**
      * Constructs an initially empty requested date.
      */
     public DefaultRequestedDate() {
-        requestedDateOfCollection = Long.MIN_VALUE;
-        latestAcceptableDate = Long.MIN_VALUE;
     }
 
     /**
@@ -72,14 +70,16 @@ public class DefaultRequestedDate 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(RequestedDate)
      */
     public DefaultRequestedDate(final RequestedDate object) {
         super(object);
-        requestedDateOfCollection = toMilliseconds(object.getRequestedDateOfCollection());
-        latestAcceptableDate      = toMilliseconds(object.getLatestAcceptableDate());
+        if (object != null) {
+            requestedDateOfCollection = toMilliseconds(object.getRequestedDateOfCollection());
+            latestAcceptableDate      = toMilliseconds(object.getLatestAcceptableDate());
+        }
     }
 
     /**

Modified: sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultRequirement.java
URL: http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultRequirement.java?rev=1499824&r1=1499823&r2=1499824&view=diff
==============================================================================
--- sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultRequirement.java [UTF-8] (original)
+++ sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultRequirement.java [UTF-8] Thu Jul  4 17:45:34 2013
@@ -90,7 +90,7 @@ public class DefaultRequirement extends 
      * Date and time after which collection is no longer valid,
      * or {@link Long#MIN_VALUE} if none.
      */
-    private long expiryDate;
+    private long expiryDate = Long.MIN_VALUE;
 
     /**
      * Plan that identifies solution to satisfy the requirement.
@@ -101,7 +101,6 @@ public class DefaultRequirement extends 
      * Constructs an initially empty requirement.
      */
     public DefaultRequirement() {
-        expiryDate = Long.MIN_VALUE;
     }
 
     /**
@@ -109,20 +108,22 @@ public class DefaultRequirement 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(Requirement)
      */
     public DefaultRequirement(final Requirement object) {
         super(object);
-        citation       = object.getCitation();
-        identifiers    = singleton(object.getIdentifier(), Identifier.class);
-        requestors     = copyCollection(object.getRequestors(), ResponsibleParty.class);
-        recipients     = copyCollection(object.getRecipients(), ResponsibleParty.class);
-        priority       = object.getPriority();
-        requestedDate  = object.getRequestedDate();
-        expiryDate     = toMilliseconds(object.getExpiryDate());
-        satisfiedPlans = copyCollection(object.getSatisfiedPlans(), Plan.class);
+        if (object != null) {
+            citation       = object.getCitation();
+            identifiers    = singleton(object.getIdentifier(), Identifier.class);
+            requestors     = copyCollection(object.getRequestors(), ResponsibleParty.class);
+            recipients     = copyCollection(object.getRecipients(), ResponsibleParty.class);
+            priority       = object.getPriority();
+            requestedDate  = object.getRequestedDate();
+            expiryDate     = toMilliseconds(object.getExpiryDate());
+            satisfiedPlans = copyCollection(object.getSatisfiedPlans(), Plan.class);
+        }
     }
 
     /**

Modified: sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultAddress.java
URL: http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultAddress.java?rev=1499824&r1=1499823&r2=1499824&view=diff
==============================================================================
--- sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultAddress.java [UTF-8] (original)
+++ sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultAddress.java [UTF-8] Thu Jul  4 17:45:34 2013
@@ -91,18 +91,20 @@ public class DefaultAddress extends ISOM
      * 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(Address)
      */
     public DefaultAddress(final Address object) {
         super(object);
-        deliveryPoints          = copyCollection(object.getDeliveryPoints(), String.class);
-        city                    = object.getCity();
-        administrativeArea      = object.getAdministrativeArea();
-        postalCode              = object.getPostalCode();
-        country                 = object.getCountry();
-        electronicMailAddresses = copyCollection(object.getElectronicMailAddresses(), String.class);
+        if (object != null) {
+            deliveryPoints          = copyCollection(object.getDeliveryPoints(), String.class);
+            city                    = object.getCity();
+            administrativeArea      = object.getAdministrativeArea();
+            postalCode              = object.getPostalCode();
+            country                 = object.getCountry();
+            electronicMailAddresses = copyCollection(object.getElectronicMailAddresses(), String.class);
+        }
     }
 
     /**

Modified: sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java
URL: http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java?rev=1499824&r1=1499823&r2=1499824&view=diff
==============================================================================
--- sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java [UTF-8] (original)
+++ sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java [UTF-8] Thu Jul  4 17:45:34 2013
@@ -122,7 +122,7 @@ public class DefaultCitation extends ISO
      * Date of the edition in milliseconds elapsed sine January 1st, 1970,
      * or {@link Long#MIN_VALUE} if none.
      */
-    private long editionDate;
+    private long editionDate = Long.MIN_VALUE;
 
     /**
      * Name and position information for an individual or organization that is responsible
@@ -158,7 +158,6 @@ public class DefaultCitation extends ISO
      * Constructs an initially empty citation.
      */
     public DefaultCitation() {
-        editionDate = Long.MIN_VALUE;
     }
 
     /**
@@ -168,7 +167,6 @@ public class DefaultCitation extends ISO
      *        or {@code null} if none.
      */
     public DefaultCitation(final CharSequence title) {
-        this(); // Initialize the date field.
         this.title = Types.toInternationalString(title);
     }
 
@@ -184,7 +182,6 @@ public class DefaultCitation extends ISO
      *              responsible for the resource, or {@code null} if none.
      */
     public DefaultCitation(final ResponsibleParty party) {
-        this(); // Initialize the date field.
         if (party != null) {
             citedResponsibleParties = singleton(party, ResponsibleParty.class);
             title = party.getOrganisationName();
@@ -205,29 +202,31 @@ public class DefaultCitation extends ISO
      * 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(Citation)
      */
     public DefaultCitation(final Citation object) {
         super(object);
-        title                   = object.getTitle();
-        alternateTitles         = copyCollection(object.getAlternateTitles(), InternationalString.class);
-        dates                   = copyCollection(object.getDates(), CitationDate.class);
-        edition                 = object.getEdition();
-        editionDate             = toMilliseconds(object.getEditionDate());
-        identifiers             = copyCollection(object.getIdentifiers(), Identifier.class);
-        citedResponsibleParties = copyCollection(object.getCitedResponsibleParties(), ResponsibleParty.class);
-        presentationForms       = copyCollection(object.getPresentationForms(), PresentationForm.class);
-        series                  = object.getSeries();
-        otherCitationDetails    = object.getOtherCitationDetails();
-        collectiveTitle         = object.getCollectiveTitle();
-        final String id1        = object.getISBN();
-        final String id2        = object.getISSN();
-        if (id1 != null || id2 != null) {
-            final IdentifierMap map = super.getIdentifierMap();
-            if (id1 != null) map.putSpecialized(ISBN, id1);
-            if (id2 != null) map.putSpecialized(ISSN, id2);
+        if (object != null) {
+            title                   = object.getTitle();
+            alternateTitles         = copyCollection(object.getAlternateTitles(), InternationalString.class);
+            dates                   = copyCollection(object.getDates(), CitationDate.class);
+            edition                 = object.getEdition();
+            editionDate             = toMilliseconds(object.getEditionDate());
+            identifiers             = copyCollection(object.getIdentifiers(), Identifier.class);
+            citedResponsibleParties = copyCollection(object.getCitedResponsibleParties(), ResponsibleParty.class);
+            presentationForms       = copyCollection(object.getPresentationForms(), PresentationForm.class);
+            series                  = object.getSeries();
+            otherCitationDetails    = object.getOtherCitationDetails();
+            collectiveTitle         = object.getCollectiveTitle();
+            final String id1        = object.getISBN();
+            final String id2        = object.getISSN();
+            if (id1 != null || id2 != null) {
+                final IdentifierMap map = super.getIdentifierMap();
+                if (id1 != null) map.putSpecialized(ISBN, id1);
+                if (id2 != null) map.putSpecialized(ISSN, id2);
+            }
         }
     }
 

Modified: sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitationDate.java
URL: http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitationDate.java?rev=1499824&r1=1499823&r2=1499824&view=diff
==============================================================================
--- sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitationDate.java [UTF-8] (original)
+++ sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitationDate.java [UTF-8] Thu Jul  4 17:45:34 2013
@@ -52,7 +52,7 @@ public class DefaultCitationDate extends
      * Reference date for the cited resource in milliseconds elapsed sine January 1st, 1970,
      * or {@link Long#MIN_VALUE} if none.
      */
-    private long date;
+    private long date = Long.MIN_VALUE;
 
     /**
      * Event used for reference date.
@@ -63,7 +63,6 @@ public class DefaultCitationDate extends
      * Constructs an initially empty citation date.
      */
     public DefaultCitationDate() {
-        date = Long.MIN_VALUE;
     }
 
     /**
@@ -82,14 +81,16 @@ public class DefaultCitationDate 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(CitationDate)
      */
     public DefaultCitationDate(final CitationDate object) {
         super(object);
-        date     = toMilliseconds(object.getDate());
-        dateType = object.getDateType();
+        if (object != null) {
+            date     = toMilliseconds(object.getDate());
+            dateType = object.getDateType();
+        }
     }
 
     /**

Modified: sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultContact.java
URL: http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultContact.java?rev=1499824&r1=1499823&r2=1499824&view=diff
==============================================================================
--- sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultContact.java [UTF-8] (original)
+++ sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultContact.java [UTF-8] Thu Jul  4 17:45:34 2013
@@ -97,17 +97,19 @@ public class DefaultContact extends ISOM
      * 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(Contact)
      */
     public DefaultContact(final Contact object) {
         super(object);
-        phone               = object.getPhone();
-        address             = object.getAddress();
-        onlineResource      = object.getOnlineResource();
-        hoursOfService      = object.getHoursOfService();
-        contactInstructions = object.getContactInstructions();
+        if (object != null) {
+            phone               = object.getPhone();
+            address             = object.getAddress();
+            onlineResource      = object.getOnlineResource();
+            hoursOfService      = object.getHoursOfService();
+            contactInstructions = object.getContactInstructions();
+        }
     }
 
     /**

Modified: sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultOnlineResource.java
URL: http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultOnlineResource.java?rev=1499824&r1=1499823&r2=1499824&view=diff
==============================================================================
--- sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultOnlineResource.java [UTF-8] (original)
+++ sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultOnlineResource.java [UTF-8] Thu Jul  4 17:45:34 2013
@@ -104,18 +104,20 @@ public class DefaultOnlineResource 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(OnlineResource)
      */
     public DefaultOnlineResource(final OnlineResource object) {
         super(object);
-        linkage            = object.getLinkage();
-        protocol           = object.getProtocol();
-        applicationProfile = object.getApplicationProfile();
-        name               = object.getName();
-        description        = object.getDescription();
-        function           = object.getFunction();
+        if (object != null) {
+            linkage            = object.getLinkage();
+            protocol           = object.getProtocol();
+            applicationProfile = object.getApplicationProfile();
+            name               = object.getName();
+            description        = object.getDescription();
+            function           = object.getFunction();
+        }
     }
 
     /**

Modified: sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibleParty.java
URL: http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibleParty.java?rev=1499824&r1=1499823&r2=1499824&view=diff
==============================================================================
--- sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibleParty.java [UTF-8] (original)
+++ sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibleParty.java [UTF-8] Thu Jul  4 17:45:34 2013
@@ -96,17 +96,19 @@ public class DefaultResponsibleParty 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(ResponsibleParty)
      */
     public DefaultResponsibleParty(final ResponsibleParty object) {
         super(object);
-        individualName   = object.getIndividualName();
-        organisationName = object.getOrganisationName();
-        positionName     = object.getPositionName();
-        contactInfo      = object.getContactInfo();
-        role             = object.getRole();
+        if (object != null) {
+            individualName   = object.getIndividualName();
+            organisationName = object.getOrganisationName();
+            positionName     = object.getPositionName();
+            contactInfo      = object.getContactInfo();
+            role             = object.getRole();
+        }
     }
 
     /**

Modified: sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultSeries.java
URL: http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultSeries.java?rev=1499824&r1=1499823&r2=1499824&view=diff
==============================================================================
--- sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultSeries.java [UTF-8] (original)
+++ sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultSeries.java [UTF-8] Thu Jul  4 17:45:34 2013
@@ -81,15 +81,17 @@ public class DefaultSeries extends ISOMe
      * 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(Series)
      */
     public DefaultSeries(final Series object) {
         super(object);
-        name                = object.getName();
-        issueIdentification = object.getIssueIdentification();
-        page                = object.getPage();
+        if (object != null) {
+            name                = object.getName();
+            issueIdentification = object.getIssueIdentification();
+            page                = object.getPage();
+        }
     }
 
     /**

Modified: sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultTelephone.java
URL: http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultTelephone.java?rev=1499824&r1=1499823&r2=1499824&view=diff
==============================================================================
--- sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultTelephone.java [UTF-8] (original)
+++ sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultTelephone.java [UTF-8] Thu Jul  4 17:45:34 2013
@@ -65,14 +65,16 @@ public class DefaultTelephone 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(Telephone)
      */
     public DefaultTelephone(final Telephone object) {
         super(object);
-        voices     = copyCollection(object.getVoices(), String.class);
-        facsimiles = copyCollection(object.getFacsimiles(), String.class);
+        if (object != null) {
+            voices     = copyCollection(object.getVoices(), String.class);
+            facsimiles = copyCollection(object.getFacsimiles(), String.class);
+        }
     }
 
     /**

Modified: sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultConstraints.java
URL: http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultConstraints.java?rev=1499824&r1=1499823&r2=1499824&view=diff
==============================================================================
--- sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultConstraints.java [UTF-8] (original)
+++ sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultConstraints.java [UTF-8] Thu Jul  4 17:45:34 2013
@@ -77,13 +77,15 @@ public class DefaultConstraints 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(Constraints)
      */
     public DefaultConstraints(final Constraints object) {
         super(object);
-        useLimitations = copyCollection(object.getUseLimitations(), InternationalString.class);
+        if (object != null) {
+            useLimitations = copyCollection(object.getUseLimitations(), InternationalString.class);
+        }
     }
 
     /**

Modified: sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultLegalConstraints.java
URL: http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultLegalConstraints.java?rev=1499824&r1=1499823&r2=1499824&view=diff
==============================================================================
--- sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultLegalConstraints.java [UTF-8] (original)
+++ sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultLegalConstraints.java [UTF-8] Thu Jul  4 17:45:34 2013
@@ -91,15 +91,17 @@ public class DefaultLegalConstraints 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(LegalConstraints)
      */
     public DefaultLegalConstraints(final LegalConstraints object) {
         super(object);
-        accessConstraints = copyCollection(object.getAccessConstraints(), Restriction.class);
-        useConstraints    = copyCollection(object.getUseConstraints(), Restriction.class);
-        otherConstraints  = copyCollection(object.getOtherConstraints(), InternationalString.class);
+        if (object != null) {
+            accessConstraints = copyCollection(object.getAccessConstraints(), Restriction.class);
+            useConstraints    = copyCollection(object.getUseConstraints(), Restriction.class);
+            otherConstraints  = copyCollection(object.getOtherConstraints(), InternationalString.class);
+        }
     }
 
     /**

Modified: sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultSecurityConstraints.java
URL: http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultSecurityConstraints.java?rev=1499824&r1=1499823&r2=1499824&view=diff
==============================================================================
--- sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultSecurityConstraints.java [UTF-8] (original)
+++ sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultSecurityConstraints.java [UTF-8] Thu Jul  4 17:45:34 2013
@@ -97,16 +97,18 @@ public class DefaultSecurityConstraints 
      * 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(SecurityConstraints)
      */
     public DefaultSecurityConstraints(final SecurityConstraints object) {
         super(object);
-        classification       = object.getClassification();
-        userNote             = object.getUserNote();
-        classificationSystem = object.getClassificationSystem();
-        handlingDescription  = object.getHandlingDescription();
+        if (object != null) {
+            classification       = object.getClassification();
+            userNote             = object.getUserNote();
+            classificationSystem = object.getClassificationSystem();
+            handlingDescription  = object.getHandlingDescription();
+        }
     }
 
     /**

Modified: sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/AbstractContentInformation.java
URL: http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/AbstractContentInformation.java?rev=1499824&r1=1499823&r2=1499824&view=diff
==============================================================================
--- sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/AbstractContentInformation.java [UTF-8] (original)
+++ sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/AbstractContentInformation.java [UTF-8] Thu Jul  4 17:45:34 2013
@@ -58,7 +58,7 @@ public class AbstractContentInformation 
      * 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(ContentInformation)
      */

Modified: sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultBand.java
URL: http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultBand.java?rev=1499824&r1=1499823&r2=1499824&view=diff
==============================================================================
--- sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultBand.java [UTF-8] (original)
+++ sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultBand.java [UTF-8] Thu Jul  4 17:45:34 2013
@@ -151,25 +151,27 @@ public class DefaultBand extends Default
      * 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(Band)
      */
     public DefaultBand(final Band object) {
         super(object);
-        maxValue                 = object.getMaxValue();
-        minValue                 = object.getMinValue();
-        units                    = object.getUnits();
-        peakResponse             = object.getPeakResponse();
-        bitsPerValue             = object.getBitsPerValue();
-        toneGradation            = object.getToneGradation();
-        scaleFactor              = object.getScaleFactor();
-        offset                   = object.getOffset();
-        bandBoundaryDefinition   = object.getBandBoundaryDefinition();
-        nominalSpatialResolution = object.getNominalSpatialResolution();
-        transferFunctionType     = object.getTransferFunctionType();
-        transmittedPolarization  = object.getTransmittedPolarization();
-        detectedPolarization     = object.getDetectedPolarization();
+        if (object != null) {
+            maxValue                 = object.getMaxValue();
+            minValue                 = object.getMinValue();
+            units                    = object.getUnits();
+            peakResponse             = object.getPeakResponse();
+            bitsPerValue             = object.getBitsPerValue();
+            toneGradation            = object.getToneGradation();
+            scaleFactor              = object.getScaleFactor();
+            offset                   = object.getOffset();
+            bandBoundaryDefinition   = object.getBandBoundaryDefinition();
+            nominalSpatialResolution = object.getNominalSpatialResolution();
+            transferFunctionType     = object.getTransferFunctionType();
+            transmittedPolarization  = object.getTransmittedPolarization();
+            detectedPolarization     = object.getDetectedPolarization();
+        }
     }
 
     /**



Mime
View raw message