diff --git a/.gitignore b/.gitignore index 7afcb7c..fbc9269 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,6 @@ Icon? ehthumbs.db [Tt]humbs.db +/nbproject/private/ +/build/ +/dist/ \ No newline at end of file diff --git a/doc/db.fuel.class.violet.html b/doc/db.fuel.class.violet.html new file mode 100644 index 0000000..31aacdb --- /dev/null +++ b/doc/db.fuel.class.violet.html @@ -0,0 +1,330 @@ + + + + + + + + + This file was generated with Violet UML Editor 2.1.0. +   ( View Source / Download Violet ) +
+
+ +
+
+ embedded diagram image + + \ No newline at end of file diff --git a/manifest.mf b/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/nbbuild.xml b/nbbuild.xml new file mode 100644 index 0000000..b6c1178 --- /dev/null +++ b/nbbuild.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project osmCoverage. + + + diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml new file mode 100644 index 0000000..894502b --- /dev/null +++ b/nbproject/build-impl.xml @@ -0,0 +1,1403 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties new file mode 100644 index 0000000..d7773c1 --- /dev/null +++ b/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +nbbuild.xml.data.CRC32=980059b7 +nbbuild.xml.script.CRC32=e7ea1557 +nbbuild.xml.stylesheet.CRC32=8064a381@1.80.1.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=980059b7 +nbproject/build-impl.xml.script.CRC32=9b89e078 +nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48 diff --git a/nbproject/project.properties b/nbproject/project.properties new file mode 100644 index 0000000..e0da09d --- /dev/null +++ b/nbproject/project.properties @@ -0,0 +1,83 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +application.title=osmCoverage +application.vendor=yuu +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +buildfile=nbbuild.xml +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# \u914d\u7f6ejar\u304b\u3089\u9664\u5916\u3059\u308b\u5fc5\u8981\u304c\u3042\u308bbuild.classes.dir\u5185\u306e\u30d5\u30a1\u30a4\u30eb +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/osmCoverage.jar +dist.javadoc.dir=${dist.dir}/javadoc +endorsed.classpath= +excludes= +file.reference.hayashi_0225.jar=lib\\hayashi_0225.jar +file.reference.hsqldb_2.2.9.jar=lib\\hsqldb_2.2.9.jar +file.reference.osmCoverage-src=src +file.reference.postgresql-9.4.1212.jar=lib\\postgresql-9.4.1212.jar +includes=** +jar.compress=false +javac.classpath=\ + ${file.reference.hayashi_0225.jar}:\ + ${file.reference.hsqldb_2.2.9.jar}:\ + ${file.reference.postgresql-9.4.1212.jar} +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.external.vm=true +javac.processorpath=\ + ${javac.classpath} +javac.source=1.8 +javac.target=1.8 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class= +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=${file.reference.osmCoverage-src} diff --git a/nbproject/project.xml b/nbproject/project.xml new file mode 100644 index 0000000..3480a86 --- /dev/null +++ b/nbproject/project.xml @@ -0,0 +1,13 @@ + + + org.netbeans.modules.java.j2seproject + + + osmCoverage + + + + + + + diff --git a/src/ImportGML_FUEL.bat b/src/ImportGML_FUEL.bat new file mode 100644 index 0000000..2f1f6e9 --- /dev/null +++ b/src/ImportGML_FUEL.bat @@ -0,0 +1,3 @@ +RD /s database +java -cp .;osmCoverage.jar;hayashi_0225.jar;hsqldb_2.2.9.jar;postgresql-9.4.1212.jar osm.jp.coverage.fuel.DbFuel + diff --git a/src/osm/jp/api/Db.java b/src/osm/jp/api/Db.java new file mode 100644 index 0000000..0da611a --- /dev/null +++ b/src/osm/jp/api/Db.java @@ -0,0 +1,51 @@ +package osm.jp.api; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.SQLException; +import java.sql.SQLSyntaxErrorException; + +public class Db { + /** + * データを受信しないSQLを実行するに作る + * 既にテーブルが存在する時には何もしない + * @param con + * @param createsql + * @throws SQLException + * @throws java.sql.SQLSyntaxErrorException + */ + public static void updateSQL(Connection con, String createsql) throws SQLException, SQLSyntaxErrorException { + System.out.println(createsql); + try (PreparedStatement ps = con.prepareStatement(createsql)) { + ps.executeUpdate(); + } + } + + /** + * 'table.?'を削除するS + * @param con + * @param tableName + * @throws SQLException + */ + public static void drop(Connection con, String tableName) throws SQLException { + String createSt = "DROP TABLE "+ tableName +";"; + System.out.println(createSt); + try (PreparedStatement ps = con.prepareStatement(createSt)) { + ps.executeUpdate(); + } + } + + /** + * 'table.FUEL'の内容を空にする + * @param con + * @param tableName + * @throws SQLException + */ + public static void clear(Connection con, String tableName) throws SQLException { + String createSt = "DELETE FROM "+ tableName +";"; + System.out.println(createSt); + try (PreparedStatement ps = con.prepareStatement(createSt)) { + ps.executeUpdate(); + } + } +} \ No newline at end of file diff --git a/src/osm/jp/coverage/busstop/Busstop.java b/src/osm/jp/coverage/busstop/Busstop.java index 4f140fc..d861539 100644 --- a/src/osm/jp/coverage/busstop/Busstop.java +++ b/src/osm/jp/coverage/busstop/Busstop.java @@ -38,9 +38,10 @@ /** * メイン * - * java -cp .:ConvBusstop.jar:hayashi_0225.jar:hsqldb_2.2.9.jar osm.jp.ConvBusstop