sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1605540 - in /sis/branches/JDK6: ./ core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/ core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ core/sis-metadata/src/main/java/org/apache/sis/metadata/ core/sis-...
Date Wed, 25 Jun 2014 18:27:52 GMT
Author: desruisseaux
Date: Wed Jun 25 18:27:51 2014
New Revision: 1605540

URL: http://svn.apache.org/r1605540
Log:
Merge partial work for SIS-94 (upgrade to ISO 19115:2014).

Added:
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/CI_Party.java
      - copied unchanged from r1605537, sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/CI_Party.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/CI_Responsibility.java
      - copied unchanged from r1605537, sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/CI_Responsibility.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_AssociatedResource.java
      - copied unchanged from r1605537, sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_AssociatedResource.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_AttributeGroup.java
      - copied unchanged from r1605537, sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_AttributeGroup.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/LegacyProperties.java
      - copied unchanged from r1605537, sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/LegacyProperties.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/AbstractParty.java
      - copied unchanged from r1605537, sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/AbstractParty.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibility.java
      - copied unchanged from r1605537, sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibility.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultAttributeGroup.java
      - copied unchanged from r1605537, sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultAttributeGroup.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultFeatureTypeInfo.java
      - copied unchanged from r1605537, sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultFeatureTypeInfo.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAssociatedResource.java
      - copied unchanged from r1605537, sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAssociatedResource.java
Modified:
    sis/branches/JDK6/   (props changed)
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/StandardImplementation.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibleParty.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultConstraints.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultBrowseGraphic.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultLineage.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java
    sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultDimension.java
    sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java

Propchange: sis/branches/JDK6/
------------------------------------------------------------------------------
  Merged /sis/branches/JDK8:r1605108-1605536
  Merged /sis/branches/JDK7:r1605110-1605537

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/StandardImplementation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/StandardImplementation.java?rev=1605540&r1=1605539&r2=1605540&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/StandardImplementation.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/StandardImplementation.java [UTF-8] Wed Jun 25 18:27:51 2014
@@ -140,10 +140,8 @@ final class StandardImplementation exten
                     name = buffer.toString();
                     try {
                         candidate = Class.forName(name);
-                        if (!candidate.isAnnotationPresent(Deprecated.class)) {
-                            implementations.put(type, candidate);
-                            return candidate;
-                        }
+                        implementations.put(type, candidate);
+                        return candidate;
                     } catch (ClassNotFoundException e) {
                         Logging.recoverableException(MetadataStandard.class, "getImplementation", e);
                     }

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibleParty.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibleParty.java?rev=1605540&r1=1605539&r2=1605540&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibleParty.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibleParty.java [UTF-8] Wed Jun 25 18:27:51 2014
@@ -23,20 +23,23 @@ import org.opengis.metadata.citation.Con
 import org.opengis.metadata.citation.ResponsibleParty;
 import org.opengis.metadata.citation.Role;
 import org.opengis.util.InternationalString;
-import org.apache.sis.metadata.iso.ISOMetadata;
 
 
 /**
  * Identification of, and means of communication with, person(s) and
  * organizations associated with the dataset.
  *
+ * @deprecated As of ISO 19115:2014, the {@code ResponsibleParty} type has been replaced by {@code Responsibility}
+ *             to allow more flexible associations of individuals, organisations, and roles.
+ *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @author  Touraïvane (IRD)
  * @author  Cédric Briançon (Geomatys)
  * @since   0.3 (derived from geotk-2.1)
- * @version 0.3
+ * @version 0.5
  * @module
  */
+@Deprecated
 @XmlType(name = "CI_ResponsibleParty_Type", propOrder = {
     "individualName",
     "organisationName",
@@ -45,11 +48,11 @@ import org.apache.sis.metadata.iso.ISOMe
     "role"
 })
 @XmlRootElement(name = "CI_ResponsibleParty")
