sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1819780 - in /sis/branches/ISO-19115-3/core: sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/ sis-utility/src/main/resources/org/apache/sis/xml/
Date Mon, 01 Jan 2018 18:58:11 GMT
Author: desruisseaux
Date: Mon Jan  1 18:58:11 2018
New Revision: 1819780

URL: http://svn.apache.org/viewvc?rev=1819780&view=rev
Log:
Commit 37d396b022ce10ab743bbb875019a65302672861 from Image Matter
(update classes in distribution package for ISO 19115-3 compatibility)

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/metadata/iso/distribution/DefaultDistribution.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultMedium.java
    sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultStandardOrderProcess.java
    sis/branches/ISO-19115-3/core/sis-utility/src/main/resources/org/apache/sis/xml/NamespaceContent.txt

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultDistribution.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultDistribution.java?rev=1819780&r1=1819779&r2=1819780&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultDistribution.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultDistribution.java
[UTF-8] Mon Jan  1 18:58:11 2018
@@ -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.distribution.DigitalTransferOptions;
 import org.opengis.metadata.distribution.Distribution;
@@ -27,6 +28,7 @@ import org.opengis.metadata.distribution
 import org.opengis.metadata.distribution.Format;
 import org.apache.sis.metadata.iso.ISOMetadata;
 import org.apache.sis.metadata.TitleProperty;
+import org.apache.sis.internal.jaxb.gco.InternationalStringAdapter;
 
 
 /**
@@ -52,13 +54,15 @@ import org.apache.sis.metadata.TitleProp
  * @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.
 @TitleProperty(name = "description")
 @XmlType(name = "MD_Distribution_Type", propOrder = {
+    "description",              // New in ISO 19115-3
     "distributionFormats",
     "distributors",
     "transferOptions"
@@ -149,6 +153,8 @@ public class DefaultDistribution extends
      * @since 0.5
      */
     @Override
+    @XmlElement(name = "description")
+    @XmlJavaTypeAdapter(InternationalStringAdapter.Since2014.class)
     public InternationalString getDescription() {
         return description;
     }

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultMedium.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultMedium.java?rev=1819780&r1=1819779&r2=1819780&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultMedium.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultMedium.java
[UTF-8] Mon Jan  1 18:58:11 2018
@@ -23,6 +23,7 @@ import javax.measure.Unit;
 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.Identifier;
 import org.opengis.metadata.distribution.Medium;
@@ -31,7 +32,11 @@ import org.opengis.metadata.distribution
 import org.apache.sis.measure.ValueRange;
 import org.apache.sis.metadata.TitleProperty;
 import org.apache.sis.metadata.iso.ISOMetadata;
+import org.apache.sis.internal.jaxb.gco.GO_Real;
+import org.apache.sis.internal.jaxb.FilterByVersion;
+import org.apache.sis.internal.jaxb.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.NonMarshalledAuthority;
+import org.apache.sis.internal.jaxb.metadata.MD_Identifier;
 import org.apache.sis.internal.metadata.Dependencies;
 import org.apache.sis.internal.metadata.LegacyPropertyAdapter;
 
