Author: desruisseaux
Date: Thu Aug  8 08:06:50 2013
New Revision: 1511612

URL: http://svn.apache.org/r1511612
Log:
Port the change from the development branch about the way boolean values are 
stored in some metadata object.
We port this change now in order to preserve the compatibility of serialized 
objects with next SIS version.

Modified:
    sis/branches/0.3/   (props changed)
    
sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/MetadataUtilities.java
    
sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultFeatureCatalogueDescription.java
    
sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultImageDescription.java
    
sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/AbstractGeographicExtent.java
    
sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBox.java
    
sis/branches/0.3/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/MetadataUtilitiesTest.java
    
sis/branches/0.3/core/sis-metadata/src/test/java/org/apache/sis/xml/MetadataMarshallingTest.java
    
sis/branches/0.3/core/sis-metadata/src/test/resources/org/apache/sis/xml/PositionalAccuracy.xml
    
sis/branches/0.3/core/sis-metadata/src/test/resources/org/apache/sis/xml/ProcessStep.xml

Propchange: sis/branches/0.3/
------------------------------------------------------------------------------
  Merged /sis/branches/JDK7:r1509731

Modified: 
sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/MetadataUtilities.java
URL: 
http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/MetadataUtilities.java?rev=1511612&r1=1511611&r2=1511612&view=diff
==============================================================================
--- 
sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/MetadataUtilities.java
 [UTF-8] (original)
+++ 
sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/MetadataUtilities.java
 [UTF-8] Thu Aug  8 08:06:50 2013
@@ -26,9 +26,6 @@ import org.apache.sis.metadata.InvalidMe
 
 import static org.apache.sis.metadata.iso.ISOMetadata.LOGGER;
 
-// Related to JDK7
-import org.apache.sis.internal.jdk7.Objects;
-
 
 /**
  * Miscellaneous utility methods for metadata.
@@ -78,58 +75,18 @@ public final class MetadataUtilities ext
     }
 
     /**
-     * Sets the bit under the given mask for the given boolean value.
-     * This method uses two bits as below:
-     *
-     * <ul>
-     *   <li>{@code 00} - {@code null}</li>
-     *   <li>{@code 10} - {@code Boolean.FALSE}</li>
-     *   <li>{@code 11} - {@code Boolean.TRUE}</li>
-     * </ul>
-     *
-     * @param  flags The set of bits to modify for the given boolean value.
-     * @param  mask  The bit mask, which much have exactly two consecutive 
bits set.
-     * @param  value The boolean value to store in the {@code flags}, or 
{@code null}.
-     * @return The updated {@code flags}.
-     */
-    public static int setBoolean(int flags, final int mask, final Boolean 
value) {
-        assert 3 << Integer.numberOfTrailingZeros(mask) == mask : mask;
-        if (value == null) {
-            flags &= ~mask;
-        } else {
-            flags |= mask;
-            if (!value) {
-                flags &= ~(mask & (mask >>> 1));
-            }
-        }
-        assert Objects.equals(getBoolean(flags, mask), value) : value;
-        return flags;
-    }
-
-    /**
-     * Returns the boolean value for the bits under the given mask.
-     * This method is the reverse of {@link #setBoolean(int, int, Boolean)}.
-     *
-     * @param  flags The set of bits from which to read the boolean value 
under the given mask.
-     * @param  mask  The bit mask, which much have exactly two consecutive 
bits set.
-     * @return The boolean value under the given mask (may be {@code null}).
-     */
-    public static Boolean getBoolean(int flags, final int mask) {
-        flags &= mask;
-        return (flags == 0) ? null : Boolean.valueOf(flags == mask);
-    }
-
-    /**
-     * Makes sure that the given inclusion is non-null, then returns its value.
+     * Makes sure that the given inclusion is non-nil, then returns its value.
+     * If the given inclusion is {@code null}, then the default value is 
{@code true}.
      *
      * @param  value The {@link 
org.opengis.metadata.extent.GeographicBoundingBox#getInclusion()} value.
      * @return The given value as a primitive type.
-     * @throws InvalidMetadataException if the given value is null.
+     * @throws InvalidMetadataException if the given value is nil.
      */
     public static boolean getInclusion(final Boolean value) throws 
