sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1823772 - 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/java/org/apache/sis/metadata/iso/constrain...
Date Sat, 10 Feb 2018 13:57:27 GMT
Author: desruisseaux
Date: Sat Feb 10 13:57:27 2018
New Revision: 1823772

URL: http://svn.apache.org/viewvc?rev=1823772&view=rev
Log:
Fix more sis-metadata tests (not yet all of them).

Added:
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/LegacyURL.java
  (with props)
Modified:
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultOnlineResource.java
    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/java/org/apache/sis/metadata/iso/constraint/DefaultLegalConstraintsTest.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/test/xml/AnnotationConsistencyCheck.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/identification/ServiceIdentification
(legacy).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/internal/jaxb/gmx/FileName.java
    sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmx/MimeFileType.java
    sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmx/MimeFileTypeAdapter.java
    sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmx/package-info.java
    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/java/org/apache/sis/xml/Pooled.java
    sis/branches/ISO-19115-3/core/sis-utility/src/test/java/org/apache/sis/test/XMLComparator.java

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultOnlineResource.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultOnlineResource.java?rev=1823772&r1=1823771&r2=1823772&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultOnlineResource.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultOnlineResource.java
[UTF-8] Sat Feb 10 13:57:27 2018
@@ -17,6 +17,7 @@
 package org.apache.sis.metadata.iso.citation;
 
 import java.net.URI;
+import java.net.URISyntaxException;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
@@ -24,7 +25,10 @@ import javax.xml.bind.annotation.adapter
 import org.opengis.util.InternationalString;
 import org.opengis.metadata.citation.OnLineFunction;
 import org.opengis.metadata.citation.OnlineResource;
+import org.apache.sis.internal.jaxb.FilterByVersion;
+import org.apache.sis.internal.jaxb.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.gco.StringAdapter;
+import org.apache.sis.internal.jaxb.gco.URIAdapter;
 import org.apache.sis.metadata.iso.ISOMetadata;
 
 
@@ -56,6 +60,7 @@ import org.apache.sis.metadata.iso.ISOMe
 @SuppressWarnings("CloneableClassWithoutClone")                 // ModifiableMetadata needs
shallow clones.
 @XmlType(name = "CI_OnlineResource_Type", propOrder = {
     "linkage",
+    "linkageURL",               // Legacy ISO 19139:2007 way to format the linkage.
     "protocol",
     "applicationProfile",
     "name",
@@ -263,6 +268,7 @@ public class DefaultOnlineResource exten
      */
     @Override
     @XmlElement(name = "linkage", required = true)
+    @XmlJavaTypeAdapter(URIAdapter.Since2014.class)
     public URI getLinkage() {
         return linkage;
     }
@@ -339,4 +345,37 @@ public class DefaultOnlineResource exten
         checkWritePermission();
         protocolRequest = newValue;
     }
+
+
+
+
+    //////////////////////////////////////////////////////////////////////////////////////////////////
+    ////////                                                                            
     ////////
+    ////////                               XML support with JAXB                        
     ////////
+    ////////                                                                            
     ////////
+    ////////        The following methods are invoked by JAXB using reflection (even if 
     ////////
+    ////////        they are private) or are helpers for other methods invoked by JAXB. 
     ////////
+    ////////        Those methods can be safely removed if Geographic Markup Language   
     ////////
+    ////////        (GML) support is not needed.                                        
     ////////
+    ////////                                                                            
     ////////
+    //////////////////////////////////////////////////////////////////////////////////////////////////
+
+    /**
+     * Invoked at marshalling time for writing URL as defined by ISO 19139:2007.
+     * That legacy standard wraps the URL in a {@code <gmd:URL>} element.
+     */
+    @XmlElement(name = "linkage", namespace = LegacyNamespaces.GMD)
+    private LegacyURL getLinkageURL() {
+        return FilterByVersion.LEGACY_METADATA.accept() ? LegacyURL.wrap(getLinkage()) :
null;
+    }
+
+    /**
+     * Invoked at ISO 19139:2007 unmarshalling time for storing the value of {@code <gmd:URL>}
element.
+     */
+    @SuppressWarnings("unused")
+    private void setLinkageURL(final LegacyURL newValue) throws URISyntaxException {
+        if (LegacyURL.isNonNull(newValue)) {
+            setLinkage(newValue.unwrap());
+        }
+    }
 }

