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/24 16:14:01 UTC

svn commit: r1825254 [2/14] - in /sis/branches/JDK8: ./ application/sis-console/src/test/java/org/apache/sis/console/ core/sis-build-helper/src/main/resources/org/apache/sis/internal/book/ core/sis-metadata/ core/sis-metadata/src/main/java/org/apache/s...

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_KeywordTypeCode.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_KeywordTypeCode.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_KeywordTypeCode.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_KeywordTypeCode.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -20,15 +20,16 @@ import javax.xml.bind.annotation.XmlElem
 import org.opengis.metadata.identification.KeywordType;
 import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
 import org.apache.sis.internal.jaxb.gmd.CodeListUID;
+import org.apache.sis.xml.Namespaces;
 
 
 /**
- * JAXB adapter for {@link KeywordType}, in order to integrate the value in an element
- * complying with ISO-19139 standard. See package documentation for more information
- * about the handling of {@code CodeList} in ISO-19139.
+ * JAXB adapter for {@link KeywordType}
+ * in order to wrap the value in an XML element as specified by ISO 19115-3 standard.
+ * See package documentation for more information about the handling of {@code CodeList} in ISO 19115-3.
  *
  * @author  Cédric Briançon (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
@@ -72,7 +73,7 @@ public final class MD_KeywordTypeCode ex
      * @return the value to be marshalled.
      */
     @Override
-    @XmlElement(name = "MD_KeywordTypeCode")
+    @XmlElement(name = "MD_KeywordTypeCode", namespace = Namespaces.MRI)
     public CodeListUID getElement() {
         return identifier;
     }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MaintenanceFrequencyCode.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MaintenanceFrequencyCode.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MaintenanceFrequencyCode.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MaintenanceFrequencyCode.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -20,15 +20,17 @@ import javax.xml.bind.annotation.XmlElem
 import org.opengis.metadata.maintenance.MaintenanceFrequency;
 import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
 import org.apache.sis.internal.jaxb.gmd.CodeListUID;
+import org.apache.sis.xml.Namespaces;
 
 
 /**
- * JAXB adapter for {@link MaintenanceFrequency}, in order to integrate the value in an element
- * complying with ISO-19139 standard. See package documentation for more information about the
- * handling of {@code CodeList} in ISO-19139.
+ * JAXB adapter for {@link MaintenanceFrequency}
+ * in order to wrap the value in an XML element as specified by ISO 19115-3 standard.
+ * See package documentation for more information about the handling of {@code CodeList} in ISO 19115-3.
  *
  * @author  Cédric Briançon (Geomatys)
- * @version 0.3
+ * @author  Cullen Rombach (Image Matters)
+ * @version 1.0
  * @since   0.3
  * @module
  */
@@ -74,7 +76,7 @@ public final class MD_MaintenanceFrequen
      * @return the value to be marshalled.
      */
     @Override
-    @XmlElement(name = "MD_MaintenanceFrequencyCode")
+    @XmlElement(name = "MD_MaintenanceFrequencyCode", namespace = Namespaces.MMI)
     public CodeListUID getElement() {
         return identifier;
     }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumFormatCode.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumFormatCode.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumFormatCode.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumFormatCode.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -20,15 +20,16 @@ import javax.xml.bind.annotation.XmlElem
 import org.opengis.metadata.distribution.MediumFormat;
 import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
 import org.apache.sis.internal.jaxb.gmd.CodeListUID;
+import org.apache.sis.xml.Namespaces;
 
 
 /**
- * JAXB adapter for {@link MediumFormat}, in order to integrate the value in an element
- * complying with ISO-19139 standard. See package documentation for more information about the
- * handling of {@code CodeList} in ISO-19139.
+ * JAXB adapter for {@link MediumFormat}
+ * in order to wrap the value in an XML element as specified by ISO 19115-3 standard.
+ * See package documentation for more information about the handling of {@code CodeList} in ISO 19115-3.
  *
  * @author  Cédric Briançon (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
@@ -72,7 +73,7 @@ public final class MD_MediumFormatCode e
      * @return the value to be marshalled.
      */
     @Override
-    @XmlElement(name = "MD_MediumFormatCode")
+    @XmlElement(name = "MD_MediumFormatCode", namespace = Namespaces.MRD)
     public CodeListUID getElement() {
         return identifier;
     }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumNameCode.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumNameCode.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumNameCode.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumNameCode.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -20,15 +20,16 @@ import javax.xml.bind.annotation.XmlElem
 import org.opengis.metadata.distribution.MediumName;
 import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
 import org.apache.sis.internal.jaxb.gmd.CodeListUID;
+import org.apache.sis.internal.jaxb.LegacyNamespaces;
 
 
 /**
- * JAXB adapter for {@link MediumName}, in order to integrate the value in an element
- * complying with ISO-19139 standard. See package documentation for more information
- * about the handling of {@code CodeList} in ISO-19139.
+ * JAXB adapter for {@link MediumName}
+ * in order to wrap the value in an XML element as specified by ISO 19115-3 standard.
+ * See package documentation for more information about the handling of {@code CodeList} in ISO 19115-3.
  *
  * @author  Cédric Briançon (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
@@ -72,7 +73,7 @@ public final class MD_MediumNameCode ext
      * @return the value to be marshalled.
      */
     @Override
-    @XmlElement(name = "MD_MediumNameCode")
+    @XmlElement(name = "MD_MediumNameCode", namespace = LegacyNamespaces.GMD)
     public CodeListUID getElement() {
         return identifier;
     }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ObligationCode.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ObligationCode.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ObligationCode.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ObligationCode.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -19,15 +19,16 @@ package org.apache.sis.internal.jaxb.cod
 import javax.xml.bind.annotation.XmlElement;
 import org.opengis.annotation.Obligation;
 import org.apache.sis.internal.jaxb.gmd.EnumAdapter;
+import org.apache.sis.xml.Namespaces;
 
 
 /**
- * JAXB adapter for {@link Obligation}, in order to wraps the value in an element
- * complying with ISO-19139 standard. See package documentation for more information
- * about the handling of {@code CodeList} in ISO-19139.
+ * JAXB adapter for {@link Obligation}
+ * in order to wrap the value in an XML element as specified by ISO 19115-3 standard.
+ * See package documentation for more information about the handling of {@code CodeList} in ISO 19115-3.
  *
  * @author  Cédric Briançon (Geomatys)
- * @version 0.5
+ * @version 1.0
  * @since   0.3
  * @module
  */
@@ -35,7 +36,7 @@ public final class MD_ObligationCode ext
     /**
      * The enumeration value.
      */
-    @XmlElement(name = "MD_ObligationCode")
+    @XmlElement(name = "MD_ObligationCode", namespace = Namespaces.MEX)
     private String value;
 
     /**

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_PixelOrientationCode.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_PixelOrientationCode.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_PixelOrientationCode.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_PixelOrientationCode.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -19,15 +19,17 @@ package org.apache.sis.internal.jaxb.cod
 import javax.xml.bind.annotation.XmlElement;
 import org.opengis.metadata.spatial.PixelOrientation;
 import org.apache.sis.internal.jaxb.gmd.EnumAdapter;
+import org.apache.sis.xml.Namespaces;
 
 
 /**
- * JAXB adapter for {@link PixelOrientation}, in order to integrate the value in an element
- * complying with ISO-19139 standard. See package documentation for more information about
- * the handling of {@code CodeList} in ISO-19139.
+ * JAXB adapter for {@link PixelOrientation}
+ * in order to wrap the value in an XML element as specified by ISO 19115-3 standard.
+ * See package documentation for more information about the handling of {@code CodeList} in ISO 19115-3.
  *
  * @author  Cédric Briançon (Geomatys)
- * @version 0.5
+ * @author  Cullen Rombach (Image Matters)
+ * @version 1.0
  * @since   0.3
  * @module
  */
@@ -35,7 +37,7 @@ public final class MD_PixelOrientationCo
     /**
      * The enumeration value.
      */
