sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1622723 - in /sis/branches/JDK7: ./ core/sis-feature/src/main/java/org/apache/sis/feature/ core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/ core/sis-metadata/src/main/java/org/apache/sis/metadata/ core/sis-metadata/sr...
Date Fri, 05 Sep 2014 15:32:49 GMT
Author: desruisseaux
Date: Fri Sep  5 15:32:48 2014
New Revision: 1622723

URL: http://svn.apache.org/r1622723
Log:
Merge the 'Scope' GeoAPI change from JDK8 branch.

Added:
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Scope.java
      - copied unchanged from r1622722, sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Scope.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultScope.java
      - copied unchanged from r1622722, sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultScope.java
Removed:
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/DQ_Scope.java
Modified:
    sis/branches/JDK7/   (props changed)
    sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/Validator.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/ObjectPair.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultConstraints.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultLineage.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultProcessStep.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultSource.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/package-info.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultDataQuality.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultScope.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/package-info.java
    sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java
    sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/test/AnnotationsTestCase.java

Propchange: sis/branches/JDK7/
------------------------------------------------------------------------------
  Merged /sis/branches/JDK8:r1622458-1622722

Modified: sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/Validator.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/Validator.java?rev=1622723&r1=1622722&r2=1622723&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/Validator.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/Validator.java
[UTF-8] Fri Sep  5 15:32:48 2014
@@ -27,7 +27,7 @@ import org.apache.sis.metadata.iso.quali
 import org.apache.sis.metadata.iso.quality.DefaultDataQuality;
 import org.apache.sis.metadata.iso.quality.DefaultDomainConsistency;
 import org.apache.sis.metadata.iso.quality.DefaultConformanceResult;