Added: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/LegacyURL.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/LegacyURL.java?rev=1823772&view=auto
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/LegacyURL.java
(added)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/LegacyURL.java
[UTF-8] Sat Feb 10 13:57:27 2018
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.metadata.iso.citation;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.adapters.NormalizedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import org.apache.sis.internal.jaxb.Context;
+import org.apache.sis.internal.jaxb.LegacyNamespaces;
+
+
+/**
+ * JAXB wrapper for an URI in a {@code <gmd:URL>} element, for ISO 19139 compliance.
+ * Note that while this object is called {@code "URL"}, we actually use the {@link URI}
+ * Java object.
+ *
+ * @author  Cédric Briançon (Geomatys)
+ * @author  Martin Desruisseaux (Geomatys)
+ * @version 1.0
+ * @since   1.0
+ * @module
+ */
+final class LegacyURL {
+    /**
+     * The URI as a string. We uses a string in order to allow the user
+     * to catch potential error at unmarshalling time.
+     */
+    @XmlJavaTypeAdapter(NormalizedStringAdapter.class)
+    @XmlElement(name = "URL", namespace = LegacyNamespaces.GMD)
+    private String uri;
+
+    /**
+     * Empty constructor for JAXB only.
+     */
+    LegacyURL() {
+    }
+
+    /**
+     * Builds an adapter for the given URI.
+     *
+     * @param  value  the URI to marshal.
+     */
+    private LegacyURL(final URI value) {
+        uri = value.toString();
+    }
+
+    /**
+     * Returns {@code true} if the given value contains a non-null URI.
+     */
+    static boolean isNonNull(final LegacyURL value) {
+        return (value != null) && (value.uri != null);
+    }
+
+    /**
+     * Converts a {@link URI} to the object to be marshalled in a XML file.
+     *
+     * @param  value  the URI value.
+     * @return the wrapper for the given URI.
+     */
+    static LegacyURL wrap(final URI value) {
+        return (value != null) ? new LegacyURL(value) : null;
+    }
+
+    /**
+     * Converts an URI read from a XML stream to the object which will contains the value.
+     *
+     * @return a {@link URI} which represents the metadata value.
+     * @throws URISyntaxException if the given value contains an invalid URI.
+     */
+    URI unwrap() throws URISyntaxException {
+        final Context context = Context.current();
+        return Context.converter(context).toURI(context, uri);
+    }
+}

Propchange: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/LegacyURL.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/LegacyURL.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8

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=1823772&r1=1823771&r2=1823772&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] Sat Feb 10 13:57:27 2018
@@ -118,7 +118,6 @@
     @XmlJavaTypeAdapter(MD_Identifier.class),
 
     // Java types, primitive types and basic OGC types handling
-    @XmlJavaTypeAdapter(URIAdapter.class),
     @XmlJavaTypeAdapter(StringAdapter.class),
     @XmlJavaTypeAdapter(InternationalStringAdapter.class)
 })

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=1823772&r1=1823771&r2=1823772&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] Sat Feb 10 13:57:27 2018
@@ -235,7 +235,7 @@ public final strictfp class DefaultCitat
         /*
          * Check that XML file built by the marshaller is the same as the example file.
          */
