sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1822408 - in /sis/branches/ISO-19115-3/core: sis-metadata/src/main/java/org/apache/sis/metadata/iso/ sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/ sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification...
Date Sat, 27 Jan 2018 14:07:17 GMT
Author: desruisseaux
Date: Sat Jan 27 14:07:17 2018
New Revision: 1822408

URL: http://svn.apache.org/viewvc?rev=1822408&view=rev
Log:
Fix a few namespaces with the help of SchemaVerifier.

Modified:
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultApplicationSchemaInformation.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultPortrayalCatalogueReference.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultDataFile.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/package-info.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/package-info.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractTemporalAccuracy.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultNonQuantitativeAttributeAccuracy.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/SchemaVerifier.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/lineage/ProcessStep.xml
    sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/LegacyNamespaces.java
    sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/Schemas.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-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultApplicationSchemaInformation.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultApplicationSchemaInformation.java?rev=1822408&r1=1822407&r2=1822408&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultApplicationSchemaInformation.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultApplicationSchemaInformation.java
[UTF-8] Sat Jan 27 14:07:17 2018
@@ -23,6 +23,7 @@ import javax.xml.bind.annotation.adapter
 import org.opengis.metadata.ApplicationSchemaInformation;
 import org.opengis.metadata.citation.Citation;
 import org.opengis.metadata.citation.OnlineResource;
+import org.apache.sis.xml.Namespaces;
 import org.apache.sis.internal.jaxb.gco.CharSequenceAdapter;
 import org.apache.sis.internal.jaxb.metadata.CI_OnlineResource;
 
@@ -56,7 +57,7 @@ import org.apache.sis.internal.jaxb.meta
  * @module
  */
 @SuppressWarnings("CloneableClassWithoutClone")                 // ModifiableMetadata needs