-import org.apache.sis.metadata.iso.quality.DefaultScope;
+import org.apache.sis.metadata.iso.maintenance.DefaultScope;
 import org.apache.sis.referencing.NamedIdentifier;
 import org.apache.sis.util.resources.Errors;
 

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/ObjectPair.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/ObjectPair.java?rev=1622723&r1=1622722&r2=1622723&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/ObjectPair.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/ObjectPair.java
[UTF-8] Fri Sep  5 15:32:48 2014
@@ -23,7 +23,7 @@ import org.apache.sis.util.Classes;
 
 
 /**
- * A pair of objects in process of being compared by the {@code MetadataStandard#equals(…)}
method.
+ * A pair of objects in process of being compared by the {@code MetadataStandard.equals(…)}
method.
  * We have to remember those pairs for avoiding infinite recursivity when comparing metadata
objects
  * having cyclic associations. The objects are compared using the identity comparison.
  * Object order is not significant.

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultConstraints.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultConstraints.java?rev=1622723&r1=1622722&r2=1622723&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultConstraints.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/constraint/DefaultConstraints.java
[UTF-8] Fri Sep  5 15:32:48 2014
@@ -29,7 +29,7 @@ import org.opengis.metadata.identificati
 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.opengis.metadata.maintenance.Scope;
 import org.apache.sis.metadata.iso.ISOMetadata;
 import org.apache.sis.util.iso.Types;
 

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultLineage.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultLineage.java?rev=1622723&r1=1622722&r2=1622723&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultLineage.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultLineage.java
[UTF-8] Fri Sep  5 15:32:48 2014
@@ -22,13 +22,13 @@ import javax.xml.bind.annotation.XmlRoot
 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.maintenance.Scope;
 import org.opengis.metadata.lineage.Source;
 import org.opengis.metadata.lineage.Lineage;
 import org.opengis.metadata.lineage.ProcessStep;
 import org.opengis.metadata.maintenance.ScopeCode;
 import org.apache.sis.metadata.iso.ISOMetadata;
-import org.apache.sis.metadata.iso.quality.DefaultScope;
+import org.apache.sis.metadata.iso.maintenance.DefaultScope;
 
 
 /**

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultProcessStep.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultProcessStep.java?rev=1622723&r1=1622722&r2=1622723&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultProcessStep.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultProcessStep.java
[UTF-8] Fri Sep  5 15:32:48 2014
@@ -25,7 +25,7 @@ import javax.xml.bind.annotation.XmlRoot
 import org.opengis.util.InternationalString;
 import org.opengis.metadata.citation.Citation;
 import org.opengis.metadata.citation.Responsibility;
-import org.opengis.metadata.quality.Scope;
+import org.opengis.metadata.maintenance.Scope;
 import org.opengis.metadata.lineage.Source;
 import org.opengis.metadata.lineage.Processing;
 import org.opengis.metadata.lineage.ProcessStep;

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultSource.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultSource.java?rev=1622723&r1=1622722&r2=1622723&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultSource.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultSource.java
[UTF-8] Fri Sep  5 15:32:48 2014
@@ -30,10 +30,10 @@ import org.opengis.metadata.lineage.Sour
 import org.opengis.metadata.lineage.ProcessStep;
 import org.opengis.metadata.identification.Resolution;
 import org.opengis.metadata.identification.RepresentativeFraction;
-import org.opengis.metadata.quality.Scope;
+import org.opengis.metadata.maintenance.Scope;
 import org.opengis.referencing.ReferenceSystem;
 import org.apache.sis.metadata.iso.ISOMetadata;
-import org.apache.sis.metadata.iso.quality.DefaultScope;
+import org.apache.sis.metadata.iso.maintenance.DefaultScope;
 import org.apache.sis.metadata.iso.identification.DefaultResolution;
 import org.apache.sis.util.iso.Types;
 import org.apache.sis.xml.Namespaces;

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java?rev=1622723&r1=1622722&r2=1622723&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java
[UTF-8] Fri Sep  5 15:32:48 2014
@@ -28,11 +28,10 @@ import org.opengis.metadata.maintenance.
 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.metadata.maintenance.Scope;
 import org.opengis.temporal.PeriodDuration;
 import org.opengis.util.InternationalString;
 import org.apache.sis.metadata.iso.ISOMetadata;
-import org.apache.sis.metadata.iso.quality.DefaultScope;
 import org.apache.sis.metadata.iso.citation.DefaultCitationDate;
 import org.apache.sis.internal.metadata.LegacyPropertyAdapter;
 

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/package-info.java?rev=1622723&r1=1622722&r2=1622723&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/package-info.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/package-info.java
[UTF-8] Fri Sep  5 15:32:48 2014
@@ -31,6 +31,7 @@
  * </tr><tr><td style="width: 50%; white-space: nowrap">
  * {@linkplain org.apache.sis.metadata.iso.ISOMetadata ISO-19115 metadata}<br>
  * {@code  ├─} {@linkplain org.apache.sis.metadata.iso.maintenance.DefaultMaintenanceInformation
Maintenance information}<br>
+ * {@code  ├─} {@linkplain org.apache.sis.metadata.iso.maintenance.DefaultScope Scope}<br>
  * {@code  └─} {@linkplain org.apache.sis.metadata.iso.maintenance.DefaultScopeDescription
Scope description}<br>
  * {@linkplain org.opengis.util.CodeList Code list}<br>
  * {@code  ├─} {@linkplain org.opengis.metadata.maintenance.MaintenanceFrequency Maintenance
frequency}<br>
@@ -38,8 +39,9 @@
  * </td><td class="sep" style="width: 50%; white-space: nowrap">
  *             {@linkplain org.apache.sis.metadata.iso.maintenance.DefaultMaintenanceInformation
Maintenance information}<br>
  * {@code  ├─} {@linkplain org.opengis.metadata.maintenance.MaintenanceFrequency   
             Maintenance frequency} «code list»<br>
- * {@code  ├─} {@linkplain org.opengis.metadata.maintenance.ScopeCode              
             Scope code} «code list»<br>
- * {@code  └─} {@linkplain org.apache.sis.metadata.iso.maintenance.DefaultScopeDescription
      Scope description}<br>
+ * {@code  └─} {@linkplain org.apache.sis.metadata.iso.maintenance.DefaultScope    
             Scope}<br>
+ * {@code      ├─} {@linkplain org.opengis.metadata.maintenance.ScopeCode      
                 Scope code} «code list»<br>
+ * {@code      └─} {@linkplain org.apache.sis.metadata.iso.maintenance.DefaultScopeDescription
  Scope description}<br>
  * </td></tr></table>
  *
  * {@section Null values, nil objects and collections}
@@ -71,6 +73,7 @@
 })
 @XmlAccessorType(XmlAccessType.NONE)
 @XmlJavaTypeAdapters({
+    @XmlJavaTypeAdapter(EX_Extent.class),
     @XmlJavaTypeAdapter(CI_Responsibility.class),
     @XmlJavaTypeAdapter(MD_MaintenanceFrequencyCode.class),
     @XmlJavaTypeAdapter(MD_MaintenanceInformation.class),

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultDataQuality.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultDataQuality.java?rev=1622723&r1=1622722&r2=1622723&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultDataQuality.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultDataQuality.java
[UTF-8] Fri Sep  5 15:32:48 2014
@@ -23,7 +23,7 @@ import javax.xml.bind.annotation.XmlRoot
 import org.opengis.metadata.lineage.Lineage;
 import org.opengis.metadata.quality.DataQuality;
 import org.opengis.metadata.quality.Element;
-import org.opengis.metadata.quality.Scope;
+import org.opengis.metadata.maintenance.Scope;
 import org.apache.sis.metadata.iso.ISOMetadata;
 
 

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultScope.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultScope.java?rev=1622723&r1=1622722&r2=1622723&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultScope.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultScope.java
[UTF-8] Fri Sep  5 15:32:48 2014
@@ -17,15 +17,11 @@
 package org.apache.sis.metadata.iso.quality;
 
 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.XmlTransient;
 import org.opengis.metadata.extent.Extent;
 import org.opengis.metadata.quality.Scope;
 import org.opengis.metadata.maintenance.ScopeCode;
-import org.opengis.metadata.maintenance.ScopeDescription;
 import org.apache.sis.internal.metadata.LegacyPropertyAdapter;
-import org.apache.sis.metadata.iso.ISOMetadata;
 
 
 /**
@@ -45,33 +41,17 @@ import org.apache.sis.metadata.iso.ISOMe
  * @since   0.3 (derived from geotk-2.1)
  * @version 0.5
  * @module
+ *
+ * @deprecated As of ISO 19115:2014, {@code DQ_Scope} has been replaced by {@code MD_Scope}.
+ *             The later is defined in the {@link org.apache.sis.metadata.iso.maintenance}
package.
  */