InvalidMetadataException {
         if (value == null) {
-            throw new 
InvalidMetadataException(Errors.format(Errors.Keys.MissingValueForProperty_1, 
"inclusion"));
+            return true;
         }
+        // Check for 'nil' value will be done in SIs 0.4.
         return value;
     }
 

Modified: 
sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultFeatureCatalogueDescription.java
URL: 
http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultFeatureCatalogueDescription.java?rev=1511612&r1=1511611&r2=1511612&view=diff
==============================================================================
--- 
sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultFeatureCatalogueDescription.java
 [UTF-8] (original)
+++ 
sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultFeatureCatalogueDescription.java
 [UTF-8] Thu Aug  8 08:06:50 2013
@@ -25,9 +25,6 @@ import org.opengis.util.GenericName;
 import org.opengis.metadata.citation.Citation;
 import org.opengis.metadata.content.FeatureCatalogueDescription;
 
-import static org.apache.sis.internal.metadata.MetadataUtilities.getBoolean;
-import static org.apache.sis.internal.metadata.MetadataUtilities.setBoolean;
-
 
 /**
  * Information identifying the feature catalogue.
@@ -53,28 +50,26 @@ public class DefaultFeatureCatalogueDesc
     /**
      * Serial number for inter-operability with different versions.
      */
-    private static final long serialVersionUID = -3626075463499626813L;
+    private static final long serialVersionUID = -3626075463499626815L;
 
     /**
-     * Mask for the {@code compliant} {@link Boolean} value.
-     * Needs 2 bits since the values can be {@code true}, {@code false} or 
{@code null}.
+     * Whether or not the cited feature catalogue complies with ISO 19110.
      *
-     * @see #booleans
+     * <p>Implementation note: we need to store the reference to the {@code 
Boolean} instance instead
+     * than using bitmask because {@link 
org.apache.sis.internal.jaxb.PrimitiveTypeProperties} may
+     * associate some properties to that particular instance.</p>
      */
-    private static final byte COMPLIANT_MASK = 3; // 0b011
+    private Boolean compliant;
 
     /**
-     * Mask for the {@code includedWithDataset} {@code boolean} value.
-     * Needs only 1 bit because the value can not be {@code null}.
-     *
-     * @see #booleans
+     * Language(s) used within the catalogue
      */
-    private static final byte INCLUDED_MASK = 4; // 0b100
+    private Collection<Locale> languages;
 
     /**
-     * Language(s) used within the catalogue
+     * Whether or not the feature catalogue is included with the dataset.
      */
