sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1819315 - in /sis/branches/ISO-19115-3/core: sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/ sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/ sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/ sis-m...
Date Wed, 27 Dec 2017 04:28:08 GMT
Author: desruisseaux
Date: Wed Dec 27 04:28:07 2017
New Revision: 1819315

URL: http://svn.apache.org/viewvc?rev=1819315&view=rev
Log:
Upgrade JAXB bindings of some more classes to ISO 19115-3.
This is part of commit e780d66b4d7d59368e742ba01777a151d8827ea8 from Image Matter.

The project at this revision can be built but is known to have test failure.
Tests will pass only after we completed the port of all ISO 19115-3 work.

Modified:
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/CI_RoleCode.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/CI_TelephoneTypeCode.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DS_AssociationTypeCode.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DS_InitiativeTypeCode.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/TM_Duration.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/CI_Citation.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Identifier.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Medium.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Releasability.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Scope.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/SV_OperationMetadata.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/Dependencies.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultDataFile.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultFormat.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/package-info.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/package-info.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/AbstractIdentification.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAssociatedResource.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultBrowseGraphic.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultCoupledResource.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultDataIdentification.java
    sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/URIAdapter.java
    sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/GO_URL.java
    sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/util/collection/Cache.java

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/CI_RoleCode.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/CI_RoleCode.java?rev=1819315&r1=1819314&r2=1819315&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/CI_RoleCode.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/CI_RoleCode.java [UTF-8] Wed Dec 27 04:28:07 2017
@@ -105,7 +105,7 @@ public class CI_RoleCode extends CodeLis
          *
          * @return a non-null value only if marshalling ISO 19115-3 or newer.
          */
-        @Override public CI_RoleCode wrap(final CodeListUID value) {
+        @Override protected CI_RoleCode wrap(final CodeListUID value) {
             return accept2014() ? super.wrap(value) : null;
         }
     }

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/CI_TelephoneTypeCode.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/CI_TelephoneTypeCode.java?rev=1819315&r1=1819314&r2=1819315&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/CI_TelephoneTypeCode.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/CI_TelephoneTypeCode.java [UTF-8] Wed Dec 27 04:28:07 2017
@@ -104,7 +104,7 @@ public class CI_TelephoneTypeCode extend
          *
          * @return a non-null value only if marshalling ISO 19115-3 or newer.
          */
-        @Override public CI_TelephoneTypeCode wrap(final CodeListUID value) {
+        @Override protected CI_TelephoneTypeCode wrap(final CodeListUID value) {
             return accept2014() ? super.wrap(value) : null;
         }
     }

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DS_AssociationTypeCode.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DS_AssociationTypeCode.java?rev=1819315&r1=1819314&r2=1819315&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DS_AssociationTypeCode.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DS_AssociationTypeCode.java [UTF-8] Wed Dec 27 04:28:07 2017
@@ -34,11 +34,11 @@ import org.apache.sis.xml.Namespaces;
  * @since   0.3
  * @module
  */