shallow clones.
-@XmlType(name = "MD_ApplicationSchemaInformation_Type", propOrder = {
+@XmlType(name = "MD_ApplicationSchemaInformation_Type", namespace = Namespaces.MAS, propOrder
= {
     "name",
     "schemaLanguage",
     "constraintLanguage",
@@ -65,7 +66,7 @@ import org.apache.sis.internal.jaxb.meta
     "softwareDevelopmentFile",
     "softwareDevelopmentFileFormat"
 })
-@XmlRootElement(name = "MD_ApplicationSchemaInformation")
+@XmlRootElement(name = "MD_ApplicationSchemaInformation", namespace = Namespaces.MAS)
 public class DefaultApplicationSchemaInformation extends ISOMetadata implements ApplicationSchemaInformation
{
     /**
      * Serial number for inter-operability with different versions.

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultPortrayalCatalogueReference.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultPortrayalCatalogueReference.java?rev=1822408&r1=1822407&r2=1822408&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultPortrayalCatalogueReference.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultPortrayalCatalogueReference.java
[UTF-8] Sat Jan 27 14:07:17 2018
@@ -22,6 +22,7 @@ import javax.xml.bind.annotation.XmlElem
 import javax.xml.bind.annotation.XmlRootElement;
 import org.opengis.metadata.citation.Citation;
 import org.opengis.metadata.PortrayalCatalogueReference;
+import org.apache.sis.xml.Namespaces;
 
 
 /**
@@ -50,8 +51,8 @@ import org.opengis.metadata.PortrayalCat
  * @module
  */
 @SuppressWarnings("CloneableClassWithoutClone")                 // ModifiableMetadata needs
shallow clones.
-@XmlType(name = "MD_PortrayalCatalogueReference_Type")
-@XmlRootElement(name = "MD_PortrayalCatalogueReference")
+@XmlType(name = "MD_PortrayalCatalogueReference_Type", namespace = Namespaces.MPC)
+@XmlRootElement(name = "MD_PortrayalCatalogueReference", namespace = Namespaces.MPC)
 public class DefaultPortrayalCatalogueReference extends ISOMetadata implements PortrayalCatalogueReference
{
     /**
      * Serial number for compatibility with different versions.

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultDataFile.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultDataFile.java?rev=1822408&r1=1822407&r2=1822408&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultDataFile.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultDataFile.java
[UTF-8] Sat Jan 27 14:07:17 2018
@@ -54,11 +54,11 @@ import org.apache.sis.metadata.iso.ISOMe
  * @module
  */
 @SuppressWarnings("CloneableClassWithoutClone")                 // ModifiableMetadata needs
shallow clones.
-@XmlType(name = "MX_DataFile_Type", namespace = Namespaces.GCX, propOrder = {
+@XmlType(name = "MX_DataFile_Type", namespace = Namespaces.MDT, propOrder = {
     "featureTypes",
     "fileFormat"
 })
-@XmlRootElement(name = "MX_DataFile", namespace = Namespaces.GCX)
+@XmlRootElement(name = "MX_DataFile", namespace = Namespaces.MDT)
 public class DefaultDataFile extends ISOMetadata implements DataFile {
     /**
      * Serial number for inter-operability with different versions.

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/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/distribution/package-info.java?rev=1822408&r1=1822407&r2=1822408&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/package-info.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/package-info.java
[UTF-8] Sat Jan 27 14:07:17 2018
@@ -77,6 +77,7 @@
 @XmlSchema(location=Schemas.METADATA_XSD_DISTRIBUTION, elementFormDefault=XmlNsForm.QUALIFIED,
namespace=Namespaces.MRD, xmlns = {
     @XmlNs(prefix = "mcc", namespaceURI = Namespaces.MCC),
     @XmlNs(prefix = "mrd", namespaceURI = Namespaces.MRD),
+    @XmlNs(prefix = "mdt", namespaceURI = Namespaces.MDT),
     @XmlNs(prefix = "gco", namespaceURI = Namespaces.GCO),
     @XmlNs(prefix = "gmw", namespaceURI = Namespaces.GMW),
     @XmlNs(prefix = "gcx", namespaceURI = Namespaces.GCX),

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java?rev=1822408&r1=1822407&r2=1822408&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java
[UTF-8] Sat Jan 27 14:07:17 2018
@@ -22,6 +22,7 @@ import java.util.Collection;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
+import org.apache.sis.internal.jaxb.LegacyNamespaces;
 import org.opengis.metadata.Identifier;
 import org.opengis.metadata.citation.Citation;
 import org.opengis.metadata.identification.AggregateInformation;
@@ -65,12 +66,12 @@ import org.apache.sis.internal.metadata.
  */
 @Deprecated
 @SuppressWarnings("CloneableClassWithoutClone")                 // ModifiableMetadata needs
shallow clones.
-@XmlType(name = "MD_AggregateInformation_Type", propOrder = {
+@XmlType(name = "MD_AggregateInformation_Type", namespace = LegacyNamespaces.GMD, propOrder
= {
     "aggregateDataSetName",
     "aggregateDataSetIdentifier",
     // "associationType" and "initiativeType" will be written by parent class.
 })
-@XmlRootElement(name = "MD_AggregateInformation")
+@XmlRootElement(name = "MD_AggregateInformation", namespace = LegacyNamespaces.GMD)
 public class DefaultAggregateInformation extends DefaultAssociatedResource implements AggregateInformation
{
     /**
      * Serial number for compatibility with different versions.

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/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/package-info.java?rev=1822408&r1=1822407&r2=1822408&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/package-info.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/package-info.java
[UTF-8] Sat Jan 27 14:07:17 2018
@@ -91,6 +91,7 @@
     @XmlNs(prefix = "cit", namespaceURI = Namespaces.CIT),
     @XmlNs(prefix = "lan", namespaceURI = Namespaces.LAN),
     @XmlNs(prefix = "mcc", namespaceURI = Namespaces.MCC),
+    @XmlNs(prefix = "mas", namespaceURI = Namespaces.MAS),
     @XmlNs(prefix = "mex", namespaceURI = Namespaces.MEX),
     @XmlNs(prefix = "gco", namespaceURI = Namespaces.GCO),
     @XmlNs(prefix = "xsi", namespaceURI = Namespaces.XSI),

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractTemporalAccuracy.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractTemporalAccuracy.java?rev=1822408&r1=1822407&r2=1822408&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractTemporalAccuracy.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractTemporalAccuracy.java
[UTF-8] Sat Jan 27 14:07:17 2018
@@ -23,6 +23,7 @@ import org.opengis.metadata.quality.Temp
 import org.opengis.metadata.quality.TemporalValidity;
 import org.opengis.metadata.quality.TemporalConsistency;
 import org.opengis.metadata.quality.AccuracyOfATimeMeasurement;
+import org.apache.sis.xml.Namespaces;
 
 
 /**
@@ -48,8 +49,8 @@ import org.opengis.metadata.quality.Accu
  * @module
  */
 @SuppressWarnings("CloneableClassWithoutClone")                 // ModifiableMetadata needs
shallow clones.
-@XmlType(name = "AbstractDQ_TemporalAccuracy_Type")
-@XmlRootElement(name = "AbstractDQ_TemporalAccuracy")
+@XmlType(name = "AbstractDQ_TemporalAccuracy_Type", namespace = Namespaces.GMD)     // TODO:
renamed TemporalQuality
+@XmlRootElement(name = "AbstractDQ_TemporalAccuracy", namespace = Namespaces.GMD)
 @XmlSeeAlso({
     DefaultAccuracyOfATimeMeasurement.class,
     DefaultTemporalConsistency.class,

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultNonQuantitativeAttributeAccuracy.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultNonQuantitativeAttributeAccuracy.java?rev=1822408&r1=1822407&r2=1822408&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultNonQuantitativeAttributeAccuracy.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultNonQuantitativeAttributeAccuracy.java
[UTF-8] Sat Jan 27 14:07:17 2018
@@ -19,6 +19,7 @@ package org.apache.sis.metadata.iso.qual
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlRootElement;
 import org.opengis.metadata.quality.NonQuantitativeAttributeAccuracy;
+import org.apache.sis.xml.Namespaces;
 
 
 /**
@@ -43,8 +44,8 @@ import org.opengis.metadata.quality.NonQ
  * @module
  */
 @SuppressWarnings("CloneableClassWithoutClone")                 // ModifiableMetadata needs
shallow clones.
-@XmlType(name = "DQ_NonQuantitativeAttributeAccuracy_Type")
-@XmlRootElement(name = "DQ_NonQuantitativeAttributeAccuracy")
+@XmlType(name = "DQ_NonQuantitativeAttributeAccuracy_Type", namespace = Namespaces.GMD) 
   // TODO: renamed NonQuantitativeAttributeCorrectness
+@XmlRootElement(name = "DQ_NonQuantitativeAttributeAccuracy", namespace = Namespaces.GMD)
 public class DefaultNonQuantitativeAttributeAccuracy extends AbstractThematicAccuracy
         implements NonQuantitativeAttributeAccuracy
 {

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/SchemaVerifier.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/SchemaVerifier.java?rev=1822408&r1=1822407&r2=1822408&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/SchemaVerifier.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/SchemaVerifier.java
[UTF-8] Sat Jan 27 14:07:17 2018
@@ -24,9 +24,13 @@ import java.nio.file.Files;
 import java.nio.file.DirectoryStream;
 import java.nio.file.DirectoryIteratorException;
 import java.util.Map;
+import java.util.Set;
 import java.util.Deque;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.ArrayDeque;
+import java.util.Arrays;
+import java.util.Collections;
 import javax.xml.XMLConstants;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlSchema;
@@ -39,6 +43,7 @@ import org.w3c.dom.Document;
 import org.w3c.dom.NamedNodeMap;
 import org.xml.sax.SAXException;
 import org.apache.sis.util.StringBuilders;
+import org.apache.sis.internal.jaxb.LegacyNamespaces;
 
 
 
@@ -66,6 +71,18 @@ import org.apache.sis.util.StringBuilder
  */
 public final strictfp class SchemaVerifier {
     /**
+     * The root of ISO schemas. May be replaced by {@link #schemaRootDirectory} if a local
copy
+     * is available for faster tests.
+     */
+    private static final String SCHEMA_ROOT_DIRECTORY = "http://standards.iso.org/iso/";
+
+    /**
+     * Classes or properties having a JAXB annotation in this namespace should be deprecated.
+     */
+    private static final Set<String> DEPRECATED_NAMESPACES = Collections.unmodifiableSet(new
HashSet<>(
+            Arrays.asList(LegacyNamespaces.GMD, LegacyNamespaces.GMI)));
+
+    /**
      * The prefix of XML type names for properties. In ISO/OGC schemas, this prefix does
not appear
      * in the definition of class types but may appear in the definition of property types.
      */
@@ -96,9 +113,16 @@ public final strictfp class SchemaVerifi
     private static final char PREFIX_SEPARATOR = ':';
 
     /**
+     * If the computer contains a local copy of ISO schemas, path to that directory. Otherwise
{@code null}.
+     * If non-null, the {@code "http://standards.iso.org/iso/"} prefix in URL will be replaced
by that path.
+     * This field is usually {@code null}, but can be set to a non-null value for making
tests faster.
+     */
+    private final Path schemaRootDirectory;
+
+    /**
      * Root directory from which to search for classes.
      */
-    private final Path rootDirectory;
+    private final Path classRootDirectory;
 
     /**
      * A temporary buffer for miscellaneous string operations.
@@ -143,10 +167,13 @@ public final strictfp class SchemaVerifi
      * in the {@code "MyProject/target/classes/mypackage/MyClass.class"} file, then the root
directory
      * shall be {@code "MyProject/target/classes/"}.
      *
-     * @param  rootDirectory  the root of compiled class files.
-     */
-    public SchemaVerifier(final Path rootDirectory) {
-        this.rootDirectory = rootDirectory;
+     * @param  classRootDirectory   the root of compiled class files.
+     * @param  schemaRootDirectory  if the computer contains a local copy of ISO schemas,
path to that directory.
+     *                              Otherwise {@code null}. This is only for making tests
faster.
+     */
+    public SchemaVerifier(final Path classRootDirectory, final Path schemaRootDirectory)
{
+        this.classRootDirectory  = classRootDirectory;
+        this.schemaRootDirectory = schemaRootDirectory;
         factory = DocumentBuilderFactory.newInstance();
         factory.setNamespaceAware(true);
         buffer = new StringBuilder(100);
@@ -173,7 +200,7 @@ public final strictfp class SchemaVerifi
                     if (Files.isDirectory(path)) {
                         verify(path);
                     } else if (filename.endsWith(".class")) {
-                        path = rootDirectory.relativize(path);
+                        path = classRootDirectory.relativize(path);
                         buffer.setLength(0);
                         buffer.append(path.toString()).setLength(buffer.length() - 6);  
   // Remove ".class" suffix.
                         StringBuilders.replace(buffer, '/', '.');
@@ -386,22 +413,49 @@ public final strictfp class SchemaVerifi
         final Package pkg = type.getPackage();
         final XmlSchema schema = pkg.getAnnotation(XmlSchema.class);
         if (schema != null) {
-            final String location = schema.location();
+            String location = schema.location();
             if (XmlSchema.NO_LOCATION.equals(location)) {
                 throw new SchemaException("Package " + pkg.getName() + " does not specify
XML schema location.");
             }
+            if (location.startsWith(SCHEMA_ROOT_DIRECTORY)) {
+                if (!location.startsWith(schema.namespace())) {
+                    throw new SchemaException("XML schema location inconsistent with namespace
in " + pkg.getName() + " package.");
+                }
+                if (schemaRootDirectory != null) {
+                    location = schemaRootDirectory.resolve(location.substring(SCHEMA_ROOT_DIRECTORY.length())).toUri().toString();
+                }
+            }
             loadSchema(location);
         }
         /*
-         * Verify @XmlType and @XmlRootElement on the class.
+         * Verify @XmlType and @XmlRootElement on the class. First, we verify naming convention
+         * (type name should be same as root element name with "_Type" suffix appended).
Then,
+         * we verify that the name exists in the schema, and finally we check its namespace.
          */
+        final String className = type.getSimpleName();
         final XmlType xmlType = type.getDeclaredAnnotation(XmlType.class);
         if (xmlType != null) {
             final XmlRootElement root = type.getDeclaredAnnotation(XmlRootElement.class);
             if (root == null) {
-                throw new SchemaException("Missing @XmlRootElement in " + type.getSimpleName()
+ " class.");
+                throw new SchemaException("Missing @XmlRootElement in " + className + " class.");
             }
             verifyNamingConvention(type.getName(), root.name(), xmlType.name(), TYPE_SUFFIX);
+            final String namespace = xmlType.namespace();
+            if (!namespace.equals(root.namespace())) {
+                throw new SchemaException("Mismatched namespace in @XmlType and @XmlRootElement
of " + className + " class.");
+            }
+            final boolean isDeprecated = DEPRECATED_NAMESPACES.contains(namespace);
+            if (!isDeprecated && type.isAnnotationPresent(Deprecated.class)) {
+                throw new SchemaException("Unexpected deprecation status of " + className
+ " class.");
+            }
+            final Map<String,String> properties = typeDefinitions.get(root.name());
+            if (properties == null) {
+                if (!isDeprecated) {
+                    throw new SchemaException("Unknown name declared in @XmlRootElement of
" + className + " class.");
+                }
+            } else {
+                // TODO: scan for properties here.
+            }
         }
     }
 }

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/lineage/ProcessStep.xml
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/lineage/ProcessStep.xml?rev=1822408&r1=1822407&r2=1822408&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/lineage/ProcessStep.xml
(original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/lineage/ProcessStep.xml
Sat Jan 27 14:07:17 2018
@@ -21,19 +21,23 @@
 <gmi:LE_ProcessStep
     xmlns:gmd = "http://www.isotc211.org/2005/gmd"
     xmlns:gco = "http://www.isotc211.org/2005/gco"
-    xmlns:gmi = "http://www.isotc211.org/2005/gmi"
+    xmlns:gmi = "http://standards.iso.org/iso/19115/-2/gmi/1.0"
     xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation = "http://www.isotc211.org/2005/gmd http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd">
+    xsi:schemaLocation = "http://standards.iso.org/iso/19115/-2/gmi/1.0
+                          http://standards.iso.org/iso/19115/-2/gmi/1.0/gmi.xsd">
 
-  <!--
-    As of February 2011, there is not yet any XSD schema for the "gmi" namespace on the
-    OGC web site. Consequently the validation of this file does not work fully yet.
-  -->
   <gmd:description>
     <gco:CharacterString>Some process step.</gco:CharacterString>
   </gmd:description>
   <gmi:processingInformation>
     <gmi:LE_Processing>
+      <gmi:identifier>
+        <gmd:MD_Identifier>
+          <gmd:code>
+            <gco:CharacterString>P4</gco:CharacterString>
+          </gmd:code>
+        </gmd:MD_Identifier>
+      </gmi:identifier>
       <gmi:procedureDescription>
         <gco:CharacterString>Some procedure.</gco:CharacterString>
       </gmi:procedureDescription>

Modified: sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/LegacyNamespaces.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/LegacyNamespaces.java?rev=1822408&r1=1822407&r2=1822408&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/LegacyNamespaces.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/LegacyNamespaces.java
[UTF-8] Sat Jan 27 14:07:17 2018
@@ -69,7 +69,7 @@ public final class LegacyNamespaces {
      * The <code>{@value}</code> URL.
      * The usual prefix for this namespace is {@code "gmi"}.
      */
-    public static final String GMI = "http://www.isotc211.org/2005/gmi";
+    public static final String GMI = "http://standards.iso.org/iso/19115/-2/gmi/1.0";
 
     /**
      * The <code>{@value}</code> URL, used in ISO 19139:2007.

Modified: sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/Schemas.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/Schemas.java?rev=1822408&r1=1822407&r2=1822408&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/Schemas.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/Schemas.java
[UTF-8] Sat Jan 27 14:07:17 2018
@@ -58,14 +58,14 @@ public final class Schemas {
      */
     public static final String METADATA_XSD_BASE           = "http://standards.iso.org/iso/19115/-3/mdb/1.0/mdb.xsd",
                                METADATA_XSD_SPATIAL        = "http://standards.iso.org/iso/19115/-3/msr/1.0/msr.xsd",
-                               METADATA_XSD_QUALITY        = "http://standards.iso.org/iso/19157/-2/dqc/1.0/dqc.xsd",
+                               METADATA_XSD_QUALITY        = "http://standards.iso.org/iso/19157/-2/mdq/1.0/mdq.xsd",
                                METADATA_XSD_MAINTENANCE    = "http://standards.iso.org/iso/19115/-3/mmi/1.0/mmi.xsd",
                                METADATA_XSD_LINEAGE        = "http://standards.iso.org/iso/19115/-3/mrl/1.0/mrl.xsd",
                                METADATA_XSD_IDENTIFICATION = "http://standards.iso.org/iso/19115/-3/mri/1.0/mri.xsd",
                                METADATA_XSD_EXTENT         = "http://standards.iso.org/iso/19115/-3/gex/1.0/gex.xsd",
                                METADATA_XSD_DISTRIBUTION   = "http://standards.iso.org/iso/19115/-3/mrd/1.0/mrd.xsd",
                                METADATA_XSD_CONTENT        = "http://standards.iso.org/iso/19115/-3/mrc/1.0/mrc.xsd",
-                               METADATA_XSD_CONSTRAINT     = "http://standards.iso.org/iso/19115/-3/mrc/1.0/mrc.xsd",
+                               METADATA_XSD_CONSTRAINT     = "http://standards.iso.org/iso/19115/-3/mco/1.0/mco.xsd",
                                METADATA_XSD_CITATION       = "http://standards.iso.org/iso/19115/-3/cit/1.0/cit.xsd",
                                METADATA_XSD_ACQUISITION    = "http://standards.iso.org/iso/19115/-3/mac/1.0/mac.xsd";
 

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=1822408&r1=1822407&r2=1822408&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] Sat Jan 27 14:07:17 2018
@@ -1228,7 +1228,7 @@ http://standards.iso.org/iso/19157/-2/md
     measureIdentification
     nameOfMeasure
     result
-http://www.isotc211.org/2005/gmi
+http://standards.iso.org/iso/19115/-2/gmi/1.0
   LE_Algorithm
     <type>
     citation



Mime
View raw message