sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1708792 - in /sis/branches/JDK8: core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/ core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/ core/sis-refe...
Date Thu, 15 Oct 2015 11:13:24 GMT
Author: desruisseaux
Date: Thu Oct 15 11:13:24 2015
New Revision: 1708792

URL: http://svn.apache.org/viewvc?rev=1708792&view=rev
Log:
Fix the order of XML elements in MD_Identifier and RS_Identifier (SIS-301).

Modified:
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Identifier.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultIdentifierTest.java
    sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/test/integration/Metadata.xml
    sis/branches/JDK8/profiles/sis-french-profile/src/test/resources/org/apache/sis/internal/profile/fra/DirectReferenceSystem.xml
    sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/storage/netcdf/MetadataReaderTest.java

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Identifier.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Identifier.java?rev=1708792&r1=1708791&r2=1708792&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Identifier.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Identifier.java
[UTF-8] Thu Oct 15 11:13:24 2015
@@ -77,6 +77,7 @@ public final class MD_Identifier extends
      * Returns {@code true} if the identifier should be marshalled as a
      * {@code RS_Identifier} instead than {@code MD_Identifier}.
      */
+    @SuppressWarnings("deprecation")
     private boolean isRS() {
         return (metadata instanceof ReferenceIdentifier) || (metadata instanceof ImmutableIdentifier);
     }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java?rev=1708792&r1=1708791&r2=1708792&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java
[UTF-8] Thu Oct 15 11:13:24 2015
@@ -51,9 +51,6 @@ import org.apache.sis.internal.util.Cita
  *
  * {@preformat xml
  *   <gmd:MD_Identifier>
- *     <gmd:code>
- *       <gco:CharacterString>4326</gco:CharacterString>
- *     </gmd:code>
  *     <gmd:authority>
  *       <gmd:CI_Citation>
  *         <gmd:title>
@@ -61,6 +58,9 @@ import org.apache.sis.internal.util.Cita
  *         </gmd:title>
  *       </gmd:CI_Citation>
  *     </gmd:authority>
+ *     <gmd:code>
+ *       <gco:CharacterString>4326</gco:CharacterString>
+ *     </gmd:code>
  *   </gmd:MD_Identifier>
  * }
  *
@@ -77,14 +77,14 @@ import org.apache.sis.internal.util.Cita
  * @author  Touraïvane (IRD)
  * @author  Cédric Briançon (Geomatys)
  * @since   0.3
