sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1778374 [1/2] - in /sis/trunk: ./ core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/ ide-project/NetBeans/ ide-project/NetBeans/nbproject/ storage/ storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/ storage/si...
Date Thu, 12 Jan 2017 06:01:13 GMT
Author: desruisseaux
Date: Thu Jan 12 06:01:13 2017
New Revision: 1778374

URL: http://svn.apache.org/viewvc?rev=1778374&view=rev
Log:
Merge GPX data store from JDK7 branch. This requires some modification because of the use of GeoAPI 3.0 released interfaces instead than the development branch.

Added:
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/IteratorSpliterator.java
      - copied unchanged from r1778364, sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/IteratorSpliterator.java
    sis/trunk/storage/sis-xmlstore/
      - copied from r1778364, sis/branches/JDK7/storage/sis-xmlstore/
Modified:
    sis/trunk/   (props changed)
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/Instant.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/Predicate.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/Spliterator.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/Stream.java
    sis/trunk/ide-project/NetBeans/build.xml
    sis/trunk/ide-project/NetBeans/nbproject/build-impl.xml
    sis/trunk/ide-project/NetBeans/nbproject/genfiles.properties
    sis/trunk/ide-project/NetBeans/nbproject/project.properties
    sis/trunk/ide-project/NetBeans/nbproject/project.xml
    sis/trunk/storage/pom.xml
    sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/Store.java
    sis/trunk/storage/sis-xmlstore/pom.xml
    sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Copyright.java
    sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/GroupAsPolylineOperation.java
    sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Link.java
    sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Metadata.java
    sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Person.java
    sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Reader.java
    sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Store.java
    sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Types.java
    sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Writer.java
    sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/StaxStreamReader.java
    sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/StaxStreamWriter.java
    sis/trunk/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/storage/gpx/MetadataTest.java
    sis/trunk/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/storage/gpx/ReaderTest.java
    sis/trunk/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/storage/gpx/WriterTest.java

Propchange: sis/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jan 12 06:01:13 2017
@@ -1,5 +1,5 @@
 /sis/branches/Android:1430670-1480699
 /sis/branches/JDK6:1394364-1758914
-/sis/branches/JDK7:1394913-1778248
+/sis/branches/JDK7:1394913-1778364
 /sis/branches/JDK8:1584960-1778247
 /sis/branches/JDK9:1773327-1773512

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/Instant.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/Instant.java?rev=1778374&r1=1778373&r2=1778374&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/Instant.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/Instant.java [UTF-8] Thu Jan 12 06:01:13 2017
@@ -40,6 +40,18 @@ public final class Instant extends Tempo
     }
 
     /**
+     * Not a JDK method - used as a replacement of {@code Date.toInstant()}.
+     *
+     * @param  date  the date to convert, or {@code null}.
+     * @return the date as an instant, or {@code null}.
+     *
+     * @see #toDate()
+     */
+    public static Instant create(final Date date) {
+        return (date != null) ? new Instant(date.getTime()) : null;
+    }
+
+    /**
      * Parses the given text.
      *
      * @param  text  the text to parse.
@@ -81,6 +93,8 @@ public final class Instant extends Tempo
      * Not a JDK method - used as a replacement of {@code Date.from(Instant)}.
      *
      * @return this instant as a legacy date object.
+     *
+     * @see #create(Date)
      */
     public Date toDate() {
         return new Date(millis);
@@ -95,4 +109,14 @@ public final class Instant extends Tempo
     public Instant plusNanos(final long n) {
         return (n == 0) ? this : new Instant(JDK8.addExact(millis, n/1000000));
     }
+
+    /**
+     * Returns this instant in XML format.
+     *
+     * @return string representation of this instant.
+     */
+    @Override
+    public String toString() {
+        return JDK8.printDateTime(toDate());
+    }
 }

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/Predicate.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/Predicate.java?rev=1778374&r1=1778373&r2=1778374&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/Predicate.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/Predicate.java [UTF-8] Thu Jan 12 06:01:13 2017
@@ -20,14 +20,14 @@ package org.apache.sis.internal.jdk8;
 /**
  * Placeholder for the {@link java.util.function.Predicate} interface.
  *
- * @param <T> The type of input.
+ * @param  <T>  the type of input.
  */
 public interface Predicate<T> {
     /**
      * Evaluates the conditions on the given value.
      *
-     * @param  value The value to test.
-     * @return The predicate result for the given value.
+     * @param  value  the value to test.
+     * @return the predicate result for the given value.
      */
     boolean test(T value);
 }

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/Spliterator.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/Spliterator.java?rev=1778374&r1=1778373&r2=1778374&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/Spliterator.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/Spliterator.java [UTF-8] Thu Jan 12 06:01:13 2017
@@ -22,13 +22,23 @@ package org.apache.sis.internal.jdk8;
  *
  * @param <T> type of values on which to iterate.
  */