@@ -58,14 +63,17 @@ import static org.apache.sis.internal.me
  * @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.
 @TitleProperty(name = "name")
 @XmlType(name = "MD_Medium_Type", propOrder = {
+    "identifier",           // New in ISO 19115-3
     "name",
+    "density",
     "densities",
     "densityUnits",
     "volumes",
@@ -200,6 +208,8 @@ public class DefaultMedium extends ISOMe
      * @since 0.5
      */
     @Override
+    @XmlElement(name = "density")
+    @XmlJavaTypeAdapter(GO_Real.Since2014.class)
     @ValueRange(minimum = 0, isMinIncluded = false)
     public Double getDensity() {
         return density;
@@ -228,9 +238,10 @@ public class DefaultMedium extends ISOMe
      */
     @Override
     @Deprecated
-    @XmlElement(name = "density")
+    @XmlElement(name = "density", namespace = LegacyNamespaces.GMD)
     @Dependencies("getDensity")
     public Collection<Double> getDensities() {
+        if (!FilterByVersion.LEGACY_METADATA.accept()) return null;
         return new AbstractSet<Double>() {
             /** Returns 0 if empty, or 1 if a density has been specified. */
             @Override public int size() {
@@ -360,7 +371,8 @@ public class DefaultMedium extends ISOMe
      * @since 0.5
      */
     @Override
-/// @XmlElement(name = "identifier")
+    @XmlElement(name = "identifier")
+    @XmlJavaTypeAdapter(MD_Identifier.Since2014.class)
     public Identifier getIdentifier() {
         return NonMarshalledAuthority.getMarshallable(identifiers);
     }

Modified: sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultStandardOrderProcess.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultStandardOrderProcess.java?rev=1819780&r1=1819779&r2=1819780&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultStandardOrderProcess.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultStandardOrderProcess.java
[UTF-8] Mon Jan  1 18:58:11 2018
@@ -16,15 +16,18 @@
  */
 package org.apache.sis.metadata.iso.distribution;
 
-import java.util.Currency;
 import java.util.Date;
+import java.util.Currency;
+import javax.xml.bind.annotation.XmlType;
 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.util.Record;
 import org.opengis.util.RecordType;
 import org.opengis.util.InternationalString;
 import org.opengis.metadata.distribution.StandardOrderProcess;
+import org.apache.sis.internal.jaxb.gco.GO_RecordType;
+import org.apache.sis.internal.jaxb.gco.GO_Record;
 import org.apache.sis.metadata.iso.ISOMetadata;
 
 import static org.apache.sis.internal.metadata.MetadataUtilities.toDate;
@@ -47,7 +50,8 @@ import static org.apache.sis.internal.me
  * @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
  */
@@ -56,7 +60,9 @@ import static org.apache.sis.internal.me
     "fees",
     "plannedAvailableDateTime",
     "orderingInstructions",
-    "turnaround"
+    "turnaround",
+    "orderOptionType",              // New in ISO 19115-3
+    "orderOptions"                  // New in ISO 19115-3
 })
 @XmlRootElement(name = "MD_StandardOrderProcess")
 public class DefaultStandardOrderProcess extends ISOMetadata implements StandardOrderProcess
{
@@ -291,7 +297,8 @@ public class DefaultStandardOrderProcess
      * @see org.apache.sis.util.iso.DefaultRecord#getRecordType()
      */
     @Override
-/// @XmlElement(name = "orderOptionType")
+    @XmlElement(name = "orderOptionType")
+    @XmlJavaTypeAdapter(GO_RecordType.Since2014.class)
     public RecordType getOrderOptionType() {
         return orderOptionType;
     }
@@ -320,7 +327,8 @@ public class DefaultStandardOrderProcess
      *       orders, otherwise this method would need to be a factory rather than a getter.
      */
     @Override
-/// @XmlElement(name = "orderOptions")
+    @XmlElement(name = "orderOptions")
+    @XmlJavaTypeAdapter(GO_Record.Since2014.class)
     public Record getOrderOptions() {
         return orderOptions;
     }

Modified: sis/branches/ISO-19115-3/core/sis-utility/src/main/resources/org/apache/sis/xml/NamespaceContent.txt
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/main/resources/org/apache/sis/xml/NamespaceContent.txt?rev=1819780&r1=1819779&r2=1819780&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-utility/src/main/resources/org/apache/sis/xml/NamespaceContent.txt
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-utility/src/main/resources/org/apache/sis/xml/NamespaceContent.txt
[UTF-8] Mon Jan  1 18:58:11 2018
@@ -667,6 +667,7 @@ http://standards.iso.org/iso/19115/-3/mr
     unitsOfDistribution
   MD_Distribution
     <type>
+    description
     distributionFormat
     distributor
     transferOptions
@@ -690,6 +691,7 @@ http://standards.iso.org/iso/19115/-3/mr
     <type>
     density
     densityUnits
+    identifier
     mediumFormat
     mediumNote
     name
@@ -698,6 +700,8 @@ http://standards.iso.org/iso/19115/-3/mr
     <type>
     fees
     orderingInstructions
+    orderOptions
+    orderOptionType
     plannedAvailableDateTime
     turnaround
 http://standards.iso.org/iso/19115/-3/mri/1.0



Mime
View raw message