sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1776099 - in /sis/branches/JDK8/storage/sis-xmlstore/src: main/java/org/apache/sis/internal/gpx/ main/java/org/apache/sis/internal/xml/ test/java/org/apache/sis/internal/gpx/
Date Tue, 27 Dec 2016 09:19:07 GMT
Author: desruisseaux
Date: Tue Dec 27 09:19:07 2016
New Revision: 1776099

URL: http://svn.apache.org/viewvc?rev=1776099&view=rev
Log:
Class renaming: GPX prefix is implicit with the package name.

Added:
    sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/Reader.java
      - copied, changed from r1776098, sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/GPXReader.java
    sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/Store.java
      - copied, changed from r1776098, sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/GPXStore.java
    sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/Writer.java
      - copied, changed from r1776098, sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/GPXWriter.java
    sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/gpx/ReaderTest.java
      - copied, changed from r1776098, sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/gpx/GPXReaderTest.java
    sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/gpx/WriterTest.java
      - copied, changed from r1776098, sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/gpx/GPXWriterTest.java
Removed:
    sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/GPXReader.java
    sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/GPXStore.java
    sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/GPXWriter.java
    sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/gpx/GPXReaderTest.java
    sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/gpx/GPXWriterTest.java
Modified:
    sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/StoreProvider.java
    sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/Types.java
    sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/xml/StaxStreamWriter.java
    sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/gpx/GPXTestSuite.java