-public abstract class Spliterator<T> {
+public abstract interface Spliterator<T> {
+    /**
+     * Flag for iterators that return the values in some specified order.
+     */
+    public static final int ORDERED = 0x10;
+
     /**
      * Flag for iterators that do not return null values.
      */
     public static final int NONNULL = 0x100;
 
     /**
+     * Flag telling that no element addition, replacement or removal will happen during iteration.
+     */
+    public static final int IMMUTABLE  = 0x400;
+
+    /**
      * Performs the given action on it on the next element, if it exists.
      *
      * @param  action  the action to execute.
@@ -41,10 +51,7 @@ public abstract class Spliterator<T> {
      *
      * @param  action  the action to execute.
      */
-    @SuppressWarnings("empty-statement")
-    public void forEachRemaining(Consumer<? super T> action) {
-        while (tryAdvance(action));
-    }
+    public abstract void forEachRemaining(Consumer<? super T> action);
 
     /**
      * Partitions this iterator if possible.

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/Stream.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/Stream.java?rev=1778374&r1=1778373&r2=1778374&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/Stream.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/Stream.java [UTF-8] Thu Jan 12 06:01:13 2017
@@ -16,6 +16,8 @@
  */
 package org.apache.sis.internal.jdk8;
 
+import java.util.List;
+import java.util.LinkedList;
 import java.util.Iterator;
 import java.util.NoSuchElementException;
 
@@ -25,13 +27,18 @@ import java.util.NoSuchElementException;
  *
  * @param <T> type of values on which to iterate.
  */
-public class Stream<T> {
+public final class Stream<T> implements AutoCloseable {
     /**
      * The iterator wrapped by this stream.
      */
     private final Spliterator<T> it;
 
     /**
+     * The handles to execute when this stream is closed.
+     */
+    private final List<Runnable> closeHandlers = new LinkedList<>();
+
+    /**
      * Wraps the given iterator.
      */
     Stream(final Spliterator<T> it) {
@@ -39,6 +46,32 @@ public class Stream<T> {
     }
 
     /**
+     * Note a JDK method - provided as a placeholder for {@code Collection.stream()}.
+     *
+     * @param  <T>  the type of objects in the collection.
+     * @param  c    the collection from which to get the stream.
+     * @return a stream over the given collection.
+     */
+    public static <T> Stream<T> create(final Iterable<T> c) {
+        if (c != null) {
+            return StreamSupport.stream(new IteratorSpliterator<>(c.iterator()), false);
+        }
+        return null;
+    }
+
+    /**
+     * Performs an action for each element of this stream.
+     *
+     * @param  action  a non-interfering action to perform on the elements.
+     */
+    public void forEachOrdered(final Consumer<? super T> action) {
+        final Iterator<T> it = iterator();
+        while (it.hasNext()) {
+            action.accept(it.next());
+        }
+    }
+
+    /**
      * Returns an iterator for this stream elements.
      *
      * @return iterator for this stream elements.
@@ -89,4 +122,25 @@ public class Stream<T> {
             throw new UnsupportedOperationException();
         }
     }
+
+    /**
+     * Returns an equivalent stream with an additional close handler.
+     *
+     * @param  handler  a task to execute when the stream is closed.
+     * @return a stream with a handler that is run if the stream is closed.
+     */
+    public Stream<T> onClose(final Runnable handler) {
+        closeHandlers.add(handler);
+        return this;
+    }
+
+    /**
+     * Closes this stream.
+     */
+    @Override
+    public void close() {
+        for (final Runnable handler : closeHandlers) {
+            handler.run();
+        }
+    }
 }

Modified: sis/trunk/ide-project/NetBeans/build.xml
URL: http://svn.apache.org/viewvc/sis/trunk/ide-project/NetBeans/build.xml?rev=1778374&r1=1778373&r2=1778374&view=diff
==============================================================================
--- sis/trunk/ide-project/NetBeans/build.xml (original)
+++ sis/trunk/ide-project/NetBeans/build.xml Thu Jan 12 06:01:13 2017
@@ -211,6 +211,10 @@
         <include name="**/*.laa"/>
         <include name="**/*.loa"/>
       </fileset>
+      <fileset dir="${project.root}/storage/sis-xmlstore/src/test/resources">
+        <include name="**/*.gpx"/>
+        <include name="**/*.xml"/>
+      </fileset>
       <fileset dir="${project.root}/storage/sis-earth-observation/src/test/resources">
         <include name="**/*.txt"/>
       </fileset>

Modified: sis/trunk/ide-project/NetBeans/nbproject/build-impl.xml
URL: http://svn.apache.org/viewvc/sis/trunk/ide-project/NetBeans/nbproject/build-impl.xml?rev=1778374&r1=1778373&r2=1778374&view=diff
==============================================================================
--- sis/trunk/ide-project/NetBeans/nbproject/build-impl.xml (original)
+++ sis/trunk/ide-project/NetBeans/nbproject/build-impl.xml Thu Jan 12 06:01:13 2017
@@ -128,6 +128,7 @@ is divided into following sections:
                 <available file="${test.geotiff.dir}"/>
                 <available file="${test.netcdf.dir}"/>
                 <available file="${test.shapefile.dir}"/>
+                <available file="${test.xmlstore.dir}"/>
                 <available file="${test.storage.dir}"/>
                 <available file="${test.feature.dir}"/>
                 <available file="${test.referencing.dir}"/>
@@ -145,6 +146,7 @@ is divided into following sections:
                 <available file="${src.geotiff.dir}"/>
                 <available file="${src.netcdf.dir}"/>
                 <available file="${src.shapefile.dir}"/>
+                <available file="${src.xmlstore.dir}"/>
                 <available file="${src.storage.dir}"/>
                 <available file="${src.feature.dir}"/>
                 <available file="${src.referencing.dir}"/>
@@ -260,6 +262,7 @@ is divided into following sections:
         <fail unless="src.geotiff.dir">Must set src.geotiff.dir</fail>
         <fail unless="src.netcdf.dir">Must set src.netcdf.dir</fail>
         <fail unless="src.shapefile.dir">Must set src.shapefile.dir</fail>
+        <fail unless="src.xmlstore.dir">Must set src.xmlstore.dir</fail>
         <fail unless="src.storage.dir">Must set src.storage.dir</fail>
         <fail unless="src.feature.dir">Must set src.feature.dir</fail>
         <fail unless="src.referencing.dir">Must set src.referencing.dir</fail>
@@ -272,6 +275,7 @@ is divided into following sections:
         <fail unless="test.geotiff.dir">Must set test.geotiff.dir</fail>
         <fail unless="test.netcdf.dir">Must set test.netcdf.dir</fail>
         <fail unless="test.shapefile.dir">Must set test.shapefile.dir</fail>
+        <fail unless="test.xmlstore.dir">Must set test.xmlstore.dir</fail>
         <fail unless="test.storage.dir">Must set test.storage.dir</fail>
         <fail unless="test.feature.dir">Must set test.feature.dir</fail>
         <fail unless="test.referencing.dir">Must set test.referencing.dir</fail>
@@ -298,7 +302,7 @@ is divided into following sections:
     </target>
     <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
         <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${src.local-src.dir}:${src.webapp.dir}:${src.console.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}" name="srcdir"/>
+            <attribute default="${src.local-src.dir}:${src.webapp.dir}:${src.console.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}" name="srcdir"/>
             <attribute default="${build.classes.dir}" name="destdir"/>
             <attribute default="${javac.classpath}" name="classpath"/>
             <attribute default="${javac.processorpath}" name="processorpath"/>
@@ -339,7 +343,7 @@ is divided into following sections:
     </target>
     <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
         <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${src.local-src.dir}:${src.webapp.dir}:${src.console.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}" name="srcdir"/>
+            <attribute default="${src.local-src.dir}:${src.webapp.dir}:${src.console.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}" name="srcdir"/>
             <attribute default="${build.classes.dir}" name="destdir"/>
             <attribute default="${javac.classpath}" name="classpath"/>
             <attribute default="${javac.processorpath}" name="processorpath"/>
@@ -372,7 +376,7 @@ is divided into following sections:
     </target>
     <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
         <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${src.local-src.dir}:${src.webapp.dir}:${src.console.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}" name="srcdir"/>
+            <attribute default="${src.local-src.dir}:${src.webapp.dir}:${src.console.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}" name="srcdir"/>
             <attribute default="${build.classes.dir}" name="destdir"/>
             <attribute default="${javac.classpath}" name="classpath"/>
             <sequential>
@@ -477,6 +481,9 @@ is divided into following sections:
                         <fileset dir="${test.shapefile.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
                             <filename name="@{testincludes}"/>
                         </fileset>
+                        <fileset dir="${test.xmlstore.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
+                            <filename name="@{testincludes}"/>
+                        </fileset>
                         <fileset dir="${test.storage.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
                             <filename name="@{testincludes}"/>
                         </fileset>
@@ -542,6 +549,9 @@ is divided into following sections:
                     <fileset dir="${test.shapefile.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
                         <filename name="@{testincludes}"/>
                     </fileset>
+                    <fileset dir="${test.xmlstore.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
+                        <filename name="@{testincludes}"/>
+                    </fileset>
                     <fileset dir="${test.storage.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
                         <filename name="@{testincludes}"/>
                     </fileset>
@@ -687,6 +697,9 @@ is divided into following sections:
                         <fileset dir="${test.shapefile.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
                             <filename name="@{testincludes}"/>
                         </fileset>
+                        <fileset dir="${test.xmlstore.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
+                            <filename name="@{testincludes}"/>
+                        </fileset>
                         <fileset dir="${test.storage.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
                             <filename name="@{testincludes}"/>
                         </fileset>
@@ -1069,7 +1082,7 @@ is divided into following sections:
                 <include name="*"/>
             </dirset>
         </pathconvert>
-        <j2seproject3:depend srcdir="${src.local-src.dir}:${src.webapp.dir}:${src.console.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}:${build.generated.subdirs}"/>
+        <j2seproject3:depend srcdir="${src.local-src.dir}:${src.webapp.dir}:${src.console.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}:${build.generated.subdirs}"/>
     </target>
     <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
         <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
@@ -1081,6 +1094,7 @@ is divided into following sections:
             <fileset dir="${src.geotiff.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${src.netcdf.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${src.shapefile.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
+            <fileset dir="${src.xmlstore.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${src.storage.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${src.feature.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${src.referencing.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
@@ -1107,7 +1121,7 @@ is divided into following sections:
     <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
         <j2seproject3:force-recompile/>
-        <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.local-src.dir}:${src.webapp.dir}:${src.console.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}"/>
+        <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.local-src.dir}:${src.webapp.dir}:${src.console.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}"/>
     </target>
     <target name="-post-compile-single">
         <!-- Empty placeholder for easier customization. -->
@@ -1394,6 +1408,9 @@ is divided into following sections:
             <fileset dir="${src.shapefile.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
                 <filename name="**/*.java"/>
             </fileset>
+            <fileset dir="${src.xmlstore.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
+                <filename name="**/*.java"/>
+            </fileset>
             <fileset dir="${src.storage.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
                 <filename name="**/*.java"/>
             </fileset>
@@ -1440,6 +1457,9 @@ is divided into following sections:
             <fileset dir="${src.shapefile.dir}" excludes="${excludes}" includes="${includes}">
                 <filename name="**/doc-files/**"/>
             </fileset>
+            <fileset dir="${src.xmlstore.dir}" excludes="${excludes}" includes="${includes}">
+                <filename name="**/doc-files/**"/>
+            </fileset>
             <fileset dir="${src.storage.dir}" excludes="${excludes}" includes="${includes}">
                 <filename name="**/doc-files/**"/>
             </fileset>
@@ -1480,10 +1500,10 @@ is divided into following sections:
         <!-- You can override this target in the ../build.xml file. -->
     </target>
     <target if="do.depend.true" name="-compile-test-depend">
-        <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.webapp.dir}:${test.console.dir}:${test.earth-obs.dir}:${test.geotiff.dir}:${test.netcdf.dir}:${test.shapefile.dir}:${test.storage.dir}:${test.feature.dir}:${test.referencing.dir}:${test.metadata.dir}:${test.utility.dir}:${test.fra-profile.dir}"/>
+        <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.webapp.dir}:${test.console.dir}:${test.earth-obs.dir}:${test.geotiff.dir}:${test.netcdf.dir}:${test.shapefile.dir}:${test.xmlstore.dir}:${test.storage.dir}:${test.feature.dir}:${test.referencing.dir}:${test.metadata.dir}:${test.utility.dir}:${test.fra-profile.dir}"/>
     </target>
     <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
-        <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.webapp.dir}:${test.console.dir}:${test.earth-obs.dir}:${test.geotiff.dir}:${test.netcdf.dir}:${test.shapefile.dir}:${test.storage.dir}:${test.feature.dir}:${test.referencing.dir}:${test.metadata.dir}:${test.utility.dir}:${test.fra-profile.dir}"/>
+        <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.webapp.dir}:${test.console.dir}:${test.earth-obs.dir}:${test.geotiff.dir}:${test.netcdf.dir}:${test.shapefile.dir}:${test.xmlstore.dir}:${test.storage.dir}:${test.feature.dir}:${test.referencing.dir}:${test.metadata.dir}:${test.utility.dir}:${test.fra-profile.dir}"/>
         <copy todir="${build.test.classes.dir}">
             <fileset dir="${test.webapp.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${test.console.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
