sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1821923 - in /sis/branches/ISO-19115-3/core: sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/ sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/ sis-metadata/src/test/resources/org/apache/sis/metadata/iso/cita...
Date Mon, 22 Jan 2018 19:01:10 GMT
Author: desruisseaux
Date: Mon Jan 22 19:01:10 2018
New Revision: 1821923

URL: http://svn.apache.org/viewvc?rev=1821923&view=rev
Log:
Skip commit 8388392013a65b73231ee8f05a0fe43d89c48b4d (add developer credit in .pom files)
because it was already
done in commits 8cc5640e8bd6b353de1a7afda0f2e2281cd68b53 and 82b9d2ea025647a26df33c2c0feced75928e0317.

Skip commit 86f6aca4769007079143d9274760441ff355a5ae (update documentation to reflect test
implementation)
since it applies to the "ApacheSIS_19115-3_Changes.html" file, which has not yet been ported.
This file will be ported after we finished revisiting the upgrade work.

Skip commit da587381dbd8f9559586e055502285b36c7202b6 (Update version in POM files to be '0.8-jdk8-19115-3').
We do not change the version number, which stay '1.0-jdk8-SNAPSHOT' for the target of this
branch.

Skip commit d0a2f8d260173d2de1cd62853df81f2602f320b8 (improve loading of ElementNamespaceMap.txt
in FilteredStreamReader)
since we use a different file format with a different loading mechanism.

Skip commit eaf7e686309f0fb0f43d423589775ce3ab3c78b4 (FilteredStreamReader now calls intern()
on all Strings before returning them to the JAXB unmarshaller).
This was already done in the different loading mechanism ported to SIS, and we don't want
to call 'String.intern()' at (un)marshalling time for performance reasons.

Skip commit 49156b876da1a57076a456c909eb3cd972cc9ffc (ISOTestUtils now extends Static as it
should) since we replaced
ISOTestUtils by a different approach (upgrade the XML test strings in the code rather than
convert them at runtime).

Skip commit d14414b7ce276572b6ddbb7970569f526a9a780e (add backup POM files to gitignore)
since we skipped the commit that modify the version numbers in pom.xml files.

Skip commit 10b29b551d7e76629d036ef9d617afc531b25c2e (Fixed NullPointerException in FilteredStreamReader
caused by interning returned Strings) since we skipped the commit which was internining strings.

Skip commit 01bb6c81403599ad9fc1ea67eb85c3e289ff5bf5 (add AllReferenceResolver to resolve
all external references to metadata)
Instead, open a separated JIRA task https://issues.apache.org/jira/browse/SIS-387 for handling
this improvement after the merge.

Skip commit 1cb23d79bba8ad43fc6a8c639f4db36187e24d64 (fixed broken tests in sis-netcdf) for
now.
We will do it last, because remaining work on ISO 19115-3 upgrade may change element order.

Skip commit eaccd01f09713c0a7e74bb50f80ba2809853a8d6 (minor change to behavior of AllReferenceResolver).
Updated https://issues.apache.org/jira/browse/SIS-387 instead.

Adaptation of commit 56632bac9f08983b2ee2ed408185b4948b74c5a8 from Image Matter
(Fixed a bug where incorrect parent element would sometimes be detected in FilteredStreamReader)
Replaced DefaultOnlineResourceTest by an integration with the XML file used for testing Citation,
for easier validation against ISO schemas. This cause a temporary test failure with legacy
XML tests;
this will be fixed after we revisited FilteredStreamResolver.

Removed:
    sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/GO_URL.java
Modified:
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/package-info.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/DefaultCitationTest.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/citation/Citation
(legacy).xml
    sis/branches/ISO-19115-3/core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/citation/Citation.xml
    sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/URIAdapter.java
    sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/xml/ReferenceResolver.java

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/package-info.java?rev=1821923&r1=1821922&r2=1821923&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/package-info.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/package-info.java
[UTF-8] Mon Jan 22 19:01:10 2018
@@ -118,7 +118,7 @@
     @XmlJavaTypeAdapter(MD_Identifier.class),
 
     // Java types, primitive types and basic OGC types handling
