Author: desruisseaux
Date: Mon Jul 29 17:26:08 2013
New Revision: 1508144
URL: http://svn.apache.org/r1508144
Log:
Some properties were wrongly using GO_Decimal adapter instead of GO_Real.
Modified:
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultBand.java
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/package-info.java
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultDigitalTransferOptions.java
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/package-info.java
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultVerticalExtent.java
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Boolean.java
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Decimal.java
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Decimal32.java
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Integer.java
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Integer64.java
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Real.java
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_RecordType.java
Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultBand.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultBand.java?rev=1508144&r1=1508143&r2=1508144&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultBand.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultBand.java
[UTF-8] Mon Jul 29 17:26:08 2013
@@ -22,14 +22,12 @@ import javax.xml.bind.annotation.XmlElem
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.opengis.metadata.content.Band;
import org.opengis.metadata.content.BandDefinition;
import org.opengis.metadata.content.PolarizationOrientation;
import org.opengis.metadata.content.TransferFunctionType;
import org.apache.sis.xml.Namespaces;
import org.apache.sis.measure.ValueRange;
-import org.apache.sis.internal.jaxb.gco.GO_Real;
/**
@@ -208,7 +206,6 @@ public class DefaultBand extends Default
*/
@Override
@XmlElement(name = "maxValue")
- @XmlJavaTypeAdapter(GO_Real.class)
public Double getMaxValue() {
return maxValue;
}
@@ -232,7 +229,6 @@ public class DefaultBand extends Default
*/
@Override
@XmlElement(name = "minValue")
- @XmlJavaTypeAdapter(GO_Real.class)
public Double getMinValue() {
return minValue;
}
Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/package-info.java?rev=1508144&r1=1508143&r2=1508144&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/package-info.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/package-info.java
[UTF-8] Mon Jul 29 17:26:08 2013
@@ -112,8 +112,8 @@
@XmlJavaTypeAdapter(GO_GenericName.class),
@XmlJavaTypeAdapter(GO_RecordType.class),
@XmlJavaTypeAdapter(GO_Boolean.class), @XmlJavaTypeAdapter(type=boolean.class, value=GO_Boolean.class),
- @XmlJavaTypeAdapter(GO_Decimal.class), @XmlJavaTypeAdapter(type=double.class, value=GO_Decimal.class),
- @XmlJavaTypeAdapter(GO_Integer.class), @XmlJavaTypeAdapter(type=int.class, value=GO_Integer.class)
+ @XmlJavaTypeAdapter(GO_Integer.class), @XmlJavaTypeAdapter(type=int.class, value=GO_Integer.class),
+ @XmlJavaTypeAdapter(GO_Real.class), @XmlJavaTypeAdapter(type=double.class, value=GO_Real.class)
})
package org.apache.sis.metadata.iso.content;
Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultDigitalTransferOptions.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultDigitalTransferOptions.java?rev=1508144&r1=1508143&r2=1508144&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultDigitalTransferOptions.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultDigitalTransferOptions.java
[UTF-8] Mon Jul 29 17:26:08 2013
@@ -20,14 +20,12 @@ 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.OnlineResource;
import org.opengis.metadata.distribution.DigitalTransferOptions;
import org.opengis.metadata.distribution.Medium;
import org.apache.sis.measure.ValueRange;
import org.apache.sis.metadata.iso.ISOMetadata;
-import org.apache.sis.internal.jaxb.gco.GO_Real;
/**
@@ -153,7 +151,6 @@ public class DefaultDigitalTransferOptio
*/
@Override
@XmlElement(name = "transferSize")
- @XmlJavaTypeAdapter(GO_Real.class)
@ValueRange(minimum=0, isMinIncluded=false)
public Double getTransferSize() {
return transferSize;
Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/package-info.java?rev=1508144&r1=1508143&r2=1508144&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/package-info.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/package-info.java
[UTF-8] Mon Jul 29 17:26:08 2013
@@ -95,8 +95,8 @@
@XmlJavaTypeAdapter(InternationalStringAdapter.class),
@XmlJavaTypeAdapter(GO_LocalName.class),
@XmlJavaTypeAdapter(GO_DateTime.class),
- @XmlJavaTypeAdapter(GO_Decimal.class), @XmlJavaTypeAdapter(type=double.class, value=GO_Decimal.class),
- @XmlJavaTypeAdapter(GO_Integer.class), @XmlJavaTypeAdapter(type=int.class, value=GO_Integer.class)
+ @XmlJavaTypeAdapter(GO_Integer.class), @XmlJavaTypeAdapter(type=int.class, value=GO_Integer.class),
+ @XmlJavaTypeAdapter(GO_Real.class), @XmlJavaTypeAdapter(type=double.class, value=GO_Real.class)
})
package org.apache.sis.metadata.iso.distribution;
Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultVerticalExtent.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultVerticalExtent.java?rev=1508144&r1=1508143&r2=1508144&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultVerticalExtent.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultVerticalExtent.java
[UTF-8] Mon Jul 29 17:26:08 2013
@@ -19,11 +19,13 @@ package org.apache.sis.metadata.iso.exte
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.geometry.Envelope;
import org.opengis.referencing.crs.VerticalCRS;
import org.opengis.referencing.operation.TransformException;
import org.opengis.metadata.extent.VerticalExtent;
import org.apache.sis.metadata.iso.ISOMetadata;
+import org.apache.sis.internal.jaxb.gco.GO_Real;
import org.apache.sis.internal.metadata.ReferencingServices;
@@ -143,6 +145,7 @@ public class DefaultVerticalExtent exten
*/
@Override
@XmlElement(name = "minimumValue", required = true)
+ @XmlJavaTypeAdapter(GO_Real.class)
public Double getMinimumValue() {
return minimumValue;
}
@@ -164,6 +167,7 @@ public class DefaultVerticalExtent exten
*/
@Override
@XmlElement(name = "maximumValue", required = true)
+ @XmlJavaTypeAdapter(GO_Real.class)
public Double getMaximumValue() {
return maximumValue;
}
Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Boolean.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Boolean.java?rev=1508144&r1=1508143&r2=1508144&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Boolean.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Boolean.java
[UTF-8] Mon Jul 29 17:26:08 2013
@@ -21,11 +21,9 @@ import javax.xml.bind.annotation.XmlElem
/**
* Surrounds boolean value by {@code <gco:Boolean>}.
- * The ISO-19139 standard specifies that primitive types have to be surrounded by an element
- * which represents the type of the value, using the namespace {@code gco} linked to the
- * {@code http://www.isotc211.org/2005/gco} URL. The JAXB default behavior is to marshal
- * primitive Java types directly "as is", without wrapping the value in the required element.
- * The role of this class is to add such wrapping.
+ * The ISO-19139 standard requires most types to be surrounded by an element representing
the value type.
+ * The JAXB default behavior is to marshal primitive Java types directly, without such wrapper
element.
+ * The role of this class is to add the {@code <gco:…>} wrapper element required
by ISO 19139.
*
* @author Cédric Briançon (Geomatys)
* @author Martin Desruisseaux (Geomatys)
Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Decimal.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Decimal.java?rev=1508144&r1=1508143&r2=1508144&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Decimal.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Decimal.java
[UTF-8] Mon Jul 29 17:26:08 2013
@@ -21,11 +21,15 @@ import javax.xml.bind.annotation.XmlElem
/**
* Surrounds double values by {@code <gco:Decimal>}.
- * The ISO-19139 standard specifies that primitive types have to be surrounded by an element
- * which represents the type of the value, using the namespace {@code gco} linked to the
- * {@code http://www.isotc211.org/2005/gco} URL. The JAXB default behavior is to marshal
- * primitive Java types directly "as is", without wrapping the value in the required element.
- * The role of this class is to add such wrapping.
+ * The ISO-19139 standard requires most types to be surrounded by an element representing
the value type.
+ * The JAXB default behavior is to marshal primitive Java types directly, without such wrapper
element.
+ * The role of this class is to add the {@code <gco:…>} wrapper element required
by ISO 19139.
+ *
+ * {@section Relationship with <code>GO_Real</code>}
+ * This adapter is identical to {@link GO_Real} except for the element name, which is {@code
"Decimal"} instead
+ * than {@code "Real"}. This adapter is used for the {@code westBoundLongitude}, {@code eastBoundLongitude},
+ * {@code southBoundLatitude} and {@code northBoundLatitude} properties of {@code EX_DefaultGeographicBoundingBox}.
+ * The {@code GO_Real} adapter is used for about everything else.
*
* @author Cédric Briançon (Geomatys)
* @author Martin Desruisseaux (Geomatys)
Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Decimal32.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Decimal32.java?rev=1508144&r1=1508143&r2=1508144&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Decimal32.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Decimal32.java
[UTF-8] Mon Jul 29 17:26:08 2013
@@ -21,11 +21,9 @@ import javax.xml.bind.annotation.XmlElem
/**
* Surrounds float values by {@code <gco:Decimal>}.
- * The ISO-19139 standard specifies that primitive types have to be surrounded by an element
- * which represents the type of the value, using the namespace {@code gco} linked to the
- * {@code http://www.isotc211.org/2005/gco} URL. The JAXB default behavior is to marshal
- * primitive Java types directly "as is", without wrapping the value in the required element.
- * The role of this class is to add such wrapping.
+ * The ISO-19139 standard requires most types to be surrounded by an element representing
the value type.
+ * The JAXB default behavior is to marshal primitive Java types directly, without such wrapper
element.
+ * The role of this class is to add the {@code <gco:…>} wrapper element required
by ISO 19139.
*
* @author Cédric Briançon (Geomatys)
* @since 0.4 (derived from geotk-2.5)
Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Integer.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Integer.java?rev=1508144&r1=1508143&r2=1508144&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Integer.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Integer.java
[UTF-8] Mon Jul 29 17:26:08 2013
@@ -21,11 +21,9 @@ import javax.xml.bind.annotation.XmlElem
/**
* Surrounds integer values by {@code <gco:Integer>}.
- * The ISO-19139 standard specifies that primitive types have to be surrounded by an element
- * which represents the type of the value, using the namespace {@code gco} linked to the
- * {@code http://www.isotc211.org/2005/gco} URL. The JAXB default behavior is to marshal
- * primitive Java types directly "as is", without wrapping the value in the required element.
- * The role of this class is to add such wrapping.
+ * The ISO-19139 standard requires most types to be surrounded by an element representing
the value type.
+ * The JAXB default behavior is to marshal primitive Java types directly, without such wrapper
element.
+ * The role of this class is to add the {@code <gco:…>} wrapper element required
by ISO 19139.
*
* @author Cédric Briançon (Geomatys)
* @author Martin Desruisseaux (Geomatys)
Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Integer64.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Integer64.java?rev=1508144&r1=1508143&r2=1508144&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Integer64.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Integer64.java
[UTF-8] Mon Jul 29 17:26:08 2013
@@ -21,11 +21,9 @@ import javax.xml.bind.annotation.XmlElem
/**
* Surrounds long values by {@code <gco:Integer>}.
- * The ISO-19139 standard specifies that primitive types have to be surrounded by an element
- * which represents the type of the value, using the namespace {@code gco} linked to the
- * {@code http://www.isotc211.org/2005/gco} URL. The JAXB default behavior is to marshal
- * primitive Java types directly "as is", without wrapping the value in the required element.
- * The role of this class is to add such wrapping.
+ * The ISO-19139 standard requires most types to be surrounded by an element representing
the value type.
+ * The JAXB default behavior is to marshal primitive Java types directly, without such wrapper
element.
+ * The role of this class is to add the {@code <gco:…>} wrapper element required
by ISO 19139.
*
* @author Cédric Briançon (Geomatys)
* @since 0.4 (derived from geotk-2.5)
Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Real.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Real.java?rev=1508144&r1=1508143&r2=1508144&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Real.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Real.java
[UTF-8] Mon Jul 29 17:26:08 2013
@@ -21,18 +21,19 @@ import javax.xml.bind.annotation.XmlElem
/**
* Surrounds double values by {@code <gco:Real>}.
- * The ISO-19139 standard specifies that primitive types have to be surrounded by an element
- * which represents the type of the value, using the namespace {@code gco} linked to the
- * {@code http://www.isotc211.org/2005/gco} URL. The JAXB default behavior is to marshal
- * primitive Java types directly "as is", without wrapping the value in the required element.
- * The role of this class is to add such wrapping.
+ * The ISO-19139 standard requires most types to be surrounded by an element representing
the value type.
+ * The JAXB default behavior is to marshal primitive Java types directly, without such wrapper
element.
+ * The role of this class is to add the {@code <gco:…>} wrapper element required
by ISO 19139.
+ *
+ * {@section Relationship with <code>GO_Decimal</code>}
+ * This adapter is identical to {@link GO_Decimal} except for the element name, which is
{@code "Real"}
+ * instead than {@code "Decimal"}. This adapter is the most widely used one in IS 19139 XML
schema.
+ * The few exceptions are documented in {@link GO_Decimal}.
*
* @author Cédric Briançon (Geomatys)
* @since 0.3 (derived from geotk-2.5)
* @version 0.3
* @module
- *
- * @see GO_Decimal
*/
public final class GO_Real extends PropertyType<GO_Real, Double> {
/**
Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_RecordType.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_RecordType.java?rev=1508144&r1=1508143&r2=1508144&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_RecordType.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_RecordType.java
[UTF-8] Mon Jul 29 17:26:08 2013
@@ -18,7 +18,6 @@ package org.apache.sis.internal.jaxb.gco
import javax.xml.bind.annotation.XmlElement;
import org.opengis.util.RecordType;
-import org.apache.sis.internal.jaxb.gco.PropertyType;
import org.apache.sis.util.iso.DefaultRecordType;
|