/[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 2200 by torben, Thu Sep 11 08:14:40 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            static String distributor;
25            
26          static SafeProperties conf;          static SafeProperties conf;
27          static Logger logger = Logger.getLogger( Lookup.class.toString() );          static Logger logger = Logger.getLogger( Lookup.class.toString() );
28                    
# Line 155  public class Lookup { Line 161  public class Lookup {
161                    
162          public static void main(String[] args) throws Exception {          public static void main(String[] args) throws Exception {
163                                    
164                  File confFile = new File("fulddaekning.properties");                  File confFile = new File( CONFIG_FILENAME );
165                  if (! confFile.exists() ) {                  if (! confFile.exists() ) {
166                          logger.warning("Config file not found");                          logger.warning("Config file not found: " + CONFIG_FILENAME);
167                          System.exit(1);                          System.exit(1);
168                  }                  }
169                                                                    
# Line 170  public class Lookup { Line 176  public class Lookup {
176                  verbose = Boolean.parseBoolean( conf.getSafeProperty("VERBOSE") );                  verbose = Boolean.parseBoolean( conf.getSafeProperty("VERBOSE") );
177                  logger.info("Starting with VERBOSE:" + verbose);                  logger.info("Starting with VERBOSE:" + verbose);
178                                    
179                    rename_tables = Boolean.parseBoolean( conf.getSafeProperty("RENAMETABLES") );
180                    logger.info("Starting with RENAMETABLES:" + rename_tables);
181                    
182                    distributor = conf.getSafeProperty("DISTRIBUTOR");
183                    distributor = distributor.toUpperCase();
184                    Constants.init(distributor);
185    
186                    
187                  Database db = new Database(conf);                  Database db = new Database(conf);
188                                    
189                  db.resetResultTable();                  db.resetResultTable();
# Line 188  public class Lookup { Line 202  public class Lookup {
202                          lookup.doLookup();                                                lookup.doLookup();                      
203                  }                  }
204                                    
205                    if (rename_tables) {
206                            db.renameResultTables();
207                    } else {
208                            logger.info( "Rename tables is disabled !!!" );
209                    }
210                    
211                  long now = System.currentTimeMillis();                  long now = System.currentTimeMillis();
212    
213                  logger.info("Flest Ikke-dækkede, " + flestIkkeDaekkede);                  logger.info("Flest Ikke-dækkede, " + flestIkkeDaekkede);

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

  ViewVC Help
Powered by ViewVC 1.1.20