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/05 11:17:45 UTC

svn commit: r1823153 - in /sis/branches/ISO-19115-3/core: sis-metadata/src/test/java/org/apache/sis/test/xml/ sis-metadata/src/test/java/org/apache/sis/xml/ sis-utility/src/main/java/org/apache/sis/xml/ sis-utility/src/main/resources/org/apache/sis/xml/

Author: desruisseaux
Date: Mon Feb  5 11:17:45 2018
New Revision: 1823153

URL: http://svn.apache.org/viewvc?rev=1823153&view=rev
Log:
Regenerate NamespaceContent.txt after we verified JAXB annotations against XSD files.

Added:
    sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/xml/NamespaceContent.java   (with props)
Modified:
    sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/test/xml/SchemaException.java
    sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/xml/FilteredStreamResolver.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/test/java/org/apache/sis/test/xml/SchemaException.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/test/xml/SchemaException.java?rev=1823153&r1=1823152&r2=1823153&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/test/xml/SchemaException.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/test/xml/SchemaException.java [UTF-8] Mon Feb  5 11:17:45 2018
@@ -33,7 +33,7 @@ public final class SchemaException exten
      *
      * @param message  the detail message.
      */
-    SchemaException(final String message) {
+    public SchemaException(final String message) {
         super(message);
     }
 }

