sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1483126 - in /sis/branches/JDK7: core/sis-utility/src/main/java/org/apache/sis/util/resources/ storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/ storage/s...
Date Wed, 15 May 2013 23:44:27 GMT
Author: desruisseaux
Date: Wed May 15 23:44:27 2013
New Revision: 1483126

URL: http://svn.apache.org/r1483126
Log:
First draft of a standalone NetCDF reader.

Added:
    sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/
    sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/Attribute.java   (with props)
    sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/ChannelDecoder.java   (with props)
    sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/Dimension.java   (with props)
    sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/VariableInfo.java   (with props)
    sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/package-info.java   (with props)
    sis/branches/JDK7/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/
    sis/branches/JDK7/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/ChannelDecoderTest.java   (with props)
Modified:
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
    sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/Decoder.java
    sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/DecoderWrapper.java
    sis/branches/JDK7/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/DecoderTest.java
    sis/branches/JDK7/storage/sis-netcdf/src/test/java/org/apache/sis/test/suite/NetcdfTestSuite.java

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java?rev=1483126&r1=1483125&r2=1483126&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java [UTF-8] Wed May 15 23:44:27 2013
@@ -89,6 +89,11 @@ public final class Errors extends Indexe
         public static final int CanNotInstantiate_1 = 81;
 
         /**
+         * Can not parse “{1}” as a file in the {0} format.
+         */
+        public static final int CanNotParseFile_2 = 95;
+
+        /**
          * Can not set a value for property “{0}”.
          */
         public static final int CanNotSetPropertyValue_1 = 75;
@@ -451,7 +456,7 @@ public final class Errors extends Indexe
         public static final int UnexpectedEndOfString_1 = 30;
 
         /**
-         * File “{1}” does not seem to be encoded in the “{0}” format.
+         * File “{1}” seems to be encoded in an other format than {0}.
          */
         public static final int UnexpectedFileFormat_2 = 92;
 

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties?rev=1483126&r1=1483125&r2=1483126&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties [ISO-8859-1] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties [ISO-8859-1] Wed May 15 23:44:27 2013
@@ -29,6 +29,7 @@ CanNotConvertFromType_2         = Can no
 CanNotConvertValue_2            = Can not convert value \u201c{0}\u201d to type \u2018{1}\u2019.
 CanNotComputeDerivative         = Can not compute the derivative.
 CanNotInstantiate_1             = Can not instantiate an object of type \u2018{0}\u2019.
+CanNotParseFile_2               = Can not parse \u201c{1}\u201d as a file in the {0} format.
 CanNotSetPropertyValue_1        = Can not set a value for property \u201c{0}\u201d.
 ClassNotFinal_1                 = Class \u2018{0}\u2019 is not final.
 CloneNotSupported_1             = Can not clone an object of type \u2018{0}\u2019.
@@ -102,7 +103,7 @@ UndefinedOrderingForElements_2  = Orderi
 UnexpectedChange_1              = Unexpected change in \u2018{0}\u2019.
 UnexpectedEndOfFile_1           = Unexpected end of file while reading \u201c{0}\u201d.
 UnexpectedEndOfString_1         = More characters were expected at the end of \u201c{0}\u201d.
-UnexpectedFileFormat_2          = File \u201c{1}\u201d does not seem to be encoded in the \u201c{0}\u201d format.
+UnexpectedFileFormat_2          = File \u201c{1}\u201d seems to be encoded in an other format than {0}.
 UnknownType_1                   = Type \u2018{0}\u2019 is unknown in this context.
 UnknownTypeForProperty_1        = Type of the \u201c{0}\u201d property is unknown.
 UnmodifiableAffineTransform     = This affine transform is unmodifiable.

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties?rev=1483126&r1=1483125&r2=1483126&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties [ISO-8859-1] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties [ISO-8859-1] Wed May 15 23:44:27 2013
@@ -19,6 +19,7 @@ CanNotConvertFromType_2         = Ne peu
 CanNotConvertValue_2            = La valeur \u201c{0}\u201d ne peut pas \u00eatre convertie vers le type \u2018{1}\u2019.
 CanNotComputeDerivative         = La d\u00e9riv\u00e9 ne peut pas \u00eatre calcul\u00e9e.
 CanNotInstantiate_1             = Ne peut pas cr\u00e9er un objet de type \u2018{0}\u2019.