@@ -1491,6 +1511,7 @@ is divided into following sections:
             <fileset dir="${test.geotiff.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${test.netcdf.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${test.shapefile.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
+            <fileset dir="${test.xmlstore.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${test.storage.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${test.feature.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${test.referencing.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
@@ -1511,7 +1532,7 @@ is divided into following sections:
     <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
         <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
-        <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.webapp.dir}:${test.console.dir}:${test.earth-obs.dir}:${test.geotiff.dir}:${test.netcdf.dir}:${test.shapefile.dir}:${test.storage.dir}:${test.feature.dir}:${test.referencing.dir}:${test.metadata.dir}:${test.utility.dir}:${test.fra-profile.dir}" srcdir="${test.webapp.dir}:${test.console.dir}:${test.earth-obs.dir}:${test.geotiff.dir}:${test.netcdf.dir}:${test.shapefile.dir}:${test.storage.dir}:${test.feature.dir}:${test.referencing.dir}:${test.metadata.dir}:${test.utility.dir}:${test.fra-profile.dir}"/>
+        <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.webapp.dir}:${test.console.dir}:${test.earth-obs.dir}:${test.geotiff.dir}:${test.netcdf.dir}:${test.shapefile.dir}:${test.xmlstore.dir}:${test.storage.dir}:${test.feature.dir}:${test.referencing.dir}:${test.metadata.dir}:${test.utility.dir}:${test.fra-profile.dir}" srcdir="${test.webapp.dir}:${test.console.dir}:${test.earth-obs.dir}:${test.geotiff.dir}:${test.netcdf.dir}:${test.shapefile.dir}:${test.xmlstore.dir}:${test.storage.dir}:${test.feature.dir}:${test.referencing.dir}:${test.metadata.dir}:${test.utility.dir}:${test.fra-profile.dir}"/>
         <copy todir="${build.test.classes.dir}">
             <fileset dir="${test.webapp.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${test.console.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
@@ -1519,6 +1540,7 @@ is divided into following sections:
             <fileset dir="${test.geotiff.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${test.netcdf.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${test.shapefile.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
+            <fileset dir="${test.xmlstore.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${test.storage.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${test.feature.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${test.referencing.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>

Modified: sis/trunk/ide-project/NetBeans/nbproject/genfiles.properties
URL: http://svn.apache.org/viewvc/sis/trunk/ide-project/NetBeans/nbproject/genfiles.properties?rev=1778374&r1=1778373&r2=1778374&view=diff
==============================================================================
--- sis/trunk/ide-project/NetBeans/nbproject/genfiles.properties [ISO-8859-1] (original)
+++ sis/trunk/ide-project/NetBeans/nbproject/genfiles.properties [ISO-8859-1] Thu Jan 12 06:01:13 2017
@@ -3,6 +3,6 @@
 build.xml.data.CRC32=58e6b21c
 build.xml.script.CRC32=462eaba0
 build.xml.stylesheet.CRC32=28e38971@1.53.1.46
-nbproject/build-impl.xml.data.CRC32=f2840da1
-nbproject/build-impl.xml.script.CRC32=6fc623fd
+nbproject/build-impl.xml.data.CRC32=33837897
+nbproject/build-impl.xml.script.CRC32=895c1242
 nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48

Modified: sis/trunk/ide-project/NetBeans/nbproject/project.properties
URL: http://svn.apache.org/viewvc/sis/trunk/ide-project/NetBeans/nbproject/project.properties?rev=1778374&r1=1778373&r2=1778374&view=diff
==============================================================================
--- sis/trunk/ide-project/NetBeans/nbproject/project.properties [ISO-8859-1] (original)
+++ sis/trunk/ide-project/NetBeans/nbproject/project.properties [ISO-8859-1] Thu Jan 12 06:01:13 2017
@@ -58,6 +58,8 @@ src.netcdf.dir       = ${project.root}/s
 test.netcdf.dir      = ${project.root}/storage/sis-netcdf/src/test/java
 src.shapefile.dir    = ${project.root}/storage/sis-shapefile/src/main/java
 test.shapefile.dir   = ${project.root}/storage/sis-shapefile/src/test/java
+src.xmlstore.dir     = ${project.root}/storage/sis-xmlstore/src/main/java
+test.xmlstore.dir    = ${project.root}/storage/sis-xmlstore/src/test/java
 src.storage.dir      = ${project.root}/storage/sis-storage/src/main/java
 test.storage.dir     = ${project.root}/storage/sis-storage/src/test/java
 src.feature.dir      = ${project.root}/core/sis-feature/src/main/java

Modified: sis/trunk/ide-project/NetBeans/nbproject/project.xml
URL: http://svn.apache.org/viewvc/sis/trunk/ide-project/NetBeans/nbproject/project.xml?rev=1778374&r1=1778373&r2=1778374&view=diff
==============================================================================
--- sis/trunk/ide-project/NetBeans/nbproject/project.xml (original)
+++ sis/trunk/ide-project/NetBeans/nbproject/project.xml Thu Jan 12 06:01:13 2017
@@ -30,6 +30,7 @@
                 <root id="src.geotiff.dir" name="GeoTIFF"/>
                 <root id="src.netcdf.dir" name="NetCDF"/>
                 <root id="src.shapefile.dir" name="Shapefile"/>
+                <root id="src.xmlstore.dir" name="XMLStore"/>
                 <root id="src.storage.dir" name="Storage"/>
                 <root id="src.feature.dir" name="Feature"/>
                 <root id="src.referencing.dir" name="Referencing"/>
@@ -44,6 +45,7 @@
                 <root id="test.geotiff.dir" name="Test GeoTIFF"/>
                 <root id="test.netcdf.dir" name="Test NetCDF"/>
                 <root id="test.shapefile.dir" name="Test Shapefile"/>
+                <root id="test.xmlstore.dir" name="Test XMLStore"/>
                 <root id="test.storage.dir" name="Test Storage"/>
                 <root id="test.feature.dir" name="Test Feature"/>
                 <root id="test.referencing.dir" name="Test Referencing"/>

Modified: sis/trunk/storage/pom.xml
URL: http://svn.apache.org/viewvc/sis/trunk/storage/pom.xml?rev=1778374&r1=1778373&r2=1778374&view=diff
==============================================================================
--- sis/trunk/storage/pom.xml (original)
+++ sis/trunk/storage/pom.xml Thu Jan 12 06:01:13 2017
@@ -162,6 +162,7 @@
     <module>sis-shapefile</module>
     <module>sis-netcdf</module>
     <module>sis-geotiff</module>
+    <module>sis-xmlstore</module>
     <module>sis-earth-observation</module>
   </modules>
 

Modified: sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/Store.java
URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/Store.java?rev=1778374&r1=1778373&r2=1778374&view=diff
==============================================================================
--- sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/Store.java [UTF-8] (original)
+++ sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/Store.java [UTF-8] Thu Jan 12 06:01:13 2017
@@ -547,7 +547,7 @@ public final class Store extends Feature
     /**
      * Implementation of the iterator returned by {@link #getFeatures()}.
      */