-    @XmlJavaTypeAdapter(GO_URL.class),
+    @XmlJavaTypeAdapter(URIAdapter.class),
     @XmlJavaTypeAdapter(GO_DateTime.class),
     @XmlJavaTypeAdapter(StringAdapter.class),
     @XmlJavaTypeAdapter(InternationalStringAdapter.class)
@@ -136,6 +136,5 @@ import org.apache.sis.xml.Namespaces;
 import org.apache.sis.internal.jaxb.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.Schemas;
 import org.apache.sis.internal.jaxb.gco.*;
-import org.apache.sis.internal.jaxb.gmd.*;
 import org.apache.sis.internal.jaxb.code.*;
 import org.apache.sis.internal.jaxb.metadata.*;

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/DefaultCitationTest.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/DefaultCitationTest.java?rev=1821923&r1=1821922&r2=1821923&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/DefaultCitationTest.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/DefaultCitationTest.java
[UTF-8] Mon Jan 22 19:01:10 2018
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.metadata.iso.citation;
 
+import java.net.URI;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
@@ -29,6 +30,7 @@ import org.opengis.metadata.citation.Dat
 import org.opengis.metadata.citation.Party;
 import org.opengis.metadata.citation.Role;
 import org.opengis.metadata.citation.Responsibility;
+import org.opengis.metadata.citation.OnLineFunction;
 import org.opengis.metadata.citation.PresentationForm;
 import org.apache.sis.internal.util.CollectionsExt;
 import org.apache.sis.internal.jaxb.LegacyNamespaces;
