/[projects]/dao/FuldDaekningWorker/src/dk/daoas/fulddaekning/Lookup.java
ViewVC logotype

Diff of /dao/FuldDaekningWorker/src/dk/daoas/fulddaekning/Lookup.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2157 by torben, Sat May 10 08:24:55 2014 UTC revision 2195 by torben, Thu Jun 19 10:56:04 2014 UTC
# Line 14  import java.util.logging.Logger; Line 14  import java.util.logging.Logger;
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                    
# Line 155  public class Lookup { Line 160  public class Lookup {
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                                                                    
# Line 170  public class Lookup { Line 175  public class Lookup {
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();
# Line 188  public class Lookup { Line 196  public class Lookup {
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);

Legend:
Removed from v.2157  
changed lines
  Added in v.2195

  ViewVC Help
Powered by ViewVC 1.1.20