Copied: sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/Reader.java
(from r1776098, sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/GPXReader.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/Reader.java?p2=sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/Reader.java&p1=sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/GPXReader.java&r1=1776098&r2=1776099&rev=1776099&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/GPXReader.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/Reader.java
[UTF-8] Tue Dec 27 09:19:07 2016
@@ -60,10 +60,10 @@ import org.opengis.feature.Feature;
  * @version 0.8
  * @module
  */
-public class GPXReader extends StaxStreamReader {
+final class Reader extends StaxStreamReader {
     /**
      * The {@link org.opengis.feature.FeatureType} for routes, tracks, way points, <i>etc</i>.
-     * Currently always {@link Types#DEFAULT}, but we use a field for keeping {@code GPXReader}
+     * Currently always {@link Types#DEFAULT}, but we use a field for keeping {@code Reader}
      * ready to handle profiles or extensions.
      */
     private final Types types;
@@ -106,7 +106,7 @@ public class GPXReader extends StaxStrea
      * @throws XMLStreamException if an error occurred while opening the XML file.
      * @throws IOException if an error occurred while preparing the input stream.
      */
-    public GPXReader(final GPXStore owner) throws DataStoreException, XMLStreamException,
IOException {
+    public Reader(final Store owner) throws DataStoreException, XMLStreamException, IOException
{
         super(owner);
         types = Types.DEFAULT;
     }
@@ -159,7 +159,7 @@ public class GPXReader extends StaxStrea
          * Skip comments, characters, entity declarations, etc. until we find the root element.
          * If that root is anything other than <gpx>, we consider that this is not
a GPX file.
          */
-        moveToRootElement(GPXReader::isGPX, Tags.GPX);
+        moveToRootElement(Reader::isGPX, Tags.GPX);
         /*
          * If a version attribute is found on the <gpx> element, use that value for
detecting the GPX version.
          * If a version is specified, we require major.minor version 1.0 or 1.1 but accept
any bug-fix versions
@@ -170,16 +170,16 @@ public class GPXReader extends StaxStrea
         Version version = null;
         if (ver != null) {
             version = new Version(ver);
-            if (version.compareTo(GPXStore.V1_0, 2) < 0 ||
-                version.compareTo(GPXStore.V1_1, 2) > 0)
+            if (version.compareTo(Store.V1_0, 2) < 0 ||
+                version.compareTo(Store.V1_1, 2) > 0)
             {
                 throw new DataStoreContentException(errors().getString(
                         Errors.Keys.UnsupportedFormatVersion_2, owner.getFormatName(), version));
             }
         } else if (namespace != null) {
             switch (namespace) {
-                case Tags.NAMESPACE_V10: version = GPXStore.V1_0; break;
-                case Tags.NAMESPACE_V11: version = GPXStore.V1_1; break;
+                case Tags.NAMESPACE_V10: version = Store.V1_0; break;
+                case Tags.NAMESPACE_V11: version = Store.V1_1; break;
             }
         }
         /*

Copied: sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/Store.java
(from r1776098, sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/GPXStore.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/Store.java?p2=sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/Store.java&p1=sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/GPXStore.java&r1=1776098&r2=1776099&rev=1776099&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/GPXStore.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/Store.java
[UTF-8] Tue Dec 27 09:19:07 2016
@@ -45,7 +45,7 @@ import org.opengis.feature.Feature;
  * @version 0.8
  * @module
  */
-public class GPXStore extends StaxDataStore {
+public final class Store extends StaxDataStore {
     /**
      * The "1.0" version.
      */
@@ -76,7 +76,7 @@ public class GPXStore extends StaxDataSt
      * If a reader has been created for parsing the {@linkplain #metadata} and has not yet
been used
      * for iterating over the features, that reader. Otherwise {@code null}.
      */
-    private GPXReader reader;
+    private Reader reader;
 
     /**
      * Creates a new GPX store from the given file, URL or stream object.
@@ -87,7 +87,7 @@ public class GPXStore extends StaxDataSt
      * @param  connector  information about the storage (URL, stream, <i>etc</i>).
      * @throws DataStoreException if an error occurred while opening the GPX file.
      */
-    public GPXStore(final StoreProvider provider, final StorageConnector connector) throws
DataStoreException {
+    public Store(final StoreProvider provider, final StorageConnector connector) throws DataStoreException
{
         super(provider, connector);
     }
 
@@ -135,7 +135,7 @@ public class GPXStore extends StaxDataSt
     public synchronized Metadata getMetadata() throws DataStoreException {
         if (!initialized) try {
             initialized = true;
-            reader = new GPXReader(this);
+            reader = new Reader(this);
             version = reader.initialize(true);
             metadata = reader.getMetadata();
         } catch (XMLStreamException | IOException | JAXBException e) {
@@ -154,10 +154,10 @@ public class GPXStore extends StaxDataSt
      */
     @Override
     public synchronized Stream<Feature> getFeatures() throws DataStoreException {
-        GPXReader r = reader;
+        Reader r = reader;
         reader = null;
         if (r == null) try {
-            r = new GPXReader(this);
+            r = new Reader(this);
             version = r.initialize(false);
         } catch (XMLStreamException | IOException | JAXBException e) {
             throw new DataStoreException(e);
@@ -181,7 +181,7 @@ public class GPXStore extends StaxDataSt
             throws DataStoreException
     {
         // TODO: convert the metadata if needed.
-        try (final GPXWriter writer = new GPXWriter(this, (org.apache.sis.internal.gpx.Metadata)
metadata)) {
+        try (final Writer writer = new Writer(this, (org.apache.sis.internal.gpx.Metadata)
metadata)) {
             writer.writeStartDocument();
             if (features != null) {
                 features.forEachOrdered(writer);
@@ -208,7 +208,7 @@ public class GPXStore extends StaxDataSt
      */
     @Override
     public synchronized void close() throws DataStoreException {
-        final GPXReader r = reader;
+        final Reader r = reader;
         reader = null;
         if (r != null) try {
             r.close();

Modified: sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/StoreProvider.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/StoreProvider.java?rev=1776099&r1=1776098&r2=1776099&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/StoreProvider.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/StoreProvider.java
[UTF-8] Tue Dec 27 09:19:07 2016
@@ -35,7 +35,7 @@ import org.apache.sis.internal.xml.StaxD
  * @version 0.8
  * @module
  */
-public class StoreProvider extends StaxDataStoreProvider {
+public final class StoreProvider extends StaxDataStoreProvider {
     /**
      * Creates a new GPX store provider.
      */
@@ -59,7 +59,7 @@ public class StoreProvider extends StaxD
      */
     @Override
     public DataStore open(StorageConnector connector) throws DataStoreException {
-        return new GPXStore(this, connector);
+        return new Store(this, connector);
     }
 
     /**

Modified: sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/Types.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/Types.java?rev=1776099&r1=1776098&r2=1776099&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/Types.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/Types.java
[UTF-8] Tue Dec 27 09:19:07 2016
@@ -42,8 +42,8 @@ import org.opengis.feature.FeatureType;
 
 /**
  * Feature types that may appear in GPX files. All values defined in this class are immutable
and can be shared
- * by many {@link GPXReader} instances. There is usually only one {@code Types} instance
for a running JVM, but
- * we nevertheless allows definition of alternative {@code Types} with names created by different
factories.
+ * by many {@link Reader} instances. There is usually only one {@code Types} instance for
a running JVM, but we
+ * nevertheless allows definition of alternative {@code Types} with names created by different
factories.
  *
  * @author  Johann Sorel (Geomatys)
  * @since   0.8

Copied: sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/Writer.java
(from r1776098, sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/GPXWriter.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/Writer.java?p2=sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/Writer.java&p1=sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/GPXWriter.java&r1=1776098&r2=1776099&rev=1776099&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/GPXWriter.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/Writer.java
[UTF-8] Tue Dec 27 09:19:07 2016
@@ -40,10 +40,10 @@ import org.opengis.feature.FeatureType;
  * @version 0.8
  * @module
  */
-public class GPXWriter extends StaxStreamWriter {
+final class Writer extends StaxStreamWriter {
     /**
      * The {@link org.opengis.feature.FeatureType} for routes, tracks, way points, <i>etc</i>.
-     * Currently always {@link Types#DEFAULT}, but we use a field for keeping {@code GPXWriter}
+     * Currently always {@link Types#DEFAULT}, but we use a field for keeping {@code Writer}
      * ready to handle profiles or extensions.
      */
     private final Types types;
@@ -72,14 +72,14 @@ public class GPXWriter extends StaxStrea
      * @throws XMLStreamException if an error occurred while opening the XML file.
      * @throws IOException if an error occurred while preparing the output stream.
      */
-    public GPXWriter(final GPXStore owner, final Metadata metadata)
+    public Writer(final Store owner, final Metadata metadata)
             throws DataStoreException, XMLStreamException, IOException
     {
         super(owner);
         types = Types.DEFAULT;
         this.metadata = metadata;
         final Version ver = owner.version;
-        if (ver != null && ver.compareTo(GPXStore.V1_0, 2) <= 0) {
+        if (ver != null && ver.compareTo(Store.V1_0, 2) <= 0) {
             version   = 0;
             namespace = Tags.NAMESPACE_V10;
         } else {
@@ -102,8 +102,8 @@ public class GPXWriter extends StaxStrea
         final Version ver;
         switch (version) {
             default:
-            case 1: ver = GPXStore.V1_1; break;
-            case 0: ver = GPXStore.V1_0; break;
+            case 1: ver = Store.V1_1; break;
+            case 0: ver = Store.V1_0; break;
         }
         writer.writeAttribute(Attributes.VERSION, ver.toString());
         if (metadata != null) {

Modified: sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/xml/StaxStreamWriter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/xml/StaxStreamWriter.java?rev=1776099&r1=1776098&r2=1776099&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/xml/StaxStreamWriter.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/xml/StaxStreamWriter.java
[UTF-8] Tue Dec 27 09:19:07 2016
@@ -272,10 +272,10 @@ public abstract class StaxStreamWriter e
         final QName qn;
         XMLStreamWriter out = writer;
         if (defaultNamespace != null) {
-            out = new DefaultNamespaceStreamWriter(writer, defaultNamespace);
-            qn = new QName(defaultNamespace, name);
+            out = new DefaultNamespaceStreamWriter(out, defaultNamespace);
+            qn  = new QName(defaultNamespace, name);
         } else {
-            qn = new QName(name);
+            qn  = new QName(name);
         }
         marshaller = null;
         m.marshal(new JAXBElement<>(qn, type, object), out);

Modified: sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/gpx/GPXTestSuite.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/gpx/GPXTestSuite.java?rev=1776099&r1=1776098&r2=1776099&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/gpx/GPXTestSuite.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/gpx/GPXTestSuite.java
[UTF-8] Tue Dec 27 09:19:07 2016
@@ -25,8 +25,8 @@ import org.junit.BeforeClass;
  * All tests from the {@code sis-xmlstore} module, in approximative dependency order.
  */
 @Suite.SuiteClasses({
-    org.apache.sis.internal.gpx.GPXReaderTest.class,
-    org.apache.sis.internal.gpx.GPXWriterTest.class
+    org.apache.sis.internal.gpx.ReaderTest.class,
+    org.apache.sis.internal.gpx.WriterTest.class
 })
 public final strictfp class GPXTestSuite extends TestSuite {
     /**

Copied: sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/gpx/ReaderTest.java
(from r1776098, sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/gpx/GPXReaderTest.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/gpx/ReaderTest.java?p2=sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/gpx/ReaderTest.java&p1=sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/gpx/GPXReaderTest.java&r1=1776098&r2=1776099&rev=1776099&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/gpx/GPXReaderTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/gpx/ReaderTest.java
[UTF-8] Tue Dec 27 09:19:07 2016
@@ -39,8 +39,8 @@ import org.opengis.feature.Feature;
 
 
 /**
- * Tests (indirectly) the {@link GPXReader} class.
- * This class creates a {@link GPXStore} instance and uses it in read-only mode.
+ * Tests (indirectly) the {@link Reader} class.
+ * This class creates a {@link Store} instance and uses it in read-only mode.
  *
  * @author  Johann Sorel (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
@@ -48,7 +48,7 @@ import org.opengis.feature.Feature;
  * @version 0.8
  * @module
  */
-public final strictfp class GPXReaderTest extends TestCase {
+public final strictfp class ReaderTest extends TestCase {
     /**
      * The provider shared by all data stores created in this test class.
      */
@@ -75,8 +75,8 @@ public final strictfp class GPXReaderTes
      *
      * @param  resource  name of the test file in a directory relative to {@code "org/apache/sis/internal/gpx"}.
      */
-    private static GPXStore create(final String resource) throws DataStoreException {
-        return new GPXStore(provider, new StorageConnector(GPXReaderTest.class.getResourceAsStream(resource)));
+    private static Store create(final String resource) throws DataStoreException {
+        return new Store(provider, new StorageConnector(ReaderTest.class.getResourceAsStream(resource)));
     }
 
     /**
@@ -127,12 +127,12 @@ public final strictfp class GPXReaderTes
      */
     @Test
     public void testMetadata100() throws DataStoreException {
-        try (final GPXStore reader = create("1.0/metadata.xml")) {
+        try (final Store reader = create("1.0/metadata.xml")) {
             final Metadata md = (Metadata) reader.getMetadata();
             verifyMetadata(md, 1);
             assertNull(md.author.link);
             assertNull(md.copyright);
-            assertEquals("version", GPXStore.V1_0, reader.getVersion());
+            assertEquals("version", Store.V1_0, reader.getVersion());
         }
     }
 
@@ -143,14 +143,14 @@ public final strictfp class GPXReaderTes
      */
     @Test
     public void testMetadata110() throws DataStoreException {
-        try (final GPXStore reader = create("1.1/metadata.xml")) {
+        try (final Store reader = create("1.1/metadata.xml")) {
             final Metadata md = (Metadata) reader.getMetadata();
             verifyMetadata(md, 3);
             assertStringEquals("http://someone-site.org", md.author.link);
             assertEquals("Apache", md.copyright.author);
             assertEquals(2004, md.copyright.year.intValue());
             assertStringEquals("http://www.apache.org/licenses/LICENSE-2.0", md.copyright.license);
-            assertEquals("version", GPXStore.V1_1, reader.getVersion());
+            assertEquals("version", Store.V1_1, reader.getVersion());
         }
     }
 
@@ -199,9 +199,9 @@ public final strictfp class GPXReaderTes
     @Test
     @DependsOnMethod("testMetadata100")
     public void testWayPoint100() throws DataStoreException {
-        try (final GPXStore reader = create("1.0/waypoint.xml")) {
+        try (final Store reader = create("1.0/waypoint.xml")) {
             verifyAlmostEmptyMetadata((Metadata) reader.getMetadata());
-            assertEquals("version", GPXStore.V1_0, reader.getVersion());
+            assertEquals("version", Store.V1_0, reader.getVersion());
             final Iterator<Feature> it = reader.getFeatures().iterator();
             verifyPoint(it.next(), 0, false);
             verifyPoint(it.next(), 1, false);
@@ -218,9 +218,9 @@ public final strictfp class GPXReaderTes
     @Test
     @DependsOnMethod("testMetadata110")
     public void testWayPoint110() throws DataStoreException {
-        try (final GPXStore reader = create("1.1/waypoint.xml")) {
+        try (final Store reader = create("1.1/waypoint.xml")) {
             verifyAlmostEmptyMetadata((Metadata) reader.getMetadata());
-            assertEquals("version", GPXStore.V1_1, reader.getVersion());
+            assertEquals("version", Store.V1_1, reader.getVersion());
             final Iterator<Feature> it = reader.getFeatures().iterator();
             verifyPoint(it.next(), 0, true);
             verifyPoint(it.next(), 1, true);
@@ -237,9 +237,9 @@ public final strictfp class GPXReaderTes
     @Test
     @DependsOnMethod("testWayPoint100")
     public void testRoute100() throws DataStoreException {
-        try (final GPXStore reader = create("1.0/route.xml")) {
+        try (final Store reader = create("1.0/route.xml")) {
             verifyAlmostEmptyMetadata((Metadata) reader.getMetadata());
-            assertEquals("version", GPXStore.V1_0, reader.getVersion());
+            assertEquals("version", Store.V1_0, reader.getVersion());
             final Iterator<Feature> it = reader.getFeatures().iterator();
             verifyRoute(it.next(), false, 1);
             verifyEmpty(it.next(), "rtept");
@@ -255,9 +255,9 @@ public final strictfp class GPXReaderTes
     @Test
     @DependsOnMethod("testWayPoint110")
     public void testRoute110() throws DataStoreException {
-        try (final GPXStore reader = create("1.1/route.xml")) {
+        try (final Store reader = create("1.1/route.xml")) {
             verifyAlmostEmptyMetadata((Metadata) reader.getMetadata());
-            assertEquals("version", GPXStore.V1_1, reader.getVersion());
+            assertEquals("version", Store.V1_1, reader.getVersion());
             final Iterator<Feature> it = reader.getFeatures().iterator();
             verifyRoute(it.next(), true, 3);
             verifyEmpty(it.next(), "rtept");
@@ -327,9 +327,9 @@ public final strictfp class GPXReaderTes
     @Test
     @DependsOnMethod("testRoute100")
     public void testTrack100() throws DataStoreException {
-        try (final GPXStore reader = create("1.0/track.xml")) {
+        try (final Store reader = create("1.0/track.xml")) {
             verifyAlmostEmptyMetadata((Metadata) reader.getMetadata());
-            assertEquals("version", GPXStore.V1_0, reader.getVersion());
+            assertEquals("version", Store.V1_0, reader.getVersion());
             final Iterator<Feature> it = reader.getFeatures().iterator();
             verifyTrack(it.next(), false, 1);
             verifyEmpty(it.next(), "trkseg");
@@ -345,9 +345,9 @@ public final strictfp class GPXReaderTes
     @Test
     @DependsOnMethod("testRoute110")
     public void testTrack110() throws DataStoreException {
-        try (final GPXStore reader = create("1.1/track.xml")) {
+        try (final Store reader = create("1.1/track.xml")) {
             verifyAlmostEmptyMetadata((Metadata) reader.getMetadata());
-            assertEquals("version", GPXStore.V1_1, reader.getVersion());
+            assertEquals("version", Store.V1_1, reader.getVersion());
             final Iterator<Feature> it = reader.getFeatures().iterator();
             verifyTrack(it.next(), true, 3);
             verifyEmpty(it.next(), "trkseg");

Copied: sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/gpx/WriterTest.java
(from r1776098, sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/gpx/GPXWriterTest.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/gpx/WriterTest.java?p2=sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/gpx/WriterTest.java&p1=sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/gpx/GPXWriterTest.java&r1=1776098&r2=1776099&rev=1776099&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/gpx/GPXWriterTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/gpx/WriterTest.java
[UTF-8] Tue Dec 27 09:19:07 2016
@@ -44,9 +44,9 @@ import org.opengis.feature.Feature;
 
 
 /**
- * Tests (indirectly) the {@link GPXWriter} class.
- * This class creates a {@link GPXStore} instance and uses it in write mode.
- * The {@link GPXReader} is used for verifying the content.
+ * Tests (indirectly) the {@link Writer} class.
+ * This class creates a {@link Store} instance and uses it in write mode.
+ * The {@link Reader} is used for verifying the content.
  *
  * @author  Johann Sorel (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
@@ -54,8 +54,8 @@ import org.opengis.feature.Feature;
  * @version 0.8
  * @module
  */
-@DependsOn(GPXReaderTest.class)
-public final strictfp class GPXWriterTest extends TestCase {
+@DependsOn(ReaderTest.class)
+public final strictfp class WriterTest extends TestCase {
     /**
      * The provider shared by all data stores created in this test class.
      */
@@ -85,8 +85,8 @@ public final strictfp class GPXWriterTes
     /**
      * Creates a new GPX data store which will read and write in memory.
      */
-    private GPXStore create() throws DataStoreException {
-        return new GPXStore(provider, new StorageConnector(output));
+    private Store create() throws DataStoreException {
+        return new Store(provider, new StorageConnector(output));
     }
 
     /**
@@ -140,12 +140,12 @@ public final strictfp class GPXWriterTes
         metaData.links.add(new Link(new URI("http://address1.org")));
         metaData.links.add(new Link(new URI("http://address2.org")));
 
-        try (GPXStore store = create()) {
+        try (Store store = create()) {
             store.write(metaData, null);
 
             // Re-read the data we just wrote.
             assertEquals(metaData,      store.getMetadata());
-            assertEquals(GPXStore.V1_1, store.getVersion());
+            assertEquals(Store.V1_1, store.getVersion());
         }
     }
 
@@ -294,7 +294,7 @@ public final strictfp class GPXWriterTes
         tracks.add(track1);
         tracks.add(track2);
 
-        try (GPXStore store = create()) {
+        try (Store store = create()) {
             store.write(null, Stream.concat(Stream.concat(wayPoints.stream(), routes.stream()),
tracks.stream()));
 
             // Re-read the data we just wrote.
@@ -308,7 +308,7 @@ public final strictfp class GPXWriterTes
             assertEquals(track1.toString(), it.next().toString());
             assertEquals(track2.toString(), it.next().toString());
             assertFalse(it.hasNext());
-            assertEquals(GPXStore.V1_1, store.getVersion());
+            assertEquals(Store.V1_1, store.getVersion());
         }
     }
 }



Mime
View raw message