diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml index 1e28d55..d30546b 100644 --- a/nbproject/build-impl.xml +++ b/nbproject/build-impl.xml @@ -903,6 +903,14 @@ + + + + + + + + @@ -1388,6 +1396,14 @@ + + + + + + + + diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties index 5b13213..e74ced1 100644 --- a/nbproject/genfiles.properties +++ b/nbproject/genfiles.properties @@ -1,8 +1,8 @@ -nbbuild.xml.data.CRC32=8751fd35 +nbbuild.xml.data.CRC32=7469a291 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=8751fd35 -nbproject/build-impl.xml.script.CRC32=b6dace46 +nbproject/build-impl.xml.data.CRC32=7469a291 +nbproject/build-impl.xml.script.CRC32=9170c4d3 nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48 diff --git a/nbproject/project.properties b/nbproject/project.properties index 76b8b06..4946c78 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -31,7 +31,6 @@ 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 @@ -40,9 +39,9 @@ jar.compress=false jar.index=${jnlp.enabled} javac.classpath=\ - ${file.reference.hayashi_0225.jar}:\ ${file.reference.hsqldb_2.2.9.jar}:\ - ${file.reference.postgresql-9.4.1212.jar} + ${file.reference.postgresql-9.4.1212.jar}:\ + ${reference.hayashi.jar} # Space-separated list of extra javac options javac.compilerargs= javac.deprecation=false @@ -91,6 +90,8 @@ meta.inf.dir=${src.dir}/META-INF mkdist.disabled=false platform.active=default_platform +project.hayashi=../hayashi +reference.hayashi.jar=${project.hayashi}/dist/hayashi.jar run.classpath=\ ${javac.classpath}:\ ${build.classes.dir} diff --git a/nbproject/project.xml b/nbproject/project.xml index 2957cff..24c2e39 100644 --- a/nbproject/project.xml +++ b/nbproject/project.xml @@ -11,5 +11,15 @@ + + + hayashi + jar + + jar + clean + jar + + diff --git a/src/osm/jp/coverage/postoffice/DbPostoffice.java b/src/osm/jp/coverage/postoffice/DbPostoffice.java index dfad401..17ac222 100644 --- a/src/osm/jp/coverage/postoffice/DbPostoffice.java +++ b/src/osm/jp/coverage/postoffice/DbPostoffice.java @@ -1,5 +1,6 @@ package osm.jp.coverage.postoffice; +import hayashi.tools.files.DeleteDir; import java.io.*; import java.sql.Connection; import java.sql.PreparedStatement; @@ -34,7 +35,7 @@ File dir = new File("database"); if (dir.exists()) { if (dir.isDirectory()) { - dir.deleteOnExit(); + DeleteDir.delete(dir); } } @@ -272,7 +273,14 @@ //Db.drop(con, TABLE_NAME); createSt = "CREATE TABLE "+ TABLE_NAME2 +" (idref VARCHAR(12) NOT NULL, lat DOUBLE, lon DOUBLE)"; Db.updateSQL(con, createSt); - createSt = "CREATE TABLE "+ TABLE_NAME +" (gid INT, idref VARCHAR(12) NOT NULL, fixed INT, area INT, up INT, fixed1 INT)"; + + createSt = "CREATE UNIQUE INDEX id2 ON "+ TABLE_NAME2 +" (idref)"; + Db.updateSQL(con, createSt); + + createSt = "CREATE TABLE "+ TABLE_NAME +" (gid INT, idref VARCHAR(12) NOT NULL, area INT, lat DOUBLE, lon DOUBLE, up INT, fixed INT, fixed1 INT)"; + Db.updateSQL(con, createSt); + + createSt = "CREATE INDEX id1 ON "+ TABLE_NAME +" (idref, lat, lon)"; Db.updateSQL(con, createSt); }