-public final class DS_AssociationTypeCode extends CodeListAdapter<DS_AssociationTypeCode, AssociationType> {
+public class DS_AssociationTypeCode extends CodeListAdapter<DS_AssociationTypeCode, AssociationType> {
     /**
      * Empty constructor for JAXB only.
      */
-    public DS_AssociationTypeCode() {
+    DS_AssociationTypeCode() {
     }
 
     /**
@@ -64,7 +64,7 @@ public final class DS_AssociationTypeCod
      * @return the code list class.
      */
     @Override
-    protected Class<AssociationType> getCodeListClass() {
+    protected final Class<AssociationType> getCodeListClass() {
         return AssociationType.class;
     }
 
@@ -75,7 +75,7 @@ public final class DS_AssociationTypeCod
      */
     @Override
     @XmlElement(name = "DS_AssociationTypeCode", namespace = Namespaces.MRI)
-    public CodeListUID getElement() {
+    public final CodeListUID getElement() {
         return identifier;
     }
 
@@ -84,7 +84,26 @@ public final class DS_AssociationTypeCod
      *
      * @param  value  the unmarshalled value.
      */
-    public void setElement(final CodeListUID value) {
+    public final void setElement(final CodeListUID value) {
         identifier = value;
     }
+
+    /**
+     * Wraps the value only if marshalling ISO 19115-3 element.
+     * Otherwise (i.e. if marshalling a legacy ISO 19139:2007 document), omit the element.
+     */
+    public static final class Since2014 extends DS_AssociationTypeCode {
+        /** Empty constructor used only by JAXB. */
+        private Since2014() {
+        }
+
+        /**
+         * Wraps the given value in an ISO 19115-3 element, unless we are marshalling an older document.
+         *
+         * @return a non-null value only if marshalling ISO 19115-3 or newer.
+         */
+        @Override protected DS_AssociationTypeCode wrap(final CodeListUID value) {
+            return accept2014() ? super.wrap(value) : null;
+        }
+    }
 }

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DS_InitiativeTypeCode.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DS_InitiativeTypeCode.java?rev=1819315&r1=1819314&r2=1819315&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DS_InitiativeTypeCode.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/DS_InitiativeTypeCode.java [UTF-8] Wed Dec 27 04:28:07 2017
@@ -34,11 +34,11 @@ import org.apache.sis.xml.Namespaces;
  * @since   0.3
  * @module
  */
-public final class DS_InitiativeTypeCode extends CodeListAdapter<DS_InitiativeTypeCode, InitiativeType> {
+public class DS_InitiativeTypeCode extends CodeListAdapter<DS_InitiativeTypeCode, InitiativeType> {
     /**
      * Empty constructor for JAXB only.
      */
-    public DS_InitiativeTypeCode() {
+    DS_InitiativeTypeCode() {
     }
 
     /**
@@ -64,7 +64,7 @@ public final class DS_InitiativeTypeCode
      * @return the code list class.
      */
     @Override
-    protected Class<InitiativeType> getCodeListClass() {
+    protected final Class<InitiativeType> getCodeListClass() {
         return InitiativeType.class;
     }
 
@@ -75,7 +75,7 @@ public final class DS_InitiativeTypeCode
      */
     @Override
     @XmlElement(name = "DS_InitiativeTypeCode", namespace = Namespaces.MRI)
-    public CodeListUID getElement() {
+    public final CodeListUID getElement() {
         return identifier;
     }
 
@@ -84,7 +84,26 @@ public final class DS_InitiativeTypeCode
      *
      * @param  value  the unmarshalled value.
      */
-    public void setElement(final CodeListUID value) {
+    public final void setElement(final CodeListUID value) {
         identifier = value;
     }
+
+    /**
+     * Wraps the value only if marshalling ISO 19115-3 element.
+     * Otherwise (i.e. if marshalling a legacy ISO 19139:2007 document), omit the element.
+     */
+    public static final class Since2014 extends DS_InitiativeTypeCode {
+        /** Empty constructor used only by JAXB. */
+        private Since2014() {
+        }
+
+        /**
+         * Wraps the given value in an ISO 19115-3 element, unless we are marshalling an older document.
+         *
+         * @return a non-null value only if marshalling ISO 19115-3 or newer.
+         */
+        @Override protected DS_InitiativeTypeCode wrap(final CodeListUID value) {
+            return accept2014() ? super.wrap(value) : null;
+        }
+    }
 }

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/TM_Duration.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/TM_Duration.java?rev=1819315&r1=1819314&r2=1819315&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/TM_Duration.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/TM_Duration.java [UTF-8] Wed Dec 27 04:28:07 2017
@@ -41,13 +41,13 @@ public final class TM_Duration extends P
     /**
      * Empty constructor for JAXB.
      */
-    public TM_Duration() {
+    TM_Duration() {
     }
 
     /**
      * Wraps a Temporal Duration value at marshalling-time.
      *
-     * @param metadata The metadata value to marshal.
+     * @param  metadata  the metadata value to marshal.
      */
     private TM_Duration(final Duration metadata) {
         super(metadata);
@@ -56,8 +56,8 @@ public final class TM_Duration extends P
     /**
      * Returns the Duration value wrapped by a {@code gts:TM_Duration} element.
      *
-     * @param value The value to marshal.
-     * @return The adapter which wraps the metadata value.
+     * @param  value  the value to marshal.
+     * @return the adapter which wraps the metadata value.
      */
     @Override
     protected TM_Duration wrap(final Duration value) {

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/CI_Citation.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/CI_Citation.java?rev=1819315&r1=1819314&r2=1819315&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/CI_Citation.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/CI_Citation.java [UTF-8] Wed Dec 27 04:28:07 2017
@@ -105,7 +105,7 @@ public class CI_Citation extends Propert
          *
          * @return a non-null value only if marshalling ISO 19115-3 or newer.
          */
-        @Override public CI_Citation wrap(final Citation value) {
+        @Override protected CI_Citation wrap(final Citation value) {
             return accept2014() ? super.wrap(value) : null;
         }
     }

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Identifier.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Identifier.java?rev=1819315&r1=1819314&r2=1819315&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Identifier.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Identifier.java [UTF-8] Wed Dec 27 04:28:07 2017
@@ -118,7 +118,7 @@ public class MD_Identifier extends Prope
          *
          * @return a non-null value only if marshalling ISO 19115-3 or newer.
          */
-        @Override public MD_Identifier wrap(final Identifier value) {
+        @Override protected MD_Identifier wrap(final Identifier value) {
             return accept2014() ? super.wrap(value) : null;
         }
     }

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Medium.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Medium.java?rev=1819315&r1=1819314&r2=1819315&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Medium.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Medium.java [UTF-8] Wed Dec 27 04:28:07 2017
@@ -28,15 +28,15 @@ 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.
      */
-    public MD_Medium() {
+    MD_Medium() {
     }
 
     /**
@@ -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 ISO 19115-3 element.
+     * Otherwise (i.e. if marshalling a legacy ISO 19139:2007 document), omit the element.
+     */
+    public static final class Since2014 extends MD_Medium {
+        /** Empty constructor used only by JAXB. */
+        private Since2014() {
+        }
+
+        /**
+         * Wraps the given value in an ISO 19115-3 element, unless we are marshalling an older document.
+         *
+         * @return a non-null value only if marshalling ISO 19115-3 or newer.
+         */
+        @Override protected MD_Medium wrap(final Medium value) {
+            return accept2014() ? super.wrap(value) : null;
+        }
+    }
 }

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Releasability.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Releasability.java?rev=1819315&r1=1819314&r2=1819315&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Releasability.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Releasability.java [UTF-8] Wed Dec 27 04:28:07 2017
@@ -105,7 +105,7 @@ public class MD_Releasability extends Pr
          *
          * @return a non-null value only if marshalling ISO 19115-3 or newer.
          */
-        @Override public MD_Releasability wrap(final Releasability value) {
+        @Override protected MD_Releasability wrap(final Releasability value) {
             return accept2014() ? super.wrap(value) : null;
         }
     }

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Scope.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Scope.java?rev=1819315&r1=1819314&r2=1819315&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Scope.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_Scope.java [UTF-8] Wed Dec 27 04:28:07 2017
@@ -23,8 +23,8 @@ import org.apache.sis.internal.jaxb.gco.
 
 
 /**
- * JAXB adapter in order to map implementing class with the GeoAPI interface. See
- * package documentation for more information about JAXB and interface.
+ * JAXB adapter in order to map implementing class with the GeoAPI interface.
+ * See package documentation for more information about JAXB and interface.
  *
  * @author  Guilhem Legal (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
@@ -105,7 +105,7 @@ public class MD_Scope extends PropertyTy
          *
          * @return a non-null value only if marshalling ISO 19115-3 or newer.
          */
-        @Override public MD_Scope wrap(final Scope value) {
+        @Override protected MD_Scope wrap(final Scope value) {
             return accept2014() ? super.wrap(value) : null;
         }
     }

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/SV_OperationMetadata.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/SV_OperationMetadata.java?rev=1819315&r1=1819314&r2=1819315&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/SV_OperationMetadata.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/SV_OperationMetadata.java [UTF-8] Wed Dec 27 04:28:07 2017
@@ -27,15 +27,15 @@ 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 SV_OperationMetadata extends PropertyType<SV_OperationMetadata, OperationMetadata> {
+public class SV_OperationMetadata extends PropertyType<SV_OperationMetadata, OperationMetadata> {
     /**
      * Empty constructor for JAXB only.
      */
-    public SV_OperationMetadata() {
+    SV_OperationMetadata() {
     }
 
     /**
@@ -46,7 +46,7 @@ public final class SV_OperationMetadata
      * @return {@code OperationMetadata.class}
      */
     @Override
-    protected Class<OperationMetadata> getBoundType() {
+    protected final Class<OperationMetadata> getBoundType() {
         return OperationMetadata.class;
     }
 
@@ -77,7 +77,7 @@ public final class SV_OperationMetadata
      * @return the metadata to be marshalled.
      */
     @XmlElementRef
-    public DefaultOperationMetadata getElement() {
+    public final DefaultOperationMetadata getElement() {
         return DefaultOperationMetadata.castOrCopy(metadata);
     }
 
@@ -86,7 +86,26 @@ public final class SV_OperationMetadata
      *
      * @param  metadata  the unmarshalled metadata.
      */
-    public void setElement(final DefaultOperationMetadata metadata) {
+    public final void setElement(final DefaultOperationMetadata metadata) {
         this.metadata = metadata;
     }
+
+    /**
+     * Wraps the value only if marshalling ISO 19115-3 element.
+     * Otherwise (i.e. if marshalling a legacy ISO 19139:2007 document), omit the element.
+     */
+    public static final class Since2014 extends SV_OperationMetadata {
+        /** Empty constructor used only by JAXB. */
+        private Since2014() {
+        }
+
+        /**
+         * Wraps the given value in an ISO 19115-3 element, unless we are marshalling an older document.
+         *
+         * @return a non-null value only if marshalling ISO 19115-3 or newer.
+         */
+        @Override protected SV_OperationMetadata wrap(final OperationMetadata value) {
+            return accept2014() ? super.wrap(value) : null;
+        }
+    }
 }

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/Dependencies.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/Dependencies.java?rev=1819315&r1=1819314&r2=1819315&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/Dependencies.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/Dependencies.java [UTF-8] Wed Dec 27 04:28:07 2017
@@ -24,9 +24,9 @@ import java.lang.annotation.RetentionPol
 
 /**
  * Indicates that the value of a property is computed from values of other properties.
- * This annotation can be applied on getter methods.  All dependent properties must be
- * in the same class than the annotated method. Transitive dependencies do not need to
- * be declared, but the dependency graph shall not contain cycle.
+ * This annotation can be applied on public getter methods. All dependent properties
+ * must be in the same class than the annotated method. Transitive dependencies do not
+ * need to be declared, but the dependency graph shall not contain cycle.
  *
  * <div class="note"><b>Example:</b>
  * {@code ResponsibleParty.individualName} is now deprecated and replaced by the first {@code Individual.name} value

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java?rev=1819315&r1=1819314&r2=1819315&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java [UTF-8] Wed Dec 27 04:28:07 2017
@@ -1556,7 +1556,6 @@ public class DefaultMetadata extends ISO
     /**
      * Gets the default locale for this record (used in ISO 19115-3 format).
      */
-    @Dependencies("getLanguages")
     @XmlElement(name = "defaultLocale")
     private Locale getDefaultLocale() {
         return FilterByVersion.CURRENT_METADATA.accept() ? CollectionsExt.first(getLanguages()) : null;
@@ -1573,7 +1572,6 @@ public class DefaultMetadata extends ISO
     /**
      * Gets the other locales for this record (used in ISO 19115-3 format).
      */
-    @Dependencies("getLanguages")
     @XmlElement(name = "otherLocale")
     private Collection<Locale> getOtherLocales() {
         return FilterByVersion.CURRENT_METADATA.accept() ? OtherLocales.filter(getLanguages()) : null;

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultDataFile.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultDataFile.java?rev=1819315&r1=1819314&r2=1819315&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultDataFile.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultDataFile.java [UTF-8] Wed Dec 27 04:28:07 2017
@@ -48,16 +48,17 @@ import org.apache.sis.metadata.iso.ISOMe
  *
  * @author  Cédric Briançon (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
- * @version 0.3
+ * @author  Cullen Rombach (Image Matters)
+ * @version 1.0
  * @since   0.3
  * @module
  */
 @SuppressWarnings("CloneableClassWithoutClone")                 // ModifiableMetadata needs shallow clones.
-@XmlType(name = "MX_DataFile_Type", propOrder = {
+@XmlType(name = "MX_DataFile_Type", namespace = Namespaces.GCX, propOrder = {
     "featureTypes",
     "fileFormat"
 })
-@XmlRootElement(name = "MX_DataFile", namespace = Namespaces.GMX)
+@XmlRootElement(name = "MX_DataFile", namespace = Namespaces.GCX)
 public class DefaultDataFile extends ISOMetadata implements DataFile {
     /**
      * Serial number for inter-operability with different versions.
@@ -134,7 +135,7 @@ public class DefaultDataFile extends ISO
      * @return list of features types concerned by the transfer data file.
      */
     @Override
-    @XmlElement(name = "featureType", namespace = Namespaces.GMX)
+    @XmlElement(name = "featureType")
     public Collection<LocalName> getFeatureTypes() {
         return featureTypes = nonNullCollection(featureTypes, LocalName.class);
     }
@@ -154,7 +155,7 @@ public class DefaultDataFile extends ISO
      * @return format of the transfer data file, or {@code null}.
      */
     @Override
-    @XmlElement(name = "fileFormat", namespace = Namespaces.GMX, required = true)
+    @XmlElement(name = "fileFormat", required = true)
     public Format getFileFormat() {
         return fileFormat;
     }

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultFormat.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultFormat.java?rev=1819315&r1=1819314&r2=1819315&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultFormat.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultFormat.java [UTF-8] Wed Dec 27 04:28:07 2017
@@ -20,6 +20,7 @@ import java.util.Collection;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import org.opengis.util.InternationalString;
 import org.opengis.metadata.citation.Citation;
 import org.opengis.metadata.distribution.Format;
@@ -27,6 +28,9 @@ import org.opengis.metadata.distribution
 import org.opengis.metadata.distribution.Distributor;
 import org.apache.sis.internal.metadata.Dependencies;
 import org.apache.sis.internal.metadata.LegacyPropertyAdapter;
+import org.apache.sis.internal.jaxb.FilterByVersion;
+import org.apache.sis.internal.jaxb.metadata.MD_Medium;
+import org.apache.sis.internal.jaxb.metadata.CI_Citation;
 import org.apache.sis.metadata.iso.citation.DefaultCitation;
 import org.apache.sis.metadata.iso.ISOMetadata;
 
@@ -77,17 +81,23 @@ import java.util.function.BiConsumer;
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @author  Touraïvane (IRD)
  * @author  Cédric Briançon (Geomatys)
- * @version 0.8
+ * @author  Cullen Rombach (Image Matters)
+ * @version 1.0
  * @since   0.3
  * @module
  */
 @SuppressWarnings("CloneableClassWithoutClone")                 // ModifiableMetadata needs shallow clones.
 @XmlType(name = "MD_Format_Type", propOrder = {
+    // ISO 19115:2003 (legacy)
     "name",
     "version",
     "amendmentNumber",
     "specification",
+
+    // ISO 19115:2014
+    "formatSpecificationCitation",
     "fileDecompressionTechnique",
+    "media",
     "formatDistributors"
 })
 @XmlRootElement(name = "MD_Format")
@@ -182,7 +192,8 @@ public class DefaultFormat extends ISOMe
      * @since 0.5
      */
     @Override
-/// @XmlElement(name = "formatSpecificationCitation", required = true)
+    @XmlElement(name = "formatSpecificationCitation", required = true)
+    @XmlJavaTypeAdapter(CI_Citation.Since2014.class)
     public Citation getFormatSpecificationCitation() {
         return formatSpecificationCitation;
     }
@@ -233,8 +244,13 @@ public class DefaultFormat extends ISOMe
     @XmlElement(name = "specification")
     @Dependencies("getFormatSpecificationCitation")
     public InternationalString getSpecification() {
-        final Citation citation = getFormatSpecificationCitation();
-        return (citation != null) ? citation.getTitle() : null;
+        if (FilterByVersion.LEGACY_METADATA.accept()) {
+            final Citation citation = getFormatSpecificationCitation();
+            if (citation != null) {
+                return citation.getTitle();
+            }
+        }
+        return null;
     }
 
     /**
@@ -266,10 +282,12 @@ public class DefaultFormat extends ISOMe
     @XmlElement(name = "name", required = true)
     @Dependencies("getFormatSpecificationCitation")
     public InternationalString getName() {
-        final Citation citation = getFormatSpecificationCitation();
-        if (citation != null) {
-            return LegacyPropertyAdapter.getSingleton(citation.getAlternateTitles(),
-                    InternationalString.class, null, DefaultFormat.class, "getName");
+        if (FilterByVersion.LEGACY_METADATA.accept()) {
+            final Citation citation = getFormatSpecificationCitation();
+            if (citation != null) {
+                return LegacyPropertyAdapter.getSingleton(citation.getAlternateTitles(),
+                        InternationalString.class, null, DefaultFormat.class, "getName");
+            }
         }
         return null;
     }
@@ -304,8 +322,13 @@ public class DefaultFormat extends ISOMe
     @XmlElement(name = "version", required = true)
     @Dependencies("getFormatSpecificationCitation")
     public InternationalString getVersion() {
-        final Citation citation = getFormatSpecificationCitation();
-        return (citation != null) ? citation.getEdition() : null;
+        if (FilterByVersion.LEGACY_METADATA.accept()) {
+            final Citation citation = getFormatSpecificationCitation();
+            if (citation != null) {
+                return citation.getEdition();
+            }
+        }
+        return null;
     }
 
     /**
@@ -376,7 +399,8 @@ public class DefaultFormat extends ISOMe
      * @since 0.5
      */
     @Override
-/// @XmlElement(name = "medium")
+    @XmlElement(name = "medium")
+    @XmlJavaTypeAdapter(MD_Medium.Since2014.class)
     public Collection<Medium> getMedia() {
         return media = nonNullCollection(media, Medium.class);
     }

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/package-info.java?rev=1819315&r1=1819314&r2=1819315&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/package-info.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/package-info.java [UTF-8] Wed Dec 27 04:28:07 2017
@@ -69,14 +69,16 @@
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @author  Touraïvane (IRD)
  * @author  Cédric Briançon (Geomatys)
- * @version 0.5
+ * @author  Cullen Rombach (Image Matters)
+ * @version 1.0
  * @since   0.3
  * @module
  */
-@XmlSchema(location=Schemas.METADATA_XSD, elementFormDefault=XmlNsForm.QUALIFIED, namespace=Namespaces.GMD, xmlns = {
-    @XmlNs(prefix = "gmx", namespaceURI = Namespaces.GMX),
-    @XmlNs(prefix = "gmd", namespaceURI = Namespaces.GMD),
+@XmlSchema(location=Schemas.METADATA_XSD_DISTRIBUTION, elementFormDefault=XmlNsForm.QUALIFIED, namespace=Namespaces.MRD, xmlns = {
+    @XmlNs(prefix = "mcc", namespaceURI = Namespaces.MCC),
+    @XmlNs(prefix = "mrd", namespaceURI = Namespaces.MRD),
     @XmlNs(prefix = "gco", namespaceURI = Namespaces.GCO),
+    @XmlNs(prefix = "gmw", namespaceURI = Namespaces.GMW),
     @XmlNs(prefix = "xsi", namespaceURI = Namespaces.XSI)
 })
 @XmlAccessorType(XmlAccessType.NONE)

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/package-info.java?rev=1819315&r1=1819314&r2=1819315&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/package-info.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/package-info.java [UTF-8] Wed Dec 27 04:28:07 2017
@@ -135,13 +135,17 @@
  * @author  Touraïvane (IRD)
  * @author  Cédric Briançon (Geomatys)
  * @author  Guilhem Legal (Geomatys)
- * @version 0.5
+ * @author  Cullen Rombach (Image Matters)
+ * @version 1.0
  * @since   0.3
  * @module
  */
-@XmlSchema(location=Schemas.METADATA_XSD, elementFormDefault=XmlNsForm.QUALIFIED, namespace=Namespaces.GMD, xmlns = {
-    @XmlNs(prefix = "gmd", namespaceURI = Namespaces.GMD),
+@XmlSchema(location=Schemas.METADATA_XSD_EXTENT, elementFormDefault=XmlNsForm.QUALIFIED, namespace=Namespaces.GEX, xmlns = {
+    @XmlNs(prefix = "gex", namespaceURI = Namespaces.GEX),
+    @XmlNs(prefix = "mcc", namespaceURI = Namespaces.MCC),
+    @XmlNs(prefix = "rce", namespaceURI = Namespaces.RCE),
     @XmlNs(prefix = "gco", namespaceURI = Namespaces.GCO),
+    @XmlNs(prefix = "gmw", namespaceURI = Namespaces.GMW),
     @XmlNs(prefix = "xsi", namespaceURI = Namespaces.XSI)
 })
 @XmlAccessorType(XmlAccessType.NONE)

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/AbstractIdentification.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/AbstractIdentification.java?rev=1819315&r1=1819314&r2=1819315&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/AbstractIdentification.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/AbstractIdentification.java [UTF-8] Wed Dec 27 04:28:07 2017
@@ -21,6 +21,7 @@ import javax.xml.bind.annotation.XmlType
 import javax.xml.bind.annotation.XmlSeeAlso;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import org.opengis.metadata.Identifier;
 import org.opengis.metadata.citation.Citation;
 import org.opengis.metadata.citation.Responsibility;
@@ -44,6 +45,8 @@ import org.opengis.temporal.Duration;
 import org.opengis.util.InternationalString;
 import org.apache.sis.internal.metadata.Dependencies;
 import org.apache.sis.internal.metadata.LegacyPropertyAdapter;
+import org.apache.sis.internal.jaxb.metadata.MD_Identifier;
+import org.apache.sis.internal.jaxb.FilterByVersion;
 import org.apache.sis.metadata.iso.ISOMetadata;
 import org.apache.sis.util.iso.Types;
 
@@ -77,7 +80,8 @@ import org.apache.sis.util.iso.Types;
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @author  Touraïvane (IRD)
  * @author  Cédric Briançon (Geomatys)
- * @version 0.5
+ * @author  Cullen Rombach (Image Matters)
+ * @version 1.0
  * @since   0.3
  * @module
  */
@@ -89,15 +93,27 @@ import org.apache.sis.util.iso.Types;
     "credits",
     "status",
     "pointOfContacts",
+    "spatialRepresentationTypes",       // Here in ISO 19115:2014 (was after 'aggregationInfo' in ISO 19115:2003)
+    "spatialResolutions",               // Shall be kept next to 'spatialRepresentationTypes'
+    "temporalResolution",               // ISO 19115-3 only
+    "topicCategory",                    // Here in ISO 19115:2014 (was in subclasses in ISO 19115:2003)
+    "extent",                           // Here in ISO 19115:2014 (was in subclasses in ISO 19115:2003)
+    "additionalDocumentation",          // ISO 19115:2014 only
+    "processingLevel",                  // ISO 19115:2014 only
     "resourceMaintenances",
     "graphicOverviews",
     "resourceFormats",
     "descriptiveKeywords",
     "resourceSpecificUsages",
     "resourceConstraints",
-    "aggregationInfo",
-    "spatialRepresentationTypes", // After 'pointOfContact' according ISO 19115:2014, but here for ISO 19115:2003 compatibility.
-    "spatialResolutions"          // Shall be kept next to 'spatialRepresentationTypes'
+    "associatedResource",
+    "aggregationInfo",                  // Legacy ISO 19115:2003 (replaced by 'associatedResources')
+    /*
+     * NOTE: legacy ISO 19115:2003 specification had 'spatialRepresentationTypes' and 'spatialResolutions'
+     *       elements last. If we wanted to produce strictly compliant legacy XML documents, we would have
+     *       to duplicate those attributes. We avoid this complexity on the assumption that readers are
+     *       tolerant to different order (this relaxation is needed only for legacy XML).
+     */
 })
 @XmlRootElement(name = "MD_Identification")
 @XmlSeeAlso({
@@ -484,7 +500,7 @@ public class AbstractIdentification exte
      * @since 0.5
      */
     @Override
-/// @XmlElement(name = "temporalResolution")
+    // @XmlElement at the end of this class.
     public Collection<Duration> getTemporalResolutions() {
         return temporalResolutions = nonNullCollection(temporalResolutions, Duration.class);
     }
@@ -508,7 +524,7 @@ public class AbstractIdentification exte
      * @since 0.5
      */
     @Override
-/// @XmlElement(name = "topicCategory")
+    // @XmlElement at the end of this class.
     public Collection<TopicCategory> getTopicCategories()  {
         return topicCategories = nonNullCollection(topicCategories, TopicCategory.class);
     }
@@ -532,7 +548,7 @@ public class AbstractIdentification exte
      * @since 0.5
      */
     @Override
-/// @XmlElement(name = "extent")
+    // @XmlElement at the end of this class.
     public Collection<Extent> getExtents() {
         return extents = nonNullCollection(extents, Extent.class);
     }
@@ -556,7 +572,7 @@ public class AbstractIdentification exte
      * @since 0.5
      */
     @Override
-/// @XmlElement(name = "additionalDocumentation")
+    // @XmlElement at the end of this class.
     public Collection<Citation> getAdditionalDocumentations() {
         return additionalDocumentations = nonNullCollection(additionalDocumentations, Citation.class);
     }
@@ -580,7 +596,8 @@ public class AbstractIdentification exte
      * @since 0.5
      */
     @Override
-/// @XmlElement(name = "processingLevel")
+    @XmlElement(name = "processingLevel")
+    @XmlJavaTypeAdapter(MD_Identifier.Since2014.class)
     public Identifier getProcessingLevel() {
         return processingLevel;
     }
@@ -731,7 +748,7 @@ public class AbstractIdentification exte
      * @since 0.5
      */
     @Override
-/// @XmlElement(name = "associatedResource")
+    // @XmlElement at the end of this class.
     public Collection<AssociatedResource> getAssociatedResources() {
         return associatedResources = nonNullCollection(associatedResources, AssociatedResource.class);
     }
@@ -759,6 +776,7 @@ public class AbstractIdentification exte
     @XmlElement(name = "aggregationInfo")
     @Dependencies("getAssociatedResources")
     public Collection<AggregateInformation> getAggregationInfo() {
+        if (!FilterByVersion.LEGACY_METADATA.accept()) return null;
         return new LegacyPropertyAdapter<AggregateInformation,AssociatedResource>(getAssociatedResources()) {
             @Override protected AssociatedResource wrap(final AggregateInformation value) {
                 return value;
@@ -785,4 +803,51 @@ public class AbstractIdentification exte
     public void setAggregationInfo(final Collection<? extends AggregateInformation> newValues) {
         setAssociatedResources(newValues);
     }
+
+
+
+
+    //////////////////////////////////////////////////////////////////////////////////////////////////
+    ////////                                                                                  ////////
+    ////////                               XML support with JAXB                              ////////
+    ////////                                                                                  ////////
+    ////////        The following methods are invoked by JAXB using reflection (even if       ////////
+    ////////        they are private) or are helpers for other methods invoked by JAXB.       ////////
+    ////////        Those methods can be safely removed if Geographic Markup Language         ////////
+    ////////        (GML) support is not needed.                                              ////////
+    ////////                                                                                  ////////
+    //////////////////////////////////////////////////////////////////////////////////////////////////
+
+    /**
+     * Invoked by JAXB at both marshalling and unmarshalling time.
+     * This attribute has been added by ISO 19115:2014 standard.
+     * If (and only if) marshalling an older standard version, we omit this attribute.
+     *
+     * @todo Currently, the {@code XmlJavaTypeAdapter} used here just internally converts {@code Duration} objects
+     *       into {@code PeriodDuration} objects. Need to add support for {@code IntervalLength} in the future.
+     */
+    @XmlElement(name = "temporalResolution")
+    private Collection<Duration> getTemporalResolution() {
+        return FilterByVersion.CURRENT_METADATA.accept() ? getTemporalResolutions() : null;
+    }
+
+    @XmlElement(name = "topicCategory")
+    private Collection<TopicCategory> getTopicCategory()  {
+        return FilterByVersion.CURRENT_METADATA.accept() ? getTopicCategories() : null;
+    }
+
+    @XmlElement(name = "extent")
+    private Collection<Extent> getExtent() {
+        return FilterByVersion.CURRENT_METADATA.accept() ? getExtents() : null;
+    }
+
+    @XmlElement(name = "additionalDocumentation")
+    private Collection<Citation> getAdditionalDocumentation() {
+        return FilterByVersion.CURRENT_METADATA.accept() ? getAdditionalDocumentations() : null;
+    }
+
+    @XmlElement(name = "associatedResource")
+    private Collection<AssociatedResource> getAssociatedResource() {
+        return FilterByVersion.CURRENT_METADATA.accept() ? getAssociatedResources() : null;
+    }
 }

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java?rev=1819315&r1=1819314&r2=1819315&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java [UTF-8] Wed Dec 27 04:28:07 2017
@@ -26,8 +26,6 @@ import org.opengis.metadata.Identifier;
 import org.opengis.metadata.citation.Citation;
 import org.opengis.metadata.identification.AggregateInformation;
 import org.opengis.metadata.identification.AssociatedResource;
-import org.opengis.metadata.identification.AssociationType;
-import org.opengis.metadata.identification.InitiativeType;
 import org.apache.sis.metadata.iso.citation.DefaultCitation;
 import org.apache.sis.internal.metadata.Dependencies;
 
@@ -58,7 +56,8 @@ import org.apache.sis.internal.metadata.
  *
  * @author  Guilhem Legal (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
- * @version 0.5
+ * @author  Cullen Rombach (Image Matters)
+ * @version 1.0
  * @since   0.3
  * @module
  *
@@ -69,8 +68,7 @@ import org.apache.sis.internal.metadata.
 @XmlType(name = "MD_AggregateInformation_Type", propOrder = {
     "aggregateDataSetName",
     "aggregateDataSetIdentifier",
-    "associationType",
-    "initiativeType"
+    // "associationType" and "initiativeType" will be written by parent class.
 })
 @XmlRootElement(name = "MD_AggregateInformation")
 public class DefaultAggregateInformation extends DefaultAssociatedResource implements AggregateInformation {
@@ -168,7 +166,7 @@ public class DefaultAggregateInformation
     /**
      * Returns the first identifier of the given citation.
      */
-    static Identifier getAggregateDataSetIdentifier(final Citation name) {
+    private static Identifier getAggregateDataSetIdentifier(final Citation name) {
         if (name != null) {
             final Collection<? extends Identifier> names = name.getIdentifiers();
             if (names != null) { // May be null on XML marshalling.
@@ -216,46 +214,4 @@ public class DefaultAggregateInformation
             }
         }
     }
-
-    /**
-     * Association type of the aggregate dataset.
-     *
-     * @return association type of the aggregate dataset.
-     */
-    @Override
-    @XmlElement(name = "associationType", required = true)
-    public AssociationType getAssociationType() {
-        return super.getAssociationType();
-    }
-
-    /**
-     * Sets the association type of the aggregate dataset.
-     *
-     * @param  newValue  the new association type.
-     */
-    @Override
-    public void setAssociationType(final AssociationType newValue) {
-        super.setAssociationType(newValue);
-    }
-
-    /**
-     * Type of initiative under which the aggregate dataset was produced.
-     *
-     * @return type of initiative under which the aggregate dataset was produced, or {@code null}.
-     */
-    @Override
-    @XmlElement(name = "initiativeType")
-    public InitiativeType getInitiativeType() {
-        return super.getInitiativeType();
-    }
-
-    /**
-     * Sets the type of initiative under which the aggregate dataset was produced.
-     *
-     * @param  newValue  the new initiative.
-     */
-    @Override
-    public void setInitiativeType(final InitiativeType newValue) {
-        super.setInitiativeType(newValue);
-    }
 }

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAssociatedResource.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAssociatedResource.java?rev=1819315&r1=1819314&r2=1819315&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAssociatedResource.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAssociatedResource.java [UTF-8] Wed Dec 27 04:28:07 2017
@@ -19,10 +19,14 @@ package org.apache.sis.metadata.iso.iden
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import org.opengis.metadata.citation.Citation;
 import org.opengis.metadata.identification.AssociatedResource;
 import org.opengis.metadata.identification.AssociationType;
 import org.opengis.metadata.identification.InitiativeType;
+import org.apache.sis.internal.jaxb.metadata.CI_Citation;
+import org.apache.sis.internal.jaxb.code.DS_AssociationTypeCode;
+import org.apache.sis.internal.jaxb.code.DS_InitiativeTypeCode;
 import org.apache.sis.metadata.iso.ISOMetadata;
 
 
@@ -52,17 +56,18 @@ import org.apache.sis.metadata.iso.ISOMe
  *
  * @author  Rémi Maréchal (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
- * @version 0.5
+ * @author  Cullen Rombach (Image Matters)
+ * @version 1.0
  * @since   0.5
  * @module
  */
 @SuppressWarnings("CloneableClassWithoutClone")                 // ModifiableMetadata needs shallow clones.
-@XmlType(name = "MD_AssociatedResource_Type" /*, propOrder = {
+@XmlType(name = "MD_AssociatedResource_Type", propOrder = {
     "name",
     "associationType",
     "initiativeType",
     "metadataReference"
-}*/)
+})
 @XmlRootElement(name = "MD_AssociatedResource")
 public class DefaultAssociatedResource extends ISOMetadata implements AssociatedResource {
     /**
@@ -156,7 +161,8 @@ public class DefaultAssociatedResource e
      * @return Citation information about the associated resource, or {@code null} if none.
      */
     @Override
-/// @XmlElement(name = "name")
+    @XmlElement(name = "name")
+    @XmlJavaTypeAdapter(CI_Citation.Since2014.class)
     public Citation getName() {
         return name;
     }
@@ -177,7 +183,8 @@ public class DefaultAssociatedResource e
      * @return type of relation between the resources.
      */
     @Override
-/// @XmlElement(name = "associationType", required = true)
+    @XmlElement(name = "associationType", required = true)
+    @XmlJavaTypeAdapter(DS_AssociationTypeCode.Since2014.class)
     public AssociationType getAssociationType() {
         return associationType;
     }
@@ -198,7 +205,8 @@ public class DefaultAssociatedResource e
      * @return the type of initiative under which the associated resource was produced, or {@code null} if none.
      */
     @Override
-/// @XmlElement(name = "initiativeType")
+    @XmlElement(name = "initiativeType")
+    @XmlJavaTypeAdapter(DS_InitiativeTypeCode.Since2014.class)
     public InitiativeType getInitiativeType() {
         return initiativeType;
     }
@@ -219,7 +227,8 @@ public class DefaultAssociatedResource e
      * @return reference to the metadata of the associated resource, or {@code null} if none.
      */
     @Override
-/// @XmlElement(name = "metadataReference")
+    @XmlElement(name = "metadataReference")
+    @XmlJavaTypeAdapter(CI_Citation.Since2014.class)
     public Citation getMetadataReference() {
         return metadataReference;
     }

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultBrowseGraphic.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultBrowseGraphic.java?rev=1819315&r1=1819314&r2=1819315&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultBrowseGraphic.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultBrowseGraphic.java [UTF-8] Wed Dec 27 04:28:07 2017
@@ -17,6 +17,7 @@
 package org.apache.sis.metadata.iso.identification;
 
 import java.net.URI;
+import java.net.URISyntaxException;
 import java.util.Collection;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;
@@ -28,6 +29,10 @@ import org.opengis.metadata.constraint.C
 import org.opengis.metadata.identification.BrowseGraphic;
 import org.apache.sis.metadata.iso.ISOMetadata;
 import org.apache.sis.internal.jaxb.gmx.MimeFileTypeAdapter;
+import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.jaxb.FilterByVersion;
+import org.apache.sis.internal.jaxb.Context;
+import org.apache.sis.xml.Namespaces;
 
 
 /**
@@ -50,17 +55,21 @@ import org.apache.sis.internal.jaxb.gmx.
  * @author  Touraïvane (IRD)
  * @author  Cédric Briançon (Geomatys)
  * @author  Rémi Maréchal (Geomatys)
- * @version 0.5
+ * @author  Cullen Rombach (Image Matters)
+ * @version 1.0
  * @since   0.3
  * @module
  */
 @SuppressWarnings("CloneableClassWithoutClone")                 // ModifiableMetadata needs shallow clones.
-@XmlType(name = "MD_BrowseGraphic_Type", propOrder = {
-    "fileName",
+@XmlType(name = "MD_BrowseGraphic_Type", namespace = Namespaces.MCC, propOrder = {
+    "fileNameURL",              // "fileName" attribute marshalled in ISO 19139:2007 way.
+    "fileNameString",           // "fileName" attribute marshalled in ISO 19115-3 way.
     "fileDescription",
-    "fileType"
+    "fileType",
+    "linkage",
+    "imageConstraint"
 })
-@XmlRootElement(name = "MD_BrowseGraphic")
+@XmlRootElement(name = "MD_BrowseGraphic", namespace = Namespaces.MCC)
 public class DefaultBrowseGraphic extends ISOMetadata implements BrowseGraphic {
     /**
      * Serial number for compatibility with different versions.
@@ -159,7 +168,6 @@ public class DefaultBrowseGraphic extend
      * @return file that contains a graphic that provides an illustration of the dataset, or {@code null}.
      */
     @Override
-    @XmlElement(name = "fileName", required = true)
     public URI getFileName() {
         return fileName;
     }
@@ -231,7 +239,7 @@ public class DefaultBrowseGraphic extend
      * @since 0.5
      */
     @Override
-/// @XmlElement(name = "imageConstraints")
+    // @XmlElement at the end of this class.
     public Collection<Constraints> getImageConstraints() {
         return imageConstraints = nonNullCollection(imageConstraints, Constraints.class);
     }
@@ -255,7 +263,7 @@ public class DefaultBrowseGraphic extend
      * @since 0.5
      */
     @Override
-/// @XmlElement(name = "linkage")
+    // @XmlElement at the end of this class.
     public Collection<OnlineResource> getLinkages() {
         return linkages = nonNullCollection(linkages, OnlineResource.class);
     }
@@ -270,4 +278,74 @@ public class DefaultBrowseGraphic extend
     public void setLinkages(final Collection<? extends OnlineResource> newValues) {
         linkages = writeCollection(newValues, linkages, OnlineResource.class);
     }
+
+
+
+
+    //////////////////////////////////////////////////////////////////////////////////////////////////
+    ////////                                                                                  ////////
+    ////////                               XML support with JAXB                              ////////
+    ////////                                                                                  ////////
+    ////////        The following methods are invoked by JAXB using reflection (even if       ////////
+    ////////        they are private) or are helpers for other methods invoked by JAXB.       ////////
+    ////////        Those methods can be safely removed if Geographic Markup Language         ////////
+    ////////        (GML) support is not needed.                                              ////////
+    ////////                                                                                  ////////
+    //////////////////////////////////////////////////////////////////////////////////////////////////
+
+    /**
+     * Invoked at marshalling time for writing URL as defined by ISO 19139:2007.
+     * That legacy standard wraps the URL in a {@code <gmx:FileName>} element.
+     */
+    @XmlElement(name = "fileName", namespace = LegacyNamespaces.GMD, required = true)
+    private URI getFileNameURL() {
+        return FilterByVersion.LEGACY_METADATA.accept() ? getFileName() : null;
+    }
+
+    /**
+     * Invoked at ISO 19139:2007 unmarshalling time for storing the value of {@code <gmd:URL>} element.
+     */
+    @SuppressWarnings("unused")
+    private void setFileNameURL(final URI newValue) {
+        setFileName(newValue);
+    }
+
+    /**
+     * Invoked at marshalling time for writing URL as defined by ISO 19115-3.
+     * That newer standard write the URL directly, without wrapping in {@code <gmd:URL>} element.
+     */
+    @XmlElement(name = "fileName", required = true)
+    private String getFileNameString() {
+        if (FilterByVersion.CURRENT_METADATA.accept()) {
+            final URI linkage = getFileName();
+            if (linkage != null) {
+                return linkage.toString();
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Invoked at ISO 19115-3 unmarshalling time for parsing the URL.
+     */
+    @SuppressWarnings("unused")
+    private void setFileNameString(final String newValue) throws URISyntaxException {
+        final Context context = Context.current();
+        setFileName(Context.converter(context).toURI(context, newValue));
+    }
+
+    /**
+     * Invoked by JAXB at both marshalling and unmarshalling time.
+     * This attribute has been added by ISO 19115:2014 standard.
+     * If (and only if) marshalling an older standard version, we omit this attribute.
+     */
+    @XmlElement(name = "imageConstraints")
+    private Collection<Constraints> getImageConstraint() {
+        return FilterByVersion.CURRENT_METADATA.accept() ? getImageConstraints() : null;
+    }
+
+    @XmlElement(name = "linkage")
+    private Collection<OnlineResource> getLinkage() {
+        return FilterByVersion.CURRENT_METADATA.accept() ? getLinkages() : null;
+    }
 }

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultCoupledResource.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultCoupledResource.java?rev=1819315&r1=1819314&r2=1819315&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultCoupledResource.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultCoupledResource.java [UTF-8] Wed Dec 27 04:28:07 2017
@@ -29,10 +29,10 @@ import org.opengis.metadata.identificati
 import org.opengis.metadata.identification.OperationMetadata;
 import org.apache.sis.metadata.iso.ISOMetadata;
 import org.apache.sis.internal.jaxb.metadata.direct.GO_ScopedName;
+import org.apache.sis.internal.jaxb.metadata.SV_OperationMetadata;
+import org.apache.sis.internal.jaxb.FilterByVersion;
 import org.apache.sis.xml.Namespaces;
 
-import static org.apache.sis.internal.jaxb.gco.PropertyType.LEGACY_XML;
-
 
 /**
  * Links a given operation name with a resource identified by an "identifier".
@@ -48,7 +48,8 @@ import static org.apache.sis.internal.ja
  *
  * @author  Rémi Maréchal (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
- * @version 0.5
+ * @author  Cullen Rombach (Image Matters)
+ * @version 1.0
  * @since   0.5
  * @module
  */
@@ -56,10 +57,10 @@ import static org.apache.sis.internal.ja
 @XmlType(name = "SV_CoupledResource_Type", namespace = Namespaces.SRV, propOrder = {
     "operationName",
     "identifier",
-    "scopedName" /*,
-    "resourceReferences",
-    "resources",
-    "operation" */
+    "scopedName",
+    "resourceReference",
+    "resource",
+    "operation"
 })
 @XmlRootElement(name = "SV_CoupledResource", namespace = Namespaces.SRV)
 public class DefaultCoupledResource extends ISOMetadata implements CoupledResource {
@@ -185,7 +186,7 @@ public class DefaultCoupledResource exte
      * @return references to the resource on which the services operates.
      */
     @Override
-/// @XmlElement(name = "resourceReference", namespace = Namespaces.SRV)
+    // @XmlElement at the end of this class.
     public Collection<Citation> getResourceReferences() {
         return resourceReferences = nonNullCollection(resourceReferences, Citation.class);
     }
@@ -205,7 +206,7 @@ public class DefaultCoupledResource exte
      * @return tightly coupled resources.
      */
     @Override
-/// @XmlElement(name = "resource", namespace = Namespaces.SRV)
+    // @XmlElement at the end of this class.
     public Collection<DataIdentification> getResources() {
         return resources = nonNullCollection(resources, DataIdentification.class);
     }
@@ -225,7 +226,8 @@ public class DefaultCoupledResource exte
      * @return the service operation, or {@code null} if none.
      */
     @Override
-/// @XmlElement(name = "operation", namespace = Namespaces.SRV)
+    @XmlElement(name = "operation", namespace = Namespaces.SRV)
+    @XmlJavaTypeAdapter(SV_OperationMetadata.Since2014.class)
     public OperationMetadata getOperation() {
         return operation;
     }
@@ -255,11 +257,11 @@ public class DefaultCoupledResource exte
     //////////////////////////////////////////////////////////////////////////////////////////////////
 
     /**
-     * For JAXB marhalling of ISO 19119 document only.
+     * For JAXB marshalling of ISO 19139:2007 document only.
      */
     @XmlElement(name = "operationName", namespace = Namespaces.SRV)
     private String getOperationName() {
-        if (LEGACY_XML) {
+        if (FilterByVersion.LEGACY_METADATA.accept()) {
             final OperationMetadata operation = getOperation();
             if (operation != null) {
                 return operation.getOperationName();
@@ -273,6 +275,7 @@ public class DefaultCoupledResource exte
      * {@link OperationName} placeholder. That temporary instance will be replaced by the real
      * one when the enclosing {@link DefaultServiceIdentification} is unmarshalled.
      */
+    @SuppressWarnings("unused")
     private void setOperationName(final String name) {
         if (operation == null) {
             operation = new OperationName(name);
@@ -284,7 +287,7 @@ public class DefaultCoupledResource exte
      */
     @XmlElement(name = "identifier", namespace = Namespaces.SRV)
     private String getIdentifier() {
-        if (LEGACY_XML) {
+        if (FilterByVersion.LEGACY_METADATA.accept()) {
             final ScopedName name = getScopedName();
             if (name != null) {
                 return name.tip().toString();
@@ -292,4 +295,19 @@ public class DefaultCoupledResource exte
         }
         return null;
     }
+
+    /**
+     * Invoked by JAXB at both marshalling and unmarshalling time.
+     * This attribute has been added by ISO 19115:2014 standard.
+     * If (and only if) marshalling an older standard version, we omit this attribute.
+     */
+    @XmlElement(name = "resourceReference")
+    private Collection<Citation> getResourceReference() {
+        return FilterByVersion.CURRENT_METADATA.accept() ? getResourceReferences() : null;
+    }
+
+    @XmlElement(name = "resource", namespace = Namespaces.SRV)
+    private Collection<DataIdentification> getResource() {
+        return FilterByVersion.CURRENT_METADATA.accept() ? getResources() : null;
+    }
 }

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultDataIdentification.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultDataIdentification.java?rev=1819315&r1=1819314&r2=1819315&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultDataIdentification.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultDataIdentification.java [UTF-8] Wed Dec 27 04:28:07 2017
@@ -22,13 +22,17 @@ import java.nio.charset.Charset;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import org.opengis.util.InternationalString;
 import org.opengis.metadata.extent.Extent;
 import org.opengis.metadata.citation.Citation;
 import org.opengis.metadata.identification.TopicCategory;
 import org.opengis.metadata.identification.DataIdentification;
-import org.opengis.util.InternationalString;
-
-import static org.apache.sis.internal.jaxb.gco.PropertyType.LEGACY_XML;
+import org.apache.sis.internal.metadata.OtherLocales;
+import org.apache.sis.internal.jaxb.gmd.LocaleAdapter;
+import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.jaxb.FilterByVersion;
+import org.apache.sis.internal.util.CollectionsExt;
 
 
 /**
@@ -62,14 +66,20 @@ import static org.apache.sis.internal.ja
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @author  Touraïvane (IRD)
  * @author  Cédric Briançon (Geomatys)
- * @version 0.5
+ * @author  Cullen Rombach (Image Matters)
+ * @version 1.0
  * @since   0.3
  * @module
  */
 @SuppressWarnings("CloneableClassWithoutClone")                 // ModifiableMetadata needs shallow clones.
 @XmlType(name = "MD_DataIdentification_Type", propOrder = {
-    "languages",
+    // ISO 19115:2003 legacy
+    "language",
     "characterSets",
+
+    // ISO 19115:2014
+    "defaultLocale",
+    "otherLocale",
     "topicCategory",
     "environmentDescription",
     "extent",
@@ -184,7 +194,7 @@ public class DefaultDataIdentification e
      * @see Locale#getISO3Language()
      */
     @Override
-    @XmlElement(name = "language", required = true)
+    // @XmlElement at the end of this class.
     public Collection<Locale> getLanguages() {
         return languages = nonNullCollection(languages, Locale.class);
     }
@@ -276,11 +286,53 @@ public class DefaultDataIdentification e
     //////////////////////////////////////////////////////////////////////////////////////////////////
 
     /**
+     * Gets the default locale for this record (used in ISO 19115-3 format).
+     */
+    @XmlElement(name = "defaultLocale")
+    private Locale getDefaultLocale() {
+        return FilterByVersion.CURRENT_METADATA.accept() ? CollectionsExt.first(getLanguages()) : null;
+    }
+
+    /**
+     * Sets the default locale for this record (used in ISO 19115-3 format).
+     */
+    @SuppressWarnings("unused")
+    private void setDefaultLocale(final Locale newValue) {
+        setLanguages(OtherLocales.setFirst(languages, newValue));
+    }
+
+    /**
+     * Gets the other locales for this record (used in ISO 19115-3 format).
+     */
+    @XmlElement(name = "otherLocale")
+    private Collection<Locale> getOtherLocales() {
+        return FilterByVersion.CURRENT_METADATA.accept() ? OtherLocales.filter(getLanguages()) : null;
+    }
+
+    /**
+     * Sets the other locales for this record (used in ISO 19115-3 format).
+     * Defined as a matter of principle, but not invoked by JAXB implementation.
+     */
+    @SuppressWarnings("unused")
+    private void setOtherLocales(final Collection<? extends Locale> newValues) {
+        setLanguages(OtherLocales.merge(CollectionsExt.first(languages), newValues));
+    }
+
+    /**
+     * Returns the locale to marshal if the XML document is to be written in ISO 19139:2007 format.
+     */
+    @XmlElement(name = "language", namespace = LegacyNamespaces.GMD, required = true)
+    @XmlJavaTypeAdapter(LocaleAdapter.class)
+    private Collection<Locale> getLanguage() {
+        return FilterByVersion.LEGACY_METADATA.accept() ? getLanguages() : null;
+    }
+
+    /**
      * For JAXB marhalling of ISO 19115:2003 document only.
      */
-    @XmlElement(name = "topicCategory")
+    @XmlElement(name = "topicCategory", namespace = LegacyNamespaces.GMD)
     private Collection<TopicCategory> getTopicCategory()  {
-        return LEGACY_XML ? getTopicCategories() : null;
+        return FilterByVersion.LEGACY_METADATA.accept() ? getTopicCategories() : null;
     }
 
     /**
@@ -293,9 +345,9 @@ public class DefaultDataIdentification e
     /**
      * For JAXB marhalling of ISO 19115:2003 document only.
      */
-    @XmlElement(name = "extent")
+    @XmlElement(name = "extent", namespace = LegacyNamespaces.GMD)
     private Collection<Extent> getExtent() {
-        return LEGACY_XML ? getExtents() : null;
+        return FilterByVersion.LEGACY_METADATA.accept() ? getExtents() : null;
     }
 
     /**

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

Modified: sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/GO_URL.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/GO_URL.java?rev=1819315&r1=1819314&r2=1819315&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/GO_URL.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/GO_URL.java [UTF-8] Wed Dec 27 04:28:07 2017
@@ -30,7 +30,10 @@ import org.apache.sis.internal.jaxb.Cont
  *
  * @author  Cédric Briançon (Geomatys)
  * @version 0.3
- * @since   0.3
+ *
+ * @see org.apache.sis.internal.jaxb.gco.URIAdapter
+ *
+ * @since 0.3
  * @module
  */
 public final class GO_URL extends XmlAdapter<GO_URL, URI> {

Modified: sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/util/collection/Cache.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/util/collection/Cache.java?rev=1819315&r1=1819314&r2=1819315&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/util/collection/Cache.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/util/collection/Cache.java [UTF-8] Wed Dec 27 04:28:07 2017
@@ -207,7 +207,7 @@ public class Cache<K,V> extends Abstract
      * {@linkplain Reference weak or soft references}.</p>
      *
      * @param initialCapacity  the initial capacity.
-     * @param costLimit        the maximum number of objects to keep by strong reference.
+     * @param costLimit        the maximum cost of objects to keep by strong reference.
      * @param soft             if {@code true}, use {@link SoftReference} instead of {@link WeakReference}.
      */
     public Cache(int initialCapacity, final long costLimit, final boolean soft) {



Mime
View raw message