sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jso...@apache.org
Subject svn commit: r1738241 [1/3] - in /sis/branches/JDK8: core/sis-feature/src/main/java/org/apache/sis/feature/ core/sis-feature/src/main/java/org/apache/sis/internal/feature/ ide-project/NetBeans/ ide-project/NetBeans/nbproject/ storage/ storage/sis-xmlsto...
Date Fri, 08 Apr 2016 12:43:54 GMT
Author: jsorel
Date: Fri Apr  8 12:43:53 2016
New Revision: 1738241

URL: http://svn.apache.org/viewvc?rev=1738241&view=rev
Log:
Add GPX reader and test samples

Added:
    sis/branches/JDK8/storage/sis-xmlstore/
    sis/branches/JDK8/storage/sis-xmlstore/pom.xml
    sis/branches/JDK8/storage/sis-xmlstore/src/
    sis/branches/JDK8/storage/sis-xmlstore/src/main/
    sis/branches/JDK8/storage/sis-xmlstore/src/main/java/
    sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/
    sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/
    sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/
    sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/
    sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/
    sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/CopyRight.java
    sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/GPXConstants.java
    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/GPXVersion.java
    sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/GroupPointsAsPolylineOperation.java
    sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/GroupPolylinesOperation.java
    sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/MetaData.java
    sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/Person.java
    sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/xml/
    sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/xml/AbstractConfigurable.java
    sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/xml/StaxStreamReader.java
    sis/branches/JDK8/storage/sis-xmlstore/src/main/resources/
    sis/branches/JDK8/storage/sis-xmlstore/src/test/
    sis/branches/JDK8/storage/sis-xmlstore/src/test/java/
    sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/
    sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/
    sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/
    sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/
    sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/gpx/
    sis/branches/JDK8/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/gpx/GPXReaderTest.java
    sis/branches/JDK8/storage/sis-xmlstore/src/test/resources/
    sis/branches/JDK8/storage/sis-xmlstore/src/test/resources/org/
    sis/branches/JDK8/storage/sis-xmlstore/src/test/resources/org/apache/
    sis/branches/JDK8/storage/sis-xmlstore/src/test/resources/org/apache/sis/
    sis/branches/JDK8/storage/sis-xmlstore/src/test/resources/org/apache/sis/gpx/
    sis/branches/JDK8/storage/sis-xmlstore/src/test/resources/org/apache/sis/gpx/sample_metadata100.xml
    sis/branches/JDK8/storage/sis-xmlstore/src/test/resources/org/apache/sis/gpx/sample_metadata110.xml
    sis/branches/JDK8/storage/sis-xmlstore/src/test/resources/org/apache/sis/gpx/sample_route100.xml
    sis/branches/JDK8/storage/sis-xmlstore/src/test/resources/org/apache/sis/gpx/sample_route110.xml
    sis/branches/JDK8/storage/sis-xmlstore/src/test/resources/org/apache/sis/gpx/sample_track100.xml
    sis/branches/JDK8/storage/sis-xmlstore/src/test/resources/org/apache/sis/gpx/sample_track110.xml
    sis/branches/JDK8/storage/sis-xmlstore/src/test/resources/org/apache/sis/gpx/sample_waypoint100.xml
    sis/branches/JDK8/storage/sis-xmlstore/src/test/resources/org/apache/sis/gpx/sample_waypoint110.xml
Modified:
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/Features.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/AttributeTypeBuilder.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/FeatureTypeBuilder.java
    sis/branches/JDK8/ide-project/NetBeans/build.xml
    sis/branches/JDK8/ide-project/NetBeans/nbproject/build-impl.xml
    sis/branches/JDK8/ide-project/NetBeans/nbproject/genfiles.properties
    sis/branches/JDK8/ide-project/NetBeans/nbproject/project.properties
    sis/branches/JDK8/ide-project/NetBeans/nbproject/project.xml
    sis/branches/JDK8/storage/pom.xml

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/Features.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/Features.java?rev=1738241&r1=1738240&r2=1738241&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/Features.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/Features.java [UTF-8] Fri Apr  8 12:43:53 2016
@@ -118,7 +118,7 @@ public final class Features extends Stat
      * otherwise the function return doing nothing.
      *
      * @param feature tested feature.
