Copied: sis/trunk/ide-project/NetBeans/nbproject/build-impl.xml~ (from r1804411, sis/trunk/ide-project/NetBeans/nbproject/build-impl.xml) URL: http://svn.apache.org/viewvc/sis/trunk/ide-project/NetBeans/nbproject/build-impl.xml%7E?p2=sis/trunk/ide-project/NetBeans/nbproject/build-impl.xml%7E&p1=sis/trunk/ide-project/NetBeans/nbproject/build-impl.xml&r1=1804411&r2=1804420&rev=1804420&view=diff ============================================================================== --- sis/trunk/ide-project/NetBeans/nbproject/build-impl.xml (original) +++ sis/trunk/ide-project/NetBeans/nbproject/build-impl.xml~ Tue Aug 8 13:13:53 2017 @@ -131,6 +131,7 @@ is divided into following sections: <available file="${test.xmlstore.dir}"/> <available file="${test.storage.dir}"/> <available file="${test.feature.dir}"/> + <available file="${test.raster.dir}"/> <available file="${test.referencing.dir}"/> <available file="${test.ref-by-id.dir}"/> <available file="${test.metadata.dir}"/> @@ -151,6 +152,7 @@ is divided into following sections: <available file="${src.xmlstore.dir}"/> <available file="${src.storage.dir}"/> <available file="${src.feature.dir}"/> + <available file="${src.raster.dir}"/> <available file="${src.referencing.dir}"/> <available file="${src.ref-by-id.dir}"/> <available file="${src.metadata.dir}"/> @@ -270,6 +272,7 @@ is divided into following sections: <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.raster.dir">Must set src.raster.dir</fail> <fail unless="src.referencing.dir">Must set src.referencing.dir</fail> <fail unless="src.ref-by-id.dir">Must set src.ref-by-id.dir</fail> <fail unless="src.metadata.dir">Must set src.metadata.dir</fail> @@ -286,6 +289,7 @@ is divided into following sections: <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.raster.dir">Must set test.raster.dir</fail> <fail unless="test.referencing.dir">Must set test.referencing.dir</fail> <fail unless="test.ref-by-id.dir">Must set test.ref-by-id.dir</fail> <fail unless="test.metadata.dir">Must set test.metadata.dir</fail> @@ -312,7 +316,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.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.ref-by-id.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}:${src.gdal.dir}:${src.c.gdal.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.raster.dir}:${src.referencing.dir}:${src.ref-by-id.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}:${src.gdal.dir}:${src.c.gdal.dir}" name="srcdir"/> <attribute default="${build.classes.dir}" name="destdir"/> <attribute default="${javac.classpath}" name="classpath"/> <attribute default="${javac.processorpath}" name="processorpath"/> @@ -353,7 +357,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.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.ref-by-id.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}:${src.gdal.dir}:${src.c.gdal.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.raster.dir}:${src.referencing.dir}:${src.ref-by-id.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}:${src.gdal.dir}:${src.c.gdal.dir}" name="srcdir"/> <attribute default="${build.classes.dir}" name="destdir"/> <attribute default="${javac.classpath}" name="classpath"/> <attribute default="${javac.processorpath}" name="processorpath"/> @@ -386,7 +390,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.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.ref-by-id.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}:${src.gdal.dir}:${src.c.gdal.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.raster.dir}:${src.referencing.dir}:${src.ref-by-id.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}:${src.gdal.dir}:${src.c.gdal.dir}" name="srcdir"/> <attribute default="${build.classes.dir}" name="destdir"/> <attribute default="${javac.classpath}" name="classpath"/> <sequential> @@ -500,6 +504,9 @@ is divided into following sections: <fileset dir="${test.feature.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> <filename name="@{testincludes}"/> </fileset> + <fileset dir="${test.raster.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> + <filename name="@{testincludes}"/> + </fileset> <fileset dir="${test.referencing.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> <filename name="@{testincludes}"/> </fileset> @@ -574,6 +581,9 @@ is divided into following sections: <fileset dir="${test.feature.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}"> <filename name="@{testincludes}"/> </fileset> + <fileset dir="${test.raster.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}"> + <filename name="@{testincludes}"/> + </fileset> <fileset dir="${test.referencing.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}"> <filename name="@{testincludes}"/> </fileset> @@ -728,6 +738,9 @@ is divided into following sections: <fileset dir="${test.feature.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> <filename name="@{testincludes}"/> </fileset> + <fileset dir="${test.raster.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> + <filename name="@{testincludes}"/> + </fileset> <fileset dir="${test.referencing.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> <filename name="@{testincludes}"/> </fileset> @@ -1110,7 +1123,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.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.ref-by-id.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}:${src.gdal.dir}:${src.c.gdal.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.raster.dir}:${src.referencing.dir}:${src.ref-by-id.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}:${src.gdal.dir}:${src.c.gdal.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}"/> @@ -1125,6 +1138,7 @@ is divided into following sections: <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.raster.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> <fileset dir="${src.referencing.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> <fileset dir="${src.ref-by-id.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> <fileset dir="${src.metadata.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> @@ -1152,7 +1166,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.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.ref-by-id.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}:${src.gdal.dir}:${src.c.gdal.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.raster.dir}:${src.referencing.dir}:${src.ref-by-id.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}:${src.gdal.dir}:${src.c.gdal.dir}"/> </target> <target name="-post-compile-single"> <!-- Empty placeholder for easier customization. --> @@ -1448,6 +1462,9 @@ is divided into following sections: <fileset dir="${src.feature.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}"> <filename name="**/*.java"/> </fileset> + <fileset dir="${src.raster.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}"> + <filename name="**/*.java"/> + </fileset> <fileset dir="${src.referencing.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}"> <filename name="**/*.java"/> </fileset> @@ -1506,6 +1523,9 @@ is divided into following sections: <fileset dir="${src.feature.dir}" excludes="${excludes}" includes="${includes}"> <filename name="**/doc-files/**"/> </fileset> + <fileset dir="${src.raster.dir}" excludes="${excludes}" includes="${includes}"> + <filename name="**/doc-files/**"/> + </fileset> <fileset dir="${src.referencing.dir}" excludes="${excludes}" includes="${includes}"> <filename name="**/doc-files/**"/> </fileset> @@ -1549,10 +1569,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.xmlstore.dir}:${test.storage.dir}:${test.feature.dir}:${test.referencing.dir}:${test.ref-by-id.dir}:${test.metadata.dir}:${test.utility.dir}:${test.fra-profile.dir}:${test.gdal.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.raster.dir}:${test.referencing.dir}:${test.ref-by-id.dir}:${test.metadata.dir}:${test.utility.dir}:${test.fra-profile.dir}:${test.gdal.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.xmlstore.dir}:${test.storage.dir}:${test.feature.dir}:${test.referencing.dir}:${test.ref-by-id.dir}:${test.metadata.dir}:${test.utility.dir}:${test.fra-profile.dir}:${test.gdal.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.raster.dir}:${test.referencing.dir}:${test.ref-by-id.dir}:${test.metadata.dir}:${test.utility.dir}:${test.fra-profile.dir}:${test.gdal.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}"/> @@ -1563,6 +1583,7 @@ is divided into following sections: <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.raster.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> <fileset dir="${test.referencing.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> <fileset dir="${test.ref-by-id.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> <fileset dir="${test.metadata.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> @@ -1583,7 +1604,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.xmlstore.dir}:${test.storage.dir}:${test.feature.dir}:${test.referencing.dir}:${test.ref-by-id.dir}:${test.metadata.dir}:${test.utility.dir}:${test.fra-profile.dir}:${test.gdal.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.ref-by-id.dir}:${test.metadata.dir}:${test.utility.dir}:${test.fra-profile.dir}:${test.gdal.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.raster.dir}:${test.referencing.dir}:${test.ref-by-id.dir}:${test.metadata.dir}:${test.utility.dir}:${test.fra-profile.dir}:${test.gdal.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.raster.dir}:${test.referencing.dir}:${test.ref-by-id.dir}:${test.metadata.dir}:${test.utility.dir}:${test.fra-profile.dir}:${test.gdal.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}"/> @@ -1594,6 +1615,7 @@ is divided into following sections: <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.raster.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> <fileset dir="${test.referencing.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> <fileset dir="${test.ref-by-id.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> <fileset dir="${test.metadata.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
Propchange: sis/trunk/ide-project/NetBeans/nbproject/cfg_hints.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: sis/trunk/ide-project/NetBeans/nbproject/cfg_hints.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Modified: sis/trunk/ide-project/NetBeans/nbproject/genfiles.properties URL: http://svn.apache.org/viewvc/sis/trunk/ide-project/NetBeans/nbproject/genfiles.properties?rev=1804420&r1=1804419&r2=1804420&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] Tue Aug 8 13:13:53 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=fc42d0c1 -nbproject/build-impl.xml.script.CRC32=ccf18ded +nbproject/build-impl.xml.data.CRC32=455d3041 +nbproject/build-impl.xml.script.CRC32=3d5816ed 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=1804420&r1=1804419&r2=1804420&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] Tue Aug 8 13:13:53 2017 @@ -68,6 +68,8 @@ src.storage.dir = ${project.root}/s test.storage.dir = ${project.root}/storage/sis-storage/src/test/java src.feature.dir = ${project.root}/core/sis-feature/src/main/java test.feature.dir = ${project.root}/core/sis-feature/src/test/java +src.raster.dir = ${project.root}/core/sis-raster/src/main/java +test.raster.dir = ${project.root}/core/sis-raster/src/test/java src.referencing.dir = ${project.root}/core/sis-referencing/src/main/java test.referencing.dir = ${project.root}/core/sis-referencing/src/test/java src.ref-by-id.dir = ${project.root}/core/sis-referencing-by-identifiers/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=1804420&r1=1804419&r2=1804420&view=diff ============================================================================== --- sis/trunk/ide-project/NetBeans/nbproject/project.xml (original) +++ sis/trunk/ide-project/NetBeans/nbproject/project.xml Tue Aug 8 13:13:53 2017 @@ -33,6 +33,7 @@ <root id="src.xmlstore.dir" name="XMLStore"/> <root id="src.storage.dir" name="Storage"/> <root id="src.feature.dir" name="Feature"/> + <root id="src.raster.dir" name="Raster"/> <root id="src.referencing.dir" name="Referencing"/> <root id="src.ref-by-id.dir" name="Referencing by identifiers"/> <root id="src.metadata.dir" name="Metadata"/> @@ -51,6 +52,7 @@ <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.raster.dir" name="Test Raster"/> <root id="test.referencing.dir" name="Test Referencing"/> <root id="test.ref-by-id.dir" name="Test Referencing by identifiers"/> <root id="test.metadata.dir" name="Test Metadata"/> Modified: sis/trunk/pom.xml URL: http://svn.apache.org/viewvc/sis/trunk/pom.xml?rev=1804420&r1=1804419&r2=1804420&view=diff ============================================================================== --- sis/trunk/pom.xml (original) +++ sis/trunk/pom.xml Tue Aug 8 13:13:53 2017 @@ -591,7 +591,7 @@ Apache SIS is a free software, Java lang <!-- Compile --> <plugin> <artifactId>maven-compiler-plugin</artifactId> - <version>3.6.1</version> + <version>3.6.2</version> <configuration> <source>${maven.compile.source}</source> <target>${maven.compile.target}</target> @@ -823,6 +823,10 @@ Apache SIS is a free software, Java lang <packages>org.apache.sis.storage*:org.apache.sis.index*</packages> </group> <group> + <title>Coverage and raster</title> + <packages>org.apache.sis.coverage*:org.apache.sis.image*</packages> + </group> + <group> <title>Feature and Geometry</title> <packages>org.apache.sis.feature*:org.apache.sis.geometry*</packages> </group> Modified: sis/trunk/src/main/javadoc/overview.html URL: http://svn.apache.org/viewvc/sis/trunk/src/main/javadoc/overview.html?rev=1804420&r1=1804419&r2=1804420&view=diff ============================================================================== --- sis/trunk/src/main/javadoc/overview.html [UTF-8] (original) +++ sis/trunk/src/main/javadoc/overview.html [UTF-8] Tue Aug 8 13:13:53 2017 @@ -28,7 +28,7 @@ Overview of <a href="http://sis.apache.org">Apache SIS™ (Spatial Information System)</a>. <h3>Requirements</h3> - <p>SIS requires Java 6 Standard Edition.</p> + <p>SIS requires Java 7 Standard Edition.</p> <h3>Classes naming</h3> <p>Implementations of <a href="http://www.geoapi.org/">GeoAPI interfaces</a> usually (but not always) Modified: sis/trunk/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/LandsatStore.java URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/LandsatStore.java?rev=1804420&r1=1804419&r2=1804420&view=diff ============================================================================== --- sis/trunk/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/LandsatStore.java [UTF-8] (original) +++ sis/trunk/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/LandsatStore.java [UTF-8] Tue Aug 8 13:13:53 2017 @@ -28,6 +28,7 @@ import org.apache.sis.storage.DataStoreR import org.apache.sis.storage.UnsupportedStorageException; import org.apache.sis.storage.StorageConnector; import org.apache.sis.setup.OptionKey; +import org.apache.sis.storage.Resource; import org.apache.sis.util.Debug; @@ -106,7 +107,7 @@ public class LandsatStore extends DataSt public synchronized Metadata getMetadata() throws DataStoreException { if (metadata == null && source != null) try { try (BufferedReader reader = (source instanceof BufferedReader) ? (BufferedReader) source : new LineNumberReader(source)) { - source = null; // Will be closed at the end of this try-catch block. + source = null; // Will be closed at the end of this try-finally block. final LandsatReader parser = new LandsatReader(getDisplayName(), listeners); parser.read(reader); metadata = parser.getMetadata(); @@ -120,6 +121,18 @@ public class LandsatStore extends DataSt } /** + * Current implementation does not provide any resource yet. + * Future versions may return an aggregate of all raster data in the GeoTIFF files associated with this metadata. + * + * @return the starting point of all resources in this data store. + * @throws DataStoreException if an error occurred while reading the data. + */ + @Override + public Resource getRootResource() throws DataStoreException { + return null; + } + + /** * Closes this Landsat store and releases any underlying resources. * * @throws DataStoreException if an error occurred while closing the Landsat file. Propchange: sis/trunk/storage/sis-gdal/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: sis/trunk/storage/sis-gdal/pom.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Modified: sis/trunk/storage/sis-gdal/src/main/java/org/apache/sis/storage/gdal/Proj4.java URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-gdal/src/main/java/org/apache/sis/storage/gdal/Proj4.java?rev=1804420&r1=1804419&r2=1804420&view=diff ============================================================================== --- sis/trunk/storage/sis-gdal/src/main/java/org/apache/sis/storage/gdal/Proj4.java [UTF-8] (original) +++ sis/trunk/storage/sis-gdal/src/main/java/org/apache/sis/storage/gdal/Proj4.java [UTF-8] Tue Aug 8 13:13:53 2017 @@ -42,7 +42,10 @@ import org.opengis.referencing.operation import org.apache.sis.referencing.operation.AbstractCoordinateOperation; import org.apache.sis.referencing.factory.UnavailableFactoryException; import org.apache.sis.referencing.factory.InvalidGeodeticParameterException; +import org.apache.sis.referencing.datum.DefaultGeodeticDatum; +import org.apache.sis.referencing.datum.BursaWolfParameters; import org.apache.sis.referencing.IdentifiedObjects; +import org.apache.sis.referencing.CommonCRS; import org.apache.sis.referencing.CRS; import org.apache.sis.metadata.iso.citation.Citations; import org.apache.sis.internal.metadata.AxisDirections; @@ -51,6 +54,7 @@ import org.apache.sis.internal.system.OS import org.apache.sis.util.logging.Logging; import org.apache.sis.util.resources.Errors; import org.apache.sis.util.ArgumentChecks; +import org.apache.sis.util.Utilities; import org.apache.sis.util.Static; import org.apache.sis.util.iso.Types; import org.apache.sis.measure.Units; @@ -255,7 +259,23 @@ public final class Proj4 extends Static definition.append("to_meter=").append(Units.toStandardUnit(unit)); } } + /* + * Append the "+towgs84" element if any. This is the last piece of information. + * Note that the use of a "+towgs84" parameter is an "early binding" approach, + * which is usually not recommended. But Proj4 works that way. + */ if (validCS) { + if (datum instanceof DefaultGeodeticDatum) { + for (final BursaWolfParameters bwp : ((DefaultGeodeticDatum) datum).getBursaWolfParameters()) { + if (Utilities.equalsIgnoreMetadata(CommonCRS.WGS84.datum(), bwp.getTargetDatum())) { + definition.append(" +towgs84=").append(bwp.tX).append(',').append(bwp.tY).append(',').append(bwp.tZ); + if (!bwp.isTranslation()) { + definition.append(',').append(bwp.rX).append(',').append(bwp.rY).append(',').append(bwp.rZ).append(',').append(bwp.dS); + } + break; + } + } + } return definition.toString(); } /* Modified: sis/trunk/storage/sis-gdal/src/main/java/org/apache/sis/storage/gdal/Transform.java URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-gdal/src/main/java/org/apache/sis/storage/gdal/Transform.java?rev=1804420&r1=1804419&r2=1804420&view=diff ============================================================================== --- sis/trunk/storage/sis-gdal/src/main/java/org/apache/sis/storage/gdal/Transform.java [UTF-8] (original) +++ sis/trunk/storage/sis-gdal/src/main/java/org/apache/sis/storage/gdal/Transform.java [UTF-8] Tue Aug 8 13:13:53 2017 @@ -38,6 +38,13 @@ import org.apache.sis.util.ComparisonMod /** * A math transform which delegate its work to the {@literal Proj.4} native library. + * The WKT for this math transform looks like the following fragment: + * + * {@preformat wkt + * PARAM_MT["pj_transform", + * PARAMETER["srcdefn", "+proj=…"], + * PARAMETER["dstdefn", "+proj=…"]] + * } * * @author Martin Desruisseaux (Geomatys) * @version 0.8 Modified: sis/trunk/storage/sis-gdal/src/main/java/org/apache/sis/storage/gdal/package-info.java URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-gdal/src/main/java/org/apache/sis/storage/gdal/package-info.java?rev=1804420&r1=1804419&r2=1804420&view=diff ============================================================================== --- sis/trunk/storage/sis-gdal/src/main/java/org/apache/sis/storage/gdal/package-info.java [UTF-8] (original) +++ sis/trunk/storage/sis-gdal/src/main/java/org/apache/sis/storage/gdal/package-info.java [UTF-8] Tue Aug 8 13:13:53 2017 @@ -40,10 +40,16 @@ * } * * Calls to {@link org.apache.sis.referencing.CRS#findOperation CRS.findOperation(…)} will delegate the coordinate - * transformation to Proj.4 if an only if {@code sourceCRS} and {@code targetCRS} were both obtained from a code - * in {@code "Proj4"} namespace or by a method in this package. If at least one CRS were obtained by another way, - * then Apache SIS will use its own referencing engine. The backing referencing engine can be seen by printing - * the {@code CoordinateOperation}. + * transformation to Proj.4 if {@code sourceCRS} and {@code targetCRS} were both obtained from a code in {@code "Proj4"} + * namespace or by a method in this package. Otherwise, Apache SIS will use its own referencing engine. + * The backing referencing engine can be seen by printing the {@code MathTransform}: + * a transform backed by Proj.4 have a <cite>Well Known Text 1</cite> representation like below: + * + * {@preformat wkt + * PARAM_MT["pj_transform", + * PARAMETER["srcdefn", "+proj=…"], + * PARAMETER["dstdefn", "+proj=…"]] + * } * * <div class="section">Note on Proj.4 definition strings</div> * Proj.4 unconditionally requires 3 letters for the {@code "+axis="} parameter — for example {@code "neu"} for Modified: sis/trunk/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/CRSBuilder.java URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/CRSBuilder.java?rev=1804420&r1=1804419&r2=1804420&view=diff ============================================================================== --- sis/trunk/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/CRSBuilder.java [UTF-8] (original) +++ sis/trunk/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/CRSBuilder.java [UTF-8] Tue Aug 8 13:13:53 2017 @@ -133,7 +133,7 @@ import org.apache.sis.referencing.operat * <p>Going further down the list, the key 2051 ({@code GeogLinearUnitSize}) is located in {@code GeoDoubleParams(34736)} * at offset 0 and has the value 1.5; the value of key 2049 ({@code GeogCitation}) is "My Geographic".</p> * - * @author Rémi Marechal (Geomatys) + * @author Rémi Maréchal (Geomatys) * @author Martin Desruisseaux (Geomatys) * @version 0.8 * Modified: sis/trunk/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/GeoTIFF.java URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/GeoTIFF.java?rev=1804420&r1=1804419&r2=1804420&view=diff ============================================================================== --- sis/trunk/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/GeoTIFF.java [UTF-8] (original) +++ sis/trunk/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/GeoTIFF.java [UTF-8] Tue Aug 8 13:13:53 2017 @@ -30,7 +30,7 @@ import org.apache.sis.internal.geotiff.R * Those readers and writers are <strong>not</strong> thread safe. * The {@link GeoTiffStore} class is responsible for synchronization if needed. * - * @author Rémi Marechal (Geomatys) + * @author Rémi Maréchal (Geomatys) * @author Alexis Manin (Geomatys) * @author Johann Sorel (Geomatys) * @author Martin Desruisseaux (Geomatys) Modified: sis/trunk/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/GeoTiffStore.java URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/GeoTiffStore.java?rev=1804420&r1=1804419&r2=1804420&view=diff ============================================================================== --- sis/trunk/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/GeoTiffStore.java [UTF-8] (original) +++ sis/trunk/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/GeoTiffStore.java [UTF-8] Tue Aug 8 13:13:53 2017 @@ -36,6 +36,7 @@ import org.apache.sis.internal.storage.M import org.apache.sis.internal.util.Constants; import org.apache.sis.metadata.sql.MetadataStoreException; import org.apache.sis.storage.DataStoreClosedException; +import org.apache.sis.storage.Resource; import org.apache.sis.util.resources.Errors; @@ -132,6 +133,18 @@ public class GeoTiffStore extends DataSt } /** + * Current implementation does not provide any resource yet. + * A future version will return the raster data in a coverage resource. + * + * @return the starting point of all resources in this data store. + * @throws DataStoreException if an error occurred while reading the data. + */ + @Override + public Resource getRootResource() throws DataStoreException { + return null; + } + + /** * Returns the reader if it is not closed, or thrown an exception otherwise. */ private Reader reader() throws DataStoreException { Modified: sis/trunk/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/ImageFileDirectory.java URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/ImageFileDirectory.java?rev=1804420&r1=1804419&r2=1804420&view=diff ============================================================================== --- sis/trunk/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/ImageFileDirectory.java [UTF-8] (original) +++ sis/trunk/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/ImageFileDirectory.java [UTF-8] Tue Aug 8 13:13:53 2017 @@ -50,7 +50,7 @@ import org.apache.sis.internal.jdk8.JDK8 /** * An Image File Directory (FID) in a TIFF image. * - * @author Rémi Marechal (Geomatys) + * @author Rémi Maréchal (Geomatys) * @author Alexis Manin (Geomatys) * @author Johann Sorel (Geomatys) * @author Thi Phuong Hao Nguyen (VNSC) Modified: sis/trunk/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/Reader.java URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/Reader.java?rev=1804420&r1=1804419&r2=1804420&view=diff ============================================================================== --- sis/trunk/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/Reader.java [UTF-8] (original) +++ sis/trunk/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/Reader.java [UTF-8] Tue Aug 8 13:13:53 2017 @@ -48,7 +48,7 @@ import org.apache.sis.internal.jdk8.JDK8 * <p>The TIFF format specification version 6.0 (June 3, 1992) is available * <a href="https://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf">here</a>.</p> * - * @author Rémi Marechal (Geomatys) + * @author Rémi Maréchal (Geomatys) * @author Alexis Manin (Geomatys) * @author Johann Sorel (Geomatys) * @author Martin Desruisseaux (Geomatys) Modified: sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStore.java URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStore.java?rev=1804420&r1=1804419&r2=1804420&view=diff ============================================================================== --- sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStore.java [UTF-8] (original) +++ sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStore.java [UTF-8] Tue Aug 8 13:13:53 2017 @@ -26,6 +26,7 @@ import org.apache.sis.storage.StorageCon import org.apache.sis.internal.netcdf.Decoder; import org.apache.sis.metadata.ModifiableMetadata; import org.apache.sis.setup.OptionKey; +import org.apache.sis.storage.Resource; import org.apache.sis.util.CharSequences; import org.apache.sis.util.Version; import ucar.nc2.constants.CDM; @@ -117,6 +118,17 @@ public class NetcdfStore extends DataSto } /** + * This implementation does not provide any resource yet. + * + * @return currently {@code null} (will be implemented in future Apache SIS version). + * @throws DataStoreException if an error occurred while reading the data. + */ + @Override + public Resource getRootResource() throws DataStoreException { + return null; + } + + /** * Returns the version number of the Climate and Forecast (CF) conventions used in the NetCDF file. * The use of CF convention is mandated by the OGC 11-165r2 standard * (<cite>CF-netCDF3 Data Model Extension standard</cite>). Copied: sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/AbstractResource.java (from r1804411, sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/AbstractResource.java) URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/AbstractResource.java?p2=sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/AbstractResource.java&p1=sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/AbstractResource.java&r1=1804411&r2=1804420&rev=1804420&view=diff ============================================================================== --- sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/AbstractResource.java [UTF-8] (original) +++ sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/AbstractResource.java [UTF-8] Tue Aug 8 13:13:53 2017 @@ -28,6 +28,9 @@ import org.apache.sis.geometry.GeneralEn import org.apache.sis.util.logging.WarningListeners; import org.opengis.metadata.extent.GeographicExtent; +// Branch-dependent imports +import org.opengis.metadata.identification.DataIdentification; + /** * Base implementation of resources contained in data stores. @@ -79,8 +82,8 @@ public abstract class AbstractResource i GeneralEnvelope bounds = null; if (metadata != null) { for (final Identification identification : metadata.getIdentificationInfo()) { - if (identification != null) { // Paranoiac check. - for (final Extent extent : identification.getExtents()) { + if (identification instanceof DataIdentification) { + for (final Extent extent : ((DataIdentification) identification).getExtents()) { if (extent != null) { // Paranoiac check. for (final GeographicExtent ge : extent.getGeographicElements()) { if (ge instanceof GeographicBoundingBox) { Modified: sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/FeatureCatalogBuilder.java URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/FeatureCatalogBuilder.java?rev=1804420&r1=1804419&r2=1804420&view=diff ============================================================================== --- sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/FeatureCatalogBuilder.java [UTF-8] (original) +++ sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/FeatureCatalogBuilder.java [UTF-8] Tue Aug 8 13:13:53 2017 @@ -39,7 +39,7 @@ import org.apache.sis.feature.DefaultFea * @since 0.8 * @module */ -public class FeatureCatalogBuilder extends MetadataBuilder { +public final class FeatureCatalogBuilder extends MetadataBuilder { /** * The data store for which the metadata will be created, or {@code null} if unknown. * This is used for producing error message if an exception is thrown. Modified: sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/MetadataBuilder.java URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/MetadataBuilder.java?rev=1804420&r1=1804419&r2=1804420&view=diff ============================================================================== --- sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/MetadataBuilder.java [UTF-8] (original) +++ sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/MetadataBuilder.java [UTF-8] Tue Aug 8 13:13:53 2017 @@ -52,8 +52,8 @@ import org.opengis.metadata.identificati import org.opengis.metadata.distribution.Format; import org.opengis.metadata.quality.Element; import org.opengis.geometry.DirectPosition; +import org.opengis.referencing.ReferenceSystem; import org.opengis.referencing.crs.VerticalCRS; -import org.opengis.referencing.crs.CoordinateReferenceSystem; import org.opengis.referencing.operation.TransformException; import org.apache.sis.geometry.AbstractEnvelope; import org.apache.sis.metadata.iso.DefaultMetadata; @@ -125,7 +125,7 @@ import org.apache.sis.metadata.iso.citat * API of this class may change in any future SIS versions. * * @author Martin Desruisseaux (Geomatys) - * @author Rémi Marechal (Geomatys) + * @author Rémi Maréchal (Geomatys) * @version 0.8 * @since 0.8 * @module @@ -1623,7 +1623,7 @@ parse: for (int i = 0; i < length;) * * @param crs the coordinate reference system to add to the metadata, or {@code null} for no-operation. */ - public final void addReferenceSystem(final CoordinateReferenceSystem crs) { + public final void addReferenceSystem(final ReferenceSystem crs) { if (crs != null) { addIfNotPresent(metadata().getReferenceSystemInfo(), crs); } Modified: sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/Resources.java URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/Resources.java?rev=1804420&r1=1804419&r2=1804420&view=diff ============================================================================== --- sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/Resources.java [UTF-8] (original) +++ sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/Resources.java [UTF-8] Tue Aug 8 13:13:53 2017 @@ -149,6 +149,16 @@ public final class Resources extends Ind public static final short ProcessingExecutedOn_1 = 12; /** + * More than one resource have the “{1}” identifier in the “{0}” data store. + */ + public static final short ResourceIdentifierCollision_2 = 23; + + /** + * No resource found for the “{1}” identifier in the “{0}” data store. + */ + public static final short ResourceNotFound_2 = 24; + + /** * The “{1}” element must be declared before “{0}”. */ public static final short ShallBeDeclaredBefore_2 = 22; Modified: sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/Resources.properties URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/Resources.properties?rev=1804420&r1=1804419&r2=1804420&view=diff ============================================================================== --- sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/Resources.properties [ISO-8859-1] (original) +++ sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/Resources.properties [ISO-8859-1] Tue Aug 8 13:13:53 2017 @@ -36,6 +36,8 @@ IllegalOutputTypeForWriter_2 = The InconsistentNameComponents_2 = Components of the \u201c{1}\u201d name are inconsistent with those of the name previously binded in \u201c{0}\u201d data store. MissingSchemeInURI_1 = Missing scheme in \u201c{0}\u201d URI. ProcessingExecutedOn_1 = Processing executed on {0}. +ResourceIdentifierCollision_2 = More than one resource have the \u201c{1}\u201d identifier in the \u201c{0}\u201d data store. +ResourceNotFound_2 = No resource found for the \u201c{1}\u201d identifier in the \u201c{0}\u201d data store. ShallBeDeclaredBefore_2 = The \u201c{1}\u201d element must be declared before \u201c{0}\u201d. StreamIsForwardOnly_1 = Can not move backward in the \u201c{0}\u201d stream. StreamIsReadOnce_1 = The \u201c{0}\u201d data store can be read only once. Modified: sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/Resources_fr.properties URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/Resources_fr.properties?rev=1804420&r1=1804419&r2=1804420&view=diff ============================================================================== --- sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/Resources_fr.properties [ISO-8859-1] (original) +++ sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/Resources_fr.properties [ISO-8859-1] Tue Aug 8 13:13:53 2017 @@ -41,6 +41,8 @@ IllegalOutputTypeForWriter_2 = Le l InconsistentNameComponents_2 = Les \u00e9l\u00e9ments qui composent le nom \u00ab\u202f{1}\u202f\u00bb ne sont pas coh\u00e9rents avec ceux du nom qui avait \u00e9t\u00e9 pr\u00e9c\u00e9demment li\u00e9 dans les donn\u00e9es de \u00ab\u202f{0}\u202f\u00bb. MissingSchemeInURI_1 = Il manque le sch\u00e9ma dans l\u2019URI \u00ab\u202f{0}\u202f\u00bb. ProcessingExecutedOn_1 = Traitement ex\u00e9cut\u00e9 sur {0}. +ResourceIdentifierCollision_2 = Plusieurs ressources utilisent l\u2019identifiant \u00ab\u202f{1}\u202f\u00bb dans les donn\u00e9es de \u00ab\u202f{0}\u202f\u00bb. +ResourceNotFound_2 = Aucune ressource n\u2019a \u00e9t\u00e9 trouv\u00e9e pour l\u2019identifiant \u00ab\u202f{1}\u202f\u00bb dans les donn\u00e9es de \u00ab\u202f{0}\u202f\u00bb. ShallBeDeclaredBefore_2 = L\u2019\u00e9l\u00e9ment \u00ab\u202f{1}\u202f\u00bb doit \u00eatre d\u00e9clar\u00e9 avant \u00ab\u202f{0}\u202f\u00bb. StreamIsForwardOnly_1 = Ne peut pas reculer dans le flux de donn\u00e9es \u00ab\u202f{0}\u202f\u00bb. StreamIsReadOnce_1 = Les donn\u00e9es de \u00ab\u202f{0}\u202f\u00bb ne peuvent \u00eatre lues qu\u2019une seule fois. Copied: sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/FeatureAccess.java (from r1804411, sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/FeatureAccess.java) URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/FeatureAccess.java?p2=sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/FeatureAccess.java&p1=sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/FeatureAccess.java&r1=1804411&r2=1804420&rev=1804420&view=diff ============================================================================== --- sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/FeatureAccess.java [UTF-8] (original) +++ sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/FeatureAccess.java [UTF-8] Tue Aug 8 13:13:53 2017 @@ -23,8 +23,8 @@ import org.apache.sis.internal.storage.A import org.apache.sis.util.logging.WarningListeners; // 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; import org.apache.sis.internal.jdk8.Stream; @@ -69,7 +69,7 @@ final class FeatureAccess extends Abstra * @return type of features in the CSV file. */ @Override - public FeatureType getType() { + public DefaultFeatureType getType() { return ((Store) store).featureType; } @@ -81,7 +81,7 @@ final class FeatureAccess extends Abstra * @throws DataStoreException if an error occurred while creating the feature stream. */ @Override - public Stream<Feature> features(final boolean parallel) throws DataStoreException { + public Stream<AbstractFeature> features(final boolean parallel) throws DataStoreException { return ((Store) store).features(parallel); } } 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=1804420&r1=1804419&r2=1804420&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] Tue Aug 8 13:13:53 2017 @@ -44,17 +44,17 @@ import org.apache.sis.internal.referenci import org.apache.sis.internal.util.UnmodifiableArrayList; import org.apache.sis.internal.storage.MetadataBuilder; import org.apache.sis.internal.storage.io.IOUtilities; -import org.apache.sis.internal.storage.FeatureStore; import org.apache.sis.internal.feature.Geometries; import org.apache.sis.internal.feature.MovingFeature; import org.apache.sis.internal.storage.Resources; import org.apache.sis.geometry.GeneralEnvelope; import org.apache.sis.metadata.iso.DefaultMetadata; import org.apache.sis.metadata.sql.MetadataStoreException; +import org.apache.sis.storage.Resource; +import org.apache.sis.storage.DataStore; import org.apache.sis.storage.DataStoreException; import org.apache.sis.storage.DataStoreContentException; import org.apache.sis.storage.DataStoreReferencingException; -import org.apache.sis.storage.IllegalNameException; import org.apache.sis.storage.StorageConnector; import org.apache.sis.setup.OptionKey; import org.apache.sis.util.ArraysExt; @@ -80,7 +80,7 @@ import org.apache.sis.feature.AbstractId * @since 0.7 * @module */ -public final class Store extends FeatureStore { +public final class Store extends DataStore { /** * The character at the beginning of lines to ignore in the header. * Note that this is not part of OGC Moving Feature Specification. @@ -601,28 +601,13 @@ public final class Store extends Feature } /** - * Returns the feature type for the given name. The {@code name} argument should be the - * value specified at the following path (only one such value exists for a CSV data store): + * Returns the {@code FeatureSet} from which all features in this data store can be accessed. * - * <blockquote> - * {@link #getMetadata()} / - * {@link org.apache.sis.metadata.iso.DefaultMetadata#getContentInfo() contentInfo} / - * {@link org.apache.sis.metadata.iso.content.DefaultFeatureCatalogueDescription#getFeatureTypeInfo() featureTypes} / - * {@link org.apache.sis.metadata.iso.content.DefaultFeatureTypeInfo#getFeatureTypeName() featureTypeName} - * </blockquote> - * - * @param name the name of the feature type to get. - * @return the feature type of the given name (never {@code null}). - * @throws IllegalNameException if the given name was not found. - * - * @since 0.8 + * @return the starting point of all features in this data store. */ @Override - public DefaultFeatureType getFeatureType(String name) throws IllegalNameException { - if (featureType.getName().toString().equals(name)) { - return featureType; - } - throw new IllegalNameException(getLocale(), getDisplayName(), name); + public Resource getRootResource() { + return new FeatureAccess(this, listeners); } /** @@ -635,8 +620,7 @@ public final class Store extends Feature * @todo Needs to reset the position when doing another pass on the features. * @todo If sequential order, publish Feature as soon as identifier changed. */ - @Override - public synchronized Stream<AbstractFeature> features(final boolean parallel) throws DataStoreException { + final synchronized Stream<AbstractFeature> features(final boolean parallel) throws DataStoreException { /* * If the user asks for one feature instance per line, then we can return a FeatureIter instance directly. * Since each feature is fully constructed from a single line and each line are read atomically, we can Modified: sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/wkt/Store.java URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/wkt/Store.java?rev=1804420&r1=1804419&r2=1804420&view=diff ============================================================================== --- sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/wkt/Store.java [UTF-8] (original) +++ sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/wkt/Store.java [UTF-8] Tue Aug 8 13:13:53 2017 @@ -17,8 +17,8 @@ package org.apache.sis.internal.storage.wkt; import java.util.List; -import java.util.ArrayList; import java.util.Arrays; +import java.util.ArrayList; import java.util.logging.Level; import java.util.logging.LogRecord; import java.io.Reader; @@ -33,12 +33,13 @@ import org.apache.sis.internal.storage.R import org.apache.sis.internal.system.Loggers; import org.apache.sis.io.wkt.WKTFormat; import org.apache.sis.io.wkt.Warnings; +import org.apache.sis.storage.Resource; import org.apache.sis.storage.DataStore; import org.apache.sis.storage.StorageConnector; import org.apache.sis.storage.DataStoreException; import org.apache.sis.storage.DataStoreContentException; import org.apache.sis.internal.referencing.DefinitionVerifier; -import org.apache.sis.metadata.iso.DefaultMetadata; +import org.apache.sis.internal.storage.MetadataBuilder; import org.apache.sis.util.resources.Errors; import org.apache.sis.util.CharSequences; @@ -171,7 +172,7 @@ final class Store extends DataStore { /** * Returns the metadata associated to the parsed objects, or {@code null} if none. * The current implementation retains only instances of {@link ReferenceSystem} - * and ignore other cases. + * and ignore other objects. * * @return the metadata associated to the parsed object, or {@code null} if none. * @throws DataStoreException if an error occurred during the parsing process. @@ -180,19 +181,28 @@ final class Store extends DataStore { public synchronized Metadata getMetadata() throws DataStoreException { if (metadata == null) { parse(); - DefaultMetadata md = null; + final MetadataBuilder builder = new MetadataBuilder(); + builder.addTitle(getDisplayName()); for (final Object object : objects) { if (object instanceof ReferenceSystem) { - if (md == null) md = new DefaultMetadata(); - md.getReferenceSystemInfo().add((ReferenceSystem) object); + builder.addReferenceSystem((ReferenceSystem) object); } } - metadata = md; + metadata = builder.build(true); } return metadata; } /** + * There is currently no resource associated to Well Known Text format since we parse only CRS. + * Future versions may return resources if we parse also geometries. + */ + @Override + public Resource getRootResource() throws DataStoreException { + return null; + } + + /** * Closes this data store and releases any underlying resources. * * @throws DataStoreException if an error occurred while closing this data store. Modified: sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/xml/Store.java URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/xml/Store.java?rev=1804420&r1=1804419&r2=1804420&view=diff ============================================================================== --- sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/xml/Store.java [UTF-8] (original) +++ sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/xml/Store.java [UTF-8] Tue Aug 8 13:13:53 2017 @@ -30,6 +30,7 @@ import org.opengis.util.FactoryException import org.opengis.referencing.ReferenceSystem; import org.opengis.referencing.crs.CoordinateReferenceSystem; import org.apache.sis.xml.XML; +import org.apache.sis.storage.Resource; import org.apache.sis.storage.DataStore; import org.apache.sis.storage.StorageConnector; import org.apache.sis.storage.DataStoreException; @@ -37,10 +38,9 @@ import org.apache.sis.metadata.iso.Defau import org.apache.sis.util.logging.WarningListener; import org.apache.sis.util.resources.Errors; import org.apache.sis.internal.system.Loggers; +import org.apache.sis.internal.storage.MetadataBuilder; import org.apache.sis.internal.referencing.DefinitionVerifier; -import static java.util.Collections.singleton; - /** * A data store which creates data objects from a XML file. @@ -199,15 +199,25 @@ final class Store extends DataStore { if (object instanceof Metadata) { metadata = (Metadata) object; } else if (object instanceof ReferenceSystem) { - final DefaultMetadata md = new DefaultMetadata(); - md.setReferenceSystemInfo(singleton((ReferenceSystem) object)); - metadata = md; + final MetadataBuilder builder = new MetadataBuilder(); + builder.addReferenceSystem((ReferenceSystem) object); + builder.addTitle(getDisplayName()); + metadata = builder.build(true); } } return metadata; } /** + * Current implementation does not provide any resource since it is only about metadata. + * Futures versions may return resources if Apache SIS provides a wider GML support. + */ + @Override + public Resource getRootResource() throws DataStoreException { + return null; + } + + /** * Closes this data store and releases any underlying resources. * * @throws DataStoreException if an error occurred while closing this data store. Copied: sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/storage/Aggregate.java (from r1804411, sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/storage/Aggregate.java) URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/storage/Aggregate.java?p2=sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/storage/Aggregate.java&p1=sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/storage/Aggregate.java&r1=1804411&r2=1804420&rev=1804420&view=diff ============================================================================== --- sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/storage/Aggregate.java [UTF-8] (original) +++ sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/storage/Aggregate.java [UTF-8] Tue Aug 8 13:13:53 2017 @@ -49,10 +49,10 @@ import java.util.Collection; * {@link org.apache.sis.metadata.iso.DefaultMetadata#getMetadataScopes() metadataScope} / * {@link org.apache.sis.metadata.iso.DefaultMetadataScope#getResourceScope() resourceScope} sets to * {@link org.opengis.metadata.maintenance.ScopeCode#SERIES} or - * {@link org.opengis.metadata.maintenance.ScopeCode#INITIATIVE} if applicable. + * {@code ScopeCode.INITIATIVE} if applicable. * If not too expensive to compute, the names of all components should be listed as * {@linkplain org.apache.sis.metadata.iso.identification.AbstractIdentification#getAssociatedResources() - * associated resources} with an {@link org.opengis.metadata.identification.AssociationType#IS_COMPOSED_OF} relation. + * associated resources} with an {@code AssociationType.IS_COMPOSED_OF} relation. * * @author Johann Sorel (Geomatys) * @version 0.8 @@ -69,7 +69,7 @@ public interface Aggregate extends Resou * <blockquote><code><b>this</b>.metadata</code> / * {@link org.apache.sis.metadata.iso.DefaultMetadata#getIdentificationInfo() identificationInfo} / * {@link org.apache.sis.metadata.iso.identification.AbstractIdentification#getAssociatedResources() associatedResource} - * with {@link org.opengis.metadata.identification.AssociationType#IS_COMPOSED_OF}</blockquote> + * with {@code AssociationType.IS_COMPOSED_OF}</blockquote> * * The name of each child resource in the returned collection is given by the following metadata element: * Modified: sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/storage/DataStore.java URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/storage/DataStore.java?rev=1804420&r1=1804419&r2=1804420&view=diff ============================================================================== --- sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/storage/DataStore.java [UTF-8] (original) +++ sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/storage/DataStore.java [UTF-8] Tue Aug 8 13:13:53 2017 @@ -17,12 +17,17 @@ package org.apache.sis.storage; import java.util.Locale; +import java.util.Map; +import java.util.IdentityHashMap; import java.util.NoSuchElementException; import org.opengis.metadata.Metadata; +import org.opengis.metadata.identification.Identification; import org.apache.sis.util.Localized; import org.apache.sis.util.ArgumentChecks; import org.apache.sis.util.logging.WarningListener; import org.apache.sis.util.logging.WarningListeners; +import org.apache.sis.internal.storage.Resources; +import org.apache.sis.internal.util.Citations; /** @@ -164,16 +169,107 @@ public abstract class DataStore implemen } /** - * Returns information about the dataset as a whole. The returned metadata object, if any, can contain - * information such as the spatiotemporal extent of the dataset, contact information about the creator - * or distributor, data quality, update frequency, usage constraints and more. + * Returns information about the data store as a whole. The returned metadata object can contain + * information such as the spatiotemporal extent of all contained {@linkplain Resource resources}, + * contact information about the creator or distributor, data quality, update frequency, usage constraints, + * file format and more. * - * @return information about the dataset, or {@code null} if none. + * @return information about resources in the data store, or {@code null} if none. * @throws DataStoreException if an error occurred while reading the data. + * + * @see Resource#getMetadata() */ public abstract Metadata getMetadata() throws DataStoreException; /** + * Returns the starting point from which all resources in this data store can be accessed. + * A resource can be for example a air temperature map or the set of all bridges in a city. + * If this data store contains only one resource, then that resource is returned directly. + * Otherwise if this data store contains more than one resource, then this method returns + * an {@link Aggregate} from which other resources can be accessed. + * + * @return the starting point of all resources in this data store, + * or {@code null} if this data store does not contain any resources. + * @throws DataStoreException if an error occurred while reading the data. + */ + public abstract Resource getRootResource() throws DataStoreException; + + /** + * Searches for a resource identified by the given identifier. + * The given identifier should match the following metadata element of a resource: + * + * <blockquote>{@link Resource#getMetadata() metadata} / + * {@link org.apache.sis.metadata.iso.DefaultMetadata#getIdentificationInfo() identificationInfo} / + * {@link org.apache.sis.metadata.iso.identification.AbstractIdentification#getCitation() citation} / + * {@link org.apache.sis.metadata.iso.citation.DefaultCitation#getIdentifiers() identifier}</blockquote> + * + * Implementation may also accept aliases for convenience. For example if the full name of a resource + * is {@code "foo:bar"}, then this method may accept {@code "bar"} as a synonymous of {@code "foo:bar"} + * provided that it does not introduce ambiguity. + * + * <p>The default implementation verifies the {@linkplain #getRootResource() root resource}, then iterates over + * components of {@link Aggregate}s. If a match is found without ambiguity, the associated resource is returned. + * Otherwise an exception is thrown. Subclasses are encouraged to override this method with a more efficient + * implementation.</p> + * + * @param identifier identifier of the resource to fetch. Must be non-null. + * @return resource associated to the given identifier (never {@code null}). + * @throws IllegalNameException if no resource is found for the given identifier, or if more than one resource is found. + * @throws DataStoreException if another kind of error occurred while searching resources. + */ + public Resource findResource(final String identifier) throws DataStoreException { + ArgumentChecks.ensureNonEmpty("identifier", identifier); + final Resource resource = findResource(identifier, getRootResource(), new IdentityHashMap<Resource,Boolean>()); + if (resource != null) { + return resource; + } + throw new IllegalNameException(Resources.forLocale(getLocale()) + .getString(Resources.Keys.ResourceNotFound_2, getDisplayName(), identifier)); + } + + /** + * Recursively searches for a resource identified by the given identifier. + * This is the implementation of {@link #findResource(String)}. + * + * @param identifier identifier of the resource to fetch. + * @param candidate a resource to compare against the identifier. + * @param visited resources visited so-far, for avoiding never-ending loops if cycles exist. + * @return resource associated to the given identifier, or {@code null} if not found. + */ + private Resource findResource(final String identifier, final Resource candidate, + final Map<Resource,Boolean> visited) throws DataStoreException + { + if (candidate != null && visited.put(candidate, Boolean.TRUE) == null) { + final Metadata metadata = candidate.getMetadata(); + if (metadata != null) { + for (final Identification identification : metadata.getIdentificationInfo()) { + if (identification != null) { // Paranoiac check. + if (Citations.identifierMatches(identification.getCitation(), null, identifier)) { + return candidate; + } + } + } + } + if (candidate instanceof Aggregate) { + Resource result = null; + for (final Resource child : ((Aggregate) candidate).components()) { + final Resource match = findResource(identifier, child, visited); + if (match != null) { + if (result == null) { + result = match; + } else { + throw new IllegalNameException(Resources.forLocale(getLocale()) + .getString(Resources.Keys.ResourceIdentifierCollision_2, getDisplayName(), identifier)); + } + } + } + return result; + } + } + return null; + } + + /** * Adds a listener to be notified when a warning occurred while reading from or writing to the storage. * When a warning occurs, there is a choice: * Copied: sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/storage/FeatureSet.java (from r1804411, sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/storage/FeatureSet.java) URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/storage/FeatureSet.java?p2=sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/storage/FeatureSet.java&p1=sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/storage/FeatureSet.java&r1=1804411&r2=1804420&rev=1804420&view=diff ============================================================================== --- sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/storage/FeatureSet.java [UTF-8] (original) +++ sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/storage/FeatureSet.java [UTF-8] Tue Aug 8 13:13:53 2017 @@ -16,11 +16,10 @@ */ package org.apache.sis.storage; -import org.opengis.feature.Feature; -import org.opengis.feature.FeatureType; - // Branch-dependent imports import org.apache.sis.internal.jdk8.Stream; +import org.apache.sis.feature.AbstractFeature; +import org.apache.sis.feature.DefaultFeatureType; /** @@ -68,7 +67,7 @@ public interface FeatureSet extends Data * @return description of common properties (never {@code null}). * @throws DataStoreException if an error occurred while reading definitions from the underlying data store. */ - FeatureType getType() throws DataStoreException; + DefaultFeatureType getType() throws DataStoreException; /** * Returns a stream of all features contained in this dataset. @@ -101,5 +100,5 @@ public interface FeatureSet extends Data * @return all features contained in this dataset. * @throws DataStoreException if an error occurred while creating the stream. */ - Stream<Feature> features(boolean parallel) throws DataStoreException; + Stream<AbstractFeature> features(boolean parallel) throws DataStoreException; } Copied: sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/storage/Resource.java (from r1804411, sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/storage/Resource.java) URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/storage/Resource.java?p2=sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/storage/Resource.java&p1=sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/storage/Resource.java&r1=1804411&r2=1804420&rev=1804420&view=diff ============================================================================== --- sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/storage/Resource.java [UTF-8] (original) +++ sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/storage/Resource.java [UTF-8] Tue Aug 8 13:13:53 2017 @@ -86,7 +86,7 @@ public interface Resource { * {@link org.opengis.metadata.maintenance.ScopeCode#DATASET} if the resource is a {@link DataSet}, or * {@link org.opengis.metadata.maintenance.ScopeCode#SERVICE} if the resource is a web service, or * {@link org.opengis.metadata.maintenance.ScopeCode#SERIES} or - * {@link org.opengis.metadata.maintenance.ScopeCode#INITIATIVE} + * {@code ScopeCode.INITIATIVE} * if the resource is an {@link Aggregate} other than a transfer aggregate.</li> * <li>{@code metadata} / * {@link org.apache.sis.metadata.iso.DefaultMetadata#getContentInfo() contentInfo} / Modified: sis/trunk/storage/sis-storage/src/test/java/org/apache/sis/storage/DataStoreMock.java URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-storage/src/test/java/org/apache/sis/storage/DataStoreMock.java?rev=1804420&r1=1804419&r2=1804420&view=diff ============================================================================== --- sis/trunk/storage/sis-storage/src/test/java/org/apache/sis/storage/DataStoreMock.java [UTF-8] (original) +++ sis/trunk/storage/sis-storage/src/test/java/org/apache/sis/storage/DataStoreMock.java [UTF-8] Tue Aug 8 13:13:53 2017 @@ -54,6 +54,11 @@ final strictfp class DataStoreMock exten } @Override + public Resource getRootResource() throws DataStoreException { + return null; + } + + @Override public void close() { } } Copied: sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/FeatureAccess.java (from r1804411, sis/branches/JDK7/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/FeatureAccess.java) URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/FeatureAccess.java?p2=sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/FeatureAccess.java&p1=sis/branches/JDK7/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/FeatureAccess.java&r1=1804411&r2=1804420&rev=1804420&view=diff ============================================================================== --- sis/branches/JDK7/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/FeatureAccess.java [UTF-8] (original) +++ sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/FeatureAccess.java [UTF-8] Tue Aug 8 13:13:53 2017 @@ -23,8 +23,8 @@ import org.apache.sis.internal.storage.A import org.apache.sis.util.logging.WarningListeners; // 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; import org.apache.sis.internal.jdk8.Stream; @@ -62,7 +62,7 @@ final class FeatureAccess extends Abstra * @return base type of all GPX types. */ @Override - public FeatureType getType() { + public DefaultFeatureType getType() { return ((Store) store).types.parent; } @@ -74,7 +74,7 @@ final class FeatureAccess extends Abstra * @throws DataStoreException if an error occurred while creating the feature stream. */ @Override - public Stream<Feature> features(final boolean parallel) throws DataStoreException { + public Stream<AbstractFeature> features(final boolean parallel) throws DataStoreException { return ((Store) store).features(); } } 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=1804420&r1=1804419&r2=1804420&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] Tue Aug 8 13:13:53 2017 @@ -21,6 +21,7 @@ import org.opengis.util.NameFactory; import org.opengis.util.FactoryException; import org.opengis.metadata.Metadata; import org.opengis.metadata.distribution.Format; +import org.apache.sis.storage.Resource; import org.apache.sis.storage.StorageConnector; import org.apache.sis.storage.DataStoreException; import org.apache.sis.storage.DataStoreContentException; @@ -167,14 +168,27 @@ public final class Store extends StaxDat } /** + * Returns the {@code FeatureSet} from which all features in this data store can be accessed. + * + * @return the starting point of all features in this data store. + */ + @Override + public Resource getRootResource() { + return new FeatureAccess(this, listeners); + } + + /** * Returns the feature type for the given name. The {@code name} argument should be the result of calling * {@link org.opengis.util.GenericName#toString()} on the name of one of the feature types in this data store. * * @param name the name or alias of the feature type to get. * @return the feature type of the given name or alias (never {@code null}). * @throws IllegalNameException if the given name was not found or is ambiguous. + * + * @deprecated We are not sure yet if we will keep this method. Decision is pending acquisition of + * more experience with the API proposed by {@link org.apache.sis.storage.FeatureSet}. */ - @Override + @Deprecated public DefaultFeatureType getFeatureType(final String name) throws IllegalNameException { return types.names.get(this, name); } @@ -182,12 +196,10 @@ public final class Store extends StaxDat /** * Returns the stream of features. * - * @param parallel ignored in current implementation. * @return a stream over all features in the XML file. * @throws DataStoreException if an error occurred while creating the feature stream. */ - @Override - public synchronized Stream<AbstractFeature> features(final boolean parallel) throws DataStoreException { + final synchronized Stream<AbstractFeature> features() throws DataStoreException { Reader r = reader; reader = null; if (r == null) 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=1804420&r1=1804419&r2=1804420&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] Tue Aug 8 13:13:53 2017 @@ -64,6 +64,11 @@ import org.apache.sis.feature.DefaultAtt */ final class Types { /** + * The parent of all other feature types. + */ + final DefaultFeatureType parent; + + /** * Way point GPX feature type. */ final DefaultFeatureType wayPoint; @@ -91,7 +96,11 @@ final class Types { /** * Binding from names to feature type instances. * Shall not be modified after construction. + * + * @deprecated We are not sure yet if we will keep this field. Decision is pending acquisition of + * more experience with the API proposed by {@link org.apache.sis.storage.FeatureSet}. */ + @Deprecated final FeatureNaming<DefaultFeatureType> names; /** @@ -143,7 +152,7 @@ final class Types { final FeatureTypeBuilder builder = new FeatureTypeBuilder(factory, library, locale); builder.setNameSpace(Tags.PREFIX).setName("GPXEntity").setAbstract(true); builder.addAttribute(Integer.class).setName(AttributeConvention.IDENTIFIER_PROPERTY); - final DefaultFeatureType parent = builder.build(); + parent = builder.build(); /* * WayPoint ⇾ GPXEntity * ┌──────────────────┬────────────────┬────────────────────────┬─────────────┐ Modified: sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/StaxDataStore.java URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/StaxDataStore.java?rev=1804420&r1=1804419&r2=1804420&view=diff ============================================================================== --- sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/StaxDataStore.java [UTF-8] (original) +++ sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/StaxDataStore.java [UTF-8] Tue Aug 8 13:13:53 2017 @@ -38,7 +38,6 @@ import org.apache.sis.setup.OptionKey; import org.apache.sis.storage.DataStore; import org.apache.sis.storage.StorageConnector; import org.apache.sis.storage.DataStoreException; -import org.apache.sis.internal.storage.FeatureStore; import org.apache.sis.internal.storage.io.ChannelFactory; import org.apache.sis.internal.storage.io.IOUtilities; import org.apache.sis.internal.storage.io.Markable; @@ -65,7 +64,7 @@ import org.apache.sis.util.Debug; * @since 0.8 * @module */ -public abstract class StaxDataStore extends FeatureStore { +public abstract class StaxDataStore extends DataStore { /** * The locale to use for locale-sensitive data (<strong>not</strong> for logging or warning messages), * or {@code null} if unspecified.