- * @version 0.6
+ * @version 0.7
  * @module
  *
  * @see ImmutableIdentifier
  */
 @XmlType(name = "MD_Identifier_Type", propOrder = {
-    "code",
-    "authority"
+    "authority",
+    "code"
 })
 @XmlRootElement(name = "MD_Identifier")
 public class DefaultIdentifier extends ISOMetadata implements Identifier {

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java?rev=1708792&r1=1708791&r2=1708792&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java
[UTF-8] Thu Oct 15 11:13:24 2015
@@ -19,6 +19,7 @@ package org.apache.sis.metadata.iso;
 import java.util.Map;
 import java.util.Locale;
 import java.io.Serializable;
+import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
 import org.opengis.metadata.Identifier;
@@ -122,11 +123,17 @@ import java.util.Objects;
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
- * @version 0.6
+ * @version 0.7
  * @module
  *
  * @see DefaultIdentifier
  */
+@XmlType(name = "RS_Identifier_Type", propOrder = {
+    "authority",
+    "code",
+    "codeSpace",
+    "version"
+})
 @XmlRootElement(name = "RS_Identifier")
 public class ImmutableIdentifier extends FormattableObject implements Identifier, Serializable
{
     /**

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultIdentifierTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultIdentifierTest.java?rev=1708792&r1=1708791&r2=1708792&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultIdentifierTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultIdentifierTest.java
[UTF-8] Thu Oct 15 11:13:24 2015
@@ -44,9 +44,6 @@ public final strictfp class DefaultIdent
     private static final String XML =
             "<gmd:MD_Identifier xmlns:gmd=\"" + Namespaces.GMD + "\" " +
                                "xmlns:gco=\"" + Namespaces.GCO + "\">\n" +
-            "  <gmd:code>\n" +
-            "    <gco:CharacterString>4326</gco:CharacterString>\n" +
-            "  </gmd:code>\n" +
             "  <gmd:authority>\n" +
             "    <gmd:CI_Citation>\n" +
             "      <gmd:title>\n" +
@@ -54,6 +51,9 @@ public final strictfp class DefaultIdent
             "      </gmd:title>\n" +
             "    </gmd:CI_Citation>\n" +
             "  </gmd:authority>\n" +
+            "  <gmd:code>\n" +
+            "    <gco:CharacterString>4326</gco:CharacterString>\n" +
+            "  </gmd:code>\n" +
             "</gmd:MD_Identifier>";
 
     /**

Modified: sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/test/integration/Metadata.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/test/integration/Metadata.xml?rev=1708792&r1=1708791&r2=1708792&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/test/integration/Metadata.xml
(original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/test/integration/Metadata.xml
Thu Oct 15 11:13:24 2015
@@ -114,12 +114,6 @@
     <gmd:MD_ReferenceSystem>
       <gmd:referenceSystemIdentifier>
         <gmd:RS_Identifier>
-          <gmd:code>
-            <gmx:Anchor xlink:href="SDN:L101:2:4326">EPSG:4326</gmx:Anchor>
-          </gmd:code>
-          <gmd:codeSpace>
-            <gco:CharacterString>L101</gco:CharacterString>
-          </gmd:codeSpace>
           <gmd:authority>
             <gmd:CI_Citation>
               <gmd:title>
@@ -140,6 +134,12 @@
               </gmd:identifier>
             </gmd:CI_Citation>
           </gmd:authority>
+          <gmd:code>
+            <gmx:Anchor xlink:href="SDN:L101:2:4326">EPSG:4326</gmx:Anchor>
+          </gmd:code>
+          <gmd:codeSpace>
+            <gco:CharacterString>L101</gco:CharacterString>
+          </gmd:codeSpace>
         </gmd:RS_Identifier>
       </gmd:referenceSystemIdentifier>
     </gmd:MD_ReferenceSystem>

Modified: sis/branches/JDK8/profiles/sis-french-profile/src/test/resources/org/apache/sis/internal/profile/fra/DirectReferenceSystem.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/profiles/sis-french-profile/src/test/resources/org/apache/sis/internal/profile/fra/DirectReferenceSystem.xml?rev=1708792&r1=1708791&r2=1708792&view=diff
==============================================================================
--- sis/branches/JDK8/profiles/sis-french-profile/src/test/resources/org/apache/sis/internal/profile/fra/DirectReferenceSystem.xml
(original)
+++ sis/branches/JDK8/profiles/sis-french-profile/src/test/resources/org/apache/sis/internal/profile/fra/DirectReferenceSystem.xml
Thu Oct 15 11:13:24 2015
@@ -33,9 +33,6 @@
     <fra:FRA_DirectReferenceSystem>
       <gmd:referenceSystemIdentifier>
         <gmd:RS_Identifier>
-          <gmd:code>
-            <gco:CharacterString>4326</gco:CharacterString>
-          </gmd:code>
           <gmd:authority>
             <gmd:CI_Citation>
               <gmd:title>
@@ -67,6 +64,9 @@
               </gmd:citedResponsibleParty>
             </gmd:CI_Citation>
           </gmd:authority>
+          <gmd:code>
+            <gco:CharacterString>4326</gco:CharacterString>
+          </gmd:code>
         </gmd:RS_Identifier>
       </gmd:referenceSystemIdentifier>
     </fra:FRA_DirectReferenceSystem>

Modified: sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/storage/netcdf/MetadataReaderTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/storage/netcdf/MetadataReaderTest.java?rev=1708792&r1=1708791&r2=1708792&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/storage/netcdf/MetadataReaderTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/storage/netcdf/MetadataReaderTest.java
[UTF-8] Thu Oct 15 11:13:24 2015
@@ -38,7 +38,7 @@ import static org.apache.sis.test.TestUt
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
- * @version 0.3
+ * @version 0.7
  * @module
  */
 @DependsOn({
@@ -108,9 +108,9 @@ public final strictfp class MetadataRead
             "  │   │   │   ├─Date………………………………………………………………………
2005-09-22 00:00:00\n" +
             "  │   │   │   └─Date type…………………………………………………………
Creation\n" +
             "  │   │   ├─Identifier\n" +
-            "  │   │   │   ├─Code………………………………………………………………………
NCEP/SST/Global_5x2p5deg/SST_Global_5x2p5deg_20050922_0000.nc\n" +
-            "  │   │   │   └─Authority\n" +
-            "  │   │   │       └─Title…………………………………………………………
edu.ucar.unidata\n" +
+            "  │   │   │   ├─Authority\n" +
+            "  │   │   │   │   └─Title…………………………………………………………
edu.ucar.unidata\n" +
+            "  │   │   │   └─Code………………………………………………………………………
NCEP/SST/Global_5x2p5deg/SST_Global_5x2p5deg_20050922_0000.nc\n" +
             "  │   │   └─Cited responsible party\n" +
             "  │   │       ├─Party\n" +
             "  │   │       │   └─Name……………………………………………………………
NOAA/NWS/NCEP\n" +
@@ -151,9 +151,9 @@ public final strictfp class MetadataRead
             "  ├─Metadata scope\n" +
             "  │   └─Resource scope…………………………………………………………………
Dataset\n" +
             "  ├─Metadata identifier\n" +
-            "  │   ├─Code……………………………………………………………………………………………
NCEP/SST/Global_5x2p5deg/SST_Global_5x2p5deg_20050922_0000.nc\n" +
-            "  │   └─Authority\n" +
-            "  │       └─Title………………………………………………………………………………
edu.ucar.unidata\n" +
+            "  │   ├─Authority\n" +
+            "  │   │   └─Title………………………………………………………………………………
edu.ucar.unidata\n" +
+            "  │   └─Code……………………………………………………………………………………………
NCEP/SST/Global_5x2p5deg/SST_Global_5x2p5deg_20050922_0000.nc\n" +
             "  ├─Metadata standard (1 of 2)\n" +
             "  │   ├─Title…………………………………………………………………………………………
Geographic Information — Metadata Part 1: Fundamentals\n" +
             "  │   ├─Cited responsible party\n" +



Mime
View raw message