-    private final class Iter extends Spliterator<AbstractFeature> {
+    private final class Iter implements Spliterator<AbstractFeature> {
         /**
          * Converters from string representations to the values to store in the {@link #values} array.
          */

Modified: sis/trunk/storage/sis-xmlstore/pom.xml
URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-xmlstore/pom.xml?rev=1778374&r1=1778364&r2=1778374&view=diff
==============================================================================
--- sis/trunk/storage/sis-xmlstore/pom.xml (original)
+++ sis/trunk/storage/sis-xmlstore/pom.xml Thu Jan 12 06:01:13 2017
@@ -28,7 +28,7 @@
   <parent>
     <groupId>org.apache.sis</groupId>
     <artifactId>storage</artifactId>
-    <version>0.8-jdk7-SNAPSHOT</version>
+    <version>0.8-SNAPSHOT</version>
   </parent>
 
 

Modified: sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Copyright.java
URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Copyright.java?rev=1778374&r1=1778364&r2=1778374&view=diff
==============================================================================
--- sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Copyright.java [UTF-8] (original)
+++ sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Copyright.java [UTF-8] Thu Jan 12 06:01:13 2017
@@ -31,21 +31,21 @@ import org.opengis.metadata.citation.Cit
 import org.opengis.metadata.citation.Contact;
 import org.opengis.metadata.citation.DateType;
 import org.opengis.metadata.citation.OnlineResource;
-import org.opengis.metadata.citation.Party;
 import org.opengis.metadata.citation.PresentationForm;
-import org.opengis.metadata.citation.Responsibility;
 import org.opengis.metadata.citation.Role;
 import org.opengis.metadata.citation.Series;
 import org.opengis.metadata.constraint.LegalConstraints;
-import org.opengis.metadata.constraint.Releasability;
 import org.opengis.metadata.constraint.Restriction;
-import org.opengis.metadata.extent.Extent;
-import org.opengis.metadata.identification.BrowseGraphic;
-import org.opengis.metadata.maintenance.Scope;
 import org.opengis.util.InternationalString;
-import org.apache.sis.util.iso.SimpleInternationalString;
 import org.apache.sis.util.iso.Types;
 
+// Branch-dependent imports
+import org.opengis.metadata.citation.ResponsibleParty;
+import org.apache.sis.metadata.iso.citation.AbstractParty;
+import org.apache.sis.metadata.iso.citation.DefaultCitation;
+import org.apache.sis.metadata.iso.constraint.DefaultConstraints;
+import org.apache.sis.metadata.iso.citation.DefaultResponsibility;
+
 
 /**
  * Information about the copyright holder and any license governing use of a GPX file.
@@ -67,7 +67,7 @@ import org.apache.sis.util.iso.Types;
  * @version 0.8
  * @module
  */
-public final class Copyright implements LegalConstraints, Responsibility, Party, Citation, CitationDate {
+public final class Copyright implements LegalConstraints, ResponsibleParty, Citation, CitationDate {
     /**
      * The copyright holder.
      * This field is mandatory in principle, but {@code Copyright} implementation is robust to null value.
@@ -109,13 +109,16 @@ public final class Copyright implements
      * Copies properties from the given ISO 19115 metadata.
      */
     private Copyright(final LegalConstraints c, final Locale locale) {
-resp:   for (final Responsibility r : c.getResponsibleParties()) {
-            for (final Party p : r.getParties()) {
+        if (!(c instanceof DefaultConstraints)) {
+            return;
+        }
+resp:   for (final DefaultResponsibility r : ((DefaultConstraints) c).getResponsibleParties()) {
+            for (final AbstractParty p : r.getParties()) {
                 author = Types.toString(p.getName(), locale);
                 if (author != null) break resp;
             }
         }
-        for (final Citation ci : c.getReferences()) {
+        for (final Citation ci : ((DefaultConstraints) c).getReferences()) {
             for (final CitationDate d : ci.getDates()) {
                 final Date date = d.getDate();
                 if (date != null) {
@@ -123,7 +126,8 @@ resp:   for (final Responsibility r : c.
                     break;
                 }
             }
-            for (final OnlineResource r : ci.getOnlineResources()) {
+            if (!(ci instanceof DefaultCitation)) continue;
+            for (final OnlineResource r : ((DefaultCitation) ci).getOnlineResources()) {
                 license = r.getLinkage();
                 if (license != null) break;
             }
@@ -162,7 +166,7 @@ resp:   for (final Responsibility r : c.
     @Override
     public Collection<Restriction> getUseConstraints() {
         if (license != null) {
-            return Arrays.asList(Restriction.COPYRIGHT, Restriction.LICENCE);
+            return Arrays.asList(Restriction.COPYRIGHT, Restriction.valueOf("LICENCE"));
         } else {
             return Collections.singleton(Restriction.COPYRIGHT);
         }
@@ -188,70 +192,6 @@ resp:   for (final Responsibility r : c.
         return Collections.emptySet();
     }
 
-    /**
-     * ISO 19115 metadata property not specified by GPX. We could said that the constraint applies to the whole dataset
-     * with {@link org.opengis.metadata.maintenance.ScopeCode#DATASET}, but it is probably implicit enough for GPX.
-     *
-     * @return spatial and/or temporal extent, or levels of the application of the constraints restrictions.
-     */
-    @Override
-    public Scope getConstraintApplicationScope() {
-        return null;
-    }
-
-    /**
-     * ISO 19115 metadata property not specified by GPX.
-     *
-     * @return graphics or symbols indicating the constraint.
-     */
-    @Override
-    public Collection<BrowseGraphic> getGraphics() {
-        return Collections.emptySet();
-    }
-
-    /**
-     * ISO 19115 metadata property determined by the {@link #year} and {@link #license} fields.
-     * Invoking this method is one of the steps in the path from the {@code LegalConstraints} root
-     * to the {@link #getDate()} and {@link #getOnlineResources()} methods.
-     *
-     * @return citations for the limitation of constraint.
-     *
-     * @see #getTitle()
-     * @see #getDates()
-     * @see #getPresentationForms()
-     * @see #getOnlineResources()
-     */
-    @Override
-    public Collection<? extends Citation> getReferences() {
-        return thisOrEmpty(year != null || license != null);
-    }
-
-    /**
-     * ISO 19115 metadata property not specified by GPX.
-     *
-     * @return information concerning the parties to whom the resource can or cannot be released.
-     */
-    @Override
-    public Releasability getReleasability() {
-        return null;
-    }
-
-    /**
-     * ISO 19115 metadata property determined by the {@link #author} field.
-     * Invoking this method is one of the steps in the path from the {@code LegalConstraints} root
-     * to the {@link #getName()} method.
-     *
-     * @return parties responsible for the resource constraints.
-     *
-     * @see #getRole()
-     * @see #getParties()
-     * @see #getCitedResponsibleParties()
-     */
-    @Override
-    public Collection<? extends Responsibility> getResponsibleParties() {
-        return thisOrEmpty(author != null);
-    }
-
 
     /* -------------------------------------------------------------------------------------------------
      * Implementation of the Responsibility object returned by LegalConstraints.getResponsibleParties().
@@ -270,29 +210,24 @@ resp:   for (final Responsibility r : c.
     }
 
     /**
-     * ISO 19115 metadata property not specified by GPX.
-     * This is part of the properties returned by {@link #getResponsibleParties()}.
+     * ISO 19115 metadata property not specified by GPX. Actually could be the {@link #author},
+     * but we have no way to know if the author is an individual or an organization.
      *
-     * @return spatial or temporal extent of the role.
+     * @return name of the organization, or {@code null} if none.
      */
     @Override
-    public Collection<Extent> getExtents() {
-        return Collections.emptySet();
+    public InternationalString getOrganisationName() {
+        return null;
     }
 
     /**
-     * ISO 19115 metadata property determined by the {@link #author} field.
-     * This is part of the properties returned by {@link #getResponsibleParties()}.
-     * Invoking this method is one of the steps in the path from the {@code LegalConstraints} root
-     * to the {@link #getName()} method.
-     *
-     * @return information about the parties.
+     * ISO 19115 metadata property not specified by GPX.
      *
-     * @see #getName()
+     * @return position of the individual in the organization, or {@code null} if none.
      */
     @Override
-    public Collection<? extends Party> getParties() {
-        return thisOrEmpty(author != null);
+    public InternationalString getPositionName() {
+        return null;
     }
 
     /**
@@ -302,8 +237,8 @@ resp:   for (final Responsibility r : c.
      * @return name of the party, or {@code null} if none.
      */
     @Override
-    public InternationalString getName() {
-        return (author != null) ? new SimpleInternationalString(author) : null;
+    public String getIndividualName() {
+        return author;
     }
 
     /**
@@ -313,8 +248,8 @@ resp:   for (final Responsibility r : c.
      * @return contact information for the party.
      */
     @Override
-    public Collection<Contact> getContactInfo() {
-        return Collections.emptySet();
+    public Contact getContactInfo() {
+        return null;
     }
 
 
@@ -384,7 +319,7 @@ resp:   for (final Responsibility r : c.
      */
     @Override
     public DateType getDateType() {
-        return DateType.IN_FORCE;
+        return DateType.valueOf("IN_FORCE");
     }
 
     /**
@@ -430,7 +365,7 @@ resp:   for (final Responsibility r : c.
      * @see #getResponsibleParties()
      */
     @Override
-    public Collection<Responsibility> getCitedResponsibleParties() {
+    public Collection<ResponsibleParty> getCitedResponsibleParties() {
         return Collections.emptySet();
     }
 
@@ -463,8 +398,8 @@ resp:   for (final Responsibility r : c.
      * @return other details.
      */
     @Override
-    public Collection<InternationalString> getOtherCitationDetails() {
-        return Collections.emptySet();
+    public InternationalString getOtherCitationDetails() {
+        return null;
     }
 
     /**
@@ -502,18 +437,6 @@ resp:   for (final Responsibility r : c.
     }
 
     /**
-     * ISO 19115 metadata property determined by the {@link #license} field.
-     * This is part of the properties returned by {@link #getReferences()}.
-     *
-     * @return online references to the cited resource.
-     */
-    @Override
-    public Collection<OnlineResource> getOnlineResources() {
-        return (license != null) ? Collections.<OnlineResource>singleton(new Link(license))
-                                 : Collections.<OnlineResource>emptySet();
-    }
-
-    /**
      * Returns this object as a singleton if the given condition is {@code true},
      * or an empty set if the given condition is {@code false}.
      */

Modified: sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/GroupAsPolylineOperation.java
URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/GroupAsPolylineOperation.java?rev=1778374&r1=1778364&r2=1778374&view=diff
==============================================================================
--- sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/GroupAsPolylineOperation.java [UTF-8] (original)
+++ sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/GroupAsPolylineOperation.java [UTF-8] Thu Jan 12 06:01:13 2017
@@ -30,10 +30,7 @@ import org.apache.sis.internal.feature.F
 import org.apache.sis.util.resources.Errors;
 
 // Branch-dependent imports
-import org.opengis.feature.Feature;
-import org.opengis.feature.Property;
-import org.opengis.feature.Attribute;
-import org.opengis.feature.AttributeType;
+import org.apache.sis.feature.AbstractFeature;
 
 
 /**
@@ -68,7 +65,7 @@ class GroupAsPolylineOperation extends A
      * The type of the values computed by this operation. The name of this type presumes
      * that the result will be assigned to the "geometry" attribute of the feature type.
      */
-    static final AttributeType<Polyline> RESULT_TYPE = new DefaultAttributeType<>(
+    static final DefaultAttributeType<Polyline> RESULT_TYPE = new DefaultAttributeType<>(
             Collections.singletonMap(NAME_KEY, AttributeConvention.ENVELOPE_PROPERTY), Polyline.class, 1, 1, null);
 
     /**
@@ -100,7 +97,7 @@ class GroupAsPolylineOperation extends A
      * Returns the expected result type.
      */
     @Override
-    public final AttributeType<Polyline> getResult() {
+    public final DefaultAttributeType<Polyline> getResult() {
         return RESULT_TYPE;
     }
 
@@ -110,7 +107,7 @@ class GroupAsPolylineOperation extends A
      * the result will be recomputed.
      */
     @Override
-    public final Property apply(Feature feature, ParameterValueGroup parameters) {
+    public final Object apply(AbstractFeature feature, ParameterValueGroup parameters) {
         return new Result(feature);
     }
 
@@ -142,7 +139,7 @@ class GroupAsPolylineOperation extends A
         /**
          * The feature on which to execute the operation.
          */
-        private final Feature feature;
+        private final AbstractFeature feature;
 
         /**
          * The result, computed when first needed.
@@ -153,7 +150,7 @@ class GroupAsPolylineOperation extends A
          * Creates a new result for an execution on the given feature.
          * The actual computation is deferred to the first call of {@link #getValue()}.
          */
-        Result(final Feature feature) {
+        Result(final AbstractFeature feature) {
             super(RESULT_TYPE);
             this.feature = feature;
         }
@@ -167,7 +164,7 @@ class GroupAsPolylineOperation extends A
                 boolean isFirst = true;
                 geometry = new Polyline();
                 for (final Object child : (Collection<?>) feature.getPropertyValue(association)) {
-                    addGeometry(geometry, ((Feature) child).getPropertyValue("@geometry"), isFirst);
+                    addGeometry(geometry, ((AbstractFeature) child).getPropertyValue("@geometry"), isFirst);
                     isFirst = false;
                 }
             }
@@ -179,7 +176,7 @@ class GroupAsPolylineOperation extends A
          */
         @Override
         public void setValue(Polyline value) {
-            throw new UnsupportedOperationException(Errors.format(Errors.Keys.UnmodifiableObject_1, Attribute.class));
+            throw new UnsupportedOperationException(Errors.format(Errors.Keys.UnmodifiableObject_1, AbstractAttribute.class));
         }
     }
 }

Modified: sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Link.java
URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Link.java?rev=1778374&r1=1778364&r2=1778374&view=diff
==============================================================================
--- sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Link.java [UTF-8] (original)
+++ sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Link.java [UTF-8] Thu Jan 12 06:01:13 2017
@@ -26,9 +26,7 @@ import javax.xml.bind.annotation.XmlElem
 import org.opengis.util.InternationalString;
 import org.opengis.metadata.citation.OnLineFunction;
 import org.opengis.metadata.citation.OnlineResource;
-import org.apache.sis.util.iso.SimpleInternationalString;
 import org.apache.sis.internal.jaxb.Context;
-import org.apache.sis.util.iso.Types;
 
 
 /**
@@ -134,7 +132,7 @@ public final class Link implements Onlin
      */
     private Link(final OnlineResource r, final Locale locale) {
         uri  = r.getLinkage();
-        text = Types.toString(r.getName(), locale);
+        text = r.getName();
     }
 
     /**
@@ -185,8 +183,8 @@ public final class Link implements Onlin
      * @return name of the online resource.
      */
     @Override
-    public InternationalString getName() {
-        return (text != null) ? new SimpleInternationalString(text) : null;
+    public String getName() {
+        return text;
     }
 
     /**
@@ -209,16 +207,6 @@ public final class Link implements Onlin
         return null;
     }
 
-    /**
-     * ISO 19115 metadata property not specified by GPX.
-     *
-     * @return request used to access the resource, or {@code null}.
-     */
-    @Override
-    public String getProtocolRequest() {
-        return null;
-    }
-
     /**
      * Compares this {@code Link} with the given object for equality.
      *

Modified: sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Metadata.java
URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Metadata.java?rev=1778374&r1=1778364&r2=1778374&view=diff
==============================================================================
--- sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Metadata.java [UTF-8] (original)
+++ sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Metadata.java [UTF-8] Thu Jan 12 06:01:13 2017
@@ -31,7 +31,6 @@ import org.opengis.metadata.citation.Cit
 import org.opengis.metadata.citation.CitationDate;
 import org.opengis.metadata.citation.DateType;
 import org.opengis.metadata.citation.OnlineResource;
-import org.opengis.metadata.citation.Responsibility;
 import org.opengis.metadata.constraint.Constraints;
 import org.opengis.metadata.constraint.LegalConstraints;
 import org.opengis.metadata.extent.Extent;
@@ -52,6 +51,9 @@ import org.apache.sis.util.iso.Types;
 
 // Branch-dependent imports
 import org.apache.sis.internal.jdk8.Instant;
+import org.apache.sis.metadata.iso.citation.DefaultCitation;
+import org.apache.sis.metadata.iso.identification.AbstractIdentification;
+import org.opengis.metadata.citation.ResponsibleParty;
 
 
 /**
@@ -200,8 +202,10 @@ public final class Metadata extends Simp
                         if (time != null) break;
                     }
                 }
-                for (final OnlineResource r : ci.getOnlineResources()) {
-                    links = addIfNonNull(links, Link.castOrCopy(r, locale));
+                if (ci instanceof DefaultCitation) {
+                    for (final OnlineResource r : ((DefaultCitation) ci).getOnlineResources()) {
+                        links = addIfNonNull(links, Link.castOrCopy(r, locale));
+                    }
                 }
             }
             if (description == null) {
@@ -211,7 +215,7 @@ public final class Metadata extends Simp
              * identificationInfo.pointOfContact.party.name   →   creator        if role is ORIGINATOR
              * identificationInfo.pointOfContact.party.name   →   author.name    if role is AUTHOR
              */
-            for (final Responsibility r : id.getPointOfContacts()) {
+            for (final ResponsibleParty r : id.getPointOfContacts()) {
                 final Person p = Person.castOrCopy(r, locale);
                 if (p != null) {
                     if (p.isCreator) {
@@ -247,8 +251,8 @@ public final class Metadata extends Simp
             /*
              * identificationInfo.extent.geographicElement   →   bounds
              */
-            if (bounds == null) {
-                for (final Extent e : id.getExtents()) {
+            if (bounds == null && id instanceof AbstractIdentification) {
+                for (final Extent e : ((AbstractIdentification) id).getExtents()) {
                     bounds = Bounds.castOrCopy(Extents.getGeographicBoundingBox(e));
                     if (bounds != null) break;
                 }
@@ -311,13 +315,13 @@ public final class Metadata extends Simp
      * @return means of communication with person(s) and organisations(s) associated with the resource.
      */
     @Override
-    public Collection<Responsibility> getPointOfContacts() {
+    public Collection<ResponsibleParty> getPointOfContacts() {
         if (creator != null) {
             final Person p = new Person(creator);
-            return (author != null) ? UnmodifiableArrayList.wrap(new Responsibility[] {p, author})
-                                    : Collections.<Responsibility>singletonList(author);
+            return (author != null) ? UnmodifiableArrayList.wrap(new ResponsibleParty[] {p, author})
+                                    : Collections.<ResponsibleParty>singletonList(author);
         }
-        return (author != null) ? Collections.<Responsibility>singletonList(author) : super.getPointOfContacts();
+        return (author != null) ? Collections.<ResponsibleParty>singletonList(author) : super.getPointOfContacts();
     }
 
     /**
@@ -357,17 +361,6 @@ public final class Metadata extends Simp
     }
 
     /**
-     * ISO 19115 metadata property determined by the {@link #links} field.
-     * This is part of the information returned by {@link #getCitation()}.
-     *
-     * @return online references to the cited resource.
-     */
-    @Override
-    public Collection<OnlineResource> getOnlineResources() {
-        return (links != null) ? Collections.<OnlineResource>unmodifiableList(links) : super.getOnlineResources();
-    }
-
-    /**
      * Names of features types available for the GPX format, or an empty list if none.
      * This property is not part of metadata described in GPX file; it is rather a hard-coded value shared by all
      * GPX files. Users could however filter the list of features, for example with only routes and no tracks.

Modified: sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Person.java
URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Person.java?rev=1778374&r1=1778364&r2=1778374&view=diff
==============================================================================
--- sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Person.java [UTF-8] (original)
+++ sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Person.java [UTF-8] Thu Jan 12 06:01:13 2017
@@ -25,14 +25,12 @@ import javax.xml.bind.annotation.adapter
 import org.opengis.metadata.citation.Address;
 import org.opengis.metadata.citation.Contact;
 import org.opengis.metadata.citation.OnlineResource;
-import org.opengis.metadata.citation.Party;
-import org.opengis.metadata.citation.Responsibility;
 import org.opengis.metadata.citation.Role;
 import org.opengis.metadata.citation.Telephone;
-import org.opengis.metadata.extent.Extent;
 import org.opengis.util.InternationalString;
-import org.apache.sis.util.iso.SimpleInternationalString;
-import org.apache.sis.util.iso.Types;
+
+// Branch-dependent imports
+import org.opengis.metadata.citation.ResponsibleParty;
 
 
 /**
@@ -59,7 +57,7 @@ import org.apache.sis.util.iso.Types;
  * @version 0.8
  * @module
  */
-public final class Person implements Responsibility, Party, Contact, Address {
+public final class Person implements ResponsibleParty, Contact, Address {
     /**
      * Name of person or organization.
      *
@@ -112,21 +110,19 @@ public final class Person implements Res
      * @param  locale  the locale to use for localized strings.
      * @return the GPX metadata, or {@code null}.
      */
-    public static Person castOrCopy(final Responsibility r, final Locale locale) {
+    public static Person castOrCopy(final ResponsibleParty r, final Locale locale) {
         if (r == null || r instanceof Person) {
             return (Person) r;
         }
         final Role role = r.getRole();
         final boolean isCreator = Role.ORIGINATOR.equals(role);
         if (isCreator || Role.AUTHOR.equals(role)) {
-            for (final Party p : r.getParties()) {
-                final String name = Types.toString(p.getName(), locale);
-                if (name != null) {
-                    final Person pr = new Person();
-                    pr.name = name;
-                    pr.isCreator = isCreator;
-                    return pr;
-                }
+            final String name = r.getIndividualName();
+            if (name != null) {
+                final Person pr = new Person();
+                pr.name = name;
+                pr.isCreator = isCreator;
+                return pr;
             }
         }
         return null;
@@ -142,45 +138,41 @@ public final class Person implements Res
         return isCreator ? Role.ORIGINATOR : Role.AUTHOR;
     }
 
+
+    /* ---------------------------------------------------------------------------------
+     * Implementation of the Party object returned by Responsibility.getParties().
+     * Contains information about 'name', 'email' and 'link'.
+     * --------------------------------------------------------------------------------- */
+
     /**
-     * ISO 19115 metadata property not specified by GPX.
+     * ISO 19115 metadata property not specified by GPX. Actually could be the {@link #name},
+     * but we have no way to know if the author is an individual or an organization.
      *
-     * @return spatial or temporal extent of the role.
+     * @return name of the organization, or {@code null} if none.
      */
     @Override
-    public Collection<Extent> getExtents() {
-        return Collections.emptyList();
+    public InternationalString getOrganisationName() {
+        return null;
     }
 
     /**
-     * ISO 19115 metadata property determined by the {@link #name}, {@link #email} and {@link #link} fields.
-     * Invoking this method is one of the steps in the path from the {@code Responsibility} root to the
-     * {@link #getName()}, {@link #getElectronicMailAddresses()} and {@link #getOnlineResources()} methods.
-     *
-     * @return information about the parties.
+     * ISO 19115 metadata property not specified by GPX.
      *
-     * @see #getName()
-     * @see #getContactInfo()
+     * @return position of the individual in the organization, or {@code null} if none.
      */
     @Override
-    public Collection<? extends Party> getParties() {
-        return thisOrEmpty(name != null || email != null || link != null);
+    public InternationalString getPositionName() {
+        return null;
     }
 
-
-    /* ---------------------------------------------------------------------------------
-     * Implementation of the Party object returned by Responsibility.getParties().
-     * Contains information about 'name', 'email' and 'link'.
-     * --------------------------------------------------------------------------------- */
-
     /**
      * ISO 19115 metadata property determined by the {@link #name} field.
      *
      * @return name of the party, or {@code null} if none.
      */
     @Override
-    public InternationalString getName() {
-        return (name != null) ? new SimpleInternationalString(name) : null;
+    public String getIndividualName() {
+        return name;
     }
 
     /**
@@ -194,8 +186,8 @@ public final class Person implements Res
      * @see #getOnlineResources()
      */
     @Override
-    public Collection<? extends Contact> getContactInfo() {
-        return thisOrEmpty(email != null || link != null);
+    public Contact getContactInfo() {
+        return (email != null || link != null) ? this : null;
     }
 
 
@@ -210,15 +202,6 @@ public final class Person implements Res
      * @return telephone numbers at which the organization or individual may be contacted.
      */
     @Override
-    public Collection<Telephone> getPhones() {
-        return Collections.emptyList();
-    }
-
-    /**
-     * @deprecated As of ISO 19115:2014, replaced by {@link #getPhones()}.
-     */
-    @Override
-    @Deprecated
     public Telephone getPhone() {
         return null;
     }
@@ -233,15 +216,6 @@ public final class Person implements Res
      * @see #getElectronicMailAddresses()
      */
     @Override
-    public Collection<? extends Address> getAddresses() {
-        return thisOrEmpty(email != null);
-    }
-
-    /**
-     * @deprecated As of ISO 19115:2014, replaced by {@link #getAddresses()}.
-     */
-    @Override
-    @Deprecated
     public Address getAddress() {
         return (email != null) ? this : null;
     }
@@ -252,16 +226,6 @@ public final class Person implements Res
      * @return on-line information that can be used to contact the individual or organization.
      */
     @Override
-    public Collection<OnlineResource> getOnlineResources() {
-        return (link != null) ? Collections.<OnlineResource>singleton(link)
-                              : Collections.<OnlineResource>emptySet();
-    }
-
-    /**
-     * @deprecated As of ISO 19115:2014, replaced by {@link #getOnlineResources()}.
-     */
-    @Override
-    @Deprecated
     public OnlineResource getOnlineResource() {
         return link;
     }
@@ -272,8 +236,8 @@ public final class Person implements Res
      * @return time period when individuals can contact the organization or individual.
      */
     @Override
-    public Collection<InternationalString> getHoursOfService() {
-        return Collections.emptyList();
+    public InternationalString getHoursOfService() {
+        return null;
     }
 
     /**
@@ -286,16 +250,6 @@ public final class Person implements Res
         return null;
     }
 
-    /**
-     * ISO 19115 metadata property not specified by GPX.
-     *
-     * @return type of the contact.
-     */
-    @Override
-    public InternationalString getContactType() {
-        return null;
-    }
-
 
     /* ---------------------------------------------------------------------------------
      * Implementation of the Address object returned by Contact.getAddresses().
@@ -308,7 +262,7 @@ public final class Person implements Res
      * @return address line for the location.
      */
     @Override
-    public Collection<InternationalString> getDeliveryPoints() {
+    public Collection<String> getDeliveryPoints() {
         return Collections.emptyList();
     }
 
@@ -364,15 +318,6 @@ public final class Person implements Res
     }
 
     /**
-     * Returns this object as a singleton if the given condition is {@code true},
-     * or an empty set if the given condition is {@code false}.
-     */
-    private Collection<Person> thisOrEmpty(final boolean condition) {
-        return condition ? Collections.<Person>singleton(this)
-                         : Collections.<Person>emptySet();
-    }
-
-    /**
      * Compares this {@code Person} with the given object for equality.
      *
      * @param  obj  the object to compare with this {@code Person}.

Modified: sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Reader.java
URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Reader.java?rev=1778374&r1=1778364&r2=1778374&view=diff
==============================================================================
--- sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Reader.java [UTF-8] (original)
+++ sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Reader.java [UTF-8] Thu Jan 12 06:01:13 2017
@@ -38,7 +38,7 @@ import org.apache.sis.util.Version;
 import org.apache.sis.internal.jdk8.Consumer;
 import org.apache.sis.internal.jdk8.Predicate;
 import java.text.ParseException;
-import org.opengis.feature.Feature;
+import org.apache.sis.feature.AbstractFeature;
 
 
 /**
@@ -324,7 +324,7 @@ parse:  while (reader.hasNext()) {
      *         or various {@link RuntimeException}.
      */
     @Override
-    public boolean tryAdvance(final Consumer<? super Feature> action) throws BackingStoreException {
+    public boolean tryAdvance(final Consumer<? super AbstractFeature> action) throws BackingStoreException {
         try {
             return parse(action, false);
         } catch (Exception e) {                 // Many possible exceptions including unchecked ones.
@@ -341,7 +341,7 @@ parse:  while (reader.hasNext()) {
      *         or various {@link RuntimeException}.
      */
     @Override
-    public void forEachRemaining(final Consumer<? super Feature> action) throws BackingStoreException {
+    public void forEachRemaining(final Consumer<? super AbstractFeature> action) throws BackingStoreException {
         try {
             parse(action, true);
         } catch (Exception e) {                 // Many possible exceptions including unchecked ones.
@@ -365,7 +365,7 @@ parse:  while (reader.hasNext()) {
      * @throws EOFException if the file seems to be truncated.
      */
     @SuppressWarnings("fallthrough")
-    private boolean parse(final Consumer<? super Feature> action, final boolean all) throws Exception {
+    private boolean parse(final Consumer<? super AbstractFeature> action, final boolean all) throws Exception {
         for (int type = reader.getEventType(); ; type = reader.next()) {
             /*
              * We do not need to check 'reader.hasNext()' in above loop
@@ -373,7 +373,7 @@ parse:  while (reader.hasNext()) {
              */
             switch (type) {
                 case START_ELEMENT: {
-                    final Feature f;
+                    final AbstractFeature f;
                     switch (isGPX() ? reader.getLocalName() : "") {
                         case Tags.WAY_POINT: f = parseWayPoint(++wayPointId); break;
                         case Tags.ROUTES:    f = parseRoute   (++routeId);    break;
@@ -399,7 +399,7 @@ parse:  while (reader.hasNext()) {
      *
      * @throws Exception see the list of exceptions documented in {@link #parse(Consumer, boolean)}.
      */
-    private Feature parseWayPoint(final int index) throws Exception {
+    private AbstractFeature parseWayPoint(final int index) throws Exception {
         assert reader.isStartElement();
         /*
          * Way points might be located in different elements: <wpt>, <rtept> and <trkpt>.
@@ -413,7 +413,7 @@ parse:  while (reader.hasNext()) {
             throw new DataStoreContentException(errors().getString(Errors.Keys.MandatoryAttribute_2,
                     (lat == null) ? Attributes.LATITUDE : Attributes.LONGITUDE, tagName));
         }
-        final Feature feature = ((Store) owner).types.wayPoint.newInstance();
+        final AbstractFeature feature = ((Store) owner).types.wayPoint.newInstance();
         feature.setPropertyValue("@identifier", index);
         feature.setPropertyValue("@geometry", new Point(parseDouble(lon), parseDouble(lat)));
         List<Link> links = null;
@@ -476,11 +476,11 @@ parse:  while (reader.hasNext()) {
      *
      * @throws Exception see the list of exceptions documented in {@link #parse(Consumer, boolean)}.
      */
-    private Feature parseRoute(final int index) throws Exception {
+    private AbstractFeature parseRoute(final int index) throws Exception {
         assert reader.isStartElement() && Tags.ROUTES.equals(reader.getLocalName());
-        final Feature feature = ((Store) owner).types.route.newInstance();
+        final AbstractFeature feature = ((Store) owner).types.route.newInstance();
         feature.setPropertyValue("@identifier", index);
-        List<Feature> wayPoints = null;
+        List<AbstractFeature> wayPoints = null;
         List<Link> links = null;
         while (true) {
             /*
@@ -532,11 +532,11 @@ parse:  while (reader.hasNext()) {
      *
      * @throws Exception see the list of exceptions documented in {@link #parse(Consumer, boolean)}.
      */
-    private Feature parseTrackSegment(final int index) throws Exception {
+    private AbstractFeature parseTrackSegment(final int index) throws Exception {
         assert reader.isStartElement() && Tags.TRACK_SEGMENTS.equals(reader.getLocalName());
-        final Feature feature = ((Store) owner).types.trackSegment.newInstance();
+        final AbstractFeature feature = ((Store) owner).types.trackSegment.newInstance();
         feature.setPropertyValue("@identifier", index);
-        List<Feature> wayPoints = null;
+        List<AbstractFeature> wayPoints = null;
         while (true) {
             /*
              * We do not need to check 'reader.hasNext()' in above loop
@@ -575,11 +575,11 @@ parse:  while (reader.hasNext()) {
      *
      * @throws Exception see the list of exceptions documented in {@link #parse(Consumer, boolean)}.
      */
-    private Feature parseTrack(final int index) throws Exception {
+    private AbstractFeature parseTrack(final int index) throws Exception {
         assert reader.isStartElement() && Tags.TRACKS.equals(reader.getLocalName());
-        final Feature feature = ((Store) owner).types.track.newInstance();
+        final AbstractFeature feature = ((Store) owner).types.track.newInstance();
         feature.setPropertyValue("@identifier", index);
-        List<Feature> segments = null;
+        List<AbstractFeature> segments = null;
         List<Link> links = null;
         while (true) {
             /*

Modified: sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Store.java
URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Store.java?rev=1778374&r1=1778364&r2=1778374&view=diff
==============================================================================
--- sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Store.java [UTF-8] (original)
+++ sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Store.java [UTF-8] Thu Jan 12 06:01:13 2017
@@ -35,8 +35,8 @@ import org.apache.sis.metadata.sql.Metad
 import org.apache.sis.internal.jdk8.Stream;
 import org.apache.sis.internal.jdk8.StreamSupport;
 import org.apache.sis.internal.jdk8.UncheckedIOException;
-import org.opengis.feature.Feature;
-import org.opengis.feature.FeatureType;
+import org.apache.sis.feature.AbstractFeature;
+import org.apache.sis.feature.DefaultFeatureType;
 
 
 /**
@@ -173,7 +173,7 @@ public final class Store extends StaxDat
      * @throws IllegalNameException if the given name was not found or is ambiguous.
      */
     @Override
-    public FeatureType getFeatureType(final String name) throws IllegalNameException {
+    public DefaultFeatureType getFeatureType(final String name) throws IllegalNameException {
         return types.names.get(this, name);
     }
 
@@ -184,7 +184,7 @@ public final class Store extends StaxDat
      * @throws DataStoreException if an error occurred while creating the feature stream.
      */
     @Override
-    public synchronized Stream<Feature> getFeatures() throws DataStoreException {
+    public synchronized Stream<AbstractFeature> getFeatures() throws DataStoreException {
         Reader r = reader;
         reader = null;
         if (r == null) try {
@@ -197,7 +197,7 @@ public final class Store extends StaxDat
         } catch (Exception e) {
             throw new DataStoreException(e);
         }
-        final Stream<Feature> features = StreamSupport.stream(r, false);
+        final Stream<AbstractFeature> features = StreamSupport.stream(r, false);
         return features.onClose(r);
     }
 
@@ -209,7 +209,7 @@ public final class Store extends StaxDat
      * @throws ConcurrentReadException if the {@code features} stream was provided by this data store.
      * @throws DataStoreException if an error occurred while writing the data.
      */
-    public synchronized void write(final Metadata metadata, final Stream<? extends Feature> features)
+    public synchronized void write(final Metadata metadata, final Stream<? extends AbstractFeature> features)
             throws DataStoreException
     {
         try {

Modified: sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Types.java
URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Types.java?rev=1778374&r1=1778364&r2=1778374&view=diff
==============================================================================
--- sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Types.java [UTF-8] (original)
+++ sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Types.java [UTF-8] Thu Jan 12 06:01:13 2017
@@ -42,7 +42,7 @@ import org.apache.sis.util.Static;
 // Branch-dependent imports
 import org.apache.sis.internal.jdk8.Temporal;
 import org.apache.sis.storage.IllegalNameException;
-import org.opengis.feature.FeatureType;
+import org.apache.sis.feature.DefaultFeatureType;
 
 
 /**
@@ -59,22 +59,22 @@ final class Types extends Static {
     /**
      * Way point GPX feature type.
      */
-    final FeatureType wayPoint;
+    final DefaultFeatureType wayPoint;
 
     /**
      * Route GPX feature type.
      */
-    final FeatureType route;
+    final DefaultFeatureType route;
 
     /**
      * Track GPX feature type.
      */
-    final FeatureType track;
+    final DefaultFeatureType track;
 
     /**
      * Track segment GPX feature type.
      */
-    final FeatureType trackSegment;
+    final DefaultFeatureType trackSegment;
 
     /**
      * The list of feature types to be given to GPC metadata objects.
@@ -87,7 +87,7 @@ final class Types extends Static {
      * Binding from names to feature type instances.
      * Shall not be modified after construction.
      */
-    final FeatureNaming<FeatureType> names;
+    final FeatureNaming<DefaultFeatureType> names;
 
     /**
      * A system-wide instance for {@code FeatureType} instances created using the {@link DefaultNameFactory}.
@@ -128,7 +128,7 @@ final class Types extends Static {
         FeatureTypeBuilder builder = new FeatureTypeBuilder(null, factory, locale);
         builder.setDefaultScope(Tags.NAMESPACE).setName("GPXEntity").setAbstract(true);
         builder.addAttribute(Integer.class).setName(AttributeConvention.IDENTIFIER_PROPERTY);
-        final FeatureType parent = builder.build();
+        final DefaultFeatureType parent = builder.build();
         /*
          * http://www.topografix.com/GPX/WayPoint ⇾ GPXEntity
          * ┌───────────────┬────────────────┬────────────────────────┬─────────────┐

Modified: sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Writer.java
URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Writer.java?rev=1778374&r1=1778364&r2=1778374&view=diff
==============================================================================
--- sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Writer.java [UTF-8] (original)
+++ sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Writer.java [UTF-8] Thu Jan 12 06:01:13 2017
@@ -28,8 +28,8 @@ import org.apache.sis.internal.storage.x
 import org.apache.sis.util.Version;
 
 // Branch-dependent imports
-import org.opengis.feature.Feature;
-import org.opengis.feature.FeatureType;
+import org.apache.sis.feature.AbstractFeature;
+import org.apache.sis.feature.DefaultFeatureType;
 
 
 /**
@@ -140,10 +140,10 @@ final class Writer extends StaxStreamWri
      * @throws JAXBException if underlying JAXB marshaller encounter an error.
      */
     @Override
-    public void write(final Feature feature) throws DataStoreException, XMLStreamException, JAXBException {
+    public void write(final AbstractFeature feature) throws DataStoreException, XMLStreamException, JAXBException {
         if (feature != null) {
             final Types types = ((Store) owner).types;
-            final FeatureType type = feature.getType();
+            final DefaultFeatureType type = feature.getType();
             if (types.wayPoint.isAssignableFrom(type)) {
                 writeWayPoint(feature, Tags.WAY_POINT);
             } else {
@@ -163,14 +163,14 @@ final class Writer extends StaxStreamWri
                 }
                 if (isRoute) {
                     for (Object prop : (Collection<?>) feature.getPropertyValue(Tags.ROUTE_POINTS)) {
-                        writeWayPoint((Feature) prop, Tags.ROUTE_POINTS);
+                        writeWayPoint((AbstractFeature) prop, Tags.ROUTE_POINTS);
                     }
                 } else {
                     for (Object segment : (Collection<?>) feature.getPropertyValue(Tags.TRACK_SEGMENTS)) {
                         if (segment != null) {
                             writer.writeStartElement(Tags.TRACK_SEGMENTS);
-                            for (Object prop : (Collection<?>) ((Feature) segment).getPropertyValue(Tags.TRACK_POINTS)) {
-                                writeWayPoint((Feature) prop, Tags.TRACK_POINTS);
+                            for (Object prop : (Collection<?>) ((AbstractFeature) segment).getPropertyValue(Tags.TRACK_POINTS)) {
+                                writeWayPoint((AbstractFeature) prop, Tags.TRACK_POINTS);
                             }
                             writer.writeEndElement();
                         }
@@ -189,7 +189,7 @@ final class Writer extends StaxStreamWri
      * @throws XMLStreamException if underlying STAX writer encounter an error.
      * @throws JAXBException if underlying JAXB marshaller encounter an error.
      */
-    private void writeWayPoint(final Feature feature, final String tagName) throws XMLStreamException, JAXBException {
+    private void writeWayPoint(final AbstractFeature feature, final String tagName) throws XMLStreamException, JAXBException {
         if (feature != null) {
             final Point pt = (Point) feature.getPropertyValue("@geometry");
             writer.writeStartElement(tagName);

Modified: sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/StaxStreamReader.java
URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/StaxStreamReader.java?rev=1778374&r1=1778364&r2=1778374&view=diff
==============================================================================
--- sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/StaxStreamReader.java [UTF-8] (original)
+++ sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/StaxStreamReader.java [UTF-8] Thu Jan 12 06:01:13 2017
@@ -49,7 +49,7 @@ import org.apache.sis.internal.jdk8.Pred
 import org.apache.sis.internal.jdk8.Temporal;
 import org.apache.sis.internal.jdk8.Instant;
 import java.text.ParseException;
-import org.opengis.feature.Feature;
+import org.apache.sis.feature.AbstractFeature;
 
 
 /**
@@ -107,7 +107,7 @@ import org.opengis.feature.Feature;
  * @version 0.8
  * @module
  */
-public abstract class StaxStreamReader extends StaxStreamIO implements XMLStreamConstants, Spliterator<Feature>, Runnable {
+public abstract class StaxStreamReader extends StaxStreamIO implements XMLStreamConstants, Spliterator<AbstractFeature>, Runnable {
     /**
      * The XML stream reader.
      */
@@ -173,7 +173,7 @@ public abstract class StaxStreamReader e
      *         or various {@link RuntimeException} among others.
      */
     @Override
-    public abstract boolean tryAdvance(Consumer<? super Feature> action) throws BackingStoreException;
+    public abstract boolean tryAdvance(Consumer<? super AbstractFeature> action) throws BackingStoreException;
 
     /**
      * Returns {@code null} by default since non-binary XML files are hard to split.
@@ -181,7 +181,7 @@ public abstract class StaxStreamReader e
      * @return {@code null}.
      */
     @Override
-    public Spliterator<Feature> trySplit() {
+    public Spliterator<AbstractFeature> trySplit() {
         return null;
     }
 

Modified: sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/StaxStreamWriter.java
URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/StaxStreamWriter.java?rev=1778374&r1=1778364&r2=1778374&view=diff
==============================================================================
--- sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/StaxStreamWriter.java [UTF-8] (original)
+++ sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/StaxStreamWriter.java [UTF-8] Thu Jan 12 06:01:13 2017
@@ -35,7 +35,7 @@ import org.apache.sis.util.resources.Err
 import org.apache.sis.internal.jdk8.UncheckedIOException;
 import org.apache.sis.internal.jdk8.Consumer;
 import org.apache.sis.internal.jdk8.Instant;
-import org.opengis.feature.Feature;
+import org.apache.sis.feature.AbstractFeature;
 
 
 /**
@@ -90,7 +90,7 @@ import org.opengis.feature.Feature;
  * @version 0.8
  * @module
  */
-public abstract class StaxStreamWriter extends StaxStreamIO implements Consumer<Feature> {
+public abstract class StaxStreamWriter extends StaxStreamIO implements Consumer<AbstractFeature> {
     /**
      * The XML stream writer.
      */
@@ -170,7 +170,7 @@ public abstract class StaxStreamWriter e
      *         but also {@link JAXBException} if JAXB is used for marshalling metadata objects,
      *         {@link DataStoreException}, {@link ClassCastException}, <i>etc.</i>
      */
-    public abstract void write(Feature feature) throws Exception;
+    public abstract void write(AbstractFeature feature) throws Exception;
 
     /**
      * Delegates to {@link #write(Feature)}, wrapping {@code Exception} into unchecked {@code BackingStoreException}.
@@ -179,7 +179,7 @@ public abstract class StaxStreamWriter e
      * @throws BackingStoreException if an error occurred while writing to the XML file.
      */
     @Override
-    public void accept(final Feature feature) throws BackingStoreException {
+    public void accept(final AbstractFeature feature) throws BackingStoreException {
         try {
             write(feature);
         } catch (BackingStoreException e) {

Modified: sis/trunk/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/storage/gpx/MetadataTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/storage/gpx/MetadataTest.java?rev=1778374&r1=1778364&r2=1778374&view=diff
==============================================================================
--- sis/trunk/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/storage/gpx/MetadataTest.java [UTF-8] (original)
+++ sis/trunk/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/storage/gpx/MetadataTest.java [UTF-8] Thu Jan 12 06:01:13 2017
@@ -22,6 +22,7 @@ import java.net.URISyntaxException;
 import org.apache.sis.test.DependsOnMethod;
 import org.apache.sis.test.TestCase;
 import org.junit.Test;
+import org.junit.Ignore;
 
 import static org.junit.Assert.*;
 import static org.apache.sis.test.TestUtilities.date;
@@ -60,6 +61,11 @@ public final strictfp class MetadataTest
      */
     @Test
     @DependsOnMethod("testEqualsAndHashCode")
+    @Ignore("Can not execute this test on this branch because it depends on Citation.getOnlineResources() "
+          + "and Identification.getExtents() methods, which are not present in GeoAPI 3.0 interfaces. "
+          + "Despite this test failure, the copy constructor should nevertheless works in practice "
+          + "if the Citation and Identification objects are instances of DefaultCitation or AbstractExtent "
+          + "(the SIS implementations of GeoAPI interfaces).")
     public void testCopyConstructor() throws URISyntaxException {
         final Metadata md1 = create();
         final Metadata md2 = new Metadata(md1, null);



Mime
View raw message