+CanNotParseFile_2               = Ne peut pas lire \u201c{1}\u201d comme un fichier au format {0}.
 CanNotSetPropertyValue_1        = Ne peut pas d\u00e9finir une valeur pour la propri\u00e9t\u00e9 \u201c{0}\u201d.
 ClassNotFinal_1                 = La classe \u2018{0}\u2019 n\u2019est pas finale.
 CloneNotSupported_1             = Un objet de type \u2018{0}\u2019 ne peut pas \u00eatre clon\u00e9.
@@ -91,7 +92,7 @@ UndefinedOrderingForElements_2  = L\u201
 UnexpectedChange_1              = Changement inattendu dans \u2018{0}\u2019.
 UnexpectedEndOfFile_1           = Fin de fichier inattendue lors de la lecture de \u201c{0}\u201d.
 UnexpectedEndOfString_1         = D\u2019autres caract\u00e8res \u00e9taient attendus \u00e0 la fin du texte \u201c{0}\u201d.
-UnexpectedFileFormat_2          = Le fichier \u201c{1}\u201d ne semble pas \u00eatre encod\u00e9 selon le format \u201c{0}\u201d.
+UnexpectedFileFormat_2          = Le fichier \u201c{1}\u201d semble \u00eatre encod\u00e9 dans un format autre que {0}.
 UnknownType_1                   = Le type \u2018{0}\u2019 n\u2019est pas reconnu dans ce contexte.
 UnknownTypeForProperty_1        = Le type de la propri\u00e9t\u00e9 \u201c{0}\u201d est inconnu.
 UnmodifiableAffineTransform     = Cette transformation affine n\u2019est pas modifiable.

Modified: sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/Decoder.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/Decoder.java?rev=1483126&r1=1483125&r2=1483126&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/Decoder.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/Decoder.java [UTF-8] Wed May 15 23:44:27 2013
@@ -82,6 +82,27 @@ public abstract class Decoder extends Wa
     public abstract Number numericValue(final String name) throws IOException;
 
     /**
+     * Convenience method for {@link #numericValue(String)} implementation.
+     *
+     * @param  value The attribute value to parse.
+     * @return The parsed attribute value, or {@code null} if the given value can not be parsed.
+     */
+    protected final Number parseNumber(String value) {
+        final int s = value.indexOf(' ');
+        if (s >= 0) {
+            // Sometime, numeric values as string are followed by
+            // a unit of measurement. We ignore that unit for now...
+            value = value.substring(0, s);
+        }
+        try {
+            return Double.valueOf(value);
+        } catch (NumberFormatException e) {
+            warning("numericValue", e);
+        }
+        return null;
+    }
+
+    /**
      * Returns the value of the attribute of the given name as a date, or {@code null} if none.
      *
      * @param  name The name of the attribute to search, or {@code null}.

Added: sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/Attribute.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/Attribute.java?rev=1483126&view=auto
==============================================================================
--- sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/Attribute.java (added)
+++ sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/Attribute.java [UTF-8] Wed May 15 23:44:27 2013
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.internal.netcdf.impl;
+
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Collections;
+import org.apache.sis.storage.DataStoreException;
+import org.apache.sis.util.collection.Containers;
+import org.apache.sis.util.resources.Errors;
+
+
+/**
+ * Attribute found in a NetCDF file.
+ *
+ * @author  Johann Sorel (Geomatys)
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.3
+ * @version 0.3
+ * @module
+ */
+final class Attribute {
+    /**
+     * The attribute name.
+     */
+    final String name;
+
+    /**
+     * The value, either as a {@link String} or as an array of primitive type.
+     */
+    final Object value;
+
+    /**
+     * Creates a new attribute of the given name and value.
+     */
+    Attribute(final String name, final Object value) {
+        this.name  = name;
+        this.value = value;
+    }
+
+    /**
+     * Creates a (<cite>name</cite>, <cite>attribute</cite>) mapping for the given array of attributes.
+     *
+     * @throws DataStoreException If an attribute is defined twice.
+     */
+    static Map<String,Attribute> toMap(final Attribute[] attributes) throws DataStoreException {
+        if (attributes == null) {
+            return Collections.emptyMap();
+        }
+        final Map<String,Attribute> map = new HashMap<>(Containers.hashMapCapacity(attributes.length));
+        for (final Attribute attribute : attributes) {
+            if (map.put(attribute.name, attribute) != null) {
+                throw new DataStoreException(Errors.format(Errors.Keys.ValueAlreadyDefined_1, attribute.name));
+            }
+        }
+        return map;
+    }
+}

Propchange: sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/Attribute.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/Attribute.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8