-    @XmlElement(name = "MD_PixelOrientationCode")
+    @XmlElement(name = "MD_PixelOrientationCode", namespace = Namespaces.MSR)
     private String value;
 
     /**

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ProgressCode.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ProgressCode.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ProgressCode.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ProgressCode.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -20,15 +20,16 @@ import javax.xml.bind.annotation.XmlElem
 import org.opengis.metadata.identification.Progress;
 import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
 import org.apache.sis.internal.jaxb.gmd.CodeListUID;
+import org.apache.sis.xml.Namespaces;
 
 
 /**
- * JAXB adapter for {@link MD_ProgressCode}, in order to integrate the value in an element
- * complying with ISO-19139 standard. See package documentation for more information about
- * the handling of {@code CodeList} in ISO-19139.
+ * JAXB adapter for {@link Progress}
+ * in order to wrap the value in an XML element as specified by ISO 19115-3 standard.
+ * See package documentation for more information about the handling of {@code CodeList} in ISO 19115-3.
  *
  * @author  Cédric Briançon (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
@@ -72,7 +73,7 @@ public final class MD_ProgressCode exten
      * @return the value to be marshalled.
      */
     @Override
-    @XmlElement(name = "MD_ProgressCode")
+    @XmlElement(name = "MD_ProgressCode", namespace = Namespaces.MCC)
     public CodeListUID getElement() {
         return identifier;
     }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_RestrictionCode.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_RestrictionCode.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_RestrictionCode.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_RestrictionCode.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -20,15 +20,17 @@ import javax.xml.bind.annotation.XmlElem
 import org.opengis.metadata.constraint.Restriction;
 import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
 import org.apache.sis.internal.jaxb.gmd.CodeListUID;
