--- dao/FuldDaekningWorker/src/dk/daoas/fulddaekning/Lookup.java 2014/05/10 08:24:55 2157 +++ dao/FuldDaekningWorker/src/dk/daoas/fulddaekning/Lookup.java 2014/06/19 10:56:04 2195 @@ -14,9 +14,14 @@ import dk.daoas.fulddaekning.BoundingBox.BoundingBoxException; public class Lookup { + + static final String CONFIG_FILENAME = "fulddaekning.properties"; + static int max_workers; static boolean verbose; + static boolean rename_tables; + static SafeProperties conf; static Logger logger = Logger.getLogger( Lookup.class.toString() ); @@ -155,9 +160,9 @@ public static void main(String[] args) throws Exception { - File confFile = new File("fulddaekning.properties"); + File confFile = new File( CONFIG_FILENAME ); if (! confFile.exists() ) { - logger.warning("Config file not found"); + logger.warning("Config file not found: " + CONFIG_FILENAME); System.exit(1); } @@ -170,6 +175,9 @@ verbose = Boolean.parseBoolean( conf.getSafeProperty("VERBOSE") ); logger.info("Starting with VERBOSE:" + verbose); + rename_tables = Boolean.parseBoolean( conf.getSafeProperty("RENAMETABLES") ); + logger.info("Starting with RENAMETABLES:" + rename_tables); + Database db = new Database(conf); db.resetResultTable(); @@ -188,6 +196,12 @@ lookup.doLookup(); } + if (rename_tables) { + db.renameResultTables(); + } else { + logger.info( "Rename tables is disabled !!!" ); + } + long now = System.currentTimeMillis(); logger.info("Flest Ikke-dækkede, " + flestIkkeDaekkede);