You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2018/02/16 15:29:30 UTC

svn commit: r1824509 - in /sis/branches/ISO-19115-3/core/sis-utility/src/main: java/org/apache/sis/xml/FilterVersion.java resources/org/apache/sis/xml/NamespaceContent.txt

Author: desruisseaux
Date: Fri Feb 16 15:29:29 2018
New Revision: 1824509

URL: http://svn.apache.org/viewvc?rev=1824509&view=rev
Log:
Declare some XML properties that have different names in legacy ISO 19139:2007 and ISO 19115-3:2016.

Modified:
    sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/xml/FilterVersion.java
    sis/branches/ISO-19115-3/core/sis-utility/src/main/resources/org/apache/sis/xml/NamespaceContent.txt

Modified: sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/xml/FilterVersion.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/xml/FilterVersion.java?rev=1824509&r1=1824508&r2=1824509&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/xml/FilterVersion.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/xml/FilterVersion.java [UTF-8] Fri Feb 16 15:29:29 2018
@@ -57,7 +57,6 @@ final class FilterVersion {
                 Namespaces.MD2,
                 Namespaces.MDA,
                 Namespaces.MDB,
-                Namespaces.MDQ,
                 Namespaces.MDS,
                 Namespaces.MDT,
                 Namespaces.MEX,
@@ -68,18 +67,26 @@ final class FilterVersion {
                 Namespaces.MRI,
                 Namespaces.MRL,
                 Namespaces.MRS,
-                Namespaces.MSR,
                 Namespaces.RCE
             }, LegacyNamespaces.GMD);
         /*
          * SV_OperationMetadata has two properties that are identical except for the name
          * between ISO 19115-3:2016 and legacy ISO 19139:2007. Instead than complicating
          * the class with JAXB annotations, we perform the renaming in this package.
+         * We apply the same mechanic to some other namespaces too.
          */
         Replacement r = new Replacement(LegacyNamespaces.SRV, 4);
         r.addProperty("distributedComputingPlatform", "DCP");
         r.addProperty("parameter", "parameters");
         ISO19139.exports.put(Namespaces.SRV, r);
+
+        // Metadata for Spatial Representation
+        r = new Replacement(LegacyNamespaces.GMD, "centrePoint", "centerPoint");
+        ISO19139.exports.put(Namespaces.MSR, r);
+
+        // Metadata for Data Quality
+        r = new Replacement(LegacyNamespaces.GMD, "valueRecordType", "valueType");
+        ISO19139.exports.put(Namespaces.MDQ, r);
         /*
          * For the way back from legacy ISO 19139:2007 to new ISO 19115-3:2016, we must rely on
          * FilteredReader (do NOT declare entries in 'imports', because some namespaces must be
@@ -131,6 +138,14 @@ final class FilterVersion {
         }
 
         /**
+         * Constructs a replacement for a namespace with exactly one property renaming.
+         */
+        Replacement(final String namespace, final String jaxb, final String xml) {
+            this.namespace  = namespace;
+            this.exports = Collections.singletonMap(jaxb, xml);
+        }
+
+        /**
          * Constructs a replacement for a namespace, together with the map of properties
          * that need to be renamed for that exported namespace.
          */

Modified: sis/branches/ISO-19115-3/core/sis-utility/src/main/resources/org/apache/sis/xml/NamespaceContent.txt
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/main/resources/org/apache/sis/xml/NamespaceContent.txt?rev=1824509&r1=1824508&r2=1824509&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-utility/src/main/resources/org/apache/sis/xml/NamespaceContent.txt [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-utility/src/main/resources/org/apache/sis/xml/NamespaceContent.txt [UTF-8] Fri Feb 16 15:29:29 2018
@@ -925,7 +925,7 @@ http://standards.iso.org/iso/19115/-3/ms
   MI_Georectified
     axisDimensionProperties
     cellGeometry
-    centrePoint
+    centerPoint/centrePoint
     checkPoint
     checkPointAvailability
     checkPointDescription
@@ -1099,7 +1099,7 @@ http://standards.iso.org/iso/19157/-2/md
   DQ_QuantitativeResult
     <type>
     value
-    valueRecordType
+    valueType/valueRecordType
     valueUnit
   DQ_RelativeInternalPositionalAccuracy
     <type>