-    private Collection<Locale> languages;
+    private boolean includedWithDataset;
 
     /**
      * Subset of feature types from cited feature catalogue occurring in 
dataset.
@@ -87,15 +82,6 @@ public class DefaultFeatureCatalogueDesc
     private Collection<Citation> featureCatalogueCitations;
 
     /**
-     * The set of {@code boolean} and {@link Boolean} values.
-     * Bits are read and written using the {@code *_MASK} constants.
-     *
-     * @see #COMPLIANT_MASK
-     * @see #INCLUDED_MASK
-     */
-    private byte booleans;
-
-    /**
      * Constructs an initially empty feature catalogue description.
      */
     public DefaultFeatureCatalogueDescription() {
@@ -113,8 +99,8 @@ public class DefaultFeatureCatalogueDesc
     public DefaultFeatureCatalogueDescription(final 
FeatureCatalogueDescription object) {
         super(object);
         if (object != null) {
-            booleans                  = object.isIncludedWithDataset() ? 
INCLUDED_MASK : 0;
-            booleans                  = (byte) setBoolean(booleans, 
COMPLIANT_MASK, object.isCompliant());
+            compliant                 = object.isCompliant();
+            includedWithDataset       = object.isIncludedWithDataset();
             languages                 = copyCollection(object.getLanguages(), 
Locale.class);
             featureTypes              = 
copyCollection(object.getFeatureTypes(), GenericName.class);
             featureCatalogueCitations = 
copyCollection(object.getFeatureCatalogueCitations(), Citation.class);
@@ -154,7 +140,7 @@ public class DefaultFeatureCatalogueDesc
     @Override
     @XmlElement(name = "complianceCode")
     public Boolean isCompliant() {
-        return getBoolean(booleans, COMPLIANT_MASK);
+        return compliant;
     }
 
     /**
@@ -164,7 +150,7 @@ public class DefaultFeatureCatalogueDesc
      */
     public void setCompliant(final Boolean newValue) {
         checkWritePermission();
-        booleans = (byte) setBoolean(booleans, COMPLIANT_MASK, newValue);
+        compliant = newValue;
     }
 
     /**
@@ -195,7 +181,7 @@ public class DefaultFeatureCatalogueDesc
     @Override
     @XmlElement(name = "includedWithDataset", required = true)
     public boolean isIncludedWithDataset() {
-        return (booleans & INCLUDED_MASK) != 0;
+        return includedWithDataset;
     }
 
     /**
@@ -205,11 +191,7 @@ public class DefaultFeatureCatalogueDesc
      */
     public void setIncludedWithDataset(final boolean newValue) {
         checkWritePermission();
-        if (newValue) {
-            booleans |= INCLUDED_MASK;
-        } else {
-            booleans &= ~INCLUDED_MASK;
-        }
+        includedWithDataset = newValue;
     }
 
     /**

Modified: 
sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultImageDescription.java
URL: 
http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultImageDescription.java?rev=1511612&r1=1511611&r2=1511612&view=diff
==============================================================================
--- 
sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultImageDescription.java
 [UTF-8] (original)
+++ 
sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultImageDescription.java
 [UTF-8] Thu Aug  8 08:06:50 2013
@@ -25,9 +25,6 @@ import org.opengis.metadata.content.Imag
 import org.opengis.metadata.content.ImagingCondition;
 import org.apache.sis.measure.ValueRange;
 
-import static org.apache.sis.internal.metadata.MetadataUtilities.getBoolean;
-import static org.apache.sis.internal.metadata.MetadataUtilities.setBoolean;
-
 
 /**
  * Information about an image's suitability for use.
@@ -59,47 +56,7 @@ public class DefaultImageDescription ext
     /**
      * Serial number for inter-operability with different versions.
      */
-    private static final long serialVersionUID = 1756867502303578674L;
-
-    /**
-     * Mask for the {@code triangulationIndicator} {@link Boolean} value.
-     * Needs 2 bits since the values can be {@code true}, {@code false} or 
{@code null}.
-     *
-     * @see #booleans
-     */
-    private static final short TRIANGULATION_MASK = 3;
-
-    /**
-     * Mask for the {@code radiometricCalibrationDataAvailable} {@link 
Boolean} value.
-     * Needs 2 bits since the values can be {@code true}, {@code false} or 
{@code null}.
-     *
-     * @see #booleans
-     */
-    private static final short RADIOMETRIC_MASK = TRIANGULATION_MASK << 2;
-
-    /**
-     * Mask for the {@code cameraCalibrationInformationAvailable} {@link 
Boolean} value.
-     * Needs 2 bits since the values can be {@code true}, {@code false} or 
{@code null}.
-     *
-     * @see #booleans
-     */
-    private static final short CAMERA_MASK = RADIOMETRIC_MASK << 2;
-
-    /**
-     * Mask for the {@code filmDistortionInformationAvailable} {@link Boolean} 
value.
-     * Needs 2 bits since the values can be {@code true}, {@code false} or 
{@code null}.
-     *
-     * @see #booleans
-     */
-    private static final short FILM_MASK = CAMERA_MASK << 2;
-
-    /**
-     * Mask for the {@code lensDistortionInformationAvailable} {@link Boolean} 
value.
-     * Needs 2 bits since the values can be {@code true}, {@code false} or 
{@code null}.
-     *
-     * @see #booleans
-     */
-    private static final short LENS_MASK = FILM_MASK << 2;
+    private static final long serialVersionUID = 1756867502303578675L;
 
     /**
      * Illumination elevation measured in degrees clockwise from the target 
plane
@@ -141,15 +98,34 @@ public class DefaultImageDescription ext
     private Integer compressionGenerationQuantity;
 
     /**
-     * The set of {@link Boolean} values. Bits are read and written using the 
{@code *_MASK} constants.
+     * Indication of whether or not triangulation has been performed upon the 
image.
      *
-     * @see #TRIANGULATION_MASK
-     * @see #RADIOMETRIC_MASK
-     * @see #CAMERA_MASK
-     * @see #FILM_MASK
-     * @see #LENS_MASK
+     * <p>Implementation note: we need to store the reference to the {@code 
Boolean} instance instead
+     * than using bitmask because {@link 
org.apache.sis.internal.jaxb.PrimitiveTypeProperties} may
+     * associate some properties to that particular instance.</p>
      */
-    private short booleans;
+    private Boolean triangulationIndicator;
+
+    /**
+     * Indication of whether or not the radiometric calibration information for
+     * generating the radiometrically calibrated standard data product is 
available.
+     */
+    private Boolean radiometricCalibrationDataAvailable;
+
+    /**
+     * Indication of whether or not constants are available which allow for 
camera calibration corrections.
+     */
+    private Boolean cameraCalibrationInformationAvailable;
+
+    /**
+     * Indication of whether or not Calibration Reseau information is 
available.
+     */
+    private Boolean filmDistortionInformationAvailable;
+
+    /**
+     * Indication of whether or not lens aberration correction information is 
available.
+     */
+    private Boolean lensDistortionInformationAvailable;
 
     /**
      * Constructs an initially empty image description.
@@ -176,14 +152,11 @@ public class DefaultImageDescription ext
             cloudCoverPercentage                  = 
object.getCloudCoverPercentage();
             processingLevelCode                   = 
object.getProcessingLevelCode();
             compressionGenerationQuantity         = 
object.getCompressionGenerationQuantity();
-
-            int flags;
-            flags = setBoolean(0,     TRIANGULATION_MASK, 
object.getTriangulationIndicator());
-            flags = setBoolean(flags, RADIOMETRIC_MASK,   
object.isRadiometricCalibrationDataAvailable());
-            flags = setBoolean(flags, CAMERA_MASK,        
object.isCameraCalibrationInformationAvailable());
-            flags = setBoolean(flags, FILM_MASK,          
object.isFilmDistortionInformationAvailable());
-            flags = setBoolean(flags, LENS_MASK,          
object.isLensDistortionInformationAvailable());
-            booleans = (short) flags;
+            triangulationIndicator                = 
object.getTriangulationIndicator();
+            radiometricCalibrationDataAvailable   = 
object.isRadiometricCalibrationDataAvailable();
+            cameraCalibrationInformationAvailable = 
object.isCameraCalibrationInformationAvailable();
+            filmDistortionInformationAvailable    = 
object.isFilmDistortionInformationAvailable();
+            lensDistortionInformationAvailable    = 
object.isLensDistortionInformationAvailable();
         }
     }
 
@@ -384,7 +357,7 @@ public class DefaultImageDescription ext
     @Override
     @XmlElement(name = "triangulationIndicator")
     public Boolean getTriangulationIndicator() {
-        return getBoolean(booleans, TRIANGULATION_MASK);
+        return triangulationIndicator;
     }
 
     /**
@@ -394,7 +367,7 @@ public class DefaultImageDescription ext
      */
     public void setTriangulationIndicator(final Boolean newValue) {
         checkWritePermission();
-        booleans = (short) setBoolean(booleans, TRIANGULATION_MASK, newValue);
+        triangulationIndicator = newValue;
     }
 
     /**
@@ -407,7 +380,7 @@ public class DefaultImageDescription ext
     @Override
     @XmlElement(name = "radiometricCalibrationDataAvailability")
     public Boolean isRadiometricCalibrationDataAvailable() {
-        return getBoolean(booleans, RADIOMETRIC_MASK);
+        return radiometricCalibrationDataAvailable;
     }
 
     /**
@@ -418,7 +391,7 @@ public class DefaultImageDescription ext
      */
     public void setRadiometricCalibrationDataAvailable(final Boolean newValue) 
{
         checkWritePermission();
-        booleans = (short) setBoolean(booleans, RADIOMETRIC_MASK, newValue);
+        radiometricCalibrationDataAvailable = newValue;
     }
 
     /**
@@ -431,7 +404,7 @@ public class DefaultImageDescription ext
     @Override
     @XmlElement(name = "cameraCalibrationInformationAvailability")
     public Boolean isCameraCalibrationInformationAvailable() {
-        return getBoolean(booleans, CAMERA_MASK);
+        return cameraCalibrationInformationAvailable;
     }
 
     /**
@@ -442,7 +415,7 @@ public class DefaultImageDescription ext
      */
     public void setCameraCalibrationInformationAvailable(final Boolean 
newValue) {
         checkWritePermission();
-        booleans = (short) setBoolean(booleans, CAMERA_MASK, newValue);
+        cameraCalibrationInformationAvailable = newValue;
     }
 
     /**
@@ -454,7 +427,7 @@ public class DefaultImageDescription ext
     @Override
     @XmlElement(name = "filmDistortionInformationAvailability")
     public Boolean isFilmDistortionInformationAvailable() {
-        return getBoolean(booleans, FILM_MASK);
+        return filmDistortionInformationAvailable;
     }
 
     /**
@@ -464,7 +437,7 @@ public class DefaultImageDescription ext
      */
     public void setFilmDistortionInformationAvailable(final Boolean newValue) {
         checkWritePermission();
-        booleans = (short) setBoolean(booleans, FILM_MASK, newValue);
+        filmDistortionInformationAvailable = newValue;
     }
 
     /**
@@ -476,7 +449,7 @@ public class DefaultImageDescription ext
     @Override
     @XmlElement(name = "lensDistortionInformationAvailability")
     public Boolean isLensDistortionInformationAvailable() {
-        return getBoolean(booleans, LENS_MASK);
+        return lensDistortionInformationAvailable;
     }
 
     /**
@@ -486,6 +459,6 @@ public class DefaultImageDescription ext
      */
     public void setLensDistortionInformationAvailable(final Boolean newValue) {
         checkWritePermission();
-        booleans = (short) setBoolean(booleans, LENS_MASK, newValue);
+        lensDistortionInformationAvailable = newValue;
     }
 }

Modified: 
sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/AbstractGeographicExtent.java
URL: 
http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/AbstractGeographicExtent.java?rev=1511612&r1=1511611&r2=1511612&view=diff
==============================================================================
--- 
sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/AbstractGeographicExtent.java
 [UTF-8] (original)
+++ 
sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/AbstractGeographicExtent.java
 [UTF-8] Thu Aug  8 08:06:50 2013
@@ -26,9 +26,6 @@ import org.opengis.metadata.extent.Geogr
 import org.opengis.metadata.extent.BoundingPolygon;
 import org.apache.sis.metadata.iso.ISOMetadata;
 
-import static org.apache.sis.internal.metadata.MetadataUtilities.getBoolean;
-import static org.apache.sis.internal.metadata.MetadataUtilities.setBoolean;
-
 
 /**
  * Base class for geographic area of the dataset.
@@ -51,22 +48,17 @@ public class AbstractGeographicExtent ex
     /**
      * Serial number for inter-operability with different versions.
      */
-    private static final long serialVersionUID = 4819196764221609263L;
+    private static final long serialVersionUID = 4819196764221609265L;
 
     /**
-     * Mask for the {@code inclusion} {@link Boolean} value.
-     * Needs 2 bits since the values can be {@code true}, {@code false} or 
{@code null}.
-     *
-     * @see #booleans
-     */
-    private static final byte INCLUSION_MASK = 3;
-
-    /**
-     * The set of {@link Boolean} values. Bits are read and written using the 
{@code *_MASK} constants.
+     * Indication of whether the bounding polygon encompasses an area covered 
by the data
+     * (<cite>inclusion</cite>) or an area where data is not present 
(<cite>exclusion</cite>).
      *
-     * @see #INCLUSION_MASK
+     * <p>Implementation note: we need to store the reference to the {@code 
Boolean} instance instead
+     * than using bitmask because {@link 
org.apache.sis.internal.jaxb.PrimitiveTypeProperties} may
+     * associate some properties to that particular instance.</p>
      */
-    private byte booleans;
+    private Boolean inclusion;
 
     /**
      * Constructs an initially empty geographic extent.
@@ -80,7 +72,7 @@ public class AbstractGeographicExtent ex
      * @param inclusion Whether the bounding polygon encompasses an area 
covered by the data.
      */
     public AbstractGeographicExtent(final boolean inclusion) {
-        booleans = inclusion ? INCLUSION_MASK : 0;
+        this.inclusion = inclusion;
     }
 
     /**
@@ -95,7 +87,7 @@ public class AbstractGeographicExtent ex
     public AbstractGeographicExtent(final GeographicExtent object) {
         super(object);
         if (object != null) {
-            booleans = (byte) setBoolean(0, INCLUSION_MASK, 
object.getInclusion());
+            inclusion = object.getInclusion();
         }
     }
 
@@ -148,7 +140,7 @@ public class AbstractGeographicExtent ex
     @Override
     @XmlElement(name = "extentTypeCode")
     public Boolean getInclusion() {
-        return getBoolean(booleans, INCLUSION_MASK);
+        return inclusion;
     }
 
     /**
@@ -159,6 +151,6 @@ public class AbstractGeographicExtent ex
      */
     public void setInclusion(final Boolean newValue) {
         checkWritePermission();
-        booleans = (byte) setBoolean(booleans, INCLUSION_MASK, newValue);
+        inclusion = newValue;
     }
 }

Modified: 
sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBox.java
URL: 
http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBox.java?rev=1511612&r1=1511611&r2=1511612&view=diff
==============================================================================
--- 
sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBox.java
 [UTF-8] (original)
+++ 
sis/branches/0.3/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBox.java
 [UTF-8] Thu Aug  8 08:06:50 2013
@@ -320,9 +320,9 @@ public class DefaultGeographicBoundingBo
      *         Note that {@linkplain Double#NaN NaN} values are allowed.
      */
     public void setBounds(final double westBoundLongitude,
-                                       final double eastBoundLongitude,
-                                       final double southBoundLatitude,
-                                       final double northBoundLatitude)
+                          final double eastBoundLongitude,
+                          final double southBoundLatitude,
+                          final double northBoundLatitude)
             throws IllegalArgumentException
     {
         checkWritePermission();

Modified: 
sis/branches/0.3/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/MetadataUtilitiesTest.java
URL: 
http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/MetadataUtilitiesTest.java?rev=1511612&r1=1511611&r2=1511612&view=diff
==============================================================================
--- 
sis/branches/0.3/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/MetadataUtilitiesTest.java
 [UTF-8] (original)
+++ 
sis/branches/0.3/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/MetadataUtilitiesTest.java
 [UTF-8] Thu Aug  8 08:06:50 2013
@@ -21,8 +21,6 @@ import org.junit.Test;
 import org.apache.sis.test.TestCase;
 
 import static org.junit.Assert.*;
-import static java.lang.Boolean.TRUE;
-import static java.lang.Boolean.FALSE;
 
 
 /**
@@ -51,22 +49,4 @@ public final strictfp class MetadataUtil
         assertEquals(new Date(1000), MetadataUtilities.toDate(1000));
         assertNull(MetadataUtilities.toDate(Long.MIN_VALUE));
     }
-
-    /**
-     * Tests {@link MetadataUtilities#setBoolean(int, byte, Boolean)}.
-     * This will indirectly test the getter method through Java assertion.
-     */
-    @Test
-    public void testSetBoolean() {
-        final int mask0 =  3; // 0b000011;
-        final int mask1 = 12; // 0b001100;
-        final int mask2 = 48; // 0b110000;
-        int flags = 0;
-        flags = MetadataUtilities.setBoolean(flags, mask1, null ); 
assertEquals( 0 /*0b000000*/, flags);
-        flags = MetadataUtilities.setBoolean(flags, mask1, TRUE ); 
assertEquals(12 /*0b001100*/, flags);
-        flags = MetadataUtilities.setBoolean(flags, mask2, FALSE); 
assertEquals(44 /*0b101100*/, flags);
-        flags = MetadataUtilities.setBoolean(flags, mask1, null ); 
assertEquals(32 /*0b100000*/, flags);
-        flags = MetadataUtilities.setBoolean(flags, mask0, TRUE ); 
assertEquals(35 /*0b100011*/, flags);
-        flags = MetadataUtilities.setBoolean(flags, mask0, FALSE); 
assertEquals(34 /*0b100010*/, flags);
-    }
 }

Modified: 
sis/branches/0.3/core/sis-metadata/src/test/java/org/apache/sis/xml/MetadataMarshallingTest.java
URL: 
http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/test/java/org/apache/sis/xml/MetadataMarshallingTest.java?rev=1511612&r1=1511611&r2=1511612&view=diff
==============================================================================
--- 
sis/branches/0.3/core/sis-metadata/src/test/java/org/apache/sis/xml/MetadataMarshallingTest.java
 [UTF-8] (original)
+++ 
sis/branches/0.3/core/sis-metadata/src/test/java/org/apache/sis/xml/MetadataMarshallingTest.java
 [UTF-8] Thu Aug  8 08:06:50 2013
@@ -131,7 +131,7 @@ public final strictfp class MetadataMars
         assertInstanceOf("Wrong value for <gmd:result>", 
DefaultConformanceResult.class,
                 getSingleton(((AbstractElement) metadata).getResults()));
         /*
-         * Final comparison: ensure that we didn't lost any information, then 
release.
+         * Final comparison: ensure that we didn't lost any information.
          */
         assertXmlEquals(resource, marshal(marshaller, metadata), "xmlns:*", 
"xsi:schemaLocation", "xsi:type");
         pool.recycle(unmarshaller);
@@ -162,7 +162,7 @@ public final strictfp class MetadataMars
         assertTrue(xml.startsWith("<?xml"));
         assertXmlEquals(getResource("ProcessStep.xml"), xml, "xmlns:*", 
"xsi:schemaLocation");
         /*
-         * Final comparison: ensure that we didn't lost any information, then 
release.
+         * Final comparison: ensure that we didn't lost any information.
          */
         assertEquals(processStep, unmarshal(unmarshaller, xml));
         pool.recycle(unmarshaller);

Modified: 
sis/branches/0.3/core/sis-metadata/src/test/resources/org/apache/sis/xml/PositionalAccuracy.xml
URL: 
http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/test/resources/org/apache/sis/xml/PositionalAccuracy.xml?rev=1511612&r1=1511611&r2=1511612&view=diff
==============================================================================
--- 
sis/branches/0.3/core/sis-metadata/src/test/resources/org/apache/sis/xml/PositionalAccuracy.xml
 (original)
+++ 
sis/branches/0.3/core/sis-metadata/src/test/resources/org/apache/sis/xml/PositionalAccuracy.xml
 Thu Aug  8 08:06:50 2013
@@ -19,10 +19,10 @@
 -->
 
 <gmd:DQ_RelativeInternalPositionalAccuracy
-  xmlns:gmd = "http://www.isotc211.org/2005/gmd";
-  xmlns:gco = "http://www.isotc211.org/2005/gco";
-  xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance";
-  xsi:schemaLocation = "http://www.isotc211.org/2005/gmd 
http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd";>
+    xmlns:gmd = "http://www.isotc211.org/2005/gmd";
+    xmlns:gco = "http://www.isotc211.org/2005/gco";
+    xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance";
+    xsi:schemaLocation = "http://www.isotc211.org/2005/gmd 
http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd";>
 
   <!-- The <nameOfMeasure> element below is the main purpose of 
MetadataMarshallingTest.testPositionalAccuracy().
        The <result> element was added only in order to allow validation of 
this XML file, with the addition of an

Modified: 
sis/branches/0.3/core/sis-metadata/src/test/resources/org/apache/sis/xml/ProcessStep.xml
URL: 
http://svn.apache.org/viewvc/sis/branches/0.3/core/sis-metadata/src/test/resources/org/apache/sis/xml/ProcessStep.xml?rev=1511612&r1=1511611&r2=1511612&view=diff
==============================================================================
--- 
sis/branches/0.3/core/sis-metadata/src/test/resources/org/apache/sis/xml/ProcessStep.xml
 (original)
+++ 
sis/branches/0.3/core/sis-metadata/src/test/resources/org/apache/sis/xml/ProcessStep.xml
 Thu Aug  8 08:06:50 2013
@@ -19,11 +19,11 @@
 -->
 
 <gmd:LI_ProcessStep
-  xmlns:gmd = "http://www.isotc211.org/2005/gmd";
-  xmlns:gco = "http://www.isotc211.org/2005/gco";
-  xmlns:gmi = "http://www.isotc211.org/2005/gmi";
-  xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance";
-  xsi:schemaLocation = "http://www.isotc211.org/2005/gmd 
http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd";>
+    xmlns:gmd = "http://www.isotc211.org/2005/gmd";
+    xmlns:gco = "http://www.isotc211.org/2005/gco";
+    xmlns:gmi = "http://www.isotc211.org/2005/gmi";
+    xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance";
+    xsi:schemaLocation = "http://www.isotc211.org/2005/gmd 
http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd";>
 
   <!-- As of February 2011, there is not yet any XSD schema for the "gmi" 
namespace on the
        OGC web site. Consequently the validation of this file does not work 
fully yet. -->


Reply via email to