+import org.apache.sis.internal.jaxb.Context;
+import org.apache.sis.xml.Namespaces;
 
 
 /**
- * JAXB adapter for {@link Restriction}, in order to integrate the value in an element
- * complying with ISO-19139 standard. See package documentation for more information about
- * the handling of {@code CodeList} in ISO-19139.
+ * JAXB adapter for {@link Restriction}
+ * in order to wrap the value in an XML element as specified by ISO 19115-3 standard.
+ * See package documentation for more information about the handling of {@code CodeList} in ISO 19115-3.
  *
  * @author  Cédric Briançon (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
@@ -58,7 +60,7 @@ public final class MD_RestrictionCode ex
      */
     @Override
     protected MD_RestrictionCode wrap(final CodeListUID value) {
-        if ("licence".equals(value.codeListValue)) {
+        if ("licence".equals(value.codeListValue) && Context.isFlagSet(Context.current(), Context.LEGACY_METADATA)) {
             value.codeListValue = "license";
         }
         return new MD_RestrictionCode(value);
@@ -80,7 +82,7 @@ public final class MD_RestrictionCode ex
      * @return the value to be marshalled.
      */
     @Override
-    @XmlElement(name = "MD_RestrictionCode")
+    @XmlElement(name = "MD_RestrictionCode", namespace = Namespaces.MCO)
     public CodeListUID getElement() {
         return identifier;
     }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ScopeCode.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ScopeCode.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ScopeCode.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_ScopeCode.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -20,15 +20,17 @@ import javax.xml.bind.annotation.XmlElem
 import org.opengis.metadata.maintenance.ScopeCode;
 import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
 import org.apache.sis.internal.jaxb.gmd.CodeListUID;
+import org.apache.sis.xml.Namespaces;
 
 
 /**
- * JAXB adapter for {@link ScopeCode}, in order to integrate the value in an element respecting
- * the ISO-19139 standard. See package documentation for more information about the handling
- * of {@code CodeList} in ISO-19139.
+ * JAXB adapter for {@link ScopeCode}
+ * in order to wrap the value in an XML element as specified by ISO 19115-3 standard.
+ * See package documentation for more information about the handling of {@code CodeList} in ISO 19115-3.
  *
  * @author  Cédric Briançon (Geomatys)
- * @version 0.3
+ * @author  Cullen Rombach (Image Matters)
+ * @version 1.0
  * @since   0.3
  * @module
  */
@@ -72,7 +74,7 @@ public final class MD_ScopeCode extends
      * @return the value to be marshalled.
      */
     @Override
-    @XmlElement(name = "MD_ScopeCode")
+    @XmlElement(name = "MD_ScopeCode", namespace = Namespaces.MCC)
     public CodeListUID getElement() {
         return identifier;
     }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_SpatialRepresentationTypeCode.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_SpatialRepresentationTypeCode.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_SpatialRepresentationTypeCode.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_SpatialRepresentationTypeCode.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -20,15 +20,16 @@ import javax.xml.bind.annotation.XmlElem
 import org.opengis.metadata.spatial.SpatialRepresentationType;
 import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
 import org.apache.sis.internal.jaxb.gmd.CodeListUID;
+import org.apache.sis.xml.Namespaces;
 
 
 /**
- * JAXB adapter for {@link SpatialRepresentationType}, in order to integrate the value in an
- * element respecting the ISO-19139 standard. See package documentation for more information
- * about the handling of {@code CodeList} in ISO-19139.
+ * JAXB adapter for {@link SpatialRepresentationType}
+ * in order to wrap the value in an XML element as specified by ISO 19115-3 standard.
+ * See package documentation for more information about the handling of {@code CodeList} in ISO 19115-3.
  *
  * @author  Cédric Briançon (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
@@ -74,7 +75,7 @@ public final class MD_SpatialRepresentat
      * @return the value to be marshalled.
      */
     @Override
-    @XmlElement(name = "MD_SpatialRepresentationTypeCode")
+    @XmlElement(name = "MD_SpatialRepresentationTypeCode", namespace = Namespaces.MCC)
     public CodeListUID getElement() {
         return identifier;
     }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_TopicCategoryCode.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_TopicCategoryCode.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_TopicCategoryCode.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_TopicCategoryCode.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -19,17 +19,18 @@ package org.apache.sis.internal.jaxb.cod
 import javax.xml.bind.annotation.XmlElement;
 import org.opengis.metadata.identification.TopicCategory;
 import org.apache.sis.internal.jaxb.gmd.EnumAdapter;
+import org.apache.sis.xml.Namespaces;
 
 
 /**
- * JAXB adapter for {@link TopicCategory}, in order to integrate the value in an element
- * complying with ISO-19139 standard. See package documentation for more information
- * about the handling of {@code CodeList} in ISO-19139.
+ * JAXB adapter for {@link TopicCategory}
+ * in order to wrap the value in an XML element as specified by ISO 19115-3 standard.
+ * See package documentation for more information about the handling of {@code CodeList} in ISO 19115-3.
  *
  * @author  Cédric Briançon (Geomatys)
  * @author  Guihem Legal (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
- * @version 0.5
+ * @version 1.0
  * @since   0.3
  * @module
  */
@@ -37,7 +38,7 @@ public final class MD_TopicCategoryCode
     /**
      * The enumeration value.
      */
-    @XmlElement(name = "MD_TopicCategoryCode")
+    @XmlElement(name = "MD_TopicCategoryCode", namespace = Namespaces.MRI)
     private String value;
 
     /**

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_TopologyLevelCode.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_TopologyLevelCode.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_TopologyLevelCode.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_TopologyLevelCode.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -20,15 +20,16 @@ import javax.xml.bind.annotation.XmlElem
 import org.opengis.metadata.spatial.TopologyLevel;
 import org.apache.sis.internal.jaxb.gmd.CodeListAdapter;
 import org.apache.sis.internal.jaxb.gmd.CodeListUID;
+import org.apache.sis.xml.Namespaces;
 
 
 /**
- * JAXB adapter for {@link TopologyLevel}, in order to integrate the value in an element
- * complying with ISO-19139 standard. See package documentation for more information about
- * the handling of {@code CodeList} in ISO-19139.
+ * JAXB adapter for {@link TopologyLevel}
+ * in order to wrap the value in an XML element as specified by ISO 19115-3 standard.
+ * See package documentation for more information about the handling of {@code CodeList} in ISO 19115-3.
  *
  * @author  Cédric Briançon (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
@@ -72,7 +73,7 @@ public final class MD_TopologyLevelCode
      * @return the value to be marshalled.
      */
     @Override
-    @XmlElement(name = "MD_TopologyLevelCode")
+    @XmlElement(name = "MD_TopologyLevelCode", namespace = Namespaces.MSR)
     public CodeListUID getElement() {
         return identifier;
     }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_BandDefinition.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_BandDefinition.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_BandDefinition.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_BandDefinition.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -24,12 +24,12 @@ import org.apache.sis.xml.Namespaces;
 
 
 /**
- * JAXB adapter for {@link BandDefinition}, in order to integrate the value in an element respecting
- * the ISO-19139 standard. See package documentation for more information about the handling
- * of {@code CodeList} in ISO-19139.
+ * JAXB adapter for {@link BandDefinition}
+ * in order to wrap the value in an XML element as specified by ISO 19115-3 standard.
+ * See package documentation for more information about the handling of {@code CodeList} in ISO 19115-3.
  *
  * @author  Cédric Briançon (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
@@ -73,7 +73,7 @@ public final class MI_BandDefinition ext
      * @return the value to be marshalled.
      */
     @Override
-    @XmlElement(name = "MI_BandDefinition", namespace = Namespaces.GMI)
+    @XmlElement(name = "MI_BandDefinition", namespace = Namespaces.MRC)
     public CodeListUID getElement() {
         return identifier;
     }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ContextCode.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ContextCode.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ContextCode.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ContextCode.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -24,12 +24,12 @@ import org.apache.sis.xml.Namespaces;
 
 
 /**
- * JAXB adapter for {@link Context}, in order to integrate the value in an element respecting
- * the ISO-19139 standard. See package documentation for more information about the handling
- * of {@code CodeList} in ISO-19139.
+ * JAXB adapter for {@link Context}
+ * in order to wrap the value in an XML element as specified by ISO 19115-3 standard.
+ * See package documentation for more information about the handling of {@code CodeList} in ISO 19115-3.
  *
  * @author  Cédric Briançon (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
@@ -73,7 +73,7 @@ public final class MI_ContextCode extend
      * @return the value to be marshalled.
      */
     @Override
-    @XmlElement(name = "MI_ContextCode", namespace = Namespaces.GMI)
+    @XmlElement(name = "MI_ContextCode", namespace = Namespaces.MAC)
     public CodeListUID getElement() {
         return identifier;
     }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_GeometryTypeCode.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_GeometryTypeCode.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_GeometryTypeCode.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_GeometryTypeCode.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -24,12 +24,12 @@ import org.apache.sis.xml.Namespaces;
 
 
 /**
- * JAXB adapter for {@link GeometryType}, in order to integrate the value in an element respecting
- * the ISO-19139 standard. See package documentation for more information about the handling
- * of {@code CodeList} in ISO-19139.
+ * JAXB adapter for {@link GeometryType}
+ * in order to wrap the value in an XML element as specified by ISO 19115-3 standard.
+ * See package documentation for more information about the handling of {@code CodeList} in ISO 19115-3.
  *
  * @author  Cédric Briançon (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
@@ -73,7 +73,7 @@ public final class MI_GeometryTypeCode e
      * @return the value to be marshalled.
      */
     @Override
-    @XmlElement(name = "MI_GeometryTypeCode", namespace = Namespaces.GMI)
+    @XmlElement(name = "MI_GeometryTypeCode", namespace = Namespaces.MAC)
     public CodeListUID getElement() {
         return identifier;
     }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ObjectiveTypeCode.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ObjectiveTypeCode.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ObjectiveTypeCode.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_ObjectiveTypeCode.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -24,12 +24,12 @@ import org.apache.sis.xml.Namespaces;
 
 
 /**
- * JAXB adapter for {@link ObjectiveType}, in order to integrate the value in an element respecting
- * the ISO-19139 standard. See package documentation for more information about the handling
- * of {@code CodeList} in ISO-19139.
+ * JAXB adapter for {@link ObjectiveType}
+ * in order to wrap the value in an XML element as specified by ISO 19115-3 standard.
+ * See package documentation for more information about the handling of {@code CodeList} in ISO 19115-3.
  *
  * @author  Cédric Briançon (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
@@ -73,7 +73,7 @@ public final class MI_ObjectiveTypeCode
      * @return the value to be marshalled.
      */
     @Override
-    @XmlElement(name = "MI_ObjectiveTypeCode", namespace = Namespaces.GMI)
+    @XmlElement(name = "MI_ObjectiveTypeCode", namespace = Namespaces.MAC)
     public CodeListUID getElement() {
         return identifier;
     }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_OperationTypeCode.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_OperationTypeCode.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_OperationTypeCode.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_OperationTypeCode.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -24,12 +24,12 @@ import org.apache.sis.xml.Namespaces;
 
 
 /**
- * JAXB adapter for {@link OperationType}, in order to integrate the value in an element respecting
- * the ISO-19139 standard. See package documentation for more information about the handling
- * of {@code CodeList} in ISO-19139.
+ * JAXB adapter for {@link OperationType}
+ * in order to wrap the value in an XML element as specified by ISO 19115-3 standard.
+ * See package documentation for more information about the handling of {@code CodeList} in ISO 19115-3.
  *
  * @author  Cédric Briançon (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
@@ -73,7 +73,7 @@ public final class MI_OperationTypeCode
      * @return the value to be marshalled.
      */
     @Override
-    @XmlElement(name = "MI_OperationTypeCode", namespace = Namespaces.GMI)
+    @XmlElement(name = "MI_OperationTypeCode", namespace = Namespaces.MAC)
     public CodeListUID getElement() {
         return identifier;
     }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PolarizationOrientationCode.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PolarizationOrientationCode.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PolarizationOrientationCode.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PolarizationOrientationCode.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -24,14 +24,17 @@ import org.apache.sis.xml.Namespaces;
 
 
 /**
- * JAXB adapter for {@link PolarizationOrientation}, in order to integrate the value in an element respecting
- * the ISO-19139 standard. See package documentation for more information about the handling
- * of {@code CodeList} in ISO-19139.
+ * JAXB adapter for {@link PolarizationOrientation}
+ * in order to wrap the value in an XML element as specified by ISO 19115-3 standard.
+ * See package documentation for more information about the handling of {@code CodeList} in ISO 19115-3.
  *
  * @author  Cédric Briançon (Geomatys)
  * @author  Guilhem Legal (Geomatys)
- * @version 0.3
- * @since   0.3
+ * @version 1.0
+ *
+ * @see <a href="https://issues.apache.org/jira/browse/SIS-398">SIS-398</a>
+ *
+ * @since 0.3
  * @module
  */
 public final class MI_PolarizationOrientationCode
@@ -76,7 +79,7 @@ public final class MI_PolarizationOrient
      * @return the value to be marshalled.
      */
     @Override
-    @XmlElement(name = "MI_PolarizationOrientationCode", namespace = Namespaces.GMI)
+    @XmlElement(name = "MI_PolarisationOrientationCode", namespace = Namespaces.MRC)
     public CodeListUID getElement() {
         return identifier;
     }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PriorityCode.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PriorityCode.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PriorityCode.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_PriorityCode.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -24,12 +24,12 @@ import org.apache.sis.xml.Namespaces;
 
 
 /**
- * JAXB adapter for {@link Priority}, in order to integrate the value in an element respecting
- * the ISO-19139 standard. See package documentation for more information about the handling
- * of {@code CodeList} in ISO-19139.
+ * JAXB adapter for {@link Priority}
+ * in order to wrap the value in an XML element as specified by ISO 19115-3 standard.
+ * See package documentation for more information about the handling of {@code CodeList} in ISO 19115-3.
  *
  * @author  Cédric Briançon (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
@@ -73,7 +73,7 @@ public final class MI_PriorityCode exten
      * @return the value to be marshalled.
      */
     @Override
-    @XmlElement(name = "MI_PriorityCode", namespace = Namespaces.GMI)
+    @XmlElement(name = "MI_PriorityCode", namespace = Namespaces.MAC)
     public CodeListUID getElement() {
         return identifier;
     }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_SequenceCode.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_SequenceCode.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_SequenceCode.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_SequenceCode.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -24,12 +24,12 @@ import org.apache.sis.xml.Namespaces;
 
 
 /**
- * JAXB adapter for {@link Sequence}, in order to integrate the value in an element respecting
- * the ISO-19139 standard. See package documentation for more information about the handling
- * of {@code CodeList} in ISO-19139.
+ * JAXB adapter for {@link Sequence}
+ * in order to wrap the value in an XML element as specified by ISO 19115-3 standard.
+ * See package documentation for more information about the handling of {@code CodeList} in ISO 19115-3.
  *
  * @author  Cédric Briançon (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
@@ -73,7 +73,7 @@ public final class MI_SequenceCode exten
      * @return the value to be marshalled.
      */
     @Override
-    @XmlElement(name = "MI_SequenceCode", namespace = Namespaces.GMI)
+    @XmlElement(name = "MI_SequenceCode", namespace = Namespaces.MAC)
     public CodeListUID getElement() {
         return identifier;
     }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TransferFunctionTypeCode.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TransferFunctionTypeCode.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TransferFunctionTypeCode.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TransferFunctionTypeCode.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -24,12 +24,12 @@ import org.apache.sis.xml.Namespaces;
 
 
 /**
- * JAXB adapter for {@link TransferFunctionType}, in order to integrate the value in an element respecting
- * the ISO-19139 standard. See package documentation for more information about the handling
- * of {@code CodeList} in ISO-19139.
+ * JAXB adapter for {@link TransferFunctionType}
+ * in order to wrap the value in an XML element as specified by ISO 19115-3 standard.
+ * See package documentation for more information about the handling of {@code CodeList} in ISO 19115-3.
  *
  * @author  Cédric Briançon (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
@@ -75,7 +75,7 @@ public final class MI_TransferFunctionTy
      * @return the value to be marshalled.
      */
     @Override
-    @XmlElement(name = "MI_TransferFunctionTypeCode", namespace = Namespaces.GMI)
+    @XmlElement(name = "MI_TransferFunctionTypeCode", namespace = Namespaces.MRC)
     public CodeListUID getElement() {
         return identifier;
     }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TriggerCode.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TriggerCode.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TriggerCode.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MI_TriggerCode.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -24,12 +24,12 @@ import org.apache.sis.xml.Namespaces;
 
 
 /**
- * JAXB adapter for {@link Trigger}, in order to integrate the value in an element respecting
- * the ISO-19139 standard. See package documentation for more information about the handling
- * of {@code CodeList} in ISO-19139.
+ * JAXB adapter for {@link Trigger}
+ * in order to wrap the value in an XML element as specified by ISO 19115-3 standard.
+ * See package documentation for more information about the handling of {@code CodeList} in ISO 19115-3.
  *
  * @author  Cédric Briançon (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
@@ -73,7 +73,7 @@ public final class MI_TriggerCode extend
      * @return the value to be marshalled.
      */
     @Override
-    @XmlElement(name = "MI_TriggerCode", namespace = Namespaces.GMI)
+    @XmlElement(name = "MI_TriggerCode", namespace = Namespaces.MAC)
     public CodeListUID getElement() {
         return identifier;
     }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/PT_Locale.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/PT_Locale.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/PT_Locale.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/PT_Locale.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -24,16 +24,18 @@ import javax.xml.bind.annotation.XmlType
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.adapters.XmlAdapter;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import org.apache.sis.internal.jaxb.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.Context;
 import org.apache.sis.internal.jaxb.gmd.Country;
 import org.apache.sis.internal.jaxb.gmd.LanguageCode;
 import org.apache.sis.internal.jaxb.gmd.PT_FreeText;
+import org.apache.sis.xml.Namespaces;
 
 
 /**
- * JAXB adapter for {@link Locale}, in order to integrate the value in an element respecting
- * the ISO-19139 standard. See package documentation for more information about the handling
- * of {@code CodeList} in ISO-19139.
+ * JAXB adapter for {@link Locale}
+ * in order to wrap the value in an XML element as specified by ISO 19115-3 standard.
+ * See package documentation for more information about the handling of {@code CodeList} in ISO 19115-3.
  *
  * <p>This adapter formats the locale like below:</p>
  *
@@ -57,7 +59,8 @@ import org.apache.sis.internal.jaxb.gmd.
  * For an alternative (simpler) format, see {@link org.apache.sis.internal.jaxb.gmd.LocaleAdapter}.
  *
  * @author  Martin Desruisseaux (Geomatys)
- * @version 0.4
+ * @author  Cullen Rombach (Image Matters)
+ * @version 1.0
  *
  * @see LanguageCode
  * @see Country
@@ -70,18 +73,19 @@ public final class PT_Locale extends Xml
     /**
      * The attributes wrapped in a {@code "PT_Locale"} element.
      */
-    @XmlElement(name = "PT_Locale")
+    @XmlElement(name = "PT_Locale", namespace = Namespaces.LAN)
     private Wrapper element;
 
     /**
      * Wraps the {@code "locale"} attributes in a {@code "PT_Locale"} element.
      */
-    @XmlType(name = "PT_Locale", propOrder = { "languageCode", "country", "characterEncoding" })
+    @XmlType(name = "PT_Locale_Type", namespace = Namespaces.LAN, propOrder = {
+        "languageCode", "language", "country", "characterEncoding"
+    })
     private static final class Wrapper {
         /**
          * The language code, or {@code null} if none.
          */
-        @XmlElement(required = true)
         LanguageCode languageCode;
 
         /**
@@ -109,6 +113,12 @@ public final class PT_Locale extends Xml
         Charset characterEncoding;
 
         /**
+         * {@code true} if marshalling an element from the ISO 19115:2003 model,
+         * or {@code false} if marshalling an element from the ISO 19115:2014 model.
+         */
+        private boolean isLegacyMetadata;
+
+        /**
          * Empty constructor for JAXB only.
          */
         public Wrapper() {
@@ -119,12 +129,45 @@ public final class PT_Locale extends Xml
          */
         Wrapper(final Locale locale) {
             final Context context = Context.current();
-            languageCode = LanguageCode.create(context, locale);
-            country      = Country     .create(context, locale);
+            isLegacyMetadata = Context.isFlagSet(context, Context.LEGACY_METADATA);
+            languageCode     = LanguageCode.create(context, locale);
+            country          = Country     .create(context, locale);
             // The characterEncoding field will be initialized at marshalling time (see method below).
         }
 
         /**
+         * Gets the language code for this PT_Locale. Used in ISO 19115:2003 model.
+         */
+        @XmlElement(name = "languageCode", namespace = LegacyNamespaces.GMD)
+        private LanguageCode getLanguageCode() {
+            return isLegacyMetadata ? languageCode : null;
+        }
+
+        /**
+         * Sets the language code for this PT_Locale. Used in ISO 19115:2003 model.
+         */
+        @SuppressWarnings("unused")
+        private void setLanguageCode(LanguageCode newValue) {
+            languageCode = newValue;
+        }
+
+        /**
+         * Gets the language code for this PT_Locale. Used in ISO 19115-3.
+         */
+        @XmlElement(name = "language", required = true)
+        private LanguageCode getLanguage() {
+            return isLegacyMetadata ? null : languageCode;
+        }
+
+        /**
+         * Sets the language code for this PT_Locale. Used in ISO 19115:2003 model.
+         */
+        @SuppressWarnings("unused")
+        private void setLanguage(LanguageCode newValue) {
+            languageCode = newValue;
+        }
+
+        /**
          * Invoked by JAXB {@link javax.xml.bind.Marshaller} before this object is marshalled to XML.
          * This method sets the {@link #characterEncoding} to the XML encoding.
          *

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/SV_CouplingType.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/SV_CouplingType.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/SV_CouplingType.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/SV_CouplingType.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -24,12 +24,12 @@ import org.apache.sis.xml.Namespaces;
 
 
 /**
- * JAXB adapter for {@link CouplingType}, in order to integrate the value in an element respecting
- * the ISO-19139 standard. See package documentation for more information about the handling
- * of {@code CodeList} in ISO-19139.
+ * JAXB adapter for {@link CouplingType}
+ * in order to wrap the value in an XML element as specified by ISO 19115-3 standard.
+ * See package documentation for more information about the handling of {@code CodeList} in ISO 19115-3.
  *
  * @author  Martin Desruisseaux (Geomatys)
- * @version 0.5
+ * @version 1.0
  * @since   0.5
  * @module
  */

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/SV_ParameterDirection.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/SV_ParameterDirection.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/SV_ParameterDirection.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/SV_ParameterDirection.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -23,12 +23,12 @@ import org.apache.sis.xml.Namespaces;
 
 
 /**
- * JAXB adapter for {@link ParameterDirection}, in order to integrate the value in an element
- * complying with ISO-19139 standard. See package documentation for more information
- * about the handling of {@code CodeList} in ISO-19139.
+ * JAXB adapter for {@link ParameterDirection}
+ * in order to wrap the value in an XML element as specified by ISO 19115-3 standard.
+ * See package documentation for more information about the handling of {@code CodeList} in ISO 19115-3.
  *
  * @author  Martin Desruisseaux (Geomatys)
- * @version 0.5
+ * @version 1.0
  * @since   0.5
  * @module
  */

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/package-info.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/package-info.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/package-info.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -30,7 +30,9 @@
  * </ul>
  *
  * @author  Cédric Briançon (Geomatys)
- * @version 0.3
+ * @author  Martin Desruisseaux (Geomatys)
+ * @author  Cullen Rombach (Image Matters)
+ * @version 1.0
  *
  * @see javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter
  * @see org.opengis.util.CodeList
@@ -38,10 +40,21 @@
  * @since 0.3
  * @module
  */
-@XmlSchema(elementFormDefault = XmlNsForm.QUALIFIED, namespace = Namespaces.GMD, xmlns = {
-    @XmlNs(prefix = "gmd", namespaceURI = Namespaces.GMD),
-    @XmlNs(prefix = "gmi", namespaceURI = Namespaces.GMI),
-    @XmlNs(prefix = "gco", namespaceURI = Namespaces.GCO)
+@XmlSchema(elementFormDefault = XmlNsForm.QUALIFIED, xmlns = {
+    @XmlNs(prefix = "mri", namespaceURI = Namespaces.MRI),      // Metadata for Resource Identification
+    @XmlNs(prefix = "mrc", namespaceURI = Namespaces.MRC),      // Metadata for Resource Content
+    @XmlNs(prefix = "mrd", namespaceURI = Namespaces.MRD),      // Metadata for Resource Distribution
+    @XmlNs(prefix = "mmi", namespaceURI = Namespaces.MMI),      // Metadata for Maintenance Information
+    @XmlNs(prefix = "msr", namespaceURI = Namespaces.MSR),      // Metadata for Spatial Representation
+    @XmlNs(prefix = "mex", namespaceURI = Namespaces.MEX),      // Metadata with Schema Extensions
+    @XmlNs(prefix = "mac", namespaceURI = Namespaces.MAC),      // Metadata for Acquisition
+    @XmlNs(prefix = "mdq", namespaceURI = Namespaces.MDQ),      // Metadata for Data Quality
+    @XmlNs(prefix = "mco", namespaceURI = Namespaces.MCO),      // Metadata for Constraints
+    @XmlNs(prefix = "srv", namespaceURI = Namespaces.SRV),      // Metadata for Services
+    @XmlNs(prefix = "cit", namespaceURI = Namespaces.CIT),      // Citation and responsible party information
+    @XmlNs(prefix = "lan", namespaceURI = Namespaces.LAN),      // Language localization
+    @XmlNs(prefix = "mcc", namespaceURI = Namespaces.MCC),      // Metadata Common Classes
+    @XmlNs(prefix = "gmd", namespaceURI = LegacyNamespaces.GMD)
 })
 package org.apache.sis.internal.jaxb.code;
 
@@ -49,3 +62,4 @@ import javax.xml.bind.annotation.XmlNs;
 import javax.xml.bind.annotation.XmlNsForm;
 import javax.xml.bind.annotation.XmlSchema;
 import org.apache.sis.xml.Namespaces;
+import org.apache.sis.internal.jaxb.LegacyNamespaces;

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/geometry/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/geometry/package-info.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/geometry/package-info.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/geometry/package-info.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -25,15 +25,16 @@
  * will be substituted to that interface.</p>
  *
  * @author  Guilhem Legal (Geomatys)
- * @version 0.3
+ * @author  Cullen Rombach (Image Matters)
+ * @version 1.0
  *
  * @see javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter
  *
  * @since 0.3
  * @module
  */
-@XmlSchema(elementFormDefault = XmlNsForm.QUALIFIED, namespace = Namespaces.GML, xmlns = {
-    @XmlNs(prefix = "gml", namespaceURI = Namespaces.GML)
+@XmlSchema(elementFormDefault = XmlNsForm.QUALIFIED, namespace = Namespaces.GEX, xmlns = {
+    @XmlNs(prefix = "gex", namespaceURI = Namespaces.GEX)
 })
 @XmlAccessorType(XmlAccessType.NONE)
 package org.apache.sis.internal.jaxb.geometry;

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/LE_ProcessStep.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/LE_ProcessStep.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/LE_ProcessStep.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/LE_ProcessStep.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -20,6 +20,7 @@ import javax.xml.bind.annotation.XmlType
 import javax.xml.bind.annotation.XmlRootElement;
 import org.opengis.metadata.lineage.ProcessStep;
 import org.apache.sis.metadata.iso.lineage.DefaultProcessStep;
+import org.apache.sis.xml.Namespaces;
 
 import static org.apache.sis.util.collection.Containers.isNullOrEmpty;
 
@@ -29,12 +30,12 @@ import static org.apache.sis.util.collec
  *
  * @author  Guilhem Legal (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
-@XmlType(name = "LE_ProcessStep_Type")
-@XmlRootElement(name = "LE_ProcessStep")
+@XmlType(name = "LE_ProcessStep_Type", namespace = Namespaces.MRL)
+@XmlRootElement(name = "LE_ProcessStep", namespace = Namespaces.MRL)
 @SuppressWarnings("CloneableClassWithoutClone")
 public class LE_ProcessStep extends DefaultProcessStep {
     /**

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/LE_Source.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/LE_Source.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/LE_Source.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/LE_Source.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -20,6 +20,7 @@ import javax.xml.bind.annotation.XmlType
 import javax.xml.bind.annotation.XmlRootElement;
 import org.opengis.metadata.lineage.Source;
 import org.apache.sis.metadata.iso.lineage.DefaultSource;
+import org.apache.sis.xml.Namespaces;
 
 
 /**
@@ -27,12 +28,12 @@ import org.apache.sis.metadata.iso.linea
  *
  * @author  Guilhem Legal (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
-@XmlType(name = "LE_Source_Type")
-@XmlRootElement(name = "LE_Source")
+@XmlType(name = "LE_Source_Type", namespace = Namespaces.MRL)
+@XmlRootElement(name = "LE_Source", namespace = Namespaces.MRL)
 @SuppressWarnings("CloneableClassWithoutClone")
 public class LE_Source extends DefaultSource {
     /**

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Band.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Band.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Band.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Band.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -20,6 +20,7 @@ import javax.xml.bind.annotation.XmlType
 import javax.xml.bind.annotation.XmlRootElement;
 import org.opengis.metadata.content.Band;
 import org.apache.sis.metadata.iso.content.DefaultBand;
+import org.apache.sis.xml.Namespaces;
 
 
 /**
@@ -27,12 +28,12 @@ import org.apache.sis.metadata.iso.conte
  *
  * @author  Guilhem Legal (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
-@XmlType(name = "MI_Band_Type")
-@XmlRootElement(name = "MI_Band")
+@XmlType(name = "MI_Band_Type", namespace = Namespaces.MRC)
+@XmlRootElement(name = "MI_Band", namespace = Namespaces.MRC)
 @SuppressWarnings("CloneableClassWithoutClone")
 public class MI_Band extends DefaultBand {
     /**

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_CoverageDescription.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_CoverageDescription.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_CoverageDescription.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_CoverageDescription.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -20,6 +20,7 @@ import javax.xml.bind.annotation.XmlType
 import javax.xml.bind.annotation.XmlRootElement;
 import org.opengis.metadata.content.CoverageDescription;
 import org.apache.sis.metadata.iso.content.DefaultCoverageDescription;
+import org.apache.sis.xml.Namespaces;
 
 import static org.apache.sis.util.collection.Containers.isNullOrEmpty;
 
@@ -29,12 +30,12 @@ import static org.apache.sis.util.collec
  *
  * @author  Guilhem Legal (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
-@XmlType(name = "MI_CoverageDescription_Type")
-@XmlRootElement(name = "MI_CoverageDescription")
+@XmlType(name = "MI_CoverageDescription_Type", namespace = Namespaces.MRC)
+@XmlRootElement(name = "MI_CoverageDescription", namespace = Namespaces.MRC)
 @SuppressWarnings("CloneableClassWithoutClone")
 public class MI_CoverageDescription extends DefaultCoverageDescription {
     /**

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Georectified.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Georectified.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Georectified.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Georectified.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -20,6 +20,7 @@ import javax.xml.bind.annotation.XmlType
 import javax.xml.bind.annotation.XmlRootElement;
 import org.opengis.metadata.spatial.Georectified;
 import org.apache.sis.metadata.iso.spatial.DefaultGeorectified;
+import org.apache.sis.xml.Namespaces;
 
 import static org.apache.sis.util.collection.Containers.isNullOrEmpty;
 
@@ -29,12 +30,12 @@ import static org.apache.sis.util.collec
  *
  * @author  Guilhem Legal (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
-@XmlType(name = "MI_Georectified_Type")
-@XmlRootElement(name = "MI_Georectified")
+@XmlType(name = "MI_Georectified_Type", namespace = Namespaces.MSR)
+@XmlRootElement(name = "MI_Georectified", namespace = Namespaces.MSR)
 @SuppressWarnings("CloneableClassWithoutClone")
 public class MI_Georectified extends DefaultGeorectified {
     /**

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Georeferenceable.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Georeferenceable.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Georeferenceable.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Georeferenceable.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -20,6 +20,7 @@ import javax.xml.bind.annotation.XmlType
 import javax.xml.bind.annotation.XmlRootElement;
 import org.opengis.metadata.spatial.Georeferenceable;
 import org.apache.sis.metadata.iso.spatial.DefaultGeoreferenceable;
+import org.apache.sis.xml.Namespaces;
 
 import static org.apache.sis.util.collection.Containers.isNullOrEmpty;
 
@@ -29,12 +30,12 @@ import static org.apache.sis.util.collec
  *
  * @author  Guilhem Legal (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
-@XmlType(name = "MI_Georeferenceable_Type")
-@XmlRootElement(name = "MI_Georeferenceable")
+@XmlType(name = "MI_Georeferenceable_Type", namespace = Namespaces.MSR)
+@XmlRootElement(name = "MI_Georeferenceable", namespace = Namespaces.MSR)
 @SuppressWarnings("CloneableClassWithoutClone")
 public class MI_Georeferenceable  extends DefaultGeoreferenceable {
     /**

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_ImageDescription.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_ImageDescription.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_ImageDescription.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_ImageDescription.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -20,6 +20,7 @@ import javax.xml.bind.annotation.XmlType
 import javax.xml.bind.annotation.XmlRootElement;
 import org.opengis.metadata.content.ImageDescription;
 import org.apache.sis.metadata.iso.content.DefaultImageDescription;
+import org.apache.sis.xml.Namespaces;
 
 import static org.apache.sis.util.collection.Containers.isNullOrEmpty;
 
@@ -29,12 +30,12 @@ import static org.apache.sis.util.collec
  *
  * @author  Guilhem Legal (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
-@XmlType(name = "MI_ImageDescription_Type")
-@XmlRootElement(name = "MI_ImageDescription")
+@XmlType(name = "MI_ImageDescription_Type", namespace = Namespaces.MRC)
+@XmlRootElement(name = "MI_ImageDescription", namespace = Namespaces.MRC)
 @SuppressWarnings("CloneableClassWithoutClone")
 public class MI_ImageDescription extends DefaultImageDescription {
     /**

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Metadata.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Metadata.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Metadata.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Metadata.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -20,6 +20,7 @@ import javax.xml.bind.annotation.XmlType
 import javax.xml.bind.annotation.XmlRootElement;
 import org.opengis.metadata.Metadata;
 import org.apache.sis.metadata.iso.DefaultMetadata;
+import org.apache.sis.internal.jaxb.LegacyNamespaces;
 
 import static org.apache.sis.util.collection.Containers.isNullOrEmpty;
 
@@ -33,8 +34,8 @@ import static org.apache.sis.util.collec
  * @since   0.3
  * @module
  */
-@XmlType(name = "MI_Metadata_Type")
-@XmlRootElement(name = "MI_Metadata")
+@XmlType(name = "MI_Metadata_Type", namespace = LegacyNamespaces.GMI)
+@XmlRootElement(name = "MI_Metadata", namespace = LegacyNamespaces.GMI)
 @SuppressWarnings("CloneableClassWithoutClone")
 public class MI_Metadata extends DefaultMetadata {
     /**

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/package-info.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/package-info.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/package-info.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -16,8 +16,8 @@
  */
 
 /**
- * Extends some classes from the {@link org.apache.sis.metadata.iso} package in order
- * to give them the {@code "gmi"} namespace. This is required for XML (un)marshalling
+ * Extends some classes from {@link org.apache.sis.metadata.iso} packages in order to give them
+ * the name used by imagery extensions (ISO 19115-2). This is required for XML (un)marshalling
  * because GeoAPI merged some classes which were dissociated in the ISO specifications.
  * The GeoAPI merge were done in order to simplify the conceptual model for developers,
  * since the classes were different in ISO specifications for historical reasons - not
@@ -32,13 +32,15 @@
  *
  * @author  Guilhem Legal (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
-@XmlSchema(elementFormDefault = XmlNsForm.QUALIFIED, namespace = Namespaces.GMI, xmlns = {
-    @XmlNs(prefix = "gmi", namespaceURI = Namespaces.GMI),
-    @XmlNs(prefix = "gco", namespaceURI = Namespaces.GCO)
+@XmlSchema(elementFormDefault = XmlNsForm.QUALIFIED, xmlns = {
+    @XmlNs(prefix = "mrc", namespaceURI = Namespaces.MRC),
+    @XmlNs(prefix = "mrl", namespaceURI = Namespaces.MRL),
+    @XmlNs(prefix = "msr", namespaceURI = Namespaces.MSR),
+    @XmlNs(prefix = "gmi", namespaceURI = LegacyNamespaces.GMI)
 })
 @XmlAccessorType(XmlAccessType.NONE)
 package org.apache.sis.internal.jaxb.gmi;
@@ -48,4 +50,5 @@ import javax.xml.bind.annotation.XmlNsFo
 import javax.xml.bind.annotation.XmlSchema;
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
+import org.apache.sis.internal.jaxb.LegacyNamespaces;
 import org.apache.sis.xml.Namespaces;

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/TM_PeriodDuration.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/TM_PeriodDuration.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/TM_PeriodDuration.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/TM_PeriodDuration.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -40,15 +40,16 @@ import org.apache.sis.util.iso.SimpleInt
  *       API in geoapi-pending, which is not very clear... We prefer to hide this for now.
  *
  * @author  Guilhem Legal (Geomatys)
- * @version 0.3
+ * @author  Martin Desruisseaux (Geomatys)
+ * @version 1.0
  * @since   0.3
  * @module
  */
-public final class TM_PeriodDuration extends PropertyType<TM_PeriodDuration, PeriodDuration> {
+public class TM_PeriodDuration extends PropertyType<TM_PeriodDuration, PeriodDuration> {
     /**
      * Empty constructor for JAXB.
      */
-    public TM_PeriodDuration() {
+    TM_PeriodDuration() {
     }
 
     /**
@@ -77,7 +78,7 @@ public final class TM_PeriodDuration ext
      * @return {@code PeriodDuration.class}
      */
     @Override
-    protected Class<PeriodDuration> getBoundType() {
+    protected final Class<PeriodDuration> getBoundType() {
         return PeriodDuration.class;
     }
 
@@ -88,8 +89,14 @@ public final class TM_PeriodDuration ext
      * @return the time period, or {@code null}.
      */
     @XmlElement(name = "TM_PeriodDuration")
-    public Duration getElement() {
-        final PeriodDuration metadata = this.metadata;
+    public final Duration getElement() {
+        return toXML(metadata);
+    }
+
+    /**
+     * Converts the given ISO 19108 duration into a Java XML duration.
+     */
+    static Duration toXML(final PeriodDuration metadata) {
         if (metadata != null) try {
             /*
              * Get the DatatypeFactory first because if not available, then we don't need to parse
@@ -124,7 +131,7 @@ public final class TM_PeriodDuration ext
             }
             return factory.newDuration(true, years, months, days, hours, minutes, seconds);
         } catch (DatatypeConfigurationException e) {
-            warningOccured("getElement", e);
+            warningOccured("toXML", e);
         }
         return null;
     }
@@ -135,8 +142,14 @@ public final class TM_PeriodDuration ext
      *
      * @param  duration  the adapter to set.
      */
-    public void setElement(final Duration duration) {
-        metadata = null;                                        // Cleaned first in case of failure.
+    public final void setElement(final Duration duration) {
+        metadata = toISO(duration);
+    }
+
+    /**
+     * Converts the given Java XML duration into an ISO 19108 duration.
+     */
+    static PeriodDuration toISO(final Duration duration) {
         if (duration != null) try {
             final TemporalFactory factory = TemporalUtilities.getTemporalFactory();
             InternationalString years = null;
@@ -165,10 +178,11 @@ public final class TM_PeriodDuration ext
             if ((value = duration.getSeconds()) != 0) {
                 seconds = new SimpleInternationalString(Integer.toString(value));
             }
-            metadata = factory.createPeriodDuration(years, months, weeks, days, hours, minutes, seconds);
+            return factory.createPeriodDuration(years, months, weeks, days, hours, minutes, seconds);
         } catch (UnsupportedOperationException e) {
-            warningOccured("setElement", e);
+            warningOccured("toISO", e);
         }
+        return null;
     }
 
     /**
@@ -182,4 +196,23 @@ public final class TM_PeriodDuration ext
             Context.warningOccured(Context.current(), TM_PeriodDuration.class, methodName, e, true);
         }
     }
+
+    /**
+     * Wraps the value only if marshalling an element from the ISO 19115:2003 metadata model.
+     * Otherwise (i.e. if marshalling according legacy ISO 19115:2014 model), omits the element.
+     */
+    public static final class Since2014 extends TM_PeriodDuration {
+        /** Empty constructor used only by JAXB. */
+        public 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 protected TM_PeriodDuration wrap(final PeriodDuration value) {
+            return accept2014() ? super.wrap(value) : null;
+        }
+    }
 }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/package-info.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/package-info.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/package-info.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -19,7 +19,9 @@
  * Temporary placeholder for the Temporal Schema JAXB adapters.
  *
  * @author  Guilhem Legal (Geomatys)
- * @version 0.3
+ * @author  Martin Desruisseaux (Geomatys)
+ * @author  Cullen Rombach (Image Matters)
+ * @version 1.0
  * @since   0.3
  * @module
  */

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/CI_Citation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/CI_Citation.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/CI_Citation.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/CI_Citation.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -28,11 +28,11 @@ import org.apache.sis.internal.jaxb.gco.
  *
  * @author  Cédric Briançon (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
-public final class CI_Citation extends PropertyType<CI_Citation, Citation> {
+public class CI_Citation extends PropertyType<CI_Citation, Citation> {
     /**
      * Empty constructor for JAXB only.
      */
@@ -47,7 +47,7 @@ public final class CI_Citation extends P
      * @return {@code Citation.class}
      */
     @Override
-    protected Class<Citation> getBoundType() {
+    protected final Class<Citation> getBoundType() {
         return Citation.class;
     }
 
@@ -78,7 +78,7 @@ public final class CI_Citation extends P
      * @return the metadata to be marshalled.
      */
     @XmlElementRef
-    public DefaultCitation getElement() {
+    public final DefaultCitation getElement() {
         return DefaultCitation.castOrCopy(metadata);
     }
 
@@ -87,7 +87,26 @@ public final class CI_Citation extends P
      *
      * @param  metadata  the unmarshalled metadata.
      */
-    public void setElement(final DefaultCitation metadata) {
+    public final void setElement(final DefaultCitation metadata) {
         this.metadata = metadata;
     }
+
+    /**
+     * Wraps the value only if marshalling an element from the ISO 19115:2003 metadata model.
+     * Otherwise (i.e. if marshalling according legacy ISO 19115:2014 model), omits the element.
+     */
+    public static final class Since2014 extends CI_Citation {
+        /** Empty constructor used only by JAXB. */
+        public 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 protected CI_Citation wrap(final Citation value) {
+            return accept2014() ? super.wrap(value) : null;
+        }
+    }
 }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/CI_OnlineResource.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/CI_OnlineResource.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/CI_OnlineResource.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/CI_OnlineResource.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -28,11 +28,11 @@ import org.apache.sis.internal.jaxb.gco.
  *
  * @author  Cédric Briançon (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
-public final class CI_OnlineResource extends PropertyType<CI_OnlineResource, OnlineResource> {
+public class CI_OnlineResource extends PropertyType<CI_OnlineResource, OnlineResource> {
     /**
      * Empty constructor for JAXB only.
      */
@@ -47,7 +47,7 @@ public final class CI_OnlineResource ext
      * @return {@code OnlineResource.class}
      */
     @Override
-    protected Class<OnlineResource> getBoundType() {
+    protected final Class<OnlineResource> getBoundType() {
         return OnlineResource.class;
     }
 
@@ -78,7 +78,7 @@ public final class CI_OnlineResource ext
      * @return the metadata to be marshalled.
      */
     @XmlElementRef
-    public DefaultOnlineResource getElement() {
+    public final DefaultOnlineResource getElement() {
         return DefaultOnlineResource.castOrCopy(metadata);
     }
 
@@ -87,7 +87,26 @@ public final class CI_OnlineResource ext
      *
      * @param  metadata  the unmarshalled metadata.
      */
-    public void setElement(final DefaultOnlineResource metadata) {
+    public final void setElement(final DefaultOnlineResource metadata) {
         this.metadata = metadata;
     }
+
+    /**
+     * Wraps the value only if marshalling an element from the ISO 19115:2003 metadata model.
+     * Otherwise (i.e. if marshalling according legacy ISO 19115:2014 model), omits the element.
+     */
+    public static final class Since2014 extends CI_OnlineResource {
+        /** Empty constructor used only by JAXB. */
+        public 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 protected CI_OnlineResource wrap(final OnlineResource value) {
+            return accept2014() ? super.wrap(value) : null;
+        }
+    }
 }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/CI_Responsibility.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/CI_Responsibility.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/CI_Responsibility.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/CI_Responsibility.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -18,9 +18,11 @@ package org.apache.sis.internal.jaxb.met
 
 import javax.xml.bind.annotation.XmlElementRef;
 import org.opengis.metadata.citation.Responsibility;
+import org.opengis.metadata.citation.ResponsibleParty;
 import org.apache.sis.metadata.iso.citation.DefaultResponsibility;
-import org.apache.sis.internal.jaxb.gco.PropertyType;
 import org.apache.sis.metadata.iso.citation.DefaultResponsibleParty;
+import org.apache.sis.internal.jaxb.gco.PropertyType;
+import org.apache.sis.internal.jaxb.FilterByVersion;
 
 
 /**
@@ -28,7 +30,8 @@ import org.apache.sis.metadata.iso.citat
  * package documentation for more information about JAXB and interface.
  *
  * @author  Martin Desruisseaux (Geomatys)
- * @version 0.5
+ * @author  Cullen Rombach (Image Matters)
+ * @since   1.0
  * @since   0.5
  * @module
  */
@@ -80,10 +83,14 @@ public final class CI_Responsibility ext
     @XmlElementRef
     @SuppressWarnings("deprecation")
     public DefaultResponsibility getElement() {
-        if (LEGACY_XML) {
-            return DefaultResponsibleParty.castOrCopy(metadata);
-        } else {
+        if (FilterByVersion.CURRENT_METADATA.accept()) {
+            if (metadata instanceof ResponsibleParty) {
+                // Need to build new DefaultResponsibility object here — simply casting doesn't work.
+                return new DefaultResponsibility(metadata);
+            }
             return DefaultResponsibility.castOrCopy(metadata);
+        } else {
+            return DefaultResponsibleParty.castOrCopy(metadata);
         }
     }
 

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Identifier.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Identifier.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Identifier.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Identifier.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -31,11 +31,11 @@ import org.apache.sis.internal.jaxb.gco.
  *
  * @author  Cédric Briançon (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
- * @version 0.7
+ * @version 1.0
  * @since   0.3
  * @module
  */
-public final class MD_Identifier extends PropertyType<MD_Identifier, Identifier> {
+public class MD_Identifier extends PropertyType<MD_Identifier, Identifier> {
     /**
      * Empty constructor for JAXB only.
      */
@@ -50,7 +50,7 @@ public final class MD_Identifier extends
      * @return {@code Identifier.class}
      */
     @Override
-    protected Class<Identifier> getBoundType() {
+    protected final Class<Identifier> getBoundType() {
         return Identifier.class;
     }
 
@@ -85,7 +85,7 @@ public final class MD_Identifier extends
         @XmlElementRef(type = ImmutableIdentifier.class)
     })
     @SuppressWarnings("deprecation")
-    public Identifier getElement() {
+    public final Identifier getElement() {
         if (metadata instanceof ImmutableIdentifier) {
             return (ImmutableIdentifier) metadata;
         }
@@ -100,7 +100,26 @@ public final class MD_Identifier extends
      *
      * @param  metadata  the unmarshalled metadata.
      */
-    public void setElement(final Identifier metadata) {
+    public final void setElement(final Identifier metadata) {
         this.metadata = metadata;
     }
+
+    /**
+     * Wraps the value only if marshalling an element from the ISO 19115:2003 metadata model.
+     * Otherwise (i.e. if marshalling according legacy ISO 19115:2014 model), omits the element.
+     */
+    public static final class Since2014 extends MD_Identifier {
+        /** Empty constructor used only by JAXB. */
+        public 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 protected MD_Identifier wrap(final Identifier value) {
+            return accept2014() ? super.wrap(value) : null;
+        }
+    }
 }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_KeywordClass.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_KeywordClass.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_KeywordClass.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_KeywordClass.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -27,11 +27,11 @@ import org.apache.sis.internal.jaxb.gco.
  * package documentation for more information about JAXB and interface.
  *
  * @author  Martin Desruisseaux (Geomatys)
- * @version 0.5
+ * @version 1.0
  * @since   0.5
  * @module
  */
-public final class MD_KeywordClass extends PropertyType<MD_KeywordClass, KeywordClass> {
+public class MD_KeywordClass extends PropertyType<MD_KeywordClass, KeywordClass> {
     /**
      * Empty constructor for JAXB only.
      */
@@ -46,7 +46,7 @@ public final class MD_KeywordClass exten
      * @return {@code KeywordClass.class}
      */
     @Override
-    protected Class<KeywordClass> getBoundType() {
+    protected final Class<KeywordClass> getBoundType() {
         return KeywordClass.class;
     }
 
@@ -77,7 +77,7 @@ public final class MD_KeywordClass exten
      * @return the metadata to be marshalled.
      */
     @XmlElementRef
-    public DefaultKeywordClass getElement() {
+    public final DefaultKeywordClass getElement() {
         return DefaultKeywordClass.castOrCopy(metadata);
     }
 
@@ -86,7 +86,26 @@ public final class MD_KeywordClass exten
      *
      * @param  metadata  the unmarshalled metadata.
      */
-    public void setElement(final DefaultKeywordClass metadata) {
+    public final void setElement(final DefaultKeywordClass metadata) {
         this.metadata = metadata;
     }
+
+    /**
+     * Wraps the value only if marshalling an element from the ISO 19115:2003 metadata model.
+     * Otherwise (i.e. if marshalling according legacy ISO 19115:2014 model), omits the element.
+     */
+    public static final class Since2014 extends MD_KeywordClass {
+        /** Empty constructor used only by JAXB. */
+        public 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 protected MD_KeywordClass wrap(final KeywordClass value) {
+            return accept2014() ? super.wrap(value) : null;
+        }
+    }
 }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Medium.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Medium.java?rev=1825254&r1=1825253&r2=1825254&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Medium.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Medium.java [UTF-8] Sat Feb 24 16:13:58 2018
@@ -28,11 +28,11 @@ import org.apache.sis.internal.jaxb.gco.
  *
  * @author  Cédric Briançon (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
- * @version 0.3
+ * @version 1.0
  * @since   0.3
  * @module
  */
-public final class MD_Medium extends PropertyType<MD_Medium, Medium> {
+public class MD_Medium extends PropertyType<MD_Medium, Medium> {
     /**
      * Empty constructor for JAXB only.
      */
@@ -47,7 +47,7 @@ public final class MD_Medium extends Pro
      * @return {@code Medium.class}
      */
     @Override
-    protected Class<Medium> getBoundType() {
+    protected final Class<Medium> getBoundType() {
         return Medium.class;
     }
 
@@ -78,7 +78,7 @@ public final class MD_Medium extends Pro
      * @return the metadata to be marshalled.
      */
     @XmlElementRef
-    public DefaultMedium getElement() {
+    public final DefaultMedium getElement() {
         return DefaultMedium.castOrCopy(metadata);
     }
 
@@ -87,7 +87,26 @@ public final class MD_Medium extends Pro
      *
      * @param  metadata  the unmarshalled metadata.
      */
-    public void setElement(final DefaultMedium metadata) {
+    public final void setElement(final DefaultMedium metadata) {
         this.metadata = metadata;
     }
+
+    /**
+     * Wraps the value only if marshalling an element from the ISO 19115:2003 metadata model.
+     * Otherwise (i.e. if marshalling according legacy ISO 19115:2014 model), omits the element.
+     */
+    public static final class Since2014 extends MD_Medium {
+        /** Empty constructor used only by JAXB. */
+        public 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 protected MD_Medium wrap(final Medium value) {
+            return accept2014() ? super.wrap(value) : null;
+        }
+    }
 }