You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2014/01/02 07:05:01 UTC
svn commit: r1554741 [4/4] - in /sis/branches/JDK6: ./
core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/
core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/
core/sis-metadata/src/main/java/org/apache/sis/metadata/ core/si...
Modified: sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/test/mock/IdentifiedObjectMock.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/test/mock/IdentifiedObjectMock.java?rev=1554741&r1=1554740&r2=1554741&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/test/mock/IdentifiedObjectMock.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/test/mock/IdentifiedObjectMock.java [UTF-8] Thu Jan 2 06:04:58 2014
@@ -74,7 +74,7 @@ public strictfp class IdentifiedObjectMo
/**
* Creates an identified object of the given name.
- * Callers are free to assign new value to the {@link #alias} field directly.
+ * Callers are free to assign new value to the {@link #alias} field directly.
*
* @param code The initial {@link #getCode()} value, or {@code null} if none.
*/
@@ -84,7 +84,7 @@ public strictfp class IdentifiedObjectMo
/**
* Creates an identified object of the given alias.
- * Callers are free to assign new value to the {@link #alias} field directly.
+ * Callers are free to assign new value to the {@link #alias} field directly.
*
* @param code The initial {@link #getCode()} value, or {@code null} if none.
* @param alias The initial {@link #alias} value, or {@code null} if none.
Modified: sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/test/mock/MetadataMock.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/test/mock/MetadataMock.java?rev=1554741&r1=1554740&r2=1554741&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/test/mock/MetadataMock.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/test/mock/MetadataMock.java [UTF-8] Thu Jan 2 06:04:58 2014
@@ -68,7 +68,7 @@ public final strictfp class MetadataMock
/**
* Creates an initially empty metadata with the given language.
- * Callers are free to assign new value to the {@link #language} field directly.
+ * Callers are free to assign new value to the {@link #language} field directly.
*
* @param language The initial {@link #language} value (can be {@code null}).
*/
Modified: sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/util/CharactersTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/util/CharactersTest.java?rev=1554741&r1=1554740&r2=1554741&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/util/CharactersTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/util/CharactersTest.java [UTF-8] Thu Jan 2 06:04:58 2014
@@ -118,8 +118,8 @@ public final strictfp class CharactersTe
}
/**
- * Scans the full {@code char} range in order to check for
- * {@link org.apache.sis.util.Characters.Filter} consistency.
+ * Scans the full {@code char} range in order to check for
+ * {@link org.apache.sis.util.Characters.Filter} consistency.
*/
@Test
public void scanCharacterRange() {
Modified: sis/branches/JDK6/profiles/sis-french-profile/src/test/java/org/apache/sis/internal/profile/fra/DirectReferenceSystemTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/profiles/sis-french-profile/src/test/java/org/apache/sis/internal/profile/fra/DirectReferenceSystemTest.java?rev=1554741&r1=1554740&r2=1554741&view=diff
==============================================================================
--- sis/branches/JDK6/profiles/sis-french-profile/src/test/java/org/apache/sis/internal/profile/fra/DirectReferenceSystemTest.java [UTF-8] (original)
+++ sis/branches/JDK6/profiles/sis-french-profile/src/test/java/org/apache/sis/internal/profile/fra/DirectReferenceSystemTest.java [UTF-8] Thu Jan 2 06:04:58 2014
@@ -17,16 +17,13 @@
package org.apache.sis.internal.profile.fra;
import java.util.Arrays;
-import java.io.IOException;
-import java.io.InputStream;
import javax.xml.bind.JAXBException;
-import org.apache.sis.xml.XML;
import org.apache.sis.metadata.iso.DefaultMetadata;
import org.apache.sis.metadata.iso.ImmutableIdentifier;
import org.apache.sis.metadata.iso.citation.DefaultCitation;
import org.apache.sis.metadata.iso.citation.HardCodedCitations;
import org.apache.sis.util.ComparisonMode;
-import org.apache.sis.test.TestCase;
+import org.apache.sis.test.XMLTestCase;
import org.junit.Test;
import static org.apache.sis.test.Assert.*;
@@ -42,11 +39,11 @@ import static org.apache.sis.test.TestUt
* @since 0.4
* @module
*/
-public final strictfp class DirectReferenceSystemTest extends TestCase {
+public final strictfp class DirectReferenceSystemTest extends XMLTestCase {
/**
- * An XML file representing a reference system tree.
+ * An XML file in this package containing a reference system definition.
*/
- private static final String RESOURCE_FILE = "DirectReferenceSystem.xml";
+ private static final String XML_FILE = "DirectReferenceSystem.xml";
/**
* Creates the metadata object to be tested.
@@ -63,13 +60,11 @@ public final strictfp class DirectRefere
* Ensures that the marshalling process of a {@link DefaultMetadata} produces
* an XML document which complies with the one expected.
*
- * @throws IOException if an error occurred while reading the resource file.
* @throws JAXBException if the marshalling process fails.
*/
@Test
- public void marshallingTest() throws IOException, JAXBException {
- final String actual = XML.marshal(createMetadata());
- assertXmlEquals(DirectReferenceSystemTest.class.getResource(RESOURCE_FILE), actual, "xmlns:*", "xsi:schemaLocation");
+ public void marshallingTest() throws JAXBException {
+ assertMarshalEqualsFile(XML_FILE, createMetadata(), "xmlns:*", "xsi:schemaLocation");
}
/**
@@ -77,18 +72,11 @@ public final strictfp class DirectRefere
* document produces an object containing all the information.
*
* @throws JAXBException if the unmarshalling process fails.
- * @throws IOException if an error occurred while reading the resource file.
*/
@Test
- public void unmarshallingTest() throws JAXBException, IOException {
- final DefaultMetadata result;
- final InputStream in = DirectReferenceSystemTest.class.getResourceAsStream(RESOURCE_FILE);
- try {
- result = (DefaultMetadata) XML.unmarshal(in);
- } finally {
- in.close();
- }
+ public void unmarshallingTest() throws JAXBException {
final DefaultMetadata expected = createMetadata();
+ final DefaultMetadata result = unmarshalFile(DefaultMetadata.class, XML_FILE);
/*
* Compare in debug mode before to perform the real comparison,
* for making easier to analyze the stack trace in case of failure.
Modified: sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/Attribute.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/Attribute.java?rev=1554741&r1=1554740&r2=1554741&view=diff
==============================================================================
--- sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/Attribute.java [UTF-8] (original)
+++ sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/Attribute.java [UTF-8] Thu Jan 2 06:04:58 2014
@@ -47,7 +47,7 @@ final class Attribute {
final String name;
/**
- * The value, either as a {@link String} or as an array of primitive type.
+ * The value, either as a {@link String} or as an array of primitive type.
* Never {@code null} and never an empty string or empty array.
*/
final Object value;
Modified: sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/ChannelDecoder.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/ChannelDecoder.java?rev=1554741&r1=1554740&r2=1554741&view=diff
==============================================================================
--- sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/ChannelDecoder.java [UTF-8] (original)
+++ sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/ChannelDecoder.java [UTF-8] Thu Jan 2 06:04:58 2014
@@ -567,7 +567,7 @@ public final class ChannelDecoder extend
}
/**
- * Returns the NetCDF attribute of the given name, or {@code null} if none.
+ * 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.
*
Modified: sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/VariableInfo.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/VariableInfo.java?rev=1554741&r1=1554740&r2=1554741&view=diff
==============================================================================
--- sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/VariableInfo.java [UTF-8] (original)
+++ sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/VariableInfo.java [UTF-8] Thu Jan 2 06:04:58 2014
@@ -172,7 +172,7 @@ final class VariableInfo extends Variabl
/**
* Returns the type of data as a Java primitive type if possible,
- * or {@code null} if the data type is unknown to this method.
+ * or {@code null} if the data type is unknown to this method.
*/
@Override
public Class<?> getDataType() {
Modified: sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/DecoderWrapper.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/DecoderWrapper.java?rev=1554741&r1=1554740&r2=1554741&view=diff
==============================================================================
--- sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/DecoderWrapper.java [UTF-8] (original)
+++ sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/DecoderWrapper.java [UTF-8] Thu Jan 2 06:04:58 2014
@@ -146,7 +146,7 @@ public final class DecoderWrapper extend
}
/**
- * Returns the NetCDF attribute of the given name in the given group, or {@code null} if none.
+ * Returns the NetCDF attribute of the given name in the given group, or {@code null} if none.
* This method is invoked for every global and group attributes to be read by this class (but
* not {@linkplain VariableSimpleIF variable} attributes), thus providing a single point where
* we can filter the attributes to be read - if we want to do that in a future version.
Modified: sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/AttributeNames.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/AttributeNames.java?rev=1554741&r1=1554740&r2=1554741&view=diff
==============================================================================
--- sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/AttributeNames.java [UTF-8] (original)
+++ sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/AttributeNames.java [UTF-8] Thu Jan 2 06:04:58 2014
@@ -441,7 +441,7 @@ public class AttributeNames {
public final String NAME;
/**
- * The attribute name for the responsible's institution, or {@code null} if none.
+ * The attribute name for the responsible's institution, or {@code null} if none.
* Possible value is {@code "institution"}.
*
* <p><b>Path in ISO 19115:</b> <ul><li>{@link ResponsibleParty} /
@@ -472,7 +472,7 @@ public class AttributeNames {
public final String EMAIL;
/**
- * The attribute name for the responsible's role, or {@code null} if none.
+ * The attribute name for the responsible's role, or {@code null} if none.
* Possible value is {@code "contributor_role"}.
*
* <p><b>Path in ISO 19115:</b> <ul><li>{@link ResponsibleParty} /
Modified: sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/MetadataReader.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/MetadataReader.java?rev=1554741&r1=1554740&r2=1554741&view=diff
==============================================================================
--- sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/MetadataReader.java [UTF-8] (original)
+++ sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/MetadataReader.java [UTF-8] Thu Jan 2 06:04:58 2014
@@ -107,7 +107,7 @@ import static org.apache.sis.storage.net
final class MetadataReader {
/**
* Names of groups where to search for metadata, in precedence order.
- * The {@code null} value stands for global attributes.
+ * The {@code null} value stands for global attributes.
*
* <p>REMINDER: if modified, update class javadoc too.</p>
*/
Modified: sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/package-info.java?rev=1554741&r1=1554740&r2=1554741&view=diff
==============================================================================
--- sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/package-info.java [UTF-8] (original)
+++ sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/package-info.java [UTF-8] Thu Jan 2 06:04:58 2014
@@ -26,7 +26,7 @@
* </ul>
*
* The NetCDF attributes recognized by this package are listed in the
- * {@link org.apache.sis.storage.netcdf.AttributeNames} class.
+ * {@link org.apache.sis.storage.netcdf.AttributeNames} class.
*
* @author Martin Desruisseaux (IRD, Geomatys)
* @since 0.3 (derived from geotk-3.20)
Modified: sis/branches/JDK6/storage/sis-storage/src/main/java/org/apache/sis/storage/StorageConnector.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/storage/sis-storage/src/main/java/org/apache/sis/storage/StorageConnector.java?rev=1554741&r1=1554740&r2=1554741&view=diff
==============================================================================
--- sis/branches/JDK6/storage/sis-storage/src/main/java/org/apache/sis/storage/StorageConnector.java [UTF-8] (original)
+++ sis/branches/JDK6/storage/sis-storage/src/main/java/org/apache/sis/storage/StorageConnector.java [UTF-8] Thu Jan 2 06:04:58 2014
@@ -419,7 +419,7 @@ public class StorageConnector implements
}
/**
- * Creates a view for the input as a {@link ChannelDataInput} if possible.
+ * Creates a view for the input as a {@link ChannelDataInput} if possible.
* If the view can not be created, remember that fact in order to avoid new attempts.
*
* @param asImageInputStream If the {@code ChannelDataInput} needs to be {@link ChannelImageInputStream} subclass.
@@ -449,7 +449,7 @@ public class StorageConnector implements
}
/**
- * Creates a view for the input as a {@link DataInput} if possible. This method performs the choice
+ * Creates a view for the input as a {@link DataInput} if possible. This method performs the choice
* documented in the {@link #getStorageAs(Class)} method for the {@code DataInput} case. Opening the
* data input may imply creating a {@link ByteBuffer}, in which case the buffer will be stored under
* the {@code ByteBuffer.class} key together with the {@code DataInput.class} case.
@@ -645,7 +645,7 @@ public class StorageConnector implements
/**
* Adds the given view in the cache.
*
- * @param <T> The compile-time type of the {@code type} argument.
+ * @param <T> The compile-time type of the {@code type} argument.
* @param type The view type.
* @param view The view, or {@code null} if none.
*/
@@ -658,7 +658,7 @@ public class StorageConnector implements
/**
* Returns the view for the given type from the cache.
*
- * @param <T> The compile-time type of the {@code type} argument.
+ * @param <T> The compile-time type of the {@code type} argument.
* @param type The view type.
* @return The view, or {@code null} if none.
*/
@@ -787,7 +787,7 @@ public class StorageConnector implements
}
/**
- * Returns a string representation of this {@code StorageConnector} for debugging purpose.
+ * Returns a string representation of this {@code StorageConnector} for debugging purpose.
*/
@Debug
@Override
Modified: sis/branches/JDK6/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/ChannelDataInputTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/ChannelDataInputTest.java?rev=1554741&r1=1554740&r2=1554741&view=diff
==============================================================================
--- sis/branches/JDK6/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/ChannelDataInputTest.java [UTF-8] (original)
+++ sis/branches/JDK6/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/ChannelDataInputTest.java [UTF-8] Thu Jan 2 06:04:58 2014
@@ -31,7 +31,7 @@ import static org.junit.Assert.*;
/**
* Tests {@link ChannelDataInput}. First, a buffer is filled with random data. Then, a view over a portion
- * of that buffer is used for the tests, while the original full buffer is used for comparison purpose.
+ * of that buffer is used for the tests, while the original full buffer is used for comparison purpose.
*
* @author Martin Desruisseaux (Geomatys)
* @since 0.3 (derived from geotk-3.07)
Modified: sis/branches/JDK6/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/ChannelImageInputStreamTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/ChannelImageInputStreamTest.java?rev=1554741&r1=1554740&r2=1554741&view=diff
==============================================================================
--- sis/branches/JDK6/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/ChannelImageInputStreamTest.java [UTF-8] (original)
+++ sis/branches/JDK6/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/ChannelImageInputStreamTest.java [UTF-8] Thu Jan 2 06:04:58 2014
@@ -35,7 +35,7 @@ import static org.junit.Assert.*;
/**
* Tests {@link ChannelImageInputStream}. A buffer is filled with random data
- * and a standard {@link ImageInputStream} is used for comparison purpose.
+ * and a standard {@link ImageInputStream} is used for comparison purpose.
*
* @author Martin Desruisseaux (Geomatys)
* @since 0.3 (derived from geotk-3.07)