-@XmlType(name = "DQ_Scope_Type", propOrder = {
-   "level",
-   "extent",
-   "levelDescription"
-})
-@XmlRootElement(name = "DQ_Scope")
-public class DefaultScope extends ISOMetadata implements Scope {
+@Deprecated
+@XmlTransient
+public class DefaultScope extends org.apache.sis.metadata.iso.maintenance.DefaultScope implements
Scope {
     /**
      * Serial number for inter-operability with different versions.
      */
-    private static final long serialVersionUID = 8357871602883209505L;
-
-    /**
-     * Hierarchical level of the data specified by the scope.
-     */
-    private ScopeCode level;
-
-    /**
-     * Information about the spatial, vertical and temporal extent of the resource specified
by the scope.
-     */
-    private Collection<Extent> extents;
-
-    /**
-     * Detailed description about the level of the data specified by the scope.
-     */
-    private Collection<ScopeDescription> levelDescription;
+    private static final long serialVersionUID = 7517784393752337009L;
 
     /**
      * Constructs an initially empty scope.
@@ -85,7 +65,7 @@ public class DefaultScope extends ISOMet
      * @param level The hierarchical level of the data specified by the scope.
      */
     public DefaultScope(final ScopeCode level) {
-        this.level = level;
+        super(level);
     }
 
     /**
@@ -99,11 +79,6 @@ public class DefaultScope extends ISOMet
      */
     public DefaultScope(final Scope object) {
         super(object);
-        if (object != null) {
-            level            = object.getLevel();
-            extents          = copyCollection(object.getExtents(), Extent.class);
-            levelDescription = copyCollection(object.getLevelDescription(), ScopeDescription.class);
-        }
     }
 
     /**
@@ -132,70 +107,6 @@ public class DefaultScope extends ISOMet
     }
 
     /**
-     * Returns the hierarchical level of the data specified by the scope.
-     *
-     * @return Hierarchical level of the data, or {@code null}.
-     */
-    @Override
-    @XmlElement(name = "level", required = true)
-    public ScopeCode getLevel() {
-        return level;
-    }
-
-    /**
-     * Sets the hierarchical level of the data specified by the scope.
-     *
-     * @param newValue The new level.
-     */
-    public void setLevel(final ScopeCode newValue) {
-        checkWritePermission();
-        level = newValue;
-    }
-
-    /**
-     * Returns information about the spatial, vertical and temporal extents of the resource
specified by the scope.
-     *
-     * @return Information about the extent of the resource.
-     *
-     * @since 0.5
-     */
-    @Override
-    public Collection<Extent> getExtents() {
-        return extents = nonNullCollection(extents, Extent.class);
-    }
-
-    /**
-     * Sets information about the spatial, vertical and temporal extents of the resource
specified by the scope.
-     *
-     * @param newValues New information about the extent of the resource.
-     *
-     * @since 0.5
-     */
-    public void setExtents(final Collection<? extends Extent> newValues) {
-        extents = writeCollection(newValues, extents, Extent.class);
-    }
-
-    /**
-     * Returns detailed descriptions about the level of the data specified by the scope.
-     *
-     * @return Detailed description about the level of the data.
-     */
-    @Override
-    @XmlElement(name = "levelDescription")
-    public Collection<ScopeDescription> getLevelDescription() {
-        return levelDescription = nonNullCollection(levelDescription, ScopeDescription.class);
-    }
-
-    /**
-     * Sets detailed descriptions about the level of the data specified by the scope.
-     *
-     * @param newValues The new level description.
-     */
-    public void setLevelDescription(final Collection<? extends ScopeDescription> newValues)
{
-        levelDescription = writeCollection(newValues, levelDescription, ScopeDescription.class);
-    }
-
-    /**
      * Information about the spatial, vertical and temporal extent of the data specified
by the scope.
      * This method fetches the value from the {@linkplain #getExtents() extents} collection.
      *
@@ -205,9 +116,8 @@ public class DefaultScope extends ISOMet
      */
     @Override
     @Deprecated
-    @XmlElement(name = "extent")
     public final Extent getExtent() {
-        return LegacyPropertyAdapter.getSingleton(extents, Extent.class, null, DefaultScope.class,
"getExtent");
+        return LegacyPropertyAdapter.getSingleton(getExtents(), Extent.class, null, DefaultScope.class,
"getExtent");
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/package-info.java?rev=1622723&r1=1622722&r2=1622723&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/package-info.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/package-info.java
[UTF-8] Fri Sep  5 15:32:48 2014
@@ -53,16 +53,15 @@
  * {@code  │   │   ├─} {@linkplain org.apache.sis.metadata.iso.quality.DefaultNonQuantitativeAttributeAccuracy
  Non quantitative attribute accuracy}<br>
  * {@code  │   │   └─} {@linkplain org.apache.sis.metadata.iso.quality.DefaultThematicClassificationCorrectness
 Thematic classification correctness}<br>
  * {@code  │   └─}     {@linkplain org.apache.sis.metadata.iso.quality.DefaultUsability
                         Usability}<br>
- * {@code  ├─}         {@linkplain org.apache.sis.metadata.iso.quality.AbstractResult
                           Result} «abstract»<br>
- * {@code  │   ├─}     {@linkplain org.apache.sis.metadata.iso.quality.DefaultConformanceResult
                 Conformance result}<br>
- * {@code  │   ├─}     {@linkplain org.apache.sis.metadata.iso.quality.DefaultQuantitativeResult
                Quantitative result}<br>
- * {@code  │   └─}     {@linkplain org.apache.sis.metadata.iso.quality.DefaultCoverageResult
                    Coverage result}<br>
- * {@code  └─}         {@linkplain org.apache.sis.metadata.iso.quality.DefaultScope
                             Scope}<br>
+ * {@code  └─}         {@linkplain org.apache.sis.metadata.iso.quality.AbstractResult
                           Result} «abstract»<br>
+ * {@code      ├─}     {@linkplain org.apache.sis.metadata.iso.quality.DefaultConformanceResult
                 Conformance result}<br>
+ * {@code      ├─}     {@linkplain org.apache.sis.metadata.iso.quality.DefaultQuantitativeResult
                Quantitative result}<br>
+ * {@code      └─}     {@linkplain org.apache.sis.metadata.iso.quality.DefaultCoverageResult
                    Coverage result}<br>
  * {@linkplain org.opengis.util.CodeList Code list}<br>
  * {@code  └─} {@linkplain org.opengis.metadata.quality.EvaluationMethodType Evaluation
method type}<br>
  * </td><td class="sep" style="width: 50%; white-space: nowrap">
  *                     {@linkplain org.apache.sis.metadata.iso.quality.DefaultDataQuality
                       Data quality}<br>
- * {@code  ├─}         {@linkplain org.apache.sis.metadata.iso.quality.DefaultScope
                             Scope}<br>
+ * {@code  ├─}         {@linkplain org.apache.sis.metadata.iso.maintenance.DefaultScope
                         Scope}<br>
  * {@code  └─}         {@linkplain org.apache.sis.metadata.iso.quality.AbstractElement
                          Element} «abstract»<br>
  * {@code      ├─}     {@linkplain org.opengis.metadata.quality.EvaluationMethodType
                            Evaluation method type} «code list»<br>
  * {@code      └─}     {@linkplain org.apache.sis.metadata.iso.quality.AbstractResult
                           Result} «abstract»<br>
@@ -127,12 +126,12 @@
     @XmlJavaTypeAdapter(DQ_Element.class),
     @XmlJavaTypeAdapter(DQ_EvaluationMethodTypeCode.class),
     @XmlJavaTypeAdapter(DQ_Result.class),
-    @XmlJavaTypeAdapter(DQ_Scope.class),
     @XmlJavaTypeAdapter(EX_Extent.class),
     @XmlJavaTypeAdapter(LI_Lineage.class),
     @XmlJavaTypeAdapter(MD_ContentInformation.class),
     @XmlJavaTypeAdapter(MD_Format.class),
     @XmlJavaTypeAdapter(MD_Identifier.class),
+    @XmlJavaTypeAdapter(MD_Scope.class),
     @XmlJavaTypeAdapter(MD_ScopeCode.class),
     @XmlJavaTypeAdapter(MD_ScopeDescription.class),
     @XmlJavaTypeAdapter(MD_SpatialRepresentation.class),

Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java?rev=1622723&r1=1622722&r2=1622723&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java
[UTF-8] Fri Sep  5 15:32:48 2014
@@ -157,6 +157,7 @@ public final strictfp class AllMetadataT
             org.opengis.metadata.lineage.Source.class,
             org.opengis.metadata.maintenance.MaintenanceFrequency.class,
             org.opengis.metadata.maintenance.MaintenanceInformation.class,
+            org.opengis.metadata.maintenance.Scope.class,
             org.opengis.metadata.maintenance.ScopeCode.class,
             org.opengis.metadata.maintenance.ScopeDescription.class,
             org.opengis.metadata.quality.AbsoluteExternalPositionalAccuracy.class,
@@ -180,7 +181,6 @@ public final strictfp class AllMetadataT
             org.opengis.metadata.quality.QuantitativeResult.class,
             org.opengis.metadata.quality.RelativeInternalPositionalAccuracy.class,
             org.opengis.metadata.quality.Result.class,
-            org.opengis.metadata.quality.Scope.class,
             org.opengis.metadata.quality.TemporalAccuracy.class,
             org.opengis.metadata.quality.TemporalConsistency.class,
             org.opengis.metadata.quality.TemporalValidity.class,
@@ -228,7 +228,7 @@ public final strictfp class AllMetadataT
      * @return {@inheritDoc}
      */
     @Override
-    protected String getExpectedName(final UML uml) {
+    protected String getExpectedPropertyName(final UML uml) {
         String name = uml.identifier();
         if (name.equals("distributedComputingPlatform")) {
             name = "DCP";
@@ -240,6 +240,21 @@ public final strictfp class AllMetadataT
     }
 
     /**
+     * Returns the name of the XML element for the given UML element.
+     * This method checks for the special cases which are known to have different UML and
XML names.
+     *
+     * @return {@inheritDoc}
+     */
+    @Override
+    protected String getExpectedTypeName(final UML uml) {
+        String name = uml.identifier();
+        if (name.equals("MD_Scope")) {  // ISO 19115:2014
+            name = "DQ_Scope";          // ISO 19115:2003
+        }
+        return name;
+    }
+
+    /**
      * Returns the expected namespace for an element defined by the given specification.
      * For example the namespace of any type defined by {@link Specification#ISO_19115}
      * is {@code "http://www.isotc211.org/2005/gmd"}.
@@ -274,6 +289,11 @@ public final strictfp class AllMetadataT
             case "SV_ServiceIdentification": {
                 return "MD_ServiceIdentification_Type";
             }
+            // Following prefix was changed in ISO 19115:2014,
+            // but ISO 19139 still use the old prefix.
+            case "MD_Scope": {
+                return "DQ_Scope_Type";
+            }
         }
         final StringBuilder buffer = new StringBuilder(rootName.length() + 13);
         if (impl.getSimpleName().startsWith("Abstract")) {

Modified: sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/test/AnnotationsTestCase.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/test/AnnotationsTestCase.java?rev=1622723&r1=1622722&r2=1622723&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/test/AnnotationsTestCase.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/test/AnnotationsTestCase.java
[UTF-8] Fri Sep  5 15:32:48 2014
@@ -236,7 +236,17 @@ public abstract strictfp class Annotatio
      * @param  uml The UML element.
      * @return The corresponding XML element name.
      */
-    protected String getExpectedName(final UML uml) {
+    protected String getExpectedTypeName(final UML uml) {
+        return uml.identifier();
+    }
+
+    /**
+     * Returns the name of the XML element for the given UML element.
+     *
+     * @param  uml The UML element.
+     * @return The corresponding XML element name.
+     */
+    protected String getExpectedPropertyName(final UML uml) {
         return uml.identifier();
     }
 
@@ -480,7 +490,7 @@ public abstract strictfp class Annotatio
             assertNotNull("Missing @XmlRootElement annotation.", root);
             final UML uml = type.getAnnotation(UML.class);
             if (uml != null) {
-                assertEquals("Wrong @XmlRootElement.name().", uml.identifier(), root.name());
+                assertEquals("Wrong @XmlRootElement.name().", getExpectedTypeName(uml), root.name());
             }
             /*
              * Check that the namespace is the expected one (according subclass)
@@ -552,7 +562,7 @@ public abstract strictfp class Annotatio
                  * is because subclasses may choose to override the above test method.
                  */
                 if (uml != null) {
-                    assertEquals("Wrong @XmlElement.name().", getExpectedName(uml), element.name());
+                    assertEquals("Wrong @XmlElement.name().", getExpectedPropertyName(uml),
element.name());
                     assertEquals("Wrong @XmlElement.required().", uml.obligation() == Obligation.MANDATORY,
element.required());
                 }
                 /*



Mime
View raw message