-public class DefaultResponsibleParty extends ISOMetadata implements ResponsibleParty {
+public class DefaultResponsibleParty extends DefaultResponsibility implements ResponsibleParty {
     /**
      * Serial number for inter-operability with different versions.
      */
-    private static final long serialVersionUID = -3429257224445006902L;
+    private static final long serialVersionUID = 6460730475638081367L;
 
     /**
      * Name of the responsible person- surname, given name, title separated by a delimiter.
@@ -72,11 +75,6 @@ public class DefaultResponsibleParty ext
     private Contact contactInfo;
 
     /**
-     * Function performed by the responsible party.
-     */
-    private Role role;
-
-    /**
      * Constructs an initially empty responsible party.
      */
     public DefaultResponsibleParty() {
@@ -88,7 +86,7 @@ public class DefaultResponsibleParty ext
      * @param role The function performed by the responsible party, or {@code null}.
      */
     public DefaultResponsibleParty(final Role role) {
-        this.role = role;
+        super(role, null, null);
     }
 
     /**
@@ -107,7 +105,6 @@ public class DefaultResponsibleParty ext
             organisationName = object.getOrganisationName();
             positionName     = object.getPositionName();
             contactInfo      = object.getContactInfo();
-            role             = object.getRole();
         }
     }
 
@@ -235,21 +232,21 @@ public class DefaultResponsibleParty ext
     /**
      * Returns the function performed by the responsible party.
      *
-     * @return Function performed by the responsible party, or {@code null}.
+     * @return Function performed by the responsible party.
      */
     @Override
     @XmlElement(name = "role", required = true)
     public Role getRole() {
-        return role;
+        return super.getRole();
     }
 
     /**
      * Sets the function performed by the responsible party.
      *
-     * @param newValue The new role, or {@code null} if none.
+     * @param newValue The new role.
      */
+    @Override
     public void setRole(final Role newValue) {
-        checkWritePermission();
-        role = newValue;
+        super.setRole(newValue);
     }
 }

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultConstraints.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultConstraints.java?rev=1605540&r1=1605539&r2=1605540&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultConstraints.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultConstraints.java [UTF-8] Wed Jun 25 18:27:51 2014
@@ -22,9 +22,14 @@ import javax.xml.bind.annotation.XmlSeeA
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
 import org.opengis.util.InternationalString;
+import org.opengis.metadata.citation.Citation;
+import org.opengis.metadata.citation.Responsibility;
+import org.opengis.metadata.constraint.Releasability;
+import org.opengis.metadata.identification.BrowseGraphic;
 import org.opengis.metadata.constraint.Constraints;
 import org.opengis.metadata.constraint.LegalConstraints;
 import org.opengis.metadata.constraint.SecurityConstraints;
+import org.opengis.metadata.quality.Scope;
 import org.apache.sis.metadata.iso.ISOMetadata;
 import org.apache.sis.util.iso.Types;
 
@@ -35,11 +40,19 @@ import org.apache.sis.util.iso.Types;
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @author  Touraïvane (IRD)
  * @author  Cédric Briançon (Geomatys)
+ * @author  Rémi Maréchal (Geomatys)
  * @since   0.3 (derived from geotk-2.1)
- * @version 0.3
+ * @version 0.5
  * @module
  */
-@XmlType(name = "MD_Constraints_Type")
+@XmlType(name = "MD_Constraints_Type" /*, propOrder = {
+    "useLimitation",
+    "constraintApplicationScope",
+    "graphic",
+    "reference",
+    "releasability",
+    "responsibleParty"
+} */)
 @XmlRootElement(name = "MD_Constraints")
 @XmlSeeAlso({
     DefaultLegalConstraints.class,
@@ -58,6 +71,32 @@ public class DefaultConstraints extends 
     private Collection<InternationalString> useLimitations;
 
     /**
+     * Spatial and / or temporal extent and or level of the application of the constraints restrictions.
+     */
+    private Collection<Scope> constraintApplicationScopes;
+
+    /**
+     * Graphic / symbol indicating the constraint.
+     */
+    private Collection<BrowseGraphic> graphics;
+
+    /**
+     * Citation for the limitation of constraint.
+     * Example: "copyright statement, license agreement, etc."
+     */
+    private Collection<Citation> references;
+
+    /**
+     * Citation for the limitation of constraint.
+     */
+    private Releasability releasability;
+
+    /**
+     * Party responsible for the resource constraints.
+     */
+    private Collection<Responsibility> responsibleParties;
+
+    /**
      * Constructs an initially empty constraints.
      */
     public DefaultConstraints() {
@@ -84,7 +123,12 @@ public class DefaultConstraints extends 
     public DefaultConstraints(final Constraints object) {
         super(object);
         if (object != null) {
-            useLimitations = copyCollection(object.getUseLimitations(), InternationalString.class);
+            useLimitations              = copyCollection(object.getUseLimitations(), InternationalString.class);
+///         constraintApplicationScopes = copyCollection(object.getConstraintApplicationScope(), Scope.class);
+///         graphics                    = copyCollection(object.getGraphic(), BrowseGraphic.class);
+///         references                  = copyCollection(object.getReference(), Citation.class);
+///         releasability               = object.getReleasability();
+///         responsibleParties          = copyCollection(object.getResponsibleParty(), Responsibility.class);
         }
     }
 
@@ -143,7 +187,130 @@ public class DefaultConstraints extends 
      *
      * @param newValues The new use limitations.
      */
-    public void setUseLimitations(final Collection<? extends InternationalString> newValues) {
+    public void setUseLimitations(final Collection< ? extends InternationalString> newValues) {
         useLimitations = writeCollection(newValues, useLimitations, InternationalString.class);
     }
+
+    /**
+     * Returns the spatial and / or temporal extents and or levels of the application
+     * of the constraints restrictions.
+     *
+     * @return Spatial and / or temporal extents.
+     *
+     * @since 0.5
+     */
+/// @Override
+/// @XmlElement(name = "constraintApplicationScope")
+    public Collection<Scope> getConstraintApplicationScopes() {
+        return constraintApplicationScopes = nonNullCollection(constraintApplicationScopes, Scope.class);
+    }
+
+    /**
+     * Sets the spatial and / or temporal extents and or levels of the application of the constraints restrictions.
+     *
+     * @param newValues The new spatial and / or temporal extents.
+     *
+     * @since 0.5
+     */
+    public void setConstraintApplicationScopes(final Collection<? extends Scope> newValues) {
+        constraintApplicationScopes = writeCollection(newValues, constraintApplicationScopes, Scope.class);
+    }
+
+    /**
+     * Returns the graphics / symbols indicating the constraint.
+     *
+     * @return The graphics / symbols indicating the constraint.
+     *
+     * @since 0.5
+     */
+/// @Override
+/// @XmlElement(name = "graphic")
+    public Collection<BrowseGraphic> getGraphics() {
+        return graphics = nonNullCollection(graphics, BrowseGraphic.class);
+    }
+
+    /**
+     * Sets the new graphics / symbols indicating the constraint.
+     *
+     * @param newValues the new graphics / symbols indicating the constraint.
+     *
+     * @since 0.5
+     */
+    public void setGraphic(final Collection<? extends BrowseGraphic> newValues) {
+        graphics = writeCollection(newValues, graphics, BrowseGraphic.class);
+    }
+
+    /**
+     * Returns citations for the limitation of constraint.
+     * Example: "copyright statement, license agreement, etc."
+     *
+     * @return Citations for the limitation of constraint.
+     *
+     * @since 0.5
+     */
+/// @Override
+/// @XmlElement(name = "reference")
+    public Collection<Citation> getReference() {
+        return references = nonNullCollection(references, Citation.class);
+    }
+
+    /**
+     * Sets the citations for the limitation of constraint.
+     *
+     * @param newValues The new citation for the limitation of constraint.
+     *
+     * @since 0.5
+     */
+    public void setReference(Collection<? extends Citation> newValues) {
+        references = writeCollection(newValues, references, Citation.class);
+    }
+
+    /**
+     * Returns information concerning the parties to whom the resource can or cannot be released, or {@code null} if none.
+     *
+     * @return Information concerning the parties to whom the resource, or {@code null} if none.
+     *
+     * @since 0.5
+     */
+/// @Override
+/// @XmlElement(name = "releasability")
+    public Releasability getReleasability() {
+        return releasability;
+    }
+
+    /**
+     * Sets the information concerning the parties to whom the resource.
+     *
+     * @param newValue The new information concerning the parties to whom the resource.
+     *
+     * @since 0.5
+     */
+    public void setReleasability(final Releasability newValue) {
+        checkWritePermission();
+        releasability = newValue;
+    }
+
+    /**
+     * Returns the parties responsible for the resource constraints.
+     *
+     * @return Parties responsible for the resource constraints.
+     *
+     * @since 0.5
+     */
+/// @Override
+/// @XmlElement(name = "responsibleParty")
+    public Collection<Responsibility> getResponsibleParties() {
+        return responsibleParties = nonNullCollection(responsibleParties, Responsibility.class);
+    }
+
+    /**
+     * Sets the parties responsible for the resource constraints.
+     *
+     * @param newValues The new parties responsible for the resource constraints.
+     *
+     * @since 0.5
+     */
+    public void setResponsibleParties(final Collection<? extends Responsibility> newValues) {
+        responsibleParties = writeCollection(newValues, responsibleParties, Responsibility.class);
+    }
 }

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultBrowseGraphic.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultBrowseGraphic.java?rev=1605540&r1=1605539&r2=1605540&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultBrowseGraphic.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultBrowseGraphic.java [UTF-8] Wed Jun 25 18:27:51 2014
@@ -17,11 +17,14 @@
 package org.apache.sis.metadata.iso.identification;
 
 import java.net.URI;
+import java.util.Collection;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import org.opengis.util.InternationalString;
+import org.opengis.metadata.citation.OnlineResource;
+import org.opengis.metadata.constraint.Constraints;
 import org.opengis.metadata.identification.BrowseGraphic;
 import org.apache.sis.metadata.iso.ISOMetadata;
 import org.apache.sis.internal.jaxb.gmx.MimeFileTypeAdapter;
@@ -33,8 +36,9 @@ import org.apache.sis.internal.jaxb.gmx.
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @author  Touraïvane (IRD)
  * @author  Cédric Briançon (Geomatys)
+ * @author  Rémi Maréchal (Geomatys)
  * @since   0.3 (derived from geotk-2.1)
- * @version 0.4
+ * @version 0.5
  * @module
  */
 @XmlType(name = "MD_BrowseGraphic_Type", propOrder = {
@@ -66,6 +70,16 @@ public class DefaultBrowseGraphic extend
     private String fileType;
 
     /**
+     * Restrictions on access and/or of browse graphic.
+     */
+    private Collection<Constraints> imageConstraints;
+
+    /**
+     * Links to browse graphic.
+     */
+    private Collection<OnlineResource> linkages;
+
+    /**
      * Constructs an initially empty browse graphic.
      */
     public DefaultBrowseGraphic() {
@@ -92,9 +106,11 @@ public class DefaultBrowseGraphic extend
     public DefaultBrowseGraphic(final BrowseGraphic object) {
         super(object);
         if (object != null) {
-            fileName        = object.getFileName();
-            fileDescription = object.getFileDescription();
-            fileType        = object.getFileType();
+            fileName         = object.getFileName();
+            fileDescription  = object.getFileDescription();
+            fileType         = object.getFileType();
+///         imageConstraints = object.getImageConstraints();
+///         linkage          = object.getLinkage();
         }
     }
 
@@ -187,4 +203,52 @@ public class DefaultBrowseGraphic extend
         checkWritePermission();
         fileType = newValue;
     }
+
+    /**
+     * Returns the restrictions on access and / or use of browse graphic.
+     *
+     * @return Restrictions on access and / or use of browse graphic.
+     *
+     * @since 0.5
+     */
+/// @Override
+/// @XmlElement(name = "imageConstraints")
+    public Collection<Constraints> getImageConstraints() {
+        return imageConstraints = nonNullCollection(imageConstraints, Constraints.class);
+    }
+
+    /**
+     * Sets the restrictions on access and / or use of browse graphic.
+     *
+     * @param newValues The new restrictions on access and / or use of browse graphic.
+     *
+     * @since 0.5
+     */
+    public void setImageConstraints(final Collection<? extends Constraints> newValues) {
+        imageConstraints = writeCollection(newValues, imageConstraints, Constraints.class);
+    }
+
+    /**
+     * Return the links to browse graphic.
+     *
+     * @return The links to browse graphic.
+     *
+     * @since 0.5
+     */
+/// @Override
+/// @XmlElement(name = "linkage")
+    public Collection<OnlineResource> getLinkages() {
+        return linkages = nonNullCollection(linkages, OnlineResource.class);
+    }
+
+    /**
+     * Sets the links to browse graphic.
+     *
+     * @param newValues The new links to browse graphic.
+     *
+     * @since 0.5
+     */
+    public void setLinkages(final Collection<? extends OnlineResource> newValues) {
+        linkages = writeCollection(newValues, linkages, OnlineResource.class);
+    }
 }

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultLineage.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultLineage.java?rev=1605540&r1=1605539&r2=1605540&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultLineage.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultLineage.java [UTF-8] Wed Jun 25 18:27:51 2014
@@ -21,6 +21,8 @@ import javax.xml.bind.annotation.XmlElem
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 import org.opengis.util.InternationalString;
+import org.opengis.metadata.citation.Citation;
+import org.opengis.metadata.quality.Scope;
 import org.opengis.metadata.lineage.Source;
 import org.opengis.metadata.lineage.Lineage;
 import org.opengis.metadata.lineage.ProcessStep;
@@ -39,12 +41,15 @@ import org.apache.sis.metadata.iso.quali
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @author  Touraïvane (IRD)
  * @author  Cédric Briançon (Geomatys)
+ * @author  Rémi Maréchal (Geomatys)
  * @since   0.3 (derived from geotk-2.1)
- * @version 0.3
+ * @version 0.5
  * @module
  */
 @XmlType(name = "LI_Lineage_Type", propOrder = {
     "statement",
+/// "scope",
+/// "additionalResource",
     "processSteps",
     "sources"
 })
@@ -63,6 +68,17 @@ public class DefaultLineage extends ISOM
     private InternationalString statement;
 
     /**
+     * Type of resource and / or extent to which the lineage information applies.
+     */
+    private Collection<Scope> scopes;
+
+    /**
+     * A resources (for example publication) that describes the whole
+     * process to generate this resource (for example a dataset).
+     */
+    private Collection<Citation> additionalDocumentation;
+
+    /**
      * Information about an event in the creation process for the data specified by the scope.
      */
     private Collection<ProcessStep> processSteps;
@@ -90,9 +106,11 @@ public class DefaultLineage extends ISOM
     public DefaultLineage(final Lineage object) {
         super(object);
         if (object != null) {
-            statement    = object.getStatement();
-            processSteps = copyCollection(object.getProcessSteps(), ProcessStep.class);
-            sources      = copyCollection(object.getSources(), Source.class);
+            statement               = object.getStatement();
+///         scopes                  = copyCollection(object.getScopes(), Scope.class);
+///         additionalDocumentation = copyCollection(object.getAdditionalDocumentation(), Citation.class);
+            processSteps            = copyCollection(object.getProcessSteps(), ProcessStep.class);
+            sources                 = copyCollection(object.getSources(), Source.class);
         }
     }
 
@@ -145,6 +163,55 @@ public class DefaultLineage extends ISOM
     }
 
     /**
+     * Returns the types of resource and / or extents to which the lineage information applies.
+     *
+     * @return Types of resource and / or extents to which the lineage information applies.
+     *
+     * @since 0.5
+     */
+/// @Override
+/// @XmlElement(name = "scope")
+    public Collection<Scope> getScopes() {
+        return scopes = nonNullCollection(scopes, Scope.class);
+    }
+
+    /**
+     * Sets the types of resource and / or extents to which the lineage information applies.
+     *
+     * @param newValues The new types of resource.
+     *
+     * @since 0.5
+     */
+    public void setScopes(final Collection<? extends Scope> newValues)  {
+        scopes = writeCollection(newValues, scopes, Scope.class);
+    }
+
+    /**
+     * Returns information about resources (for example publication) that describes the whole
+     * process to generate this resource (for example a dataset).
+     *
+     * @return Resources that describes the whole process to generate this resource.
+     *
+     * @since 0.5
+     */
+/// @Override
+/// @XmlElement(name = "additionalDocumentation")
+    public Collection<Citation> getAdditionalDocumentation() {
+        return additionalDocumentation = nonNullCollection(additionalDocumentation, Citation.class);
+    }
+
+    /**
+     * Sets information about resources that describes the whole process to generate this resource.
+     *
+     * @param newValues The new information about resource.
+     *
+     * @since 0.5
+     */
+    public void setAdditionalDocumentation(final Collection<? extends Citation> newValues)  {
+        additionalDocumentation = writeCollection(newValues, additionalDocumentation , Citation.class);
+    }
+
+    /**
      * Returns the information about an event in the creation process for the data specified by the scope.
      *
      * @return Information about an event in the creation process.

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java?rev=1605540&r1=1605539&r2=1605540&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java [UTF-8] Wed Jun 25 18:27:51 2014
@@ -18,20 +18,25 @@ package org.apache.sis.metadata.iso.main
 
 import java.util.Date;
 import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
+import org.opengis.metadata.citation.DateType;
+import org.opengis.metadata.citation.CitationDate;
 import org.opengis.metadata.citation.ResponsibleParty;
 import org.opengis.metadata.maintenance.MaintenanceFrequency;
 import org.opengis.metadata.maintenance.MaintenanceInformation;
 import org.opengis.metadata.maintenance.ScopeCode;
 import org.opengis.metadata.maintenance.ScopeDescription;
+import org.opengis.metadata.quality.Scope;
 import org.opengis.temporal.PeriodDuration;
 import org.opengis.util.InternationalString;
 import org.apache.sis.metadata.iso.ISOMetadata;
-
-import static org.apache.sis.internal.metadata.MetadataUtilities.toDate;
-import static org.apache.sis.internal.metadata.MetadataUtilities.toMilliseconds;
+import org.apache.sis.metadata.iso.quality.DefaultScope;
+import org.apache.sis.metadata.iso.citation.DefaultCitationDate;
+import org.apache.sis.internal.metadata.LegacyProperties;
 
 
 /**
@@ -41,8 +46,9 @@ import static org.apache.sis.internal.me
  * @author  Touraïvane (IRD)
  * @author  Cédric Briançon (Geomatys)
  * @author  Guilhem Legal (Geomatys)
+ * @author  Rémi Maréchal (Geomatys)
  * @since   0.3 (derived from geotk-2.1)
- * @version 0.3
+ * @version 0.5
  * @module
  */
 @XmlType(name = "MD_MaintenanceInformation_Type", propOrder = {
@@ -59,7 +65,7 @@ public class DefaultMaintenanceInformati
     /**
      * Serial number for inter-operability with different versions.
      */
-    private static final long serialVersionUID = -5134544727860361898L;
+    private static final long serialVersionUID = -8736825706141936429L;
 
     /**
      * Frequency with which changes and additions are made to the resource after the
@@ -68,11 +74,9 @@ public class DefaultMaintenanceInformati
     private MaintenanceFrequency maintenanceAndUpdateFrequency;
 
     /**
-     * Scheduled revision date for resource, in milliseconds elapsed
-     * since January 1st, 1970. If there is no such date, then this field
-     * is set to the special value {@link Long#MIN_VALUE}.
+     * Date information associated with maintenance of resource.
      */
-    private long dateOfNextUpdate = Long.MIN_VALUE;
+    private Collection<CitationDate> maintenanceDates;
 
     /**
      * Maintenance period other than those defined, in milliseconds.
@@ -80,14 +84,9 @@ public class DefaultMaintenanceInformati
     private PeriodDuration userDefinedMaintenanceFrequency;
 
     /**
-     * Scope of data to which maintenance is applied.
-     */
-    private Collection<ScopeCode> updateScopes;
-
-    /**
-     * Additional information about the range or extent of the resource.
+     * Type of resource and / or extent to which the maintenance information applies.
      */
-    private Collection<ScopeDescription> updateScopeDescriptions;
+    private Collection<Scope> maintenanceScopes;
 
     /**
      * Information regarding specific requirements for maintaining the resource.
@@ -95,8 +94,8 @@ public class DefaultMaintenanceInformati
     private Collection<InternationalString> maintenanceNotes;
 
     /**
-     * Identification of, and means of communicating with,
-     * person(s) and organization(s) with responsibility for maintaining the metadata
+     * Identification of, and means of communicating with, person(s) and organization(s)
+     * with responsibility for maintaining the resource.
      */
     private Collection<ResponsibleParty> contacts;
 
@@ -128,11 +127,15 @@ public class DefaultMaintenanceInformati
     public DefaultMaintenanceInformation(final MaintenanceInformation object) {
         super(object);
         if (object != null) {
+            setDateOfNextUpdate        (object.getDateOfNextUpdate());
+            setDateOfNextUpdate        (object.getDateOfNextUpdate());
+            setUpdateScopes            (object.getUpdateScopes());
+            setUpdateScopeDescriptions (object.getUpdateScopeDescriptions());
+
             maintenanceAndUpdateFrequency   = object.getMaintenanceAndUpdateFrequency();
-            dateOfNextUpdate                = toMilliseconds(object.getDateOfNextUpdate());
+///         maintenanceDates                = copyCollection(object.getMaintenanceDate(), CitationDate.class);
             userDefinedMaintenanceFrequency = object.getUserDefinedMaintenanceFrequency();
-            updateScopes                    = copyCollection(object.getUpdateScopes(), ScopeCode.class);
-            updateScopeDescriptions         = copyCollection(object.getUpdateScopeDescriptions(), ScopeDescription.class);
+///         maintenanceScope                = copyCollection(object.getMaintenanceScope(), Scope.class);
             maintenanceNotes                = copyCollection(object.getMaintenanceNotes(), InternationalString.class);
             contacts                        = copyCollection(object.getContacts(), ResponsibleParty.class);
         }
@@ -187,14 +190,50 @@ public class DefaultMaintenanceInformati
     }
 
     /**
+     * Return the date information associated with maintenance of resource.
+     *
+     * @return date information associated with maintenance of resource.
+     *
+     * @since 0.5
+     */
+/// @Override
+/// @XmlElement(name = "maintenanceDate", required = true)
+    public Collection<CitationDate> getMaintenanceDates() {
+        return maintenanceDates = nonNullCollection(maintenanceDates, CitationDate.class);
+    }
+
+    /**
+     * Sets the date information associated with maintenance of resource.
+     *
+     * @param newValues The new date information associated with maintenance of resource.
+     *
+     * @since 0.5
+     */
+    public void setMaintenanceDates(final Collection<? extends CitationDate> newValues) {
+        maintenanceDates = writeCollection(newValues, maintenanceDates, CitationDate.class);
+    }
+
+    /**
      * Returns the scheduled revision date for resource.
      *
      * @return Scheduled revision date, or {@code null}.
+     *
+     * @deprecated As of ISO 19115:2014, replaced by {@link #getMaintenanceDates()} in order to enable inclusion
+     *             of a {@link DateType} to describe the type of the date. Note that {@link DateType#NEXT_UPDATE}
+     *             was added to that code list.
      */
     @Override
+    @Deprecated
     @XmlElement(name = "dateOfNextUpdate")
     public Date getDateOfNextUpdate() {
-        return toDate(dateOfNextUpdate);
+        if (maintenanceDates != null) {
+            for (final CitationDate date : maintenanceDates) {
+                if (DateType.NEXT_UPDATE.equals(date.getDateType())) {
+                    return date.getDate();
+                }
+            }
+        }
+        return null;
     }
 
     /**
@@ -202,15 +241,17 @@ public class DefaultMaintenanceInformati
      *
      * @param newValue The new date of next update.
      */
+    @Deprecated
     public void setDateOfNextUpdate(final Date newValue) {
-        checkWritePermission();
-        dateOfNextUpdate = toMilliseconds(newValue);
+        if (newValue != null) {
+            getMaintenanceDates().add(new DefaultCitationDate(newValue, DateType.NEXT_UPDATE));
+        }
     }
 
     /**
      * Returns the maintenance period other than those defined.
      *
-     * @return The Maintenance period, or {@code null}.
+     * @return The maintenance period, or {@code null}.
      */
     @Override
     @XmlElement(name = "userDefinedMaintenanceFrequency")
@@ -229,14 +270,50 @@ public class DefaultMaintenanceInformati
     }
 
     /**
+     * Return the types of resource and / or extents to which the maintenance information applies.
+     *
+     * @return type of resource and / or extent to which the maintenance information applies.
+     *
+     * @since 0.5
+     */
+/// @Override
+/// @XmlElement(name = "maintenanceScope")
+    public Collection<Scope> getMaintenanceScopes() {
+        return maintenanceScopes = nonNullCollection(maintenanceScopes, Scope.class);
+    }
+
+    /**
+     * Sets the types of resource and / or extents to which the maintenance information applies.
+     *
+     * @param newValues The types of resource and / or extents to which the maintenance information applies.
+     *
+     * @since 0.5
+     */
+    public void setMaintenanceScopes(final Collection<? extends Scope> newValues) {
+        maintenanceScopes = writeCollection(newValues, maintenanceScopes, Scope.class);
+    }
+
+    /**
      * Returns the scope of data to which maintenance is applied.
      *
      * @return Scope of data to which maintenance is applied.
+     *
+     * @deprecated As of ISO 19115:2014, {@code getUpdateScopes()} and {@link #getUpdateScopeDescriptions()}
+     *             were combined into {@link #getMaintenanceScopes()} in order to allow specifying a scope
+     *             that includes a spatial and temporal extent.
      */
     @Override
+    @Deprecated
     @XmlElement(name = "updateScope")
     public Collection<ScopeCode> getUpdateScopes() {
-        return updateScopes = nonNullCollection(updateScopes, ScopeCode.class);
+        return new LegacyProperties<ScopeCode,Scope>(getMaintenanceScopes()) {
+            @Override protected Scope wrap(final ScopeCode code) {
+                return new DefaultScope(code);
+            }
+            @Override protected ScopeCode unwrap(final Scope scope) {
+                return scope.getLevel();
+            }
+        };
     }
 
     /**
@@ -244,19 +321,53 @@ public class DefaultMaintenanceInformati
      *
      * @param newValues The new update scopes.
      */
-    public void setUpdateScopes(final Collection<? extends ScopeCode> newValues) {
-        updateScopes = writeCollection(newValues, updateScopes, ScopeCode.class);
+    @Deprecated
+    public void setUpdateScopes(Collection<? extends ScopeCode> newValues) {
+        if (newValues == null) {
+            newValues = Collections.emptySet();
+        }
+        final Iterator<? extends ScopeCode> it = newValues.iterator();
+        final Collection<Scope> scopes = getMaintenanceScopes();
+        final Iterator<Scope> im = scopes.iterator();
+        while (im.hasNext()) {
+            final Scope scope = im.next();
+            if (scope instanceof DefaultScope) {
+                final DefaultScope df = (DefaultScope) scope;
+                df.setLevel(it.hasNext() ? it.next() : null);
+                if (df.isEmpty()) {
+                    im.remove();
+                }
+            }
+        }
+        while (it.hasNext()) {
+            scopes.add(new DefaultScope(it.next()));
+        }
     }
 
     /**
      * Returns additional information about the range or extent of the resource.
      *
      * @return Additional information about the range or extent of the resource.
+     *
+     * @deprecated As of ISO 19115:2014, {@link #getUpdateScopes()} and {@code getUpdateScopeDescriptions()}
+     *             were combined into {@link #getMaintenanceScopes()} in order to allow specifying a scope
+     *             that includes a spatial and temporal extent.
      */
     @Override
+    @Deprecated
     @XmlElement(name = "updateScopeDescription")
     public Collection<ScopeDescription> getUpdateScopeDescriptions() {
-        return updateScopeDescriptions = nonNullCollection(updateScopeDescriptions, ScopeDescription.class);
+        return new LegacyProperties<ScopeDescription,Scope>(getMaintenanceScopes()) {
+            @Override protected Scope wrap(final ScopeDescription code) {
+                final DefaultScope scope = new DefaultScope();
+                scope.setLevelDescription(Collections.singleton(code));
+                return scope;
+            }
+            @Override protected ScopeDescription unwrap(final Scope scope) {
+                final Iterator<? extends ScopeDescription> i = scope.getLevelDescription().iterator();
+                return (i.hasNext()) ? i.next() : null;
+            }
+        };
     }
 
     /**
@@ -264,8 +375,29 @@ public class DefaultMaintenanceInformati
      *
      * @param newValues The new update scope descriptions.
      */
-    public void setUpdateScopeDescriptions(final Collection<? extends ScopeDescription> newValues) {
-        updateScopeDescriptions = writeCollection(newValues, updateScopeDescriptions, ScopeDescription.class);
+    @Deprecated
+    public void setUpdateScopeDescriptions(Collection<? extends ScopeDescription> newValues) {
+        if (newValues == null) {
+            newValues = Collections.emptySet();
+        }
+        final Iterator<? extends ScopeDescription> it = newValues.iterator();
+        final Collection<Scope> scopes = getMaintenanceScopes();
+        final Iterator<Scope> im = scopes.iterator();
+        while (im.hasNext()) {
+            final Scope scope = im.next();
+            if (scope instanceof DefaultScope) {
+                final DefaultScope df = (DefaultScope) scope;
+                df.setLevelDescription(it.hasNext() ? Collections.singleton(it.next()) : null);
+                if (df.isEmpty()) {
+                    im.remove();
+                }
+            }
+        }
+        while (it.hasNext()) {
+            final DefaultScope scope = new DefaultScope();
+            scope.setLevelDescription(Collections.singleton(it.next()));
+            scopes.add(scope);
+        }
     }
 
     /**
@@ -290,10 +422,10 @@ public class DefaultMaintenanceInformati
 
     /**
      * Returns identification of, and means of communicating with,
-     * person(s) and organization(s) with responsibility for maintaining the metadata.
+     * person(s) and organization(s) with responsibility for maintaining the resource.
      *
      * @return Means of communicating with person(s) and organization(s) with responsibility
-     *         for maintaining the metadata.
+     *         for maintaining the resource.
      */
     @Override
     @XmlElement(name = "contact")
@@ -303,9 +435,10 @@ public class DefaultMaintenanceInformati
 
     /**
      * Sets identification of, and means of communicating with,
-     * person(s) and organization(s) with responsibility for maintaining the metadata.
+     * person(s) and organization(s) with responsibility for maintaining the resource.
      *
-     * @param newValues The new contacts
+     * @param newValues The new identification of person(s) and organization(s)
+     *                  with responsibility for maintaining the resource.
      */
     public void setContacts(final Collection<? extends ResponsibleParty> newValues) {
         contacts = writeCollection(newValues, contacts, ResponsibleParty.class);

Modified: sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultDimension.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultDimension.java?rev=1605540&r1=1605539&r2=1605540&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultDimension.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultDimension.java [UTF-8] Wed Jun 25 18:27:51 2014
@@ -20,6 +20,7 @@ import javax.xml.bind.annotation.XmlType
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import org.opengis.util.InternationalString;
 import org.opengis.metadata.spatial.Dimension;
 import org.opengis.metadata.spatial.DimensionNameType;
 import org.apache.sis.internal.jaxb.gco.GO_Measure;
@@ -33,14 +34,17 @@ import org.apache.sis.measure.ValueRange
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @author  Touraïvane (IRD)
  * @author  Cédric Briançon (Geomatys)
+ * @author  Rémi Maréchal (Geomatys)
  * @since   0.3 (derived from geotk-2.1)
- * @version 0.3
+ * @version 0.5
  * @module
  */
 @XmlType(name = "MD_Dimension_Type", propOrder = {
     "dimensionName",
     "dimensionSize",
-    "resolution"
+    "resolution",
+/// "dimensionTitle",
+/// "dimensionDescription"
 })
 @XmlRootElement(name = "MD_Dimension")
 public class DefaultDimension extends ISOMetadata implements Dimension {
@@ -65,6 +69,18 @@ public class DefaultDimension extends IS
     private Double resolution;
 
     /**
+     * Enhancement/ modifier of the dimension name.
+     * Example: dimensionName = "column",
+     *          dimensionTitle = "longitude"
+     */
+    private InternationalString dimensionTitle;
+
+    /**
+     * Description of the axis.
+     */
+    private InternationalString dimensionDescription;
+
+    /**
      * Constructs an initially empty dimension.
      */
     public DefaultDimension() {
@@ -93,9 +109,11 @@ public class DefaultDimension extends IS
     public DefaultDimension(final Dimension object) {
         super(object);
         if (object != null) {
-            dimensionName = object.getDimensionName();
-            dimensionSize = object.getDimensionSize();
-            resolution    = object.getResolution();
+            dimensionName        = object.getDimensionName();
+            dimensionSize        = object.getDimensionSize();
+            resolution           = object.getResolution();
+///         dimensionTitle       = object.getDimensionTitle();
+///         dimensionDescription = object.getDimensionDescription();
         }
     }
 
@@ -189,4 +207,57 @@ public class DefaultDimension extends IS
         checkWritePermission();
         resolution = newValue;
     }
+
+    /**
+     * Returns the enhancement/ modifier of the dimension name.
+     *
+     * <div class="note"><b>Example:</b>
+     * dimensionName = "column", dimensionTitle = "longitude"</div>
+     *
+     * @return The enhancement/ modifier of the dimension name.
+     *
+     * @since 0.5
+     */
+/// @Override
+/// @XmlElement(name = "dimensionTitle")
+    public InternationalString getDimensionTitle() {
+        return dimensionTitle;
+    }
+
+    /**
+     * Sets the enhancement/ modifier of the dimension name.
+     *
+     * @param newValue The new enhancement/ modifier of the dimension name.
+     *
+     * @since 0.5
+     */
+    public void setDimensionTitle(final InternationalString newValue) {
+        checkWritePermission();
+        dimensionTitle = newValue;
+    }
+
+    /**
+     * Return the axis dimension description.
+     *
+     * @return The axis dimension description.
+     *
+     * @since 0.5
+     */
+/// @Override
+/// @XmlElement(name = "dimensionDescription")
+    public InternationalString getDimensionDescription() {
+        return dimensionDescription;
+    }
+
+    /**
+     * Sets the axis dimension description.
+     *
+     * @param newValue The new axis dimension description.
+     *
+     * @since 0.5
+     */
+    public void setDimensionDescription(final InternationalString newValue) {
+        checkWritePermission();
+        dimensionDescription = newValue;
+    }
 }

Modified: sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java?rev=1605540&r1=1605539&r2=1605540&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java [UTF-8] Wed Jun 25 18:27:51 2014
@@ -88,7 +88,9 @@ public final strictfp class AllMetadataT
             org.opengis.metadata.citation.DateType.class,
             org.opengis.metadata.citation.OnLineFunction.class,
             org.opengis.metadata.citation.OnlineResource.class,
+            org.opengis.metadata.citation.Party.class,
             org.opengis.metadata.citation.PresentationForm.class,
+            org.opengis.metadata.citation.Responsibility.class,
             org.opengis.metadata.citation.ResponsibleParty.class,
             org.opengis.metadata.citation.Role.class,
             org.opengis.metadata.citation.Series.class,
@@ -98,6 +100,7 @@ public final strictfp class AllMetadataT
             org.opengis.metadata.constraint.LegalConstraints.class,
             org.opengis.metadata.constraint.Restriction.class,
             org.opengis.metadata.constraint.SecurityConstraints.class,
+            org.opengis.metadata.content.AttributeGroup.class,
             org.opengis.metadata.content.Band.class,
             org.opengis.metadata.content.BandDefinition.class,
             org.opengis.metadata.content.ContentInformation.class,
@@ -128,6 +131,7 @@ public final strictfp class AllMetadataT
             org.opengis.metadata.extent.TemporalExtent.class,
             org.opengis.metadata.extent.VerticalExtent.class,
             org.opengis.metadata.identification.AggregateInformation.class,
+            org.opengis.metadata.identification.AssociatedResource.class,
             org.opengis.metadata.identification.AssociationType.class,
             org.opengis.metadata.identification.BrowseGraphic.class,
             org.opengis.metadata.identification.CharacterSet.class,



Mime
View raw message