@@ -216,7 +218,12 @@ public final strictfp class DefaultCitat
      * @param  version  the metadata version to marshal.
      */
     private void testMarshalling(final String file, final Version version) throws JAXBException
{
-        final DefaultContact contact = new DefaultContact();
+        final DefaultOnlineResource rs = new DefaultOnlineResource(URI.create("https://tools.ietf.org/html/rfc1149"));
+        rs.setName(new SimpleInternationalString("IP over Avian Carriers"));
+        rs.setDescription(new SimpleInternationalString("High delay, low throughput, and
low altitude service."));
+        rs.setFunction(OnLineFunction.OFFLINE_ACCESS);
+
+        final DefaultContact contact = new DefaultContact(rs);
         contact.setContactInstructions(new SimpleInternationalString("Send carrier pigeon."));
         contact.getIdentifierMap().putSpecialized(IdentifierSpace.ID, "ip-protocol");
         final DefaultCitation c = new DefaultCitation("Fight against poverty");
@@ -226,7 +233,9 @@ public final strictfp class DefaultCitat
         ));
         c.getDates().add(new DefaultCitationDate(TestUtilities.date("2015-10-17 00:00:00"),
DateType.ADOPTED));
         c.getPresentationForms().add(PresentationForm.PHYSICAL_OBJECT);
-        // Check that XML file built by the marshaller is the same as the example file.
+        /*
+         * Check that XML file built by the marshaller is the same as the example file.
+         */
         assertMarshalEqualsFile(file, c, version, "xlmns:*", "xsi:schemaLocation");
     }
 

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/citation/Citation
(legacy).xml
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/citation/Citation%20%28legacy%29.xml?rev=1821923&r1=1821922&r2=1821923&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/citation/Citation
(legacy).xml (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/citation/Citation
(legacy).xml Mon Jan 22 19:01:10 2018
@@ -47,6 +47,23 @@
       </gmd:individualName>
       <gmd:contactInfo>
         <gmd:CI_Contact id="ip-protocol">
+          <gmd:onlineResource>
+            <gmd:CI_OnlineResource>
+              <gmd:linkage>
+                <gmd:URL>https://tools.ietf.org/html/rfc1149</gmd:URL>
+              </gmd:linkage>
+              <gmd:name>
+                <gco:CharacterString>IP over Avian Carriers</gco:CharacterString>
+              </gmd:name>
+              <gmd:description>
+                <gco:CharacterString>High delay, low throughput, and low altitude service.</gco:CharacterString>
+              </gmd:description>
+              <gmd:function>
+                <gmd:CI_OnLineFunctionCode codeList="http://schemas.opengis.net/iso/19139/20070417/resources/Codelist/gmxCodelists.xml#CI_OnLineFunctionCode"
+                                           codeListValue="offlineAccess">Offline access</gmd:CI_OnLineFunctionCode>
+              </gmd:function>
+            </gmd:CI_OnlineResource>
+          </gmd:onlineResource>
           <gmd:contactInstructions>
             <gco:CharacterString>Send carrier pigeon.</gco:CharacterString>
           </gmd:contactInstructions>

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/citation/Citation.xml
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/citation/Citation.xml?rev=1821923&r1=1821922&r2=1821923&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/citation/Citation.xml
(original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/citation/Citation.xml
Mon Jan 22 19:01:10 2018
@@ -21,10 +21,11 @@
 <cit:CI_Citation
     xmlns:cit="http://standards.iso.org/iso/19115/-3/cit/1.0"
     xmlns:gco="http://standards.iso.org/iso/19115/-3/gco/1.0"
+    xmlns:gcx="http://standards.iso.org/iso/19115/-3/gcx/1.0"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns:xlink="http://www.w3.org/1999/xlink"
-    xsi:schemaLocation = "http://standards.iso.org/iso/19115/-3/cit/1.0
-                          http://standards.iso.org/iso/19115/-3/cit/1.0/cit.xsd">
+    xsi:schemaLocation = "http://standards.iso.org/iso/19115/-3/cit/1.0 http://standards.iso.org/iso/19115/-3/cit/1.0/cit.xsd
+                          http://standards.iso.org/iso/19115/-3/gcx/1.0 http://standards.iso.org/iso/19115/-3/gcx/1.0/gcx.xsd">
 
   <cit:title>
     <gco:CharacterString>Fight against poverty</gco:CharacterString>
@@ -54,6 +55,23 @@
           </cit:name>
           <cit:contactInfo>
             <cit:CI_Contact id="ip-protocol">
+              <cit:onlineResource>
+                <cit:CI_OnlineResource>
+                  <cit:linkage>
+                    <gcx:FileName src="https://tools.ietf.org/html/rfc1149">rfc1149</gcx:FileName>
+                  </cit:linkage>
+                  <cit:name>
+                    <gco:CharacterString>IP over Avian Carriers</gco:CharacterString>
+                  </cit:name>
+                  <cit:description>
+                    <gco:CharacterString>High delay, low throughput, and low altitude
service.</gco:CharacterString>
+                  </cit:description>
+                  <cit:function>
+                    <cit:CI_OnLineFunctionCode codeList="http://standards.iso.org/iso/19115/resources/Codelist/cat/codelists.xml#CI_OnLineFunctionCode"
+                                               codeListValue="offlineAccess">Offline access</cit:CI_OnLineFunctionCode>
+                  </cit:function>
+                </cit:CI_OnlineResource>
+              </cit:onlineResource>
               <cit:contactInstructions>
                 <gco:CharacterString>Send carrier pigeon.</gco:CharacterString>
               </cit:contactInstructions>

Modified: sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/URIAdapter.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/URIAdapter.java?rev=1821923&r1=1821922&r2=1821923&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/URIAdapter.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/URIAdapter.java
[UTF-8] Mon Jan 22 19:01:10 2018
@@ -28,10 +28,7 @@ import org.apache.sis.internal.jaxb.Cont
  * @author  Cédric Briançon (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
  * @version 0.4
- *
- * @see org.apache.sis.internal.jaxb.gmd.GO_URL
- *
- * @since 0.3
+ * @since   0.3
  * @module
  */
 public final class URIAdapter extends XmlAdapter<GO_CharacterString, URI> {

Modified: sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/xml/ReferenceResolver.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/xml/ReferenceResolver.java?rev=1821923&r1=1821922&r2=1821923&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/xml/ReferenceResolver.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/xml/ReferenceResolver.java
[UTF-8] Mon Jan 22 19:01:10 2018
@@ -100,7 +100,6 @@ public class ReferenceResolver {
      * @param  uuid     the {@code uuid} attributes.
      * @return an object of the given type for the given {@code uuid} attribute, or {@code
null} if none.
      */
-    @SuppressWarnings("unchecked")
     public <T> T resolve(final MarshalContext context, final Class<T> type, final
UUID uuid) {
         ensureNonNull("type", type);
         ensureNonNull("uuid", uuid);



Mime
View raw message