-     * @throws InvalidPropertyValueException
+     * @throws InvalidPropertyValueException if feature do not pass validation
      */
     public static void validate(Feature feature) throws InvalidPropertyValueException {
 

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/AttributeTypeBuilder.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/AttributeTypeBuilder.java?rev=1738241&r1=1738240&r2=1738241&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/AttributeTypeBuilder.java (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/AttributeTypeBuilder.java Fri Apr  8 12:43:53 2016
@@ -120,7 +120,7 @@ public class AttributeTypeBuilder {
      *
      * See {@link #DESCRIPTION_KEY}
      *
-     * @param description
+     * @param description attribute description
      */
     public void setDescription(CharSequence description){
         parameters.put(DESCRIPTION_KEY, description);
@@ -131,7 +131,7 @@ public class AttributeTypeBuilder {
      *
      * See {@link #DESIGNATION_KEY}
      *
-     * @param designation
+     * @param designation attribute designation
      */
     public void setDesignation(CharSequence designation){
         parameters.put(DESIGNATION_KEY, designation);
@@ -142,7 +142,7 @@ public class AttributeTypeBuilder {
      *
      * See {@link #DEFINITION_KEY}
      *
-     * @param definition
+     * @param definition attribute definition
      */
     public void setDefinition(CharSequence definition){
         parameters.put(DEFINITION_KEY, definition);
@@ -160,7 +160,7 @@ public class AttributeTypeBuilder {
     /**
      * Set default attribute value.
      *
-     * @param defaultValue
+     * @param defaultValue attribute default value, can be null
      */
     public void setDefaultValue(Object defaultValue) {
         this.defaultValue = defaultValue;
@@ -169,7 +169,7 @@ public class AttributeTypeBuilder {
     /**
      * Set minimum occurrences of the attribute values.
      *
-     * @param minimumOccurs
+     * @param minimumOccurs must be positive
      */
     public void setMinimumOccurs(int minimumOccurs) {
         this.minimumOccurs = minimumOccurs;
@@ -178,7 +178,7 @@ public class AttributeTypeBuilder {
     /**
      * Set maximum occurrences of the attribute values.
      *
-     * @param maximumOccurs
+     * @param maximumOccurs must be positive and superior to minimum occurences
      */
     public void setMaximumOccurs(int maximumOccurs) {
         this.maximumOccurs = maximumOccurs;
@@ -188,7 +188,7 @@ public class AttributeTypeBuilder {
      * Set maximum attribute length.
      * This characteristic only have a meaning with CharSequence type attributes.
      *
-     * @param length 
+     * @param length character sequence length
      * @return created characteristic
      */
     public AttributeType setLengthCharacteristic(int length){
@@ -199,7 +199,7 @@ public class AttributeTypeBuilder {
      * Set attribute {@code CoordinateReferenceSystem}.
      * This characteristic only have a meaning with georeferenced type attributes.
      * 
-     * @param crs
+     * @param crs geometry coordinate reference system
      * @return created characteristic
      */
     public AttributeType setCRSCharacteristic(CoordinateReferenceSystem crs){
@@ -210,7 +210,7 @@ public class AttributeTypeBuilder {
      * Set attribute restricted values.
      * This characteristic defines a list of possible values for the attribute.
      *
-     * @param values
+     * @param values enumeration of values
      * @return created characteristic
      */
     public AttributeType setPossibleValues(Collection values){
@@ -252,7 +252,7 @@ public class AttributeTypeBuilder {
     /**
      * Add a user defined characteristic.
      *
-     * @param characteristic
+     * @param characteristic not null
      * @return added characteristic
      */
     public AttributeType addCharacteristic(AttributeType characteristic){

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/FeatureTypeBuilder.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/FeatureTypeBuilder.java?rev=1738241&r1=1738240&r2=1738241&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/FeatureTypeBuilder.java (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/FeatureTypeBuilder.java Fri Apr  8 12:43:53 2016
@@ -151,7 +151,7 @@ public class FeatureTypeBuilder {
      *
      * See {@link #DESCRIPTION_KEY}
      *
-     * @param description
+     * @param description feature type description
      */
     public void setDescription(CharSequence description){
         parameters.put(DESCRIPTION_KEY, description);
@@ -162,7 +162,7 @@ public class FeatureTypeBuilder {
      *
      * See {@link #DESIGNATION_KEY}
      *
-     * @param designation
+     * @param designation feature type designation
      */
     public void setDesignation(CharSequence designation){
         parameters.put(DESIGNATION_KEY, designation);
@@ -173,7 +173,7 @@ public class FeatureTypeBuilder {
      *
      * See {@link #DEFINITION_KEY}
      *
-     * @param definition
+     * @param definition feature type definition
      */
     public void setDefinition(CharSequence definition){
         parameters.put(DEFINITION_KEY, definition);
@@ -182,7 +182,7 @@ public class FeatureTypeBuilder {
     /**
      * Set feature type abstract.
      *
-     * @param abstrac
+     * @param abstrac long description of the feature type
      */
     public void setAbstract(boolean abstrac) {
         this.isAbstract = abstrac;
@@ -740,7 +740,7 @@ public class FeatureTypeBuilder {
      * if the given string do not match any, then a Name with no namespace will be
      * created and the localpart will be the given string.
      *
-     * @param candidate
+     * @param candidate String to convert to a geoneric name
      * @return Name
      */
     private static GenericName valueOf(final String candidate){
@@ -787,8 +787,8 @@ public class FeatureTypeBuilder {
      * String can be written with only the local part or in extendedform or JCR
      * extended form.
      *
-     * @param name
-     * @param candidate
+     * @param name expected generic name
+     * @param candidate name to test
      * @return true if the string match the name
      */
     private static boolean match(final GenericName name, final String candidate){

Modified: sis/branches/JDK8/ide-project/NetBeans/build.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/ide-project/NetBeans/build.xml?rev=1738241&r1=1738240&r2=1738241&view=diff
==============================================================================
--- sis/branches/JDK8/ide-project/NetBeans/build.xml (original)
+++ sis/branches/JDK8/ide-project/NetBeans/build.xml Fri Apr  8 12:43:53 2016
@@ -186,6 +186,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>
     </copy>
     <copy todir="${build.test.classes.dir}">
       <fileset dir="${project.root}/storage/sis-shapefile/src/test/resources">

Modified: sis/branches/JDK8/ide-project/NetBeans/nbproject/build-impl.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/ide-project/NetBeans/nbproject/build-impl.xml?rev=1738241&r1=1738240&r2=1738241&view=diff
==============================================================================
--- sis/branches/JDK8/ide-project/NetBeans/nbproject/build-impl.xml (original)
+++ sis/branches/JDK8/ide-project/NetBeans/nbproject/build-impl.xml Fri Apr  8 12:43:53 2016
@@ -125,6 +125,7 @@ is divided into following sections:
                 <available file="${test.console.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}"/>
@@ -140,6 +141,7 @@ is divided into following sections:
                 <available file="${src.console.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}"/>
@@ -252,6 +254,7 @@ is divided into following sections:
         <fail unless="src.console.dir">Must set src.console.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>
@@ -261,6 +264,7 @@ is divided into following sections:
         <fail unless="test.console.dir">Must set test.console.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>
@@ -287,7 +291,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.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.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"/>
@@ -328,7 +332,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.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.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"/>
@@ -361,7 +365,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.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.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>
@@ -457,6 +461,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>
@@ -513,6 +520,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>
@@ -649,6 +659,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>
@@ -1039,7 +1052,7 @@ is divided into following sections:
                 <include name="*"/>
             </dirset>
         </pathconvert>
-        <j2seproject3:depend srcdir="${src.local-src.dir}:${src.webapp.dir}:${src.console.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.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}"/>
@@ -1049,6 +1062,7 @@ is divided into following sections:
             <fileset dir="${src.console.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}"/>
@@ -1075,7 +1089,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.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.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. -->
@@ -1356,6 +1370,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>
@@ -1396,6 +1413,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>
@@ -1436,14 +1456,15 @@ 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.console.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.console.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.console.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.console.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.console.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}"/>
@@ -1464,11 +1485,12 @@ 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.console.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.console.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.console.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.console.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.console.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/branches/JDK8/ide-project/NetBeans/nbproject/genfiles.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/ide-project/NetBeans/nbproject/genfiles.properties?rev=1738241&r1=1738240&r2=1738241&view=diff
==============================================================================
--- sis/branches/JDK8/ide-project/NetBeans/nbproject/genfiles.properties [ISO-8859-1] (original)
+++ sis/branches/JDK8/ide-project/NetBeans/nbproject/genfiles.properties [ISO-8859-1] Fri Apr  8 12:43:53 2016
@@ -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=21ae62d4
-nbproject/build-impl.xml.script.CRC32=e337b80c
+nbproject/build-impl.xml.data.CRC32=8c88ad6d
+nbproject/build-impl.xml.script.CRC32=cc691eca
 nbproject/build-impl.xml.stylesheet.CRC32=05530350@1.79.1.48

Modified: sis/branches/JDK8/ide-project/NetBeans/nbproject/project.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/ide-project/NetBeans/nbproject/project.properties?rev=1738241&r1=1738240&r2=1738241&view=diff
==============================================================================
--- sis/branches/JDK8/ide-project/NetBeans/nbproject/project.properties [ISO-8859-1] (original)
+++ sis/branches/JDK8/ide-project/NetBeans/nbproject/project.properties [ISO-8859-1] Fri Apr  8 12:43:53 2016
@@ -52,6 +52,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/branches/JDK8/ide-project/NetBeans/nbproject/project.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/ide-project/NetBeans/nbproject/project.xml?rev=1738241&r1=1738240&r2=1738241&view=diff
==============================================================================
--- sis/branches/JDK8/ide-project/NetBeans/nbproject/project.xml (original)
+++ sis/branches/JDK8/ide-project/NetBeans/nbproject/project.xml Fri Apr  8 12:43:53 2016
@@ -28,6 +28,7 @@
                 <root id="src.console.dir" name="Console"/>
                 <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"/>
@@ -39,6 +40,7 @@
                 <root id="test.console.dir" name="Test Console"/>
                 <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/branches/JDK8/storage/pom.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/pom.xml?rev=1738241&r1=1738240&r2=1738241&view=diff
==============================================================================
--- sis/branches/JDK8/storage/pom.xml (original)
+++ sis/branches/JDK8/storage/pom.xml Fri Apr  8 12:43:53 2016
@@ -138,6 +138,7 @@
     <module>sis-storage</module>
     <module>sis-shapefile</module>
     <module>sis-netcdf</module>
+    <module>sis-xmlstore</module>
   </modules>
 
 </project>

Added: sis/branches/JDK8/storage/sis-xmlstore/pom.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-xmlstore/pom.xml?rev=1738241&view=auto
==============================================================================
--- sis/branches/JDK8/storage/sis-xmlstore/pom.xml (added)
+++ sis/branches/JDK8/storage/sis-xmlstore/pom.xml Fri Apr  8 12:43:53 2016
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+<project xmlns              = "http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi          = "http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation = "http://maven.apache.org/POM/4.0.0
+                               http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.sis</groupId>
+    <artifactId>storage</artifactId>
+    <version>0.7-jdk8-SNAPSHOT</version>
+  </parent>
+
+
+   <!-- ===========================================================
+           Module Description
+       =========================================================== -->
+  <groupId>org.apache.sis.storage</groupId>
+  <artifactId>sis-xmlstore</artifactId>
+  <packaging>bundle</packaging>
+  <name>Apache SIS XML storage</name>
+  <description>
+  <!-- Left alignment because this description will be copied in META-INF/MANIFEST.MF
+       The leading space after the first line is necessary for proper formatting. -->
+Read and write files in the GPX format.
+  </description>
+
+
+  <!-- ===========================================================
+           Developers and Contributors
+       =========================================================== -->
+  <developers>
+    <developer>
+      <name>Johann Sorel</name>
+      <id>jsorel</id>
+      <email>johann.sorel@geomatys.com</email>
+      <roles>
+        <role>developer</role>
+      </roles>
+    </developer>
+  </developers>
+
+
+  <!-- ===========================================================
+           Build configuration
+       =========================================================== -->
+  <build>
+    <plugins>
+
+      <!-- Compile properties files into resources UTF files. -->
+      <plugin>
+        <groupId>org.apache.sis.core</groupId>
+        <artifactId>sis-build-helper</artifactId>
+        <version>${sis.plugin.version}</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>compile-resources</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+
+      <!-- Package as OSGi bundle -->
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <configuration>
+          <instructions>
+            <Bundle-SymbolicName>org.apache.sis.storage.xmlstore</Bundle-SymbolicName>
+          </instructions>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+
+  <!-- ===========================================================
+           Dependencies
+       =========================================================== -->
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.sis.core</groupId>
+      <artifactId>sis-feature</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.sis.storage</groupId>
+      <artifactId>sis-storage</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+  </dependencies>
+
+</project>

Added: sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/CopyRight.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/CopyRight.java?rev=1738241&view=auto
==============================================================================
--- sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/CopyRight.java (added)
+++ sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/CopyRight.java Fri Apr  8 12:43:53 2016
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.internal.gpx;
+
+import java.net.URI;
+
+/**
+ * Copyright object as defined in GPX.
+ * 
+ * @author Johann Sorel (Geomatys)
+ * @since   0.7
+ * @version 0.7
+ * @module
+ */
+public class CopyRight {
+
+    private String author;
+    private Integer year;
+    private URI license;
+
+    /**
+     * Returns the author value.
+     *
+     * @return author, may be null
+     */
+    public String getAuthor() {
+        return author;
+    }
+
+    /**
+     * Set author value.
+     *
+     * @param author, can be null
+     */
+    public void setAuthor(String author) {
+        this.author = author;
+    }
+
+    /**
+     * Returns the copyright year.
+     *
+     * @return copyright year, may be null
+     */
+    public Integer getYear() {
+        return year;
+    }
+
+    /**
+     * Set copyright year value.
+     *
+     * @param year, can be null
+     */
+    public void setYear(Integer year) {
+        this.year = year;
+    }
+
+    /**
+     * Returns the license URI.
+     *
+     * @return license, may be null
+     */
+    public URI getLicense() {
+        return license;
+    }
+
+    /**
+     * Set license URI.
+     *
+     * @param license, can be null
+     */
+    public void setLicense(URI license) {
+        this.license = license;
+    }
+
+    @Override
+    public String toString() {
+        final StringBuilder sb = new StringBuilder("CopyRight(");
+        sb.append(author).append(',').append(year).append(',').append(license);
+        sb.append(')');
+        return sb.toString();
+    }
+
+}

Added: sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/GPXConstants.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/GPXConstants.java?rev=1738241&view=auto
==============================================================================
--- sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/GPXConstants.java (added)
+++ sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/GPXConstants.java Fri Apr  8 12:43:53 2016
@@ -0,0 +1,402 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.internal.gpx;
+
+import com.esri.core.geometry.Point;
+import java.net.URI;
+import java.time.temporal.Temporal;
+import java.util.Collections;
+import org.apache.sis.feature.AbstractIdentifiedType;
+import org.apache.sis.internal.feature.AttributeTypeBuilder;
+import org.apache.sis.feature.DefaultAttributeType;
+import org.apache.sis.internal.feature.FeatureTypeBuilder;
+import org.apache.sis.internal.system.DefaultFactories;
+import org.apache.sis.referencing.CommonCRS;
+import org.apache.sis.util.Static;
+import org.opengis.feature.AttributeType;
+import org.opengis.feature.FeatureAssociationRole;
+import org.opengis.feature.FeatureType;
+import org.opengis.feature.Operation;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+import org.opengis.util.GenericName;
+import org.opengis.util.NameFactory;
+
+/**
+ * GPX XML tags and feature types.
+ *
+ * @author Johann Sorel (Geomatys)
+ * @since   0.7
+ * @version 0.7
+ * @module
+ */
+public final class GPXConstants extends Static {
+
+    /**
+     * Main GPX xml tag.
+     */
+    /** used in version : 1.0 and 1.1 */
+    public static final String TAG_GPX = "gpx";
+    /** used in version : 1.0 and 1.1 */
+    public static final String ATT_GPX_VERSION = "version";
+    /** used in version : 1.0 and 1.1 */
+    public static final String ATT_GPX_CREATOR = "creator";             
+
+    /**
+     * Attributs used a bit everywhere.
+     */
+    /** used in version : 1.0 and 1.1 */
+    public static final String TAG_NAME = "name";
+    /** used in version : 1.0 */
+    public static final String TAG_URL = "url";
+    /** used in version : 1.0 */
+    public static final String TAG_URLNAME = "urlname";
+    /** used in version : 1.1 */
+    public static final String TAG_LINK = "link";
+    /** used in version : 1.0 and 1.1 */
+    public static final String TAG_DESC = "desc";
+    /** used in version : 1.0 and 1.1 */
+    public static final String TAG_CMT = "cmt";
+    /** used in version : 1.0 and 1.1 */
+    public static final String TAG_SRC = "src";
+    /** used in version : 1.0 and 1.1 */
+    public static final String TAG_TYPE = "type";
+    /** used in version : 1.0 and 1.1 */
+    public static final String TAG_NUMBER = "number";                   
+
+    /**
+     * Metadata tag.
+     */
+    /** used in version : 1.1 */
+    public static final String TAG_METADATA = "metadata";
+    /** used in version : 1.0 and 1.1 */
+    public static final String TAG_METADATA_TIME = "time";
+    /** used in version : 1.0 and 1.1 */
+    public static final String TAG_METADATA_KEYWORDS = "keywords";      
+
+    /**
+     * Person tag.
+     */
+    /** used in version : 1.0(as attribut) and 1.1(as tag) */
+    public static final String TAG_AUTHOR = "author";
+    /** used in version : 1.0 and 1.1 */
+    public static final String TAG_AUTHOR_EMAIL = "email";              
+
+    /**
+     * CopyRight tag.
+     */
+    /** used in version : 1.1 */
+    public static final String TAG_COPYRIGHT = "copyright";
+    /** used in version : 1.1 */
+    public static final String TAG_COPYRIGHT_YEAR = "year";
+    /** used in version : 1.1 */
+    public static final String TAG_COPYRIGHT_LICENSE = "license";
+    /** used in version : 1.1 */
+    public static final String ATT_COPYRIGHT_AUTHOR = "author";         
+
+    /**
+     * Bounds tag.
+     */
+    /** used in version : 1.0 and 1.1 */
+    public static final String TAG_BOUNDS = "bounds";
+    /** used in version : 1.0 and 1.1 */
+    public static final String ATT_BOUNDS_MINLAT = "minlat";
+    /** used in version : 1.0 and 1.1 */
+    public static final String ATT_BOUNDS_MINLON = "minlon";
+    /** used in version : 1.0 and 1.1 */
+    public static final String ATT_BOUNDS_MAXLAT = "maxlat";
+    /** used in version : 1.0 and 1.1 */
+    public static final String ATT_BOUNDS_MAXLON = "maxlon";            
+
+    /**
+     * Link tag.
+     */
+    /** used in version : 1.1 */
+    public static final String TAG_LINK_TEXT = "text";
+    /** used in version : 1.1 */
+    public static final String TAG_LINK_TYPE = "type";
+    /** used in version : 1.1 */
+    public static final String ATT_LINK_HREF = "href";                  
+
+    /**
+     * WPT tag.
+     */
+    /** used in version : 1.0 and 1.1 */
+    public static final String TAG_WPT = "wpt";
+    /** used in version : 1.0 and 1.1 */
+    public static final String ATT_WPT_LAT = "lat";
+    /** used in version : 1.0 and 1.1 */
+    public static final String ATT_WPT_LON = "lon";
+    /** used in version : 1.0 and 1.1 */
+    public static final String TAG_WPT_ELE = "ele";
+    /** used in version : 1.0 and 1.1 */
+    public static final String TAG_WPT_TIME = "time";
+    /** used in version : 1.0 and 1.1 */
+    public static final String TAG_WPT_MAGVAR = "magvar";
+    /** used in version : 1.0 and 1.1 */
+    public static final String TAG_WPT_GEOIHEIGHT = "geoidheight";
+    /** used in version : 1.0 and 1.1 */
+    public static final String TAG_WPT_SYM = "sym";
+    /** used in version : 1.0 and 1.1 */
+    public static final String TAG_WPT_FIX = "fix";
+    /** used in version : 1.0 and 1.1 */
+    public static final String TAG_WPT_SAT = "sat";
+    /** used in version : 1.0 and 1.1 */
+    public static final String TAG_WPT_HDOP = "hdop";
+    /** used in version : 1.0 and 1.1 */
+    public static final String TAG_WPT_VDOP = "vdop";
+    /** used in version : 1.0 and 1.1 */
+    public static final String TAG_WPT_PDOP = "pdop";
+    /** used in version : 1.0 and 1.1 */
+    public static final String TAG_WPT_AGEOFGPSDATA = "ageofdgpsdata";
+    /** used in version : 1.0 and 1.1 */
+    public static final String TAG_WPT_DGPSID = "dgpsid";               
+
+    /**
+     * RTE tag.
+     */
+    /** used in version : 1.0 and 1.1 */
+    public static final String TAG_RTE = "rte";
+    /** used in version : 1.0 and 1.1 */
+    public static final String TAG_RTE_RTEPT = "rtept";                 
+
+    /**
+     * TRK tag.
+     */
+    /** used in version : 1.0 and 1.1 */
+    public static final String TAG_TRK = "trk";
+    /** used in version : 1.0 and 1.1 */
+    public static final String TAG_TRK_SEG = "trkseg";
+    /** used in version : 1.0 and 1.1 */
+    public static final String TAG_TRK_SEG_PT = "trkpt";                
+
+    /**
+     * Coordinate reference system used by gpx files.
+     */
+    public static final CoordinateReferenceSystem GPX_CRS = CommonCRS.WGS84.normalizedGeographic();
+    /**
+     * GPX scope name used for feature type names.
+     */
+    public static final String GPX_NAMESPACE = "http://www.topografix.com";
+    /**
+     * GPX 1.1 xml namespace
+     */
+    public static final String GPX_NAMESPACE_V11 = "http://www.topografix.com/GPX/1/1";
+    /**
+     * GPX 1.0 xml namespace
+     */
+    public static final String GPX_NAMESPACE_V10 = "http://www.topografix.com/GPX/1/0";
+
+    /**
+     * Parent feature type of all gpx types.
+     */
+    public static final FeatureType TYPE_GPX_ENTITY;
+    /**
+     * Waypoint GPX feature type.
+     */
+    public static final FeatureType TYPE_WAYPOINT;
+    /**
+     * Track GPX feature type.
+     */
+    public static final FeatureType TYPE_TRACK;
+    /**
+     * Route GPX feature type.
+     */
+    public static final FeatureType TYPE_ROUTE;
+    /**
+     * Track segment GPX feature type.
+     */
+    public static final FeatureType TYPE_TRACK_SEGMENT;
+
+
+    static {
+        final FeatureTypeBuilder ftb = new FeatureTypeBuilder();
+        final AttributeTypeBuilder atb = new AttributeTypeBuilder();
+
+        //-------------------- GENERIC GPX ENTITY ------------------------------
+        final AttributeType attIndex = createAttribute("index",Integer.class,1,1,null);
+        final String geomName = "geometry";
+
+        ftb.reset();
+        ftb.setName(GPX_NAMESPACE, "GPXEntity");
+        ftb.setAbstract(true);
+        ftb.addProperty(attIndex);
+        TYPE_GPX_ENTITY = ftb.build();
+
+        //------------------- WAY POINT TYPE -----------------------------------
+        //lat="latitudeType [1] ?"
+        //lon="longitudeType [1] ?">
+        //<ele> xsd:decimal </ele> [0..1] ?
+        //<time> xsd:dateTime </time> [0..1] ?
+        //<magvar> degreesType </magvar> [0..1] ?
+        //<geoidheight> xsd:decimal </geoidheight> [0..1] ?
+        //<name> xsd:string </name> [0..1] ?
+        //<cmt> xsd:string </cmt> [0..1] ?
+        //<desc> xsd:string </desc> [0..1] ?
+        //<src> xsd:string </src> [0..1] ?
+        //<link> linkType </link> [0..*] ?
+        //<sym> xsd:string </sym> [0..1] ?
+        //<type> xsd:string </type> [0..1] ?
+        //<fix> fixType </fix> [0..1] ?
+        //<sat> xsd:nonNegativeInteger </sat> [0..1] ?
+        //<hdop> xsd:decimal </hdop> [0..1] ?
+        //<vdop> xsd:decimal </vdop> [0..1] ?
+        //<pdop> xsd:decimal </pdop> [0..1] ?
+        //<ageofdgpsdata> xsd:decimal </ageofdgpsdata> [0..1] ?
+        //<dgpsid> dgpsStationType </dgpsid> [0..1] ?
+        //<extensions> extensionsType </extensions> [0..1] ?
+        atb.setName(createName(geomName));
+        atb.setValueClass(Point.class);
+        atb.setCRSCharacteristic(GPX_CRS);
+        atb.setMinimumOccurs(1);
+        atb.setMaximumOccurs(1);
+        final AttributeType attPointGeometry =    atb.build();
+        final AttributeType attWptEle =           createAttribute(TAG_WPT_ELE,            Double.class,0,1,null);
+        final AttributeType attWptTime =          createAttribute(TAG_WPT_TIME,           Temporal.class,0,1,null);
+        final AttributeType attWptMagvar =        createAttribute(TAG_WPT_MAGVAR,         Double.class,0,1,null);
+        final AttributeType attWptGeoHeight =     createAttribute(TAG_WPT_GEOIHEIGHT,     Double.class,0,1,null);
+        final AttributeType attName =             createAttribute(TAG_NAME,               String.class,0,1,null);
+        final AttributeType attCmt =              createAttribute(TAG_CMT,                String.class,0,1,null);
+        final AttributeType attDesc =             createAttribute(TAG_DESC,               String.class,0,1,null);
+        final AttributeType attSrc =              createAttribute(TAG_SRC,                String.class,0,1,null);
+        final AttributeType attLink =             createAttribute(TAG_LINK,               URI.class,0,Integer.MAX_VALUE,null);
+        final AttributeType attWptSym =           createAttribute(TAG_WPT_SYM,            String.class,0,1,null);
+        final AttributeType attType =             createAttribute(TAG_TYPE,               String.class,0,1,null);
+        final AttributeType attWptFix =           createAttribute(TAG_WPT_FIX,            String.class,0,1,null);
+        final AttributeType attWptSat =           createAttribute(TAG_WPT_SAT,            Integer.class,0,1,null);
+        final AttributeType attWptHdop =          createAttribute(TAG_WPT_HDOP,           Double.class,0,1,null);
+        final AttributeType attWptVdop =          createAttribute(TAG_WPT_VDOP,           Double.class,0,1,null);
+        final AttributeType attWptPdop =          createAttribute(TAG_WPT_PDOP,           Double.class,0,1,null);
+        final AttributeType attWptAgeofGpsData =  createAttribute(TAG_WPT_AGEOFGPSDATA,   Double.class,0,1,null);
+        final AttributeType attWptDgpsid =        createAttribute(TAG_WPT_DGPSID,         Integer.class,0,1,null);
+
+        ftb.reset();
+        ftb.setName(GPX_NAMESPACE, "WayPoint");
+        ftb.setSuperTypes(TYPE_GPX_ENTITY);
+        ftb.addProperty(attIndex);
+        ftb.addProperty(attPointGeometry);
+        ftb.addProperty(attWptEle);
+        ftb.addProperty(attWptTime);
+        ftb.addProperty(attWptMagvar);
+        ftb.addProperty(attWptGeoHeight);
+        ftb.addProperty(attName);
+        ftb.addProperty(attCmt);
+        ftb.addProperty(attDesc);
+        ftb.addProperty(attSrc);
+        ftb.addProperty(attLink);
+        ftb.addProperty(attWptSym);
+        ftb.addProperty(attType);
+        ftb.addProperty(attWptFix);
+        ftb.addProperty(attWptSat);
+        ftb.addProperty(attWptHdop);
+        ftb.addProperty(attWptVdop);
+        ftb.addProperty(attWptPdop);
+        ftb.addProperty(attWptAgeofGpsData);
+        ftb.addProperty(attWptDgpsid);
+        ftb.setDefaultGeometryOperation(attPointGeometry.getName());
+        TYPE_WAYPOINT = ftb.build();
+
+
+        //------------------- ROUTE TYPE ---------------------------------------
+        //<name> xsd:string </name> [0..1] ?
+        //<cmt> xsd:string </cmt> [0..1] ?
+        //<desc> xsd:string </desc> [0..1] ?
+        //<src> xsd:string </src> [0..1] ?
+        //<link> linkType </link> [0..*] ?
+        //<number> xsd:nonNegativeInteger </number> [0..1] ?
+        //<type> xsd:string </type> [0..1] ?
+        //<extensions> extensionsType </extensions> [0..1] ?
+        //<rtept> wptType </rtept> [0..*] ?
+        final AttributeType attNumber          = createAttribute(TAG_NUMBER,    Integer.class,0,1,null);
+
+        ftb.reset();
+        ftb.setName(GPX_NAMESPACE, "Route");
+        ftb.setSuperTypes(TYPE_GPX_ENTITY);
+        ftb.addProperty(attIndex);
+        ftb.addProperty(attName);
+        ftb.addProperty(attCmt);
+        ftb.addProperty(attDesc);
+        ftb.addProperty(attSrc);
+        ftb.addProperty(attLink);
+        ftb.addProperty(attNumber);
+        ftb.addProperty(attType);
+        final FeatureAssociationRole attWayPoints = ftb.addAssociation(createName(TAG_RTE_RTEPT),TYPE_WAYPOINT,0,Integer.MAX_VALUE);
+        final Operation attRouteGeometry = new GroupPointsAsPolylineOperation(createName(geomName),attWayPoints.getName(), attPointGeometry.getName());
+        ftb.addProperty(attRouteGeometry);
+        ftb.setDefaultGeometryOperation(attRouteGeometry.getName());
+        TYPE_ROUTE = ftb.build();
+
+
+        //------------------- TRACK SEGMENT TYPE -------------------------------
+        //<trkpt> wptType </trkpt> [0..*] ?
+        //<extensions> extensionsType </extensions> [0..1] ?
+        ftb.reset();
+        ftb.setName(GPX_NAMESPACE, "TrackSegment");
+        ftb.addProperty(attIndex);
+        final FeatureAssociationRole attTrackPoints = ftb.addAssociation(createName(TAG_TRK_SEG_PT),TYPE_WAYPOINT,0,Integer.MAX_VALUE);
+        final Operation attTrackSegGeometry = new GroupPointsAsPolylineOperation(createName(geomName),attTrackPoints.getName(), attPointGeometry.getName());
+        ftb.addProperty(attTrackSegGeometry);
+        ftb.setDefaultGeometryOperation(attTrackSegGeometry.getName());
+        TYPE_TRACK_SEGMENT = ftb.build();
+
+        //------------------- TRACK TYPE ---------------------------------------
+        //<name> xsd:string </name> [0..1] ?
+        //<cmt> xsd:string </cmt> [0..1] ?
+        //<desc> xsd:string </desc> [0..1] ?
+        //<src> xsd:string </src> [0..1] ?
+        //<link> linkType </link> [0..*] ?
+        //<number> xsd:nonNegativeInteger </number> [0..1] ?
+        //<type> xsd:string </type> [0..1] ?
+        //<extensions> extensionsType </extensions> [0..1] ?
+        //<trkseg> trksegType </trkseg> [0..*] ?
+        ftb.reset();
+        ftb.setName(GPX_NAMESPACE, "Track");
+        ftb.setSuperTypes(TYPE_GPX_ENTITY);
+        ftb.addProperty(attIndex);
+        ftb.addProperty(attName);
+        ftb.addProperty(attCmt);
+        ftb.addProperty(attDesc);
+        ftb.addProperty(attSrc);
+        ftb.addProperty(attLink);
+        ftb.addProperty(attNumber);
+        ftb.addProperty(attType);
+        final FeatureAssociationRole attTrackSegments = ftb.addAssociation(createName(TAG_TRK_SEG),TYPE_TRACK_SEGMENT,0,Integer.MAX_VALUE);
+        final Operation attTrackGeometry = new GroupPolylinesOperation(createName(geomName),attTrackSegments.getName(), attTrackSegGeometry.getName());
+        ftb.addProperty(attTrackGeometry);
+        ftb.setDefaultGeometryOperation(attTrackGeometry.getName());
+        TYPE_TRACK = ftb.build();
+
+    }
+
+    /**
+     * Shortcut method to create attribute type.
+     */
+    private static AttributeType createAttribute(String name, Class valueClass, int min, int max, Object defaultValue) {
+        return new DefaultAttributeType(Collections.singletonMap(AbstractIdentifiedType.NAME_KEY,
+                createName(name)), valueClass, min, max, defaultValue);
+    }
+
+    /**
+     * Shortcut method to create generic name in GPX scope.
+     */
+    private static GenericName createName(String localPart) {
+        final NameFactory factory = DefaultFactories.forBuildin(NameFactory.class);
+        return factory.createGenericName(null, GPX_NAMESPACE,  localPart);
+    }
+
+    private GPXConstants(){};
+
+}



Mime
View raw message