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 2017/12/09 10:57:47 UTC
svn commit: r1817597 [19/19] - in /sis/branches/ISO-19115-3: ./ application/
application/sis-console/ application/sis-console/src/main/artifact/
application/sis-console/src/main/artifact/lib/
application/sis-console/src/main/artifact/lib/darwin/ applic...
Modified: sis/branches/ISO-19115-3/storage/sis-storage/src/test/java/org/apache/sis/storage/StorageConnectorTest.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/storage/sis-storage/src/test/java/org/apache/sis/storage/StorageConnectorTest.java?rev=1817597&r1=1817596&r2=1817597&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/storage/sis-storage/src/test/java/org/apache/sis/storage/StorageConnectorTest.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/storage/sis-storage/src/test/java/org/apache/sis/storage/StorageConnectorTest.java [UTF-8] Sat Dec 9 10:57:44 2017
@@ -16,16 +16,19 @@
*/
package org.apache.sis.storage;
+import java.net.URI;
import java.io.DataInput;
import java.io.InputStream;
import java.io.Reader;
import java.io.IOException;
import java.nio.ByteBuffer;
+import java.nio.charset.StandardCharsets;
import java.nio.channels.ReadableByteChannel;
-import javax.imageio.ImageIO;
import javax.imageio.stream.ImageInputStream;
+import javax.imageio.ImageIO;
import java.sql.Connection;
import org.apache.sis.setup.OptionKey;
+import org.apache.sis.util.UnconvertibleObjectException;
import org.apache.sis.internal.storage.io.ChannelDataInput;
import org.apache.sis.internal.storage.io.ChannelImageInputStream;
import org.apache.sis.internal.storage.io.InputStreamAdapter;
@@ -34,7 +37,7 @@ import org.apache.sis.test.DependsOn;
import org.apache.sis.test.TestCase;
import org.junit.Test;
-import static org.junit.Assume.*;
+import static org.junit.Assume.assumeTrue;
import static org.opengis.test.Assert.*;
@@ -46,24 +49,33 @@ import static org.opengis.test.Assert.*;
* @since 0.3
* @module
*/
-@SuppressWarnings("OverlyStrongTypeCast")
@DependsOn(org.apache.sis.internal.storage.io.ChannelImageInputStreamTest.class)
public final strictfp class StorageConnectorTest extends TestCase {
/**
- * The magic number of Java class files, used for verifying the content of our test file.
+ * Name of the test file, in the same directory than this {@code StorageConnectorTest} file.
+ */
+ private static final String FILENAME = "Any.txt";
+
+ /**
+ * Beginning of the first sentence in {@value #FILENAME}.
*/
- private static final int MAGIC_NUMBER = 0xCAFEBABE;
+ private static final String FIRST_SENTENCE = "The purpose of this file";
/**
- * Creates the instance to test. This method uses the {@code StorageConnectorTest} compiled
- * class file as the resource to test. The resource can be provided either as a URL or as a stream.
+ * The 4 first characters of {@link #FIRST_SENTENCE}, encoded as an integer.
+ */
+ private static final int MAGIC_NUMBER = ('T' << 24) | ('h' << 16) | ('e' << 8) | ' ';
+
+ /**
+ * Creates the instance to test. This method uses the {@code "test.txt"} ASCII file as
+ * the resource to test. The resource can be provided either as a URL or as a stream.
*/
private static StorageConnector create(final boolean asStream) {
final Class<?> c = StorageConnectorTest.class;
- final String name = c.getSimpleName() + ".class";
- final Object storage = asStream ? c.getResourceAsStream(name) : c.getResource(name);
+ final Object storage = asStream ? c.getResourceAsStream(FILENAME) : c.getResource(FILENAME);
assertNotNull(storage);
final StorageConnector connector = new StorageConnector(storage);
+ connector.setOption(OptionKey.ENCODING, StandardCharsets.US_ASCII);
connector.setOption(OptionKey.URL_ENCODING, "UTF-8");
return connector;
}
@@ -74,7 +86,7 @@ public final strictfp class StorageConne
@Test
public void testGetStorageName() {
final StorageConnector c = create(false);
- assertEquals("StorageConnectorTest.class", c.getStorageName());
+ assertEquals(FILENAME, c.getStorageName());
}
/**
@@ -83,7 +95,7 @@ public final strictfp class StorageConne
@Test
public void testGetExtension() {
final StorageConnector c = create(false);
- assertEquals("class", c.getFileExtension());
+ assertEquals("txt", c.getFileExtension());
}
/**
@@ -95,7 +107,7 @@ public final strictfp class StorageConne
@Test
public void testGetAsString() throws DataStoreException, IOException {
final StorageConnector c = create(false);
- assertTrue(c.getStorageAs(String.class).endsWith("org/apache/sis/storage/StorageConnectorTest.class"));
+ assertTrue(c.getStorageAs(String.class).endsWith("org/apache/sis/storage/" + FILENAME));
}
/**
@@ -129,7 +141,7 @@ public final strictfp class StorageConne
final StorageConnector connection = create(asStream);
final DataInput input = connection.getStorageAs(DataInput.class);
assertSame("Value shall be cached.", input, connection.getStorageAs(DataInput.class));
- assertInstanceOf("Needs the SIS implementation", ChannelImageInputStream.class, input);
+ assertInstanceOf("Needs the SIS implementation.", ChannelImageInputStream.class, input);
assertSame("Instance shall be shared.", input, connection.getStorageAs(ChannelDataInput.class));
/*
* Reads a single integer for checking that the stream is at the right position, then close the stream.
@@ -137,7 +149,7 @@ public final strictfp class StorageConne
*/
final ReadableByteChannel channel = ((ChannelImageInputStream) input).channel;
assertTrue("channel.isOpen()", channel.isOpen());
- assertEquals(MAGIC_NUMBER, input.readInt());
+ assertEquals("First 4 bytes", MAGIC_NUMBER, input.readInt());
connection.closeAllExcept(null);
assertFalse("channel.isOpen()", channel.isOpen());
}
@@ -150,6 +162,7 @@ public final strictfp class StorageConne
* @throws IOException if an error occurred while reading the test file.
*/
@Test
+ @DependsOnMethod("testGetAsDataInputFromURL")
public void testGetAsImageInputStream() throws DataStoreException, IOException {
final StorageConnector connection = create(false);
final ImageInputStream in = connection.getStorageAs(ImageInputStream.class);
@@ -206,9 +219,9 @@ public final strictfp class StorageConne
final InputStream in = connection.getStorageAs(InputStream.class);
assertNotSame(connection.getStorage(), in);
assertSame("Expected cached value.", in, connection.getStorageAs(InputStream.class));
- assertInstanceOf("Expected Channel backend", InputStreamAdapter.class, in);
+ assertInstanceOf("Expected Channel backend.", InputStreamAdapter.class, in);
final ImageInputStream input = ((InputStreamAdapter) in).input;
- assertInstanceOf("Expected Channel backend", ChannelImageInputStream.class, input);
+ assertInstanceOf("Expected Channel backend.", ChannelImageInputStream.class, input);
assertSame(input, connection.getStorageAs(DataInput.class));
assertSame(input, connection.getStorageAs(ImageInputStream.class));
@@ -225,11 +238,34 @@ public final strictfp class StorageConne
* @throws IOException if an error occurred while reading the test file.
*/
@Test
- @DependsOnMethod("testGetAsInputStream")
+ @DependsOnMethod({"testGetAsInputStream", "testGetAsDataInputFromStream"})
public void testGetAsReader() throws DataStoreException, IOException {
final StorageConnector connection = create(true);
final Reader in = connection.getStorageAs(Reader.class);
+ final char[] expected = FIRST_SENTENCE.toCharArray();
+ final char[] actual = new char[expected.length];
+ in.mark(1000);
+ assertEquals("Number of characters read.", expected.length, in.read(actual));
+ assertArrayEquals("First sentence.", expected, actual);
assertSame("Expected cached value.", in, connection.getStorageAs(Reader.class));
+ in.reset();
+ /*
+ * Open as an ImageInputStream and verify that reading starts from the beginning.
+ * This operation should force StorageConnector to discard the previous Reader.
+ */
+ final ImageInputStream im = connection.getStorageAs(ImageInputStream.class);
+ assertInstanceOf("Needs the SIS implementation.", ChannelImageInputStream.class, im);
+ im.mark();
+ assertEquals("First 4 bytes", MAGIC_NUMBER, im.readInt());
+ im.reset();
+ /*
+ * Get a reader again. It should be a new one, in order to read from the beginning again.
+ */
+ final Reader in2 = connection.getStorageAs(Reader.class);
+ assertNotSame("Expected a new Reader instance.", in, in2);
+ assertEquals("Number of characters read.", expected.length, in.read(actual));
+ assertArrayEquals("First sentence.", expected, actual);
+ assertSame("Expected cached value.", in2, connection.getStorageAs(Reader.class));
connection.closeAllExcept(null);
}
@@ -315,6 +351,28 @@ public final strictfp class StorageConne
connection.closeAllExcept(null);
}
+ /**
+ * Verifies that {@link StorageConnector#getStorageAs(Class)} returns {@code null} for unavailable
+ * target classes, and throws an exception for illegal target classes.
+ *
+ * @throws DataStoreException if an error occurred while using the storage connector.
+ */
+ @Test
+ public void testGetInvalidObject() throws DataStoreException {
+ final StorageConnector connection = create(true);
+ assertNotNull("getStorageAs(InputStream.class)", connection.getStorageAs(InputStream.class));
+ assertNull ("getStorageAs(URI.class)", connection.getStorageAs(URI.class));
+ assertNull ("getStorageAs(String.class)", connection.getStorageAs(String.class));
+ try {
+ connection.getStorageAs(Float.class); // Any unconvertible type.
+ fail("Should not have accepted Float.class");
+ } catch (UnconvertibleObjectException e) {
+ final String message = e.getMessage();
+ assertTrue(message, message.contains("Float"));
+ }
+ connection.closeAllExcept(null);
+ }
+
/**
* Tests the {@link StorageConnector#closeAllExcept(Object)} method.
*
Modified: sis/branches/ISO-19115-3/storage/sis-storage/src/test/java/org/apache/sis/test/suite/StorageTestSuite.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/storage/sis-storage/src/test/java/org/apache/sis/test/suite/StorageTestSuite.java?rev=1817597&r1=1817596&r2=1817597&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/storage/sis-storage/src/test/java/org/apache/sis/test/suite/StorageTestSuite.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/storage/sis-storage/src/test/java/org/apache/sis/test/suite/StorageTestSuite.java [UTF-8] Sat Dec 9 10:57:44 2017
@@ -37,6 +37,7 @@ import org.junit.BeforeClass;
org.apache.sis.internal.storage.io.ChannelImageInputStreamTest.class,
org.apache.sis.internal.storage.io.ChannelImageOutputStreamTest.class,
org.apache.sis.internal.storage.io.HyperRectangleReaderTest.class,
+ org.apache.sis.internal.storage.io.RewindableLineReaderTest.class,
org.apache.sis.internal.storage.MetadataBuilderTest.class,
org.apache.sis.storage.FeatureNamingTest.class,
org.apache.sis.storage.ProbeResultTest.class,
@@ -48,6 +49,7 @@ import org.junit.BeforeClass;
org.apache.sis.internal.storage.wkt.StoreTest.class,
org.apache.sis.internal.storage.csv.StoreProviderTest.class,
org.apache.sis.internal.storage.csv.StoreTest.class,
+ org.apache.sis.internal.storage.folder.StoreTest.class,
org.apache.sis.storage.DataStoresTest.class
})
public final strictfp class StorageTestSuite extends TestSuite {
Modified: sis/branches/ISO-19115-3/storage/sis-xmlstore/pom.xml
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/storage/sis-xmlstore/pom.xml?rev=1817597&r1=1817596&r2=1817597&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/storage/sis-xmlstore/pom.xml (original)
+++ sis/branches/ISO-19115-3/storage/sis-xmlstore/pom.xml Sat Dec 9 10:57:44 2017
@@ -28,7 +28,7 @@
<parent>
<groupId>org.apache.sis</groupId>
<artifactId>storage</artifactId>
- <version>0.8-jdk8-SNAPSHOT</version>
+ <version>1.0-jdk8-SNAPSHOT</version>
</parent>
Modified: sis/branches/ISO-19115-3/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Link.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Link.java?rev=1817597&r1=1817596&r2=1817597&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Link.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Link.java [UTF-8] Sat Dec 9 10:57:44 2017
@@ -116,7 +116,7 @@ public final class Link implements Onlin
* </link>
* }
*
- * If we fail to convert the text to an URI, we will leave the object state as-is.
+ * If we fail to convert the text to a URI, we will leave the object state as-is.
*/
final void afterUnmarshal(Unmarshaller um, Object parent) {
if (uri == null && text != null) {
Modified: sis/branches/ISO-19115-3/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Person.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Person.java?rev=1817597&r1=1817596&r2=1817597&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Person.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Person.java [UTF-8] Sat Dec 9 10:57:44 2017
@@ -400,7 +400,7 @@ public final class Person implements Res
/**
* Returns a string representation of this person statement.
- * The statement is formatted in a way similar to the email address in client softwares.
+ * The statement is formatted in a way similar to the email address in client software applications.
* Example:
*
* <blockquote>
Modified: sis/branches/ISO-19115-3/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Store.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Store.java?rev=1817597&r1=1817596&r2=1817597&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Store.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Store.java [UTF-8] Sat Dec 9 10:57:44 2017
@@ -19,15 +19,17 @@ package org.apache.sis.internal.storage.
import java.net.URISyntaxException;
import org.opengis.util.NameFactory;
import org.opengis.util.FactoryException;
+import org.opengis.geometry.Envelope;
import org.opengis.metadata.Metadata;
import org.opengis.metadata.distribution.Format;
-import org.apache.sis.storage.Resource;
+import org.apache.sis.storage.FeatureSet;
import org.apache.sis.storage.StorageConnector;
import org.apache.sis.storage.DataStoreException;
import org.apache.sis.storage.DataStoreContentException;
import org.apache.sis.storage.ConcurrentReadException;
import org.apache.sis.storage.IllegalNameException;
import org.apache.sis.internal.system.DefaultFactories;
+import org.apache.sis.internal.storage.AbstractResource;
import org.apache.sis.internal.storage.xml.stream.StaxDataStore;
import org.apache.sis.util.collection.BackingStoreException;
import org.apache.sis.util.ArgumentChecks;
@@ -56,7 +58,7 @@ import org.opengis.feature.FeatureType;
* @since 0.8
* @module
*/
-public final class Store extends StaxDataStore {
+public final class Store extends StaxDataStore implements FeatureSet {
/**
* Version of the GPX file, or {@code null} if unknown.
*/
@@ -168,13 +170,24 @@ public final class Store extends StaxDat
}
/**
- * Returns the {@code FeatureSet} from which all features in this data store can be accessed.
+ * Returns the spatio-temporal envelope of this resource.
*
- * @return the starting point of all features in this data store.
+ * @return the spatio-temporal resource extent.
+ * @throws DataStoreException if an error occurred while reading or computing the envelope.
*/
@Override
- public Resource getRootResource() {
- return new FeatureAccess(this, listeners);
+ public Envelope getEnvelope() throws DataStoreException {
+ return AbstractResource.envelope(getMetadata());
+ }
+
+ /**
+ * Returns the base type of all GPX types.
+ *
+ * @return base type of all GPX types.
+ */
+ @Override
+ public FeatureType getType() {
+ return types.parent;
}
/**
@@ -196,10 +209,12 @@ public final class Store extends StaxDat
/**
* Returns the stream of features.
*
+ * @param parallel ignored in current implementation.
* @return a stream over all features in the XML file.
* @throws DataStoreException if an error occurred while creating the feature stream.
*/
- final synchronized Stream<Feature> features() throws DataStoreException {
+ @Override
+ public final synchronized Stream<Feature> features(boolean parallel) throws DataStoreException {
Reader r = reader;
reader = null;
if (r == null) try {
Modified: sis/branches/ISO-19115-3/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/StaxDataStore.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/StaxDataStore.java?rev=1817597&r1=1817596&r2=1817597&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/StaxDataStore.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/StaxDataStore.java [UTF-8] Sat Dec 9 10:57:44 2017
@@ -38,6 +38,7 @@ import org.apache.sis.setup.OptionKey;
import org.apache.sis.storage.DataStore;
import org.apache.sis.storage.StorageConnector;
import org.apache.sis.storage.DataStoreException;
+import org.apache.sis.internal.storage.URIDataStore;
import org.apache.sis.internal.storage.io.ChannelFactory;
import org.apache.sis.internal.storage.io.IOUtilities;
import org.apache.sis.internal.storage.io.Markable;
@@ -64,7 +65,7 @@ import org.apache.sis.util.Debug;
* @since 0.8
* @module
*/
-public abstract class StaxDataStore extends DataStore {
+public abstract class StaxDataStore extends URIDataStore {
/**
* The locale to use for locale-sensitive data (<strong>not</strong> for logging or warning messages),
* or {@code null} if unspecified.
@@ -124,9 +125,9 @@ public abstract class StaxDataStore exte
* <p>We keep this reference as long as possible in order to use {@link #mark()} and {@link #reset()}
* instead than creating new streams for re-reading the data. If we can not reset the stream but can
* create a new one, then this field will become a reference to the new stream. This change should be
- * done only in last resort, when there is no way to reuse the existing stream. This is because the
- * streams created by {@link ChannelFactory#inputStream(String)} are not of the same kind than the
- * streams created by {@link StorageConnector}.</p>
+ * done only in last resort, when there is no way to reuse the existing stream. This is because the
+ * streams created by {@link ChannelFactory#inputStream(String, WarningListeners)} are not of the same
+ * kind than the streams created by {@link StorageConnector}.</p>
*
* @see #close()
*/
@@ -372,8 +373,11 @@ public abstract class StaxDataStore exte
/**
* Returns the factory that created this {@code DataStore} instance, or {@code null} if unspecified.
+ *
+ * @return the factory that created this {@code DataStore} instance, or {@code null} if unspecified.
*/
- final StaxDataStoreProvider getProvider() {
+ @Override
+ public final StaxDataStoreProvider getProvider() {
return (StaxDataStoreProvider) provider;
}
@@ -469,7 +473,7 @@ public abstract class StaxDataStore exte
if (channelFactory == null) {
throw new ForwardOnlyStorageException(getLocale(), name, StandardOpenOption.READ);
}
- inputOrFile = input = channelFactory.inputStream(name);
+ inputOrFile = input = channelFactory.inputStream(name, listeners);
type = InputType.STREAM;
if (stream == null) {
stream = input;
Modified: sis/branches/ISO-19115-3/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/StaxStreamReader.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/StaxStreamReader.java?rev=1817597&r1=1817596&r2=1817597&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/StaxStreamReader.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/StaxStreamReader.java [UTF-8] Sat Dec 9 10:57:44 2017
@@ -332,12 +332,12 @@ public abstract class StaxStreamReader e
}
/**
- * Returns the current value of {@link XMLStreamReader#getElementText()} as an URI,
+ * Returns the current value of {@link XMLStreamReader#getElementText()} as a URI,
* or {@code null} if that value is null or empty.
*
- * @return the current text element as an URI, or {@code null} if empty.
+ * @return the current text element as a URI, or {@code null} if empty.
* @throws XMLStreamException if a text element can not be returned.
- * @throws URISyntaxException if the text can not be parsed as an URI.
+ * @throws URISyntaxException if the text can not be parsed as a URI.
*/
protected final URI getElementAsURI() throws XMLStreamException, URISyntaxException {
final Context context = Context.current();
Modified: sis/branches/ISO-19115-3/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/storage/gpx/ReaderTest.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/storage/gpx/ReaderTest.java?rev=1817597&r1=1817596&r2=1817597&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/storage/gpx/ReaderTest.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/storage/gpx/ReaderTest.java [UTF-8] Sat Dec 9 10:57:44 2017
@@ -224,7 +224,7 @@ public final strictfp class ReaderTest e
try (Store reader = create("1.0/waypoint.xml")) {
verifyAlmostEmptyMetadata((Metadata) reader.getMetadata());
assertEquals("version", StoreProvider.V1_0, reader.getVersion());
- try (Stream<Feature> features = reader.features()) {
+ try (Stream<Feature> features = reader.features(false)) {
final Iterator<Feature> it = features.iterator();
verifyPoint(it.next(), 0, false);
verifyPoint(it.next(), 1, false);
@@ -245,7 +245,7 @@ public final strictfp class ReaderTest e
try (Store reader = create("1.1/waypoint.xml")) {
verifyAlmostEmptyMetadata((Metadata) reader.getMetadata());
assertEquals("version", StoreProvider.V1_1, reader.getVersion());
- try (Stream<Feature> features = reader.features()) {
+ try (Stream<Feature> features = reader.features(false)) {
final Iterator<Feature> it = features.iterator();
verifyPoint(it.next(), 0, true);
verifyPoint(it.next(), 1, true);
@@ -266,7 +266,7 @@ public final strictfp class ReaderTest e
try (Store reader = create("1.0/route.xml")) {
verifyAlmostEmptyMetadata((Metadata) reader.getMetadata());
assertEquals("version", StoreProvider.V1_0, reader.getVersion());
- try (Stream<Feature> features = reader.features()) {
+ try (Stream<Feature> features = reader.features(false)) {
final Iterator<Feature> it = features.iterator();
verifyRoute(it.next(), false, 1);
verifyEmpty(it.next(), "rtept");
@@ -295,7 +295,7 @@ public final strictfp class ReaderTest e
* This verification is shared by {@link #testRoute110()} and {@link #testSequentialReads()}.
*/
static void verifyRoute110(final Store reader) throws DataStoreException {
- try (Stream<Feature> features = reader.features()) {
+ try (Stream<Feature> features = reader.features(false)) {
final Iterator<Feature> it = features.iterator();
verifyRoute(it.next(), true, 3);
verifyEmpty(it.next(), "rtept");
@@ -373,7 +373,7 @@ public final strictfp class ReaderTest e
try (Store reader = create("1.0/track.xml")) {
verifyAlmostEmptyMetadata((Metadata) reader.getMetadata());
assertEquals("version", StoreProvider.V1_0, reader.getVersion());
- try (Stream<Feature> features = reader.features()) {
+ try (Stream<Feature> features = reader.features(false)) {
final Iterator<Feature> it = features.iterator();
verifyTrack(it.next(), false, 1);
verifyEmpty(it.next(), "trkseg");
@@ -393,7 +393,7 @@ public final strictfp class ReaderTest e
try (Store reader = create("1.1/track.xml")) {
verifyAlmostEmptyMetadata((Metadata) reader.getMetadata());
assertEquals("version", StoreProvider.V1_1, reader.getVersion());
- try (Stream<Feature> features = reader.features()) {
+ try (Stream<Feature> features = reader.features(false)) {
final Iterator<Feature> it = features.iterator();
verifyTrack(it.next(), true, 3);
verifyEmpty(it.next(), "trkseg");
@@ -610,13 +610,13 @@ public final strictfp class ReaderTest e
@DependsOnMethod("testSequentialReads")
public void testConcurrentReads() throws DataStoreException {
try (Store reader = createFromURL()) {
- final Stream<Feature> f1 = reader.features();
+ final Stream<Feature> f1 = reader.features(false);
final Iterator<Feature> i1 = f1.iterator();
verifyRoute(i1.next(), true, 3);
- final Stream<Feature> f2 = reader.features();
+ final Stream<Feature> f2 = reader.features(false);
final Iterator<Feature> i2 = f2.iterator();
verifyEmpty(i1.next(), "rtept");
- final Stream<Feature> f3 = reader.features();
+ final Stream<Feature> f3 = reader.features(false);
final Iterator<Feature> i3 = f3.iterator();
verifyRoute(i2.next(), true, 3);
verifyRoute(i3.next(), true, 3);