Added: sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/xml/NamespaceContent.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/xml/NamespaceContent.java?rev=1823153&view=auto
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/xml/NamespaceContent.java (added)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/xml/NamespaceContent.java [UTF-8] Mon Feb  5 11:17:45 2018
@@ -0,0 +1,217 @@
+/*
+ * 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.xml;
+
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.TreeSet;
+import java.nio.file.Path;
+import java.nio.file.Files;
+import java.nio.file.DirectoryStream;
+import java.nio.file.DirectoryIteratorException;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Collections;
+import java.lang.reflect.Method;
+import javax.xml.bind.annotation.XmlSchema;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import org.apache.sis.test.xml.SchemaException;
+import org.apache.sis.internal.jaxb.LegacyNamespaces;
+
+
+/**
+ * Creates the {@code NamespaceContent.txt} file. This class needs to be executed only when the content
+ * has changed, or for verifying the current file. Output format contains namespaces first, then classes,
+ * then properties. Example:
+ *
+ * {@preformat
+ * http://standards.iso.org/iso/19115/-3/cit/1.0
+ *   CI_Address
+ *     administrativeArea
+ *     city
+ *   CI_Citation
+ *     citedResponsibleParty
+ * }
+ */
+public final class NamespaceContent {
+    /**
+     * Properties in those namespaces do not have older namespaces to map from.
+     */
+    private static final Set<String> LEGACY_NAMESPACES = Collections.unmodifiableSet(new HashSet<>(
+            Arrays.asList(LegacyNamespaces.GMD, LegacyNamespaces.GMI, LegacyNamespaces.SRV)));
+
+    /**
+     * The {@value} string used in JAXB annotations for default names or namespaces.
+     */
+    private static final String DEFAULT = "##default";
+
+    /**
+     * Root directory from which to search for classes.
+     */
+    private final Path classRootDirectory;
+
+    /**
+     * The content to write. Keys in the first (outer) map are namespaces. Keys in the enclosed maps
+     * are class names. Keys in the enclosed set are property names.
+     */
+    private final Map<String, Map<String, Set<String>>> content;
+
+    /**
+     * Creates a new {@code NamespaceContent.txt} generator for classes under the given directory.
+     * The given directory shall be the root of {@code "*.class"} files.
+     *
+     * @param  classRootDirectory   the root of compiled class files.
+     */
+    public NamespaceContent(final Path classRootDirectory) {
+        this.classRootDirectory = classRootDirectory;
+        content = new TreeMap<>();
+    }
+
+    /**
+     * Gets the namespaces, types and properties for all class files in the given directory and sub-directories.
+     * Those information are memorized for future listing with {@link #print(Appendable)}.
+     *
+     * @param  directory  the directory to scan for classes, relative to class root directory.
+     * @throws IOException if an error occurred while reading files or schemas.
+     * @throws ClassNotFoundException if an error occurred while loading a {@code "*.class"} file.
+     * @throws SchemaException if two properties have the same name in the same class and namespace.
+     */
+    public void add(final Path directory) throws IOException, ClassNotFoundException, SchemaException {
+        try (DirectoryStream<Path> stream = Files.newDirectoryStream(classRootDirectory.resolve(directory))) {
+            for (Path path : stream) {
+                final String filename = path.getFileName().toString();
+                if (!filename.startsWith(".")) {
+                    if (Files.isDirectory(path)) {
+                        add(path);
+                    } else if (filename.endsWith(".class")) {
+                        path = classRootDirectory.relativize(path);
+                        String classname = path.toString();
+                        classname = classname.substring(0, classname.length() - 6).replace('/', '.');
+                        add(Class.forName(classname));
+                    }
+                }
+            }
+        } catch (DirectoryIteratorException e) {
+            throw e.getCause();
+        }
+    }
+
+    /**
+     * Gets the namespaces, types and properties for the given class.
+     * Properties defined in super-classes will be copied as if they were declared in-line.
+     * Those information are memorized for future listing with {@link #print(Appendable)}.
+     *
+     * @throws SchemaException if two properties have the same name in the same class and namespace.
+     */
+    private void add(Class<?> classe) throws SchemaException {
+        XmlRootElement root = classe.getDeclaredAnnotation(XmlRootElement.class);
+        if (root != null) {
+            /*
+             * Add the following entry:
+             *
+             *     http://a.namespace
+             *       PX_AClass
+             *         <type>
+             *
+             * Then list all properties below "PX_AClass". Note that the namespace may change because properties
+             * may be declared in different namespaces, but the class name stay the same. If the same properties
+             * are inherited by many classes, they will be repeated in each subclass.
+             */
+            final String topLevelTypeName = root.name();
+            String classNS = namespace(classe, root.namespace());
+            add(classNS, topLevelTypeName, FilteredStreamResolver.TYPE_KEY);
+            for (;; classNS = namespace(classe, root.namespace())) {
+                for (final Method method : classe.getDeclaredMethods()) {
+                    if (!method.isBridge()) {
+                        final XmlElement xe = method.getDeclaredAnnotation(XmlElement.class);
+                        if (xe != null) {
+                            String namespace = xe.namespace();
+                            if (namespace.equals(DEFAULT)) {
+                                namespace = classNS;
+                            }
+                            add(namespace, topLevelTypeName, xe.name());
+                        }
+                    }
+                }
+                classe = classe.getSuperclass();
+                root = classe.getDeclaredAnnotation(XmlRootElement.class);
+                if (root == null) break;
+            }
+        } else {
+            /*
+             * In Apache SIS implementation, classes without JAXB annotation except on a single method are
+             * code lists or enumerations. Those classes have exactly one method annotated with @XmlElement,
+             * and that method actually gives a type, not a property (because of the way OGC/ISO wrap every
+             * properties in a type).
+             */
+            XmlElement singleton = null;
+            for (final Method method : classe.getDeclaredMethods()) {
+                final XmlElement xe = method.getDeclaredAnnotation(XmlElement.class);
+                if (xe != null) {
+                    if (singleton != null) return;
+                    singleton = xe;
+                }
+            }
+            if (singleton != null) {
+                add(namespace(classe, singleton.namespace()), singleton.name(), FilteredStreamResolver.TYPE_KEY);
+            }
+        }
+    }
+
+    private static String namespace(final Class<?> classe, String classNS) {
+        if (classNS.equals(DEFAULT)) {
+            classNS = classe.getPackage().getDeclaredAnnotation(XmlSchema.class).namespace();
+        }
+        return classNS;
+    }
+
+    /**
+     * Adds a property in the given class in the given namespace.
+     */
+    private void add(final String namespace, final String typeName, final String property) throws SchemaException {
+        if (!LEGACY_NAMESPACES.contains(namespace)) {
+            if (!content.computeIfAbsent(namespace, (k) -> new TreeMap<>())
+                        .computeIfAbsent(typeName,  (k) -> new TreeSet<>())
+                        .add(property))
+            {
+                if (typeName.equals("Integer")) return;     // Exception because of GO_Integer and GO_Integer64.
+                throw new SchemaException(String.format("Duplicated property %s.%s in:%n%s", typeName, property, namespace));
+            }
+        }
+    }
+
+    /**
+     * Prints the {@code NamespaceContent.txt} file.
+     *
+     * @param  out  where to print the content.
+     * @throws IOException if an error occurred while printing the content.
+     */
+    public void print(final Appendable out) throws IOException {
+        for (final Map.Entry<String, Map<String, Set<String>>> e : content.entrySet()) {
+            out.append(e.getKey()).append('\n');                                            // Namespace
+            for (final Map.Entry<String, Set<String>> c : e.getValue().entrySet()) {
+                out.append("  ").append(c.getKey()).append('\n');                           // Class
+                for (final String p : c.getValue()) {
+                    out.append("    ").append(p).append('\n');                              // Property
+                }
+            }
+        }
+    }
+}

Propchange: sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/xml/NamespaceContent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/ISO-19115-3/core/sis-metadata/src/test/java/org/apache/sis/xml/NamespaceContent.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8

