14 |
import dk.daoas.fulddaekning.BoundingBox.BoundingBoxException; |
import dk.daoas.fulddaekning.BoundingBox.BoundingBoxException; |
15 |
|
|
16 |
public class Lookup { |
public class Lookup { |
17 |
|
|
18 |
|
static final String CONFIG_FILENAME = "fulddaekning.properties"; |
19 |
|
|
20 |
static int max_workers; |
static int max_workers; |
21 |
static boolean verbose; |
static boolean verbose; |
22 |
|
|
23 |
|
static boolean rename_tables; |
24 |
|
|
25 |
static SafeProperties conf; |
static SafeProperties conf; |
26 |
static Logger logger = Logger.getLogger( Lookup.class.toString() ); |
static Logger logger = Logger.getLogger( Lookup.class.toString() ); |
27 |
|
|
160 |
|
|
161 |
public static void main(String[] args) throws Exception { |
public static void main(String[] args) throws Exception { |
162 |
|
|
163 |
File confFile = new File("fulddaekning.properties"); |
File confFile = new File( CONFIG_FILENAME ); |
164 |
if (! confFile.exists() ) { |
if (! confFile.exists() ) { |
165 |
logger.warning("Config file not found"); |
logger.warning("Config file not found: " + CONFIG_FILENAME); |
166 |
System.exit(1); |
System.exit(1); |
167 |
} |
} |
168 |
|
|
175 |
verbose = Boolean.parseBoolean( conf.getSafeProperty("VERBOSE") ); |
verbose = Boolean.parseBoolean( conf.getSafeProperty("VERBOSE") ); |
176 |
logger.info("Starting with VERBOSE:" + verbose); |
logger.info("Starting with VERBOSE:" + verbose); |
177 |
|
|
178 |
|
rename_tables = Boolean.parseBoolean( conf.getSafeProperty("RENAMETABLES") ); |
179 |
|
logger.info("Starting with RENAMETABLES:" + rename_tables); |
180 |
|
|
181 |
Database db = new Database(conf); |
Database db = new Database(conf); |
182 |
|
|
183 |
db.resetResultTable(); |
db.resetResultTable(); |
196 |
lookup.doLookup(); |
lookup.doLookup(); |
197 |
} |
} |
198 |
|
|
199 |
|
if (rename_tables) { |
200 |
|
db.renameResultTables(); |
201 |
|
} else { |
202 |
|
logger.info( "Rename tables is disabled !!!" ); |
203 |
|
} |
204 |
|
|
205 |
long now = System.currentTimeMillis(); |
long now = System.currentTimeMillis(); |
206 |
|
|
207 |
logger.info("Flest Ikke-dækkede, " + flestIkkeDaekkede); |
logger.info("Flest Ikke-dækkede, " + flestIkkeDaekkede); |