-        assertMarshalEqualsFile(file, c, version, "xlmns:*", "xsi:schemaLocation");
+        assertMarshalEqualsFile(file, c, version, "xmlns:*", "xsi:schemaLocation");
     }
 
     /**

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/constraint/DefaultLegalConstraintsTest.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/constraint/DefaultLegalConstraintsTest.java?rev=1823772&r1=1823771&r2=1823772&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/constraint/DefaultLegalConstraintsTest.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/constraint/DefaultLegalConstraintsTest.java
[UTF-8] Sat Feb 10 13:57:27 2018
@@ -103,14 +103,14 @@ public final strictfp class DefaultLegal
     @Test
     public void testUnmarshallEmptyCodeListValue() throws JAXBException {
         final DefaultLegalConstraints c = unmarshal(
-                "<gmd:MD_LegalConstraints xmlns:gmd=\"" + Namespaces.GMD + "\">\n"
+
-                "  <gmd:accessConstraints>\n" +
-                "    <gmd:MD_RestrictionCode codeListValue=\"intellectualPropertyRights\"
codeList=\"http://www.isotc211.org/2005/resources/codeList.xml#MD_RestrictionCode\"/>\n"
+
-                "  </gmd:accessConstraints>\n" +
-                "  <gmd:useConstraints>\n" + // Below is an intentionally empty code
list value (SIS-157)
-                "    <gmd:MD_RestrictionCode codeListValue=\"\" codeList=\"http://www.isotc211.org/2005/resources/codeList.xml#MD_RestrictionCode\"/>\n"
+
-                "  </gmd:useConstraints>\n" +
-                "</gmd:MD_LegalConstraints>");
+                "<mco:MD_LegalConstraints xmlns:mco=\"" + Namespaces.MCO + "\">\n"
+
+                "  <mco:accessConstraints>\n" +
+                "    <mco:MD_RestrictionCode codeListValue=\"intellectualPropertyRights\"
codeList=\"http://standards.iso.org/iso/19115/resources/Codelist/cat/codelists.xml#MD_RestrictionCode\"/>\n"
+
+                "  </mco:accessConstraints>\n" +
+                "  <mco:useConstraints>\n" +            // Below is an intentionally
empty code list value (SIS-157)
+                "    <mco:MD_RestrictionCode codeListValue=\"\" codeList=\"http://standards.iso.org/iso/19115/resources/Codelist/cat/codelists.xml#MD_RestrictionCode\"/>\n"
+
+                "  </mco:useConstraints>\n" +
+                "</mco:MD_LegalConstraints>");
         /*
          * Verify metadata property.
          */

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/test/xml/AnnotationConsistencyCheck.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/test/xml/AnnotationConsistencyCheck.java?rev=1823772&r1=1823771&r2=1823772&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/test/xml/AnnotationConsistencyCheck.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/test/xml/AnnotationConsistencyCheck.java
[UTF-8] Sat Feb 10 13:57:27 2018
@@ -216,8 +216,10 @@ public abstract strictfp class Annotatio
      * <p>The default implementation recognizes the
      * {@linkplain Specification#ISO_19115   ISO 19115},
      * {@linkplain Specification#ISO_19115_2 ISO 19115-2},
+     * {@linkplain Specification#ISO_19115_3 ISO 19115-3},
      * {@linkplain Specification#ISO_19139   ISO 19139} and
-     * {@linkplain Specification#ISO_19108   ISO 19108} specifications.
+     * {@linkplain Specification#ISO_19108   ISO 19108} specifications,
+     * with a hard-coded list of exceptions to the general rule.
      * Subclasses shall override this method if they need to support more namespaces.</p>
      *
      * <p>Note that a more complete verification is done by {@link SchemaCompliance}.
@@ -226,7 +228,7 @@ public abstract strictfp class Annotatio
      * <p>The prefix for the given namespace will be fetched by
      * {@link Namespaces#getPreferredPrefix(String, String)}.</p>
      *
-     * @param  impl  the implementation class, {@link CodeList} or {@link Enum} type.
+     * @param  impl  the implementation class ({@link CodeList} or {@link Enum} type).
      * @param  uml   the UML associated to the class or the method.
      * @return the expected namespace.
      * @throws IllegalArgumentException if the given UML is unknown to this method.
@@ -261,6 +263,12 @@ public abstract strictfp class Annotatio
                 }
                 break;
             }
+            case "errorStatistic": {
+                if (org.opengis.metadata.quality.QuantitativeResult.class.isAssignableFrom(impl))
{
+                    return LegacyNamespaces.GMD;            // Deprecated property in a type
not yet upgraded.
+                }
+                break;
+            }
             case "nameOfMeasure":
             case "measureIdentification":
             case "measureDescription":
@@ -553,6 +561,12 @@ public abstract strictfp class Annotatio
     protected boolean isIgnored(final Method method) {
         switch (method.getName()) {
             /*
+             * Types for which JAXB binding has not yet implemented.
+             */
+            case "getGeographicCoordinates": {
+                return org.opengis.metadata.spatial.GCP.class.isAssignableFrom(method.getDeclaringClass());
+            }
+            /*
              * GeoAPI extension for inter-operability with JDK API, not defined in ISO specification.
              */
             case "getCurrency": {

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/identification/ServiceIdentification
(legacy).xml
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/identification/ServiceIdentification%20%28legacy%29.xml?rev=1823772&r1=1823771&r2=1823772&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/identification/ServiceIdentification
(legacy).xml (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/identification/ServiceIdentification
(legacy).xml Sat Feb 10 13:57:27 2018
@@ -62,7 +62,7 @@
       <srv:DCP>
         <srv:DCPList codeList="http://schemas.opengis.net/iso/19139/20070417/resources/Codelist/gmxCodelists.xml#DCPList"
codeListValue="WebServices">Web services</srv:DCPList>
       </srv:DCP>
-      <srv:parameters>
+      <srv:parameters>          <!-- This has been renamed <srv:parameter>
in ISO 19115:2014. -->
         <srv:SV_Parameter>
           <srv:name>
             <gco:aName>

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=1823772&r1=1823771&r2=1823772&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] Sat Feb 10 13:57:27 2018
@@ -19,6 +19,7 @@ package org.apache.sis.internal.jaxb.gco
 import java.net.URI;
 import java.net.URISyntaxException;
 import javax.xml.bind.annotation.adapters.XmlAdapter;
+import org.apache.sis.internal.jaxb.FilterByVersion;
 import org.apache.sis.internal.jaxb.Context;
 
 
@@ -27,11 +28,11 @@ import org.apache.sis.internal.jaxb.Cont
  *
  * @author  Cédric Briançon (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
- * @version 0.4
+ * @version 1.0
  * @since   0.3
  * @module
  */
-public final class URIAdapter extends XmlAdapter<GO_CharacterString, URI> {
+public class URIAdapter extends XmlAdapter<GO_CharacterString, URI> {
     /**
      * Empty constructor for JAXB.
      */
@@ -77,4 +78,23 @@ public final class URIAdapter extends Xm
         }
         return null;
     }
+
+    /**
+     * Wraps the value only if marshalling ISO 19115-3 element.
+     * Otherwise (i.e. if marshalling a legacy ISO 19139:2007 document), omit the element.
+     */
+    public static final class Since2014 extends URIAdapter {
+        /** Empty constructor used only by JAXB. */
+        private Since2014() {
+        }
+
+        /**
+         * Wraps the given value in an ISO 19115-3 element, unless we are marshalling an
older document.
+         *
+         * @return a non-null value only if marshalling ISO 19115-3 or newer.
+         */
+        @Override public GO_CharacterString marshal(final URI value) {
+            return FilterByVersion.CURRENT_METADATA.accept() ? super.marshal(value) : null;
+        }
+    }
 }

Modified: sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmx/FileName.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmx/FileName.java?rev=1823772&r1=1823771&r2=1823772&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmx/FileName.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmx/FileName.java
[UTF-8] Sat Feb 10 13:57:27 2018
@@ -23,13 +23,13 @@ import javax.xml.bind.annotation.XmlRoot
 
 
 /**
- * The {@code <gmx:FileName>} element, which may be used as a substitute of {@code
<gco:CharacterString>}.
+ * The {@code <gcx:FileName>} element, which may be used as a substitute of {@code
<gco:CharacterString>}.
  * This is used for the URI in {@link org.apache.sis.metadata.iso.identification.DefaultBrowseGraphic}.
  * Example:
  *
  * {@preformat xml
  *   <fileName>
- *      <gmx:FileName src="../path/wkj98723.jpg">Overview</gmx:FileName>
+ *      <gcx:FileName src="../path/wkj98723.jpg">Overview</gcx:FileName>
  *   </fileName>
  * }
  *

Modified: sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmx/MimeFileType.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmx/MimeFileType.java?rev=1823772&r1=1823771&r2=1823772&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmx/MimeFileType.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmx/MimeFileType.java
[UTF-8] Sat Feb 10 13:57:27 2018
@@ -23,13 +23,13 @@ import javax.xml.bind.annotation.XmlRoot
 
 
 /**
- * The {@code <gmx:MimeFileType>} element, which may be used as a substitute of {@code
<gco:CharacterString>}.
+ * The {@code <gcx:MimeFileType>} element, which may be used as a substitute of {@code
<gco:CharacterString>}.
  * This is used in {@link org.apache.sis.metadata.iso.identification.DefaultBrowseGraphic}.
  * Example:
  *
  * {@preformat xml
  *   <fileType>
- *     <gmx:MimeFileType type="image/tiff">Graphic TIFF</gmx:MimeFileType>
+ *     <gcx:MimeFileType type="image/tiff">Graphic TIFF</gcx:MimeFileType>
  *   </fileType>
  * }
  *

Modified: sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmx/MimeFileTypeAdapter.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmx/MimeFileTypeAdapter.java?rev=1823772&r1=1823771&r2=1823772&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmx/MimeFileTypeAdapter.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmx/MimeFileTypeAdapter.java
[UTF-8] Sat Feb 10 13:57:27 2018
@@ -23,7 +23,7 @@ import org.apache.sis.internal.jaxb.gco.
 
 
 /**
- * JAXB adapter wrapping a {@code String} value with a {@code <gmx:MimeFileType>} element.
+ * JAXB adapter wrapping a {@code String} value with a {@code <gcx:MimeFileType>} element.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 0.4

Modified: sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmx/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmx/package-info.java?rev=1823772&r1=1823771&r2=1823772&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmx/package-info.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmx/package-info.java
[UTF-8] Sat Feb 10 13:57:27 2018
@@ -16,8 +16,8 @@
  */
 
 /**
- * Miscellaneous objects and adapters defined in the {@code "gmx"} namespace.
- * In ISO 19115-3, this namespace was changed to {@code "gcx"}.
+ * Miscellaneous objects and adapters defined in the {@code "gcx"} namespace.
+ * In legacy ISO 19139:2007, this namespace was to {@code "gmx"}.
  *
  * @author  Guilhem Legal (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)

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=1823772&r1=1823771&r2=1823772&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] Sat Feb 10 13:57:27 2018
@@ -85,7 +85,7 @@ enum FilterVersion {
 
     /**
      * GML using the legacy {@code "http://www.opengis.net/gml"} namespace.
-     * Note that the use of GML 3.2 may imply that use of ISO 19139:2007,
+     * Note that the use of GML 3.2 may imply the use of ISO 19139:2007,
      * which requires the use of {@link #ALL}.
      */
     GML31(Namespaces.GML, LegacyNamespaces.GML),

Modified: sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/xml/Pooled.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/xml/Pooled.java?rev=1823772&r1=1823771&r2=1823772&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/xml/Pooled.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/xml/Pooled.java
[UTF-8] Sat Feb 10 13:57:27 2018
@@ -251,7 +251,7 @@ abstract class Pooled {
      */
     final FilterVersion getFilterVersion() {
         /*
-         * If no version is specified, the the default behavior will be:
+         * If no version is specified, then the default behavior will be:
          *   - enable namespace replacement on unmarshalling (in order to accept all versions)
          *   - disable namespace replacement on marshalling (in order to use latest version).
          */

Modified: sis/branches/ISO-19115-3/core/sis-utility/src/test/java/org/apache/sis/test/XMLComparator.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/test/java/org/apache/sis/test/XMLComparator.java?rev=1823772&r1=1823771&r2=1823772&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-utility/src/test/java/org/apache/sis/test/XMLComparator.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-utility/src/test/java/org/apache/sis/test/XMLComparator.java
[UTF-8] Sat Feb 10 13:57:27 2018
@@ -761,7 +761,7 @@ public strictfp class XMLComparator {
          */
         final String ns = node.getNamespaceURI();
         if (ns != null) {
-            buffer.append(ns).append(':');
+            buffer.append('{').append(ns).append('}');
         }
         buffer.append(node.getNodeName());
         boolean hasText = appendTextContent(buffer, node);



Mime
View raw message