Added: sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/ChannelDecoder.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/ChannelDecoder.java?rev=1483126&view=auto
==============================================================================
--- sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/ChannelDecoder.java (added)
+++ sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/ChannelDecoder.java [UTF-8] Wed May 15 23:44:27 2013
@@ -0,0 +1,519 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.internal.netcdf.impl;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.io.IOException;
+import java.io.EOFException;
+import java.nio.ByteBuffer;
+import java.nio.channels.ReadableByteChannel;
+import java.lang.reflect.Array;
+import org.apache.sis.internal.netcdf.Decoder;
+import org.apache.sis.internal.netcdf.Variable;
+import org.apache.sis.internal.netcdf.GridGeometry;
+import org.apache.sis.internal.netcdf.WarningProducer;
+import org.apache.sis.storage.DataStoreException;
+import org.apache.sis.util.iso.DefaultNameSpace;
+import org.apache.sis.util.resources.Errors;
+import org.apache.sis.util.resources.Vocabulary;
+
+
+/**
+ * Provides NetCDF decoding services as a standalone library.
+ * The javadoc in this class uses the "file" word for the source of data, but
+ * this implementation actually works with arbitrary {@link ReadableByteChannel}.
+ *
+ * @author  Johann Sorel (Geomatys)
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.3
+ * @version 0.3
+ * @module
+ *
+ * @see <a href="http://portal.opengeospatial.org/files/?artifact_id=43734">NetCDF Classic and 64-bit Offset Format (1.0)</a>
+ */
+public final class ChannelDecoder extends Decoder {
+    /*
+     * NOTE: the names of the static constants in this file match the names used in the Backus-Naur Form (BNF)
+     *       definitions in the above-cited NetCDF Classic and 64-bit Offset Format (1.0) specification.
+     *       The types of those constants match the expected type in the file.
+     */
+
+    /**
+     * A {@link #numrecs} value indicating indeterminate record count.
+     * This value allows streaming data.
+     */
+    private static final int STREAMING = -1;
+
+    /**
+     * Tag for lists of dimensions, variables or attributes, as 32 bits value.
+     * A 64-bits zero means that there is no list (identified as {@code ABSENT} in the BNF).
+     *
+     * @see #tagName(int)
+     */
+    private static final int NC_DIMENSION = 0x0A, NC_VARIABLE = 0x0B, NC_ATTRIBUTE = 0x0C;
+
+    /**
+     * A file identifier used only for formatting error message.
+     */
+    private final String filename;
+
+    /**
+     * The channel from where data are read.
+     */
+    private final ReadableByteChannel channel;
+
+    /**
+     * The buffer to use for reading NetCDF data.
+     */
+    private final ByteBuffer buffer;
+
+    /**
+     * {@code false} if the file is the classic format, or
+     * {@code true} if it is the 64-bits offset format.
+     */
+    private final boolean is64bits;
+
+    /**
+     * Number of records as an unsigned integer, or {@value #STREAMING} if unlimited.
+     */
+    private final int numrecs;
+
+    /**
+     * The character encoding of attribute values. This encoding does <strong>not</strong> apply to
+     * dimension, variable and attribute names, which are fixed to UTF-8 as of NetCDF specification.
+     *
+     * @todo Fixed to ISO-LATIN-1 for now, needs to be determined in a better way.
+     */
+    private final String encoding = "ISO-8859-1";
+
+    /**
+     * The attributes found in the NetCDF file.
+     */
+    private final Map<String,Attribute> attributeMap;
+
+    /**
+     * Creates a new decoder for the given file.
+     * This constructor parses immediately the header.
+     *
+     * @param  parent   Where to send the warnings, or {@code null} if none.
+     * @param  filename A file identifier used only for formatting error message.
+     * @param  channel  The channel from where data are read.
+     * @throws IOException If an error occurred while reading the channel.
+     * @throws DataStoreException If the content of the given channel is not a NetCDF file.
+     */
+    public ChannelDecoder(final WarningProducer parent, final String filename, final ReadableByteChannel channel)
+            throws IOException, DataStoreException
+    {
+        super(parent);
+        this.filename = filename;
+        this.channel  = channel;
+        this.buffer   = ByteBuffer.allocate(1024);
+        channel.read(buffer);
+        buffer.flip();
+        /*
+         * Check the magic number, which is expected to be exactly 3 bytes forming the "CDF" string.
+         * The 4th byte is the version number, which we opportunistically use after the magic number check.
+         */
+        int version = readInt();
+        if ((version & 0xFFFFFF00) != (('C' << 24) | ('D' << 16) | ('F' <<  8))) {
+            throw new DataStoreException(Errors.format(Errors.Keys.UnexpectedFileFormat_2, "NetCDF", filename));
+        }
+        /*
+         * Check the version number.
+         */
+        version &= 0xFF;
+        switch (version) {
+            case 1:  is64bits = false; break;
+            case 2:  is64bits = true;  break;
+            default: throw new DataStoreException(Errors.format(Errors.Keys.UnsupportedVersion_1, version));
+        }
+        numrecs = readInt();
+        /*
+         * Read the dimension, attribute and variable declarations. We expect exactly 3 lists,
+         * where any of them which can be flagged as absent by a long (64 bits) 0.
+         */
+        Dimension[]    dimensions = null;
+        VariableInfo[] variables  = null;
+        Attribute[]    attributes = null;
+        for (int i=0; i<3; i++) {
+            long nelems = readLong(); // Not yet the actual value (the 'tag' part is separated later).
+            if (nelems != 0) {
+                final int tag = (int) (nelems >>> Integer.SIZE);
+                nelems &= 0xFFFFFFFFL;
+                if (nelems > Integer.MAX_VALUE) {
+                    throw new DataStoreException(Errors.format(Errors.Keys.ExcessiveListSize_2,
+                            filename + DefaultNameSpace.DEFAULT_SEPARATOR + tagName(tag), nelems));
+                }
+                switch (tag) {
+                    case NC_DIMENSION: dimensions = readDimensions((int) nelems); break;
+                    case NC_VARIABLE:  variables  = readVariables ((int) nelems, dimensions); break;
+                    case NC_ATTRIBUTE: attributes = readAttributes((int) nelems); break;
+                    default:           throw malformedHeader();
+                }
+            }
+        }
+        attributeMap = Attribute.toMap(attributes);
+    }
+
+    /**
+     * Returns an exception for a malformed header.
+     */
+    private DataStoreException malformedHeader() {
+        return new DataStoreException(Errors.format(Errors.Keys.CanNotParseFile_2, "NetCDF", filename));
+    }
+
+    /**
+     * Makes sure that the buffer contains at least <var>n</var> remaining bytes.
+     * It is caller's responsibility to ensure that the given number of bytes is
+     * not greater than the buffer capacity.
+     *
+     * @param  n The minimal number of bytes needed in the {@linkplain #buffer}.
+     * @throws EOFException If the channel has reached the end of stream.
+     * @throws IOException If an other kind of error occurred while reading.
+     */
+    private void require(int n) throws IOException {
+        assert n <= buffer.capacity() : n;
+        n -= buffer.remaining();
+        if (n > 0) {
+            buffer.compact();
+            do {
+                final int c = channel.read(buffer);
+                if (c < 0) {
+                    throw new EOFException(Errors.format(Errors.Keys.UnexpectedEndOfFile_1, filename));
+                }
+                n -= c;
+            } while (n > 0);
+            buffer.flip();
+        }
+    }
+
+    /**
+     * Reads all dimensions from the NetCDF file header.
+     *
+     * @param nelems The number of dimensions to read.
+     */
+    private Dimension[] readDimensions(final int nelems) throws IOException, DataStoreException {
+        final Dimension[] dimensions = new Dimension[nelems];
+        for (int i=0; i<nelems; i++) {
+            final String name = readString("UTF-8"); // The specification fixes those names to UTF-8 encoding.
+            dimensions[i] = new Dimension(name, readInt());
+        }
+        return dimensions;
+    }
+
+    /**
+     * Reads information (not data) about all variables from the NetCDF file header.
+     *
+     * @param nelems     The number of variables to read.
+     * @param dimensions The dimensions previously read by {@link #readDimensions(int)}.
+     */
+    private VariableInfo[] readVariables(final int nelems, final Dimension[] dimensions)
+            throws IOException, DataStoreException
+    {
+        if (dimensions == null) {
+            throw malformedHeader();
+        }
+        final VariableInfo[] variables = new VariableInfo[nelems];
+        for (int j=0; j<nelems; j++) {
+            final String name = readString("UTF-8"); // The specification fixes those names to UTF-8 encoding.
+            final int n = readInt();
+            final Dimension[] varDims = new Dimension[n];
+            try {
+                for (int i=0; i<n; i++) {
+                    varDims[i] = dimensions[readInt()];
+                }
+            } catch (IndexOutOfBoundsException cause) {
+                final DataStoreException e = malformedHeader();
+                e.initCause(cause);
+                throw e;
+            }
+            /*
+             * Following block is almost a copy-and-paste of similar block in the contructor,
+             * but with less cases in the "switch" statements.
+             */
+            Attribute[] attributes = null;
+            long na = readLong();
+            if (na != 0) {
+                final int tag = (int) (na >>> Integer.SIZE);
+                na &= 0xFFFFFFFFL;
+                if (na > Integer.MAX_VALUE) {
+                    throw new DataStoreException(Errors.format(Errors.Keys.ExcessiveListSize_2,
+                            filename + DefaultNameSpace.DEFAULT_SEPARATOR + tagName(tag), na));
+                }
+                switch (tag) {
+                    // More cases may be added later if it appears to exist.
+                    case NC_ATTRIBUTE: attributes = readAttributes((int) na); break;
+                    default:           throw malformedHeader();
+                }
+            }
+            variables[j] = new VariableInfo(name, varDims, attributes, readInt(), readInt(), readOffset());
+        }
+        return variables;
+    }
+
+    /**
+     * Reads attribute values from the NetCDF file header.
+     *
+     * @param nelems The number of attributes to read.
+     */
+    private Attribute[] readAttributes(final int nelems) throws IOException, DataStoreException {
+        final Attribute[] attributes = new Attribute[nelems];
+        for (int i=0; i<nelems; i++) {
+            final String name = readString("UTF-8"); // The specification fixes those names to UTF-8 encoding.
+            final Object value = readValues(readInt(), readInt());
+            attributes[i] = new Attribute(name, value);
+        }
+        return attributes;
+    }
+
+    /**
+     * Reads the next offset, which may be encoded on 32 or 64 bits depending on the file format.
+     */
+    private long readOffset() throws IOException {
+        return is64bits ? readLong() : (readInt() & 0xFFFFFFFFL);
+    }
+
+    /**
+     * Reads the next long value from the buffer.
+     */
+    private long readLong() throws IOException {
+        require(Long.SIZE / Byte.SIZE);
+        return buffer.getLong();
+    }
+
+    /**
+     * Reads the next integer value from the buffer.
+     */
+    private int readInt() throws IOException {
+        require(Integer.SIZE / Byte.SIZE);
+        return buffer.getInt();
+    }
+
+    /**
+     * Returns the values of the given type. In the given type is {@code CHAR}, then this method returns the values
+     * as a {@link String}. Otherwise this method returns the value as an array of the corresponding primitive type
+     * and the given length.
+     */
+    private Object readValues(final int type, final int length) throws IOException, DataStoreException {
+        int position;
+        final Object result;
+        switch (type) {
+            case VariableInfo.CHAR: {
+                final int size = addPadding(length); // Number of bytes to read.
+                require(size);
+                position = buffer.position();
+                final String text = new String(buffer.array(), position, length, encoding).trim();
+                result = text.isEmpty() ? null : text;
+                position += size;
+                break;
+            }
+            case VariableInfo.BYTE: {
+                final int size = addPadding(length);
+                require(size);
+                position = buffer.position() + size;
+                final byte[] array = new byte[length];
+                buffer.get(array);
+                result = array;
+                break;
+            }
+            case VariableInfo.SHORT: {
+                final int size = addPadding(length * (Short.SIZE / Byte.SIZE));
+                require(size);
+                position = buffer.position() + size;
+                final short[] array = new short[length];
+                buffer.asShortBuffer().get(array);
+                result = array;
+                break;
+            }
+            case VariableInfo.INT: {
+                final int size = length * (Integer.SIZE / Byte.SIZE);
+                require(size);
+                position = buffer.position() + size;
+                final int[] array = new int[length];
+                buffer.asIntBuffer().get(array);
+                result = array;
+                break;
+            }
+            case VariableInfo.FLOAT: {
+                final int size = length * (Float.SIZE / Byte.SIZE);
+                require(size);
+                position = buffer.position() + size;
+                final float[] array = new float[length];
+                buffer.asFloatBuffer().get(array);
+                result = array;
+                break;
+            }
+            case VariableInfo.DOUBLE: {
+                final int size = length * (Double.SIZE / Byte.SIZE);
+                require(size);
+                position = buffer.position() + size;
+                final double[] array = new double[length];
+                buffer.asDoubleBuffer().get(array);
+                result = array;
+                break;
+            }
+            default: {
+                throw malformedHeader();
+            }
+        }
+        buffer.position(position);
+        return result;
+    }
+
+    /**
+     * Reads a string from the buffer in the given encoding.
+     *
+     * @param encoding The string encoding, {@code "UTF-8"} for the dimension, variable and attribute
+     *                 names in the header but potentially different in the rest of the file.
+     */
+    private String readString(final String encoding) throws IOException, DataStoreException {
+        final int length = readInt();
+        if (length < 0) {
+            throw malformedHeader();
+        }
+        final int lengthWithPadding = addPadding(length);
+        require(lengthWithPadding);
+        final int position = buffer.position();
+        final String text = new String(buffer.array(), position, length, encoding);
+        buffer.position(position + lengthWithPadding);
+        return text;
+    }
+
+    /**
+     * Adds a padding to the given length, if necessary, in order to make it a multiple
+     * of the size (in bytes) of the {@code int} type.
+     */
+    private static int addPadding(int position) {
+        return (position + 3) & ~3;
+    }
+
+    /**
+     * Return the localized name of the given tag.
+     *
+     * @param  tag One of {@link #NC_DIMENSION}, {@link #NC_VARIABLE} or {@link #NC_ATTRIBUTE} constants.
+     * @return The localized name of the given tag, or its hexadecimal number if the given value is not
+     *         one of the expected constants.
+     */
+    private static String tagName(final int tag) {
+        final int key;
+        switch (tag) {
+            case NC_DIMENSION: key = Vocabulary.Keys.Dimensions; break;
+            case NC_VARIABLE:  key = Vocabulary.Keys.Variables;  break;
+            case NC_ATTRIBUTE: key = Vocabulary.Keys.Attributes; break;
+            default: return Integer.toHexString(tag);
+        }
+        return Vocabulary.format(key);
+    }
+
+    /**
+     * Defines the groups where to search for named attributes, in preference order.
+     * The {@code null} group name stands for the global attributes.
+     */
+    @Override
+    public void setSearchPath(final String... groupNames) throws IOException {
+        if (groupNames.length != 1 || groupNames[0] != null) {
+            throw new UnsupportedOperationException();
+        }
+    }
+
+    /**
+     * Returns the path which is currently set. The array returned by this method may be only
+     * a subset of the array given to {@link #setSearchPath(String[])} since only the name of
+     * groups which have been found in the NetCDF file are returned by this method.
+     */
+    @Override
+    public String[] getSearchPath() throws IOException {
+        return new String[1];
+    }
+
+    /**
+     * Returns the NetCDF attribute of the given name, or {@code null} if none.
+     * The {@code name} argument is typically (but is not restricted too) one of
+     * the constants defined in the {@link AttributeNames} class.
+     *
+     * @param  name The name of the attribute to search, or {@code null}.
+     * @return The attribute, or {@code null} if none.
+     */
+    private Attribute findAttribute(final String name) {
+        return attributeMap.get(name);
+    }
+
+    /**
+     * Returns the value for the attribute of the given name, or {@code null} if none.
+     *
+     * @param  name The name of the attribute to search, or {@code null}.
+     * @return The attribute value, or {@code null} if none or empty or if the given name was null.
+     */
+    @Override
+    public String stringValue(final String name) throws IOException {
+        final Attribute attribute = findAttribute(name);
+        if (attribute != null && attribute.value != null) {
+            return attribute.value.toString();
+        }
+        return null;
+    }
+
+    /**
+     * Returns the value of the attribute of the given name as a number, or {@code null} if none.
+     * If there is more than one numeric value, only the first one is returned.
+     */
+    @Override
+    public Number numericValue(final String name) throws IOException {
+        final Attribute attribute = findAttribute(name);
+        if (attribute != null && attribute.value != null) {
+            if (attribute.value instanceof String) {
+                return parseNumber((String) attribute.value);
+            }
+            if (Array.getLength(attribute.value) != 0) {
+                return (Number) Array.get(attribute.value, 0);
+            }
+        }
+        return null;
+    }
+
+    @Override
+    public Date dateValue(String name) throws IOException {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public Date[] numberToDate(String symbol, Number... values) throws IOException {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public List<Variable> getVariables() throws IOException {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public List<GridGeometry> getGridGeometries() throws IOException {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * Closes the channel.
+     *
+     * @throws IOException If an error occurred while closing the channel.
+     */
+    @Override
+    public void close() throws IOException {
+        channel.close();
+    }
+}

Propchange: sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/ChannelDecoder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/ChannelDecoder.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8

Added: sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/Dimension.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/Dimension.java?rev=1483126&view=auto
==============================================================================
--- sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/Dimension.java (added)
+++ sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/Dimension.java [UTF-8] Wed May 15 23:44:27 2013
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.internal.netcdf.impl;
+
+import org.apache.sis.util.Debug;
+
+
+/**
+ * A dimension in a NetCDF file. A dimension can been seen as an axis in the grid space
+ * (not the geodetic space). Dimension are referenced by their index in other parts of
+ * the NetCDF file header.
+ *
+ * @author  Johann Sorel (Geomatys)
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.3
+ * @version 0.3
+ * @module
+ *
+ */
+final class Dimension {
+    /**
+     * The dimension name.
+     */
+    final String name;
+
+    /**
+     * The number of grid cell value along that dimension.
+     */
+    final int length;
+
+    /**
+     * Creates a new dimension of the given name and length.
+     */
+    Dimension(final String name, final int length) {
+        this.name   = name;
+        this.length = length;
+    }
+
+    /**
+     * A string representation of this dimension for debugging purpose only.
+     */
+    @Debug
+    @Override
+    public String toString() {
+        return "Dimension[“" + name + "”, " + length + ']';
+    }
+}

Propchange: sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/Dimension.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/Dimension.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8

Added: sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/VariableInfo.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/VariableInfo.java?rev=1483126&view=auto
==============================================================================
--- sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/VariableInfo.java (added)
+++ sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/VariableInfo.java [UTF-8] Wed May 15 23:44:27 2013
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.internal.netcdf.impl;
+
+
+/**
+ * Description of a variable found in a NetCDF file.
+ *
+ * @author  Johann Sorel (Geomatys)
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.3
+ * @version 0.3
+ * @module
+ */
+final class VariableInfo {
+    /**
+     * The type of data. Number of bits and endianess are same as in the Java language
+     * except {@code CHAR}, which is defined as an unsigned 8-bits value.
+     */
+    static final int BYTE=1, CHAR=2, SHORT=3, INT=4, FLOAT=5, DOUBLE=6;
+
+    /**
+     * The size in bytes of the above constants.
+     */
+    private static final int[] SIZES = new int[] {
+        Byte   .SIZE / Byte.SIZE,
+        Byte   .SIZE / Byte.SIZE, // NOT Java char
+        Short  .SIZE / Byte.SIZE,
+        Integer.SIZE / Byte.SIZE,
+        Float  .SIZE / Byte.SIZE,
+        Double .SIZE / Byte.SIZE,
+    };
+
+    /**
+     * The variable name.
+     */
+    final String name;
+
+    /**
+     * The dimensions of that variable.
+     */
+    final Dimension[] dimensions;
+
+    /**
+     * The attributes associates to the variable, or {@code null} if none.
+     */
+    final Attribute[] attributes;
+
+    /**
+     * The type of data, as one of the {@code BYTE}, {@code SHORT} and similar constants defined
+     * in {@link ChannelDecoder}.
+     */
+    final int datatype;
+
+    /**
+     * The offset where the variable data begins in the NetCDF file.
+     */
+    final long offset;
+
+    /**
+     * Creates a new variable.
+     */
+    VariableInfo(final String name, final Dimension[] dimensions, final Attribute[] attributes,
+            final int datatype, final int size, final long offset)
+    {
+        this.name       = name;
+        this.dimensions = dimensions;
+        this.attributes = attributes;
+        this.datatype   = datatype;
+        this.offset     = offset;
+        // TODO: verify 'size'.
+    }
+}

Propchange: sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/VariableInfo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/VariableInfo.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8

Added: sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/package-info.java?rev=1483126&view=auto
==============================================================================
--- sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/package-info.java (added)
+++ sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/package-info.java [UTF-8] Wed May 15 23:44:27 2013
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Implementation of the {@link org.apache.sis.internal.netcdf} API as a standalone library.
+ * This is useful only for the NetCDF binary format (no NcML, no GRIB, no BUFR).
+ * This package works with channels instead than files, which is a little bit easier to use
+ * in some environments.
+ *
+ * <p><b>Reference:</b></p>
+ * <ul>
+ *   <li><a href="http://www.opengeospatial.org/standards/netcdf">NetCDF standards on OGC web site</a></li>
+ *   <li><a href="http://portal.opengeospatial.org/files/?artifact_id=43734">NetCDF Classic and 64-bit Offset Format (1.0)</a></li>
+ * </ul>
+ *
+ * @author  Johann Sorel (Geomatys)
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.3
+ * @version 0.3
+ * @module
+ */
+package org.apache.sis.internal.netcdf.impl;

Propchange: sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/package-info.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8

Modified: sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/DecoderWrapper.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/DecoderWrapper.java?rev=1483126&r1=1483125&r2=1483126&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/DecoderWrapper.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/DecoderWrapper.java [UTF-8] Wed May 15 23:44:27 2013
@@ -177,17 +177,7 @@ public final class DecoderWrapper extend
                     }
                     String asString = attribute.getStringValue();
                     if (asString != null && !(asString = asString.trim()).isEmpty()) {
-                        final int s = asString.indexOf(' ');
-                        if (s >= 0) {
-                            // Sometime, numeric values as string are followed by
-                            // a unit of measurement. We ignore that unit for now...
-                            asString = asString.substring(0, s);
-                        }
-                        try {
-                            return Double.valueOf(asString);
-                        } catch (NumberFormatException e) {
-                            warning("numericValue", e);
-                        }
+                        return parseNumber(asString);
                     }
                 }
             }

Modified: sis/branches/JDK7/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/DecoderTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/DecoderTest.java?rev=1483126&r1=1483125&r2=1483126&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/DecoderTest.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/DecoderTest.java [UTF-8] Wed May 15 23:44:27 2013
@@ -71,6 +71,7 @@ public strictfp class DecoderTest extend
         assertAttributeEquals(Double.valueOf(+180), LONGITUDE.MAXIMUM);
         assertAttributeEquals((Double) null,        LATITUDE .RESOLUTION);
         assertAttributeEquals((Double) null,        LONGITUDE.RESOLUTION);
+        assertAttributeEquals(Double.valueOf(1),    "version"); // Specific to the NCEP file.
     }
 
     /**

Added: sis/branches/JDK7/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/ChannelDecoderTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/ChannelDecoderTest.java?rev=1483126&view=auto
==============================================================================
--- sis/branches/JDK7/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/ChannelDecoderTest.java (added)
+++ sis/branches/JDK7/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/ChannelDecoderTest.java [UTF-8] Wed May 15 23:44:27 2013
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.internal.netcdf.impl;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.channels.Channels;
+import org.opengis.wrapper.netcdf.IOTestCase;
+import org.apache.sis.internal.netcdf.Decoder;
+import org.apache.sis.internal.netcdf.DecoderTest;
+import org.apache.sis.storage.DataStoreException;
+import org.apache.sis.test.DependsOn;
+
+import static org.junit.Assert.*;
+
+
+/**
+ * Tests the {@link ChannelDecoder} implementation. This test shall be executed only if the
+ * {@link ChannelDecoder} tests, which use the UCAR library has a reference implementation,
+ * passed.
+ *
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.3
+ * @version 0.3
+ * @module
+ */
+@DependsOn(DecoderTest.class)
+public final strictfp class ChannelDecoderTest extends DecoderTest {
+    /**
+     * Creates a new decoder of the given name.
+     */
+    @Override
+    protected Decoder createDecoder(final String name) throws IOException {
+        final InputStream in = IOTestCase.class.getResourceAsStream(name);
+        assertNotNull(name, in);
+        try {
+            return new ChannelDecoder(null, name, Channels.newChannel(in));
+        } catch (DataStoreException e) {
+            throw new AssertionError(e);
+        }
+    }
+
+    @Override
+    public void testStringValue() {
+        // Disabled for now
+    }
+
+    @Override
+    public void testDateValue() {
+        // Disabled for now
+    }
+}

Propchange: sis/branches/JDK7/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/ChannelDecoderTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK7/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/ChannelDecoderTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8

Modified: sis/branches/JDK7/storage/sis-netcdf/src/test/java/org/apache/sis/test/suite/NetcdfTestSuite.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-netcdf/src/test/java/org/apache/sis/test/suite/NetcdfTestSuite.java?rev=1483126&r1=1483125&r2=1483126&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-netcdf/src/test/java/org/apache/sis/test/suite/NetcdfTestSuite.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-netcdf/src/test/java/org/apache/sis/test/suite/NetcdfTestSuite.java [UTF-8] Wed May 15 23:44:27 2013
@@ -31,7 +31,8 @@ import org.junit.BeforeClass;
  * @module
  */
 @Suite.SuiteClasses({
-    org.apache.sis.internal.netcdf.DecoderTest.class
+    org.apache.sis.internal.netcdf.DecoderTest.class,
+    org.apache.sis.internal.netcdf.impl.ChannelDecoderTest.class
 })
 public final strictfp class NetcdfTestSuite extends TestSuite {
     /**



Mime
View raw message