Modified: sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/xml/FilteredStreamResolver.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/xml/FilteredStreamResolver.java?rev=1823153&r1=1823152&r2=1823153&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/xml/FilteredStreamResolver.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/xml/FilteredStreamResolver.java [UTF-8] Mon Feb  5 11:17:45 2018
@@ -68,7 +68,7 @@ final class FilteredStreamResolver exten
      * A key in {@link #NAMESPACES} sub-map meaning that the value (a namespace URI) is for the type instead
      * than for an attribute. Shall be the same string than the one used in {@value #FILENAME} resource file.
      */
-    private static final String TYPE_KEY = "<type>";
+    static final String TYPE_KEY = "<type>";
 
     /**
      * The mapping from (<var>type</var>, <var>attribute</var>) pairs to namespaces.

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=1823153&r1=1823152&r2=1823153&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] Mon Feb  5 11:17:45 2018
@@ -5,6 +5,10 @@
 # Lines with four-spaces indentation are attributes.
 #
 http://standards.iso.org/iso/19115/-3/cit/1.0
+  AbstractCI_Party
+    <type>
+    contactInfo
+    name
   CI_Address
     <type>
     administrativeArea
@@ -19,7 +23,6 @@ http://standards.iso.org/iso/19115/-3/ci
     ISSN
     alternateTitle
     citedResponsibleParty
-    collectiveTitle
     date
     edition
     editionDate
@@ -66,10 +69,6 @@ http://standards.iso.org/iso/19115/-3/ci
     individual
     logo
     name
-  CI_Party
-    <type>
-    contactInfo
-    name
   CI_PresentationFormCode
     <type>
   CI_Responsibility
@@ -80,6 +79,7 @@ http://standards.iso.org/iso/19115/-3/ci
   CI_ResponsibleParty
     extent
     party
+    role
   CI_RoleCode
     <type>
   CI_Series
@@ -89,10 +89,8 @@ http://standards.iso.org/iso/19115/-3/ci
     page
   CI_Telephone
     <type>
-    facsimile
     number
     numberType
-    voice
   CI_TelephoneTypeCode
     <type>
 http://standards.iso.org/iso/19115/-3/gco/1.0
@@ -127,15 +125,12 @@ http://standards.iso.org/iso/19115/-3/gc
     <type>
   FileName
     <type>
-  MX_DataFile
-    <type>
-    featureType
-    fileFormat
   MimeFileType
     <type>
-  QE_CoverageResult
-    resultFile
 http://standards.iso.org/iso/19115/-3/gex/1.0
+  AbstractEX_GeographicExtent
+    <type>
+    extentTypeCode
   EX_BoundingPolygon
     <type>
     extentTypeCode
@@ -157,9 +152,6 @@ http://standards.iso.org/iso/19115/-3/ge
     <type>
     extentTypeCode
     geographicIdentifier
-  EX_GeographicExtent
-    <type>
-    extentTypeCode
   EX_SpatialTemporalExtent
     <type>
     extent
@@ -199,12 +191,14 @@ http://standards.iso.org/iso/19115/-3/ma
     objective
     operation
     platform
+  MI_ContextCode
+    <type>
   MI_EnvironmentalRecord
     <type>
     averageAirTemperature
     maxAltitude
     maxRelativeHumidity
-    meteorologicalConditions
+    meterologicalConditions
   MI_Event
     <type>
     context
@@ -215,6 +209,8 @@ http://standards.iso.org/iso/19115/-3/ma
     sequence
     time
     trigger
+  MI_GeometryTypeCode
+    <type>
   MI_Instrument
     <type>
     citation
@@ -232,6 +228,8 @@ http://standards.iso.org/iso/19115/-3/ma
     priority
     sensingInstrument
     type
+  MI_ObjectiveTypeCode
+    <type>
   MI_Operation
     <type>
     childOperation
@@ -245,6 +243,8 @@ http://standards.iso.org/iso/19115/-3/ma
     significantEvent
     status
     type
+  MI_OperationTypeCode
+    <type>
   MI_Plan
     <type>
     citation
@@ -264,6 +264,8 @@ http://standards.iso.org/iso/19115/-3/ma
     extent
     identifier
     relatedEvent
+  MI_PriorityCode
+    <type>
   MI_RequestedDate
     <type>
     latestAcceptableDate
@@ -277,7 +279,21 @@ http://standards.iso.org/iso/19115/-3/ma
     recipient
     requestedDate
     requestor
-    satisfiedPlan
+    satisifiedPlan
+  MI_SequenceCode
+    <type>
+  MI_TriggerCode
+    <type>
+http://standards.iso.org/iso/19115/-3/mas/1.0
+  MD_ApplicationSchemaInformation
+    <type>
+    constraintLanguage
+    graphicsFile
+    name
+    schemaAscii
+    schemaLanguage
+    softwareDevelopmentFile
+    softwareDevelopmentFileFormat
 http://standards.iso.org/iso/19115/-3/mcc/1.0
   MD_BrowseGraphic
     <type>
@@ -293,9 +309,28 @@ http://standards.iso.org/iso/19115/-3/mc
     codeSpace
     description
     version
+  MD_ProgressCode
+    <type>
+  MD_Scope
+    <type>
+    extent
+    level
+    levelDescription
   MD_ScopeCode
     <type>
+  MD_ScopeDescription
+    <type>
+    attributeInstances
+    attributes
+    dataset
+    featureInstances
+    features
+    other
+  MD_SpatialRepresentationTypeCode
+    <type>
 http://standards.iso.org/iso/19115/-3/mco/1.0
+  MD_ClassificationCode
+    <type>
   MD_Constraints
     <type>
     constraintApplicationScope
@@ -335,33 +370,9 @@ http://standards.iso.org/iso/19115/-3/mc
     useLimitation
     userNote
 http://standards.iso.org/iso/19115/-3/mdb/1.0
-  DQ_EvaluationMethodTypeCode
-    <type>
-  MD_ApplicationSchemaInformation
-    <type>
-    constraintLanguage
-    graphicsFile
-    name
-    schemaAscii
-    schemaLanguage
-    softwareDevelopmentFile
-    softwareDevelopmentFileFormat
-  MD_CellGeometryCode
-    <type>
-  MD_ClassificationCode
-    <type>
-  MD_GeometricObjectTypeCode
-    <type>
-  MD_ImagingConditionCode
-    <type>
-  MD_KeywordTypeCode
-    <type>
-  MD_MediumFormatCode
-    <type>
-  MD_MediumNameCode
-    <type>
   MD_Metadata
     <type>
+    acquisitionInformation
     alternativeMetadataReference
     applicationSchemaInfo
     contact
@@ -389,33 +400,16 @@ http://standards.iso.org/iso/19115/-3/md
     <type>
     name
     resourceScope
-  MD_ObligationCode
-    <type>
-  MD_PortrayalCatalogueReference
-    <type>
-    portrayalCatalogueCitation
-  MD_ProgressCode
-    <type>
-  MD_SpatialRepresentationTypeCode
-    <type>
-  MD_TopologyLevelCode
-    <type>
   MI_Metadata
-    alternativeMetadataReference
     acquisitionInformation
+    alternativeMetadataReference
     applicationSchemaInfo
-    characterSet
     contact
     contentInfo
     dataQualityInfo
-    dataSetURI
     dateInfo
-    dateStamp
     defaultLocale
     distributionInfo
-    fileIdentifier
-    hierarchyLevel
-    hierarchyLevelName
     identificationInfo
     metadataConstraints
     metadataExtensionInfo
@@ -425,17 +419,19 @@ http://standards.iso.org/iso/19115/-3/md
     metadataProfile
     metadataScope
     metadataStandard
-    metadataStandardName
-    metadataStandardVersion
     otherLocale
-    parentIdentifier
     parentMetadata
     portrayalCatalogueInfo
     referenceSystemInfo
     resourceLineage
     spatialRepresentationInfo
-  URL
+http://standards.iso.org/iso/19115/-3/mdt/1.0
+  MX_DataFile
     <type>
+    featureTypes
+    fileDescription
+    fileName
+    fileType
 http://standards.iso.org/iso/19115/-3/mex/1.0
   MD_DatatypeCode
     <type>
@@ -444,7 +440,6 @@ http://standards.iso.org/iso/19115/-3/me
     condition
     dataType
     definition
-    domainCode
     domainValue
     maximumOccurrence
     name
@@ -452,43 +447,29 @@ http://standards.iso.org/iso/19115/-3/me
     parentEntity
     rationale
     rule
-    shortName
     source
   MD_MetadataExtensionInformation
     <type>
     extendedElementInformation
     extensionOnLineResource
 http://standards.iso.org/iso/19115/-3/mmi/1.0
-  DQ_Scope
-    extent
-    level
   MD_MaintenanceFrequencyCode
     <type>
   MD_MaintenanceInformation
     <type>
     contact
-    dateOfNextUpdate
     maintenanceAndUpdateFrequency
     maintenanceDate
     maintenanceNote
     maintenanceScope
-    updateScope
-    updateScopeDescription
     userDefinedMaintenanceFrequency
-  MD_Scope
-    <type>
-    extent
-    level
-    levelDescription
-  MD_ScopeDescription
+http://standards.iso.org/iso/19115/-3/mpc/1.0
+  MD_PortrayalCatalogueReference
     <type>
-    attributeInstances
-    attributes
-    dataset
-    featureInstances
-    features
-    other
+    portrayalCatalogueCitation
 http://standards.iso.org/iso/19115/-3/mrc/1.0
+  AbstractMD_ContentInformation
+    <type>
   MD_AttributeGroup
     <type>
     attribute
@@ -497,12 +478,16 @@ http://standards.iso.org/iso/19115/-3/mr
     <type>
     bandBoundaryDefinition
     bitsPerValue
+    boundMax
+    boundMin
+    boundUnits
     description
-    descriptor
+    detectedPolarisation
     maxValue
     meanValue
     minValue
     name
+    nominalSpatialResolution
     numberOfValues
     offset
     otherProperty
@@ -512,27 +497,24 @@ http://standards.iso.org/iso/19115/-3/mr
     sequenceIdentifier
     standardDeviation
     toneGradation
+    transferFunctionType
+    transmittedPolarisation
     units
-  MD_ContentInformation
-    <type>
   MD_CoverageContentTypeCode
     <type>
   MD_CoverageDescription
     <type>
     attributeDescription
     attributeGroup
-    contentType
-    dimension
     processingLevelCode
     rangeElementDescription
   MD_FeatureCatalogueDescription
     <type>
     complianceCode
     featureCatalogueCitation
-    featureTypeInfo
     featureTypes
     includedWithDataset
-    language
+    locale
   MD_FeatureTypeInfo
     <type>
     featureInstanceCount
@@ -544,8 +526,6 @@ http://standards.iso.org/iso/19115/-3/mr
     cameraCalibrationInformationAvailability
     cloudCoverPercentage
     compressionGenerationQuantity
-    contentType
-    dimension
     filmDistortionInformationAvailability
     illuminationAzimuthAngle
     illuminationElevationAngle
@@ -556,26 +536,21 @@ http://standards.iso.org/iso/19115/-3/mr
     radiometricCalibrationDataAvailability
     rangeElementDescription
     triangulationIndicator
+  MD_ImagingConditionCode
+    <type>
   MD_RangeDimension
     <type>
     description
-    descriptor
     name
     sequenceIdentifier
   MD_SampleDimension
     <type>
     bitsPerValue
-    boundMax
-    boundMin
-    boundUnits
     description
-    descriptor
-    detectedPolarization
     maxValue
     meanValue
     minValue
     name
-    nominalSpatialResolution
     numberOfValues
     offset
     otherProperty
@@ -583,8 +558,6 @@ http://standards.iso.org/iso/19115/-3/mr
     scaleFactor
     sequenceIdentifier
     standardDeviation
-    transferFunctionType
-    transmittedPolarization
     units
   MI_Band
     bandBoundaryDefinition
@@ -593,8 +566,7 @@ http://standards.iso.org/iso/19115/-3/mr
     boundMin
     boundUnits
     description
-    descriptor
-    detectedPolarization
+    detectedPolarisation
     maxValue
     meanValue
     minValue
@@ -610,13 +582,13 @@ http://standards.iso.org/iso/19115/-3/mr
     standardDeviation
     toneGradation
     transferFunctionType
-    transmittedPolarization
+    transmittedPolarisation
     units
+  MI_BandDefinition
+    <type>
   MI_CoverageDescription
     attributeDescription
     attributeGroup
-    contentType
-    dimension
     processingLevelCode
     rangeElementDescription
   MI_ImageDescription
@@ -625,8 +597,6 @@ http://standards.iso.org/iso/19115/-3/mr
     cameraCalibrationInformationAvailability
     cloudCoverPercentage
     compressionGenerationQuantity
-    contentType
-    dimension
     filmDistortionInformationAvailability
     illuminationAzimuthAngle
     illuminationElevationAngle
@@ -637,6 +607,13 @@ http://standards.iso.org/iso/19115/-3/mr
     radiometricCalibrationDataAvailability
     rangeElementDescription
     triangulationIndicator
+  MI_RangeElementDescription
+    <type>
+    definition
+    name
+    rangeElement
+  MI_TransferFunctionTypeCode
+    <type>
 http://standards.iso.org/iso/19115/-3/mrd/1.0
   MD_DigitalTransferOptions
     <type>
@@ -665,9 +642,6 @@ http://standards.iso.org/iso/19115/-3/mr
     formatDistributor
     formatSpecificationCitation
     medium
-    name
-    specification
-    version
   MD_Medium
     <type>
     density
@@ -677,49 +651,27 @@ http://standards.iso.org/iso/19115/-3/mr
     mediumNote
     name
     volumes
+  MD_MediumFormatCode
+    <type>
   MD_StandardOrderProcess
     <type>
     fees
-    orderingInstructions
     orderOptions
-    orderOptionType
+    orderOptionsType
+    orderingInstructions
     plannedAvailableDateTime
     turnaround
 http://standards.iso.org/iso/19115/-3/mri/1.0
-  DS_AssociationTypeCode
-    <type>
-  DS_InitiativeTypeCode
-    <type>
-  MD_AggregateInformation
-    <type>
-    aggregateDataSetIdentifier
-    aggregateDataSetName
-    associationType
-    initiativeType
-    metadataReference
-    name
-  MD_AssociatedResource
-    <type>
-    associationType
-    initiativeType
-    metadataReference
-    name
-  MD_DataIdentification
+  AbstractMD_Identification
     <type>
     abstract
     additionalDocumentation
-    aggregationInfo
     associatedResource
-    characterSet
     citation
     credit
-    defaultLocale
     descriptiveKeywords
-    environmentDescription
     extent
     graphicOverview
-    language
-    otherLocale
     pointOfContact
     processingLevel
     purpose
@@ -730,20 +682,36 @@ http://standards.iso.org/iso/19115/-3/mr
     spatialRepresentationType
     spatialResolution
     status
-    supplementalInformation
     temporalResolution
     topicCategory
-  MD_Identification
+  DS_AssociationTypeCode
+    <type>
+  DS_InitiativeTypeCode
+    <type>
+  MD_AggregateInformation
+    associationType
+    initiativeType
+    metadataReference
+    name
+  MD_AssociatedResource
+    <type>
+    associationType
+    initiativeType
+    metadataReference
+    name
+  MD_DataIdentification
     <type>
     abstract
     additionalDocumentation
-    aggregationInfo
     associatedResource
     citation
     credit
+    defaultLocale
     descriptiveKeywords
+    environmentDescription
     extent
     graphicOverview
+    otherLocale
     pointOfContact
     processingLevel
     purpose
@@ -754,6 +722,7 @@ http://standards.iso.org/iso/19115/-3/mr
     spatialRepresentationType
     spatialResolution
     status
+    supplementalInformation
     temporalResolution
     topicCategory
   MD_KeywordClass
@@ -761,6 +730,8 @@ http://standards.iso.org/iso/19115/-3/mr
     className
     conceptIdentifier
     ontology
+  MD_KeywordTypeCode
+    <type>
   MD_Keywords
     <type>
     keyword
@@ -772,13 +743,10 @@ http://standards.iso.org/iso/19115/-3/mr
     denominator
   MD_Resolution
     <type>
-    angularDistance
     distance
     equivalentScale
     levelOfDetail
     vertical
-  MD_TopicCategoryCode
-    <type>
   MD_Usage
     <type>
     additionalDocumentation
@@ -791,7 +759,6 @@ http://standards.iso.org/iso/19115/-3/mr
   SV_ServiceIdentification
     abstract
     additionalDocumentation
-    aggregationInfo
     associatedResource
     citation
     credit
@@ -811,8 +778,15 @@ http://standards.iso.org/iso/19115/-3/mr
     temporalResolution
     topicCategory
 http://standards.iso.org/iso/19115/-3/mrl/1.0
+  LE_Algorithm
+    <type>
+    citation
+    description
+  LE_NominalResolution
+    <type>
+    groundResolution
+    scanningResolution
   LE_ProcessStep
-    dateTime
     description
     output
     processingInformation
@@ -822,14 +796,24 @@ http://standards.iso.org/iso/19115/-3/mr
     report
     scope
     source
+    stepDateTime
+  LE_ProcessStepReport
+    <type>
+    description
+    fileType
+    name
+  LE_Processing
+    <type>
+    algorithm
+    documentation
+    identifier
+    procedureDescription
+    runTimeParameters
+    softwareReference
   LE_Source
     description
-    processedLevel
-    resolution
-    scaleDenominator
     scope
     sourceCitation
-    sourceExtent
     sourceMetadata
     sourceReferenceSystem
     sourceSpatialResolution
@@ -843,20 +827,21 @@ http://standards.iso.org/iso/19115/-3/mr
     statement
   LI_ProcessStep
     <type>
-    dateTime
     description
+    output
+    processingInformation
     processor
     rationale
     reference
+    report
     scope
     source
+    stepDateTime
   LI_Source
     <type>
     description
-    scaleDenominator
     scope
     sourceCitation
-    sourceExtent
     sourceMetadata
     sourceReferenceSystem
     sourceSpatialResolution
@@ -866,6 +851,13 @@ http://standards.iso.org/iso/19115/-3/mr
     <type>
     referenceSystemIdentifier
 http://standards.iso.org/iso/19115/-3/msr/1.0
+  AbstractMD_SpatialRepresentation
+    <type>
+  AbstractMI_GeolocationInformation
+    <type>
+    qualityInfo
+  MD_CellGeometryCode
+    <type>
   MD_Dimension
     <type>
     dimensionDescription
@@ -875,6 +867,8 @@ http://standards.iso.org/iso/19115/-3/ms
     resolution
   MD_DimensionNameTypeCode
     <type>
+  MD_GeometricObjectTypeCode
+    <type>
   MD_GeometricObjects
     <type>
     geometricObjectCount
@@ -883,7 +877,8 @@ http://standards.iso.org/iso/19115/-3/ms
     <type>
     axisDimensionProperties
     cellGeometry
-    centerPoint
+    centrePoint
+    checkPoint
     checkPointAvailability
     checkPointDescription
     cornerPoints
@@ -897,6 +892,7 @@ http://standards.iso.org/iso/19115/-3/ms
     axisDimensionProperties
     cellGeometry
     controlPointAvailability
+    geolocationInformation
     georeferencedParameters
     numberOfDimensions
     orientationParameterAvailability
@@ -909,18 +905,26 @@ http://standards.iso.org/iso/19115/-3/ms
     cellGeometry
     numberOfDimensions
     transformationParameterAvailability
-  MD_PixelOrientationCode
-    <type>
-  MD_SpatialRepresentation
+  MD_TopologyLevelCode
     <type>
   MD_VectorSpatialRepresentation
     <type>
     geometricObjects
     topologyLevel
+  MI_GCP
+    <type>
+    accuracyReport
+  MI_GCPCollection
+    <type>
+    collectionIdentification
+    collectionName
+    coordinateReferenceSystem
+    gcp
+    qualityInfo
   MI_Georectified
     axisDimensionProperties
     cellGeometry
-    centerPoint
+    centrePoint
     checkPoint
     checkPointAvailability
     checkPointDescription
@@ -949,6 +953,7 @@ http://standards.iso.org/iso/19115/-3/sr
     operation
     resource
     resourceReference
+    scopedName
   SV_CouplingType
     <type>
   SV_OperationChainMetadata
@@ -987,343 +992,139 @@ http://standards.iso.org/iso/19115/-3/sr
     serviceStandard
     serviceType
     serviceTypeVersion
+http://standards.iso.org/iso/19157/-2/dqc/1.0
+  AbstractDQ_Completeness
+    dateTime
+  AbstractDQ_Element
+    dateTime
+  AbstractDQ_LogicalConsistency
+    dateTime
+  AbstractDQ_PositionalAccuracy
+    dateTime
+  AbstractDQ_TemporalAccuracy
+    dateTime
+  AbstractDQ_ThematicAccuracy
+    dateTime
+  DQ_AbsoluteExternalPositionalAccuracy
+    dateTime
+  DQ_AccuracyOfATimeMeasurement
+    dateTime
+  DQ_CompletenessCommission
+    dateTime
+  DQ_CompletenessOmission
+    dateTime
+  DQ_ConceptualConsistency
+    dateTime
+  DQ_DomainConsistency
+    dateTime
+  DQ_FormatConsistency
+    dateTime
+  DQ_GriddedDataPositionalAccuracy
+    dateTime
+  DQ_NonQuantitativeAttributeAccuracy
+    dateTime
+  DQ_QuantitativeAttributeAccuracy
+    dateTime
+  DQ_RelativeInternalPositionalAccuracy
+    dateTime
+  DQ_TemporalConsistency
+    dateTime
+  DQ_TemporalValidity
+    dateTime
+  DQ_ThematicClassificationCorrectness
+    dateTime
+  DQ_TopologicalConsistency
+    dateTime
+  QE_Usability
+    dateTime
 http://standards.iso.org/iso/19157/-2/mdq/1.0
+  AbstractDQ_Completeness
+    <type>
+    result
+  AbstractDQ_Element
+    <type>
+    result
+  AbstractDQ_LogicalConsistency
+    <type>
+    result
+  AbstractDQ_PositionalAccuracy
+    <type>
+    result
+  AbstractDQ_Result
+    <type>
+  AbstractDQ_TemporalAccuracy
+    result
+  AbstractDQ_ThematicAccuracy
+    <type>
+    result
   DQ_AbsoluteExternalPositionalAccuracy
     <type>
-    dateTime
-    evaluationMethodDescription
-    evaluationMethodType
-    evaluationProcedure
-    measureDescription
-    measureIdentification
-    nameOfMeasure
     result
   DQ_AccuracyOfATimeMeasurement
     <type>
-    dateTime
-    evaluationMethodDescription
-    evaluationMethodType
-    evaluationProcedure
-    measureDescription
-    measureIdentification
-    nameOfMeasure
-    result
-  DQ_Completeness
-    <type>
-    dateTime
-    evaluationMethodDescription
-    evaluationMethodType
-    evaluationProcedure
-    measureDescription
-    measureIdentification
-    nameOfMeasure
     result
   DQ_CompletenessCommission
     <type>
-    dateTime
-    evaluationMethodDescription
-    evaluationMethodType
-    evaluationProcedure
-    measureDescription
-    measureIdentification
-    nameOfMeasure
     result
   DQ_CompletenessOmission
     <type>
-    dateTime
-    evaluationMethodDescription
-    evaluationMethodType
-    evaluationProcedure
-    measureDescription
-    measureIdentification
-    nameOfMeasure
     result
   DQ_ConceptualConsistency
     <type>
-    dateTime
-    evaluationMethodDescription
-    evaluationMethodType
-    evaluationProcedure
-    measureDescription
-    measureIdentification
-    nameOfMeasure
     result
   DQ_ConformanceResult
     <type>
     explanation
-    pass
     specification
   DQ_DataQuality
     <type>
-    lineage
     report
     scope
   DQ_DomainConsistency
     <type>
-    dateTime
-    evaluationMethodDescription
-    evaluationMethodType
-    evaluationProcedure
-    measureDescription
-    measureIdentification
-    nameOfMeasure
-    result
-  DQ_Element
-    <type>
-    dateTime
-    evaluationMethodDescription
-    evaluationMethodType
-    evaluationProcedure
-    measureDescription
-    measureIdentification
-    nameOfMeasure
     result
+  DQ_EvaluationMethodTypeCode
+    <type>
   DQ_FormatConsistency
     <type>
-    dateTime
-    evaluationMethodDescription
-    evaluationMethodType
-    evaluationProcedure
-    measureDescription
-    measureIdentification
-    nameOfMeasure
     result
   DQ_GriddedDataPositionalAccuracy
     <type>
-    dateTime
-    evaluationMethodDescription
-    evaluationMethodType
-    evaluationProcedure
-    measureDescription
-    measureIdentification
-    nameOfMeasure
-    result
-  DQ_LogicalConsistency
-    <type>
-    dateTime
-    evaluationMethodDescription
-    evaluationMethodType
-    evaluationProcedure
-    measureDescription
-    measureIdentification
-    nameOfMeasure
     result
   DQ_NonQuantitativeAttributeAccuracy
-    <type>
-    dateTime
-    evaluationMethodDescription
-    evaluationMethodType
-    evaluationProcedure
-    measureDescription
-    measureIdentification
-    nameOfMeasure
-    result
-  DQ_PositionalAccuracy
-    <type>
-    dateTime
-    evaluationMethodDescription
-    evaluationMethodType
-    evaluationProcedure
-    measureDescription
-    measureIdentification
-    nameOfMeasure
     result
   DQ_QuantitativeAttributeAccuracy
     <type>
-    dateTime
-    evaluationMethodDescription
-    evaluationMethodType
-    evaluationProcedure
-    measureDescription
-    measureIdentification
-    nameOfMeasure
     result
   DQ_QuantitativeResult
     <type>
-    errorStatistic
     value
-    valueType
+    valueRecordType
     valueUnit
   DQ_RelativeInternalPositionalAccuracy
     <type>
-    dateTime
-    evaluationMethodDescription
-    evaluationMethodType
-    evaluationProcedure
-    measureDescription
-    measureIdentification
-    nameOfMeasure
-    result
-  DQ_Result
-    <type>
-  DQ_Scope
-    <type>
-    levelDescription
-  DQ_TemporalAccuracy
-    <type>
-    dateTime
-    evaluationMethodDescription
-    evaluationMethodType
-    evaluationProcedure
-    measureDescription
-    measureIdentification
-    nameOfMeasure
     result
   DQ_TemporalConsistency
     <type>
-    dateTime
-    evaluationMethodDescription
-    evaluationMethodType
-    evaluationProcedure
-    measureDescription
-    measureIdentification
-    nameOfMeasure
     result
   DQ_TemporalValidity
     <type>
-    dateTime
-    evaluationMethodDescription
-    evaluationMethodType
-    evaluationProcedure
-    measureDescription
-    measureIdentification
-    nameOfMeasure
-    result
-  DQ_ThematicAccuracy
-    <type>
-    dateTime
-    evaluationMethodDescription
-    evaluationMethodType
-    evaluationProcedure
-    measureDescription
-    measureIdentification
-    nameOfMeasure
     result
   DQ_ThematicClassificationCorrectness
     <type>
-    dateTime
-    evaluationMethodDescription
-    evaluationMethodType
-    evaluationProcedure
-    measureDescription
-    measureIdentification
-    nameOfMeasure
     result
   DQ_TopologicalConsistency
     <type>
-    dateTime
-    evaluationMethodDescription
-    evaluationMethodType
-    evaluationProcedure
-    measureDescription
-    measureIdentification
-    nameOfMeasure
-    result
-  QE_Usability
-    dateTime
-    evaluationMethodDescription
-    evaluationMethodType
-    evaluationProcedure
-    measureDescription
-    measureIdentification
-    nameOfMeasure
     result
-http://standards.iso.org/iso/19115/-2/gmi/1.0
-  LE_Algorithm
-    <type>
-    citation
-    description
-  LE_NominalResolution
-    <type>
-    groundResolution
-    scanningResolution
-  LE_ProcessStep
-    <type>
-  LE_ProcessStepReport
-    <type>
-    description
-    fileType
-    name
-  LE_Processing
-    <type>
-    algorithm
-    documentation
-    identifier
-    procedureDescription
-    runTimeParameters
-    softwareReference
-  LE_Source
-    <type>
-  LI_ProcessStep
-    output
-    processingInformation
-    report
-  LI_Source
-    processedLevel
-    resolution
-  MD_Georectified
-    checkPoint
-  MD_Georeferenceable
-    geolocationInformation
-  MD_Metadata
-    acquisitionInformation
-  MI_Band
-    <type>
-  MI_BandDefinition
-    <type>
-  MI_ContextCode
-    <type>
-  MI_CoverageDescription
-    <type>
-  MI_GCP
-    <type>
-    accuracyReport
-  MI_GCPCollection
-    <type>
-    collectionIdentification
-    collectionName
-    coordinateReferenceSystem
-    gcp
-    qualityInfo
-  MI_GeolocationInformation
-    <type>
-    qualityInfo
-  MI_GeometryTypeCode
-    <type>
-  MI_Georectified
-    <type>
-  MI_Georeferenceable
-    <type>
-  MI_ImageDescription
-    <type>
-  MI_Metadata
-    <type>
-  MI_ObjectiveTypeCode
-    <type>
-  MI_OperationTypeCode
-    <type>
-  MI_PolarizationOrientationCode
-    <type>
-  MI_PriorityCode
-    <type>
-  MI_RangeElementDescription
-    <type>
-    definition
-    name
-  MI_SequenceCode
-    <type>
-  MI_TransferFunctionTypeCode
-    <type>
-  MI_TriggerCode
-    <type>
   QE_CoverageResult
     <type>
     resultContentDescription
+    resultFile
     resultFormat
     resultSpatialRepresentation
     spatialRepresentationType
   QE_Usability
-    <type>
+    result
 http://www.isotc211.org/2005/gts
   TM_Duration
     <type>