31 |
|
|
32 |
private TaskLogger logger = TaskLogger.getInstance(); |
private TaskLogger logger = TaskLogger.getInstance(); |
33 |
|
|
34 |
|
private int duplicateCount; |
35 |
|
|
36 |
List<Address> addressList; |
List<Address> addressList; |
37 |
|
|
327 |
} |
} |
328 |
} |
} |
329 |
} else { |
} else { |
330 |
|
duplicateCount++; |
331 |
logger.info( "Double visit monday " + addr); |
logger.info( "Double visit monday " + addr); |
332 |
|
return; // if the entry is duplicate on one day that it covers - then it will be as well on all the othters |
333 |
} |
} |
334 |
|
|
335 |
} |
} |
351 |
} |
} |
352 |
} |
} |
353 |
} else { |
} else { |
354 |
|
duplicateCount++; |
355 |
logger.info( "Double visit tuesday " + addr); |
logger.info( "Double visit tuesday " + addr); |
356 |
|
return; // if the entry is duplicate on one day that it covers - then it will be as well on all the othters |
357 |
} |
} |
358 |
} |
} |
359 |
|
|
373 |
} |
} |
374 |
} |
} |
375 |
} else { |
} else { |
376 |
|
duplicateCount++; |
377 |
logger.info( "Double visit wednesday " + addr); |
logger.info( "Double visit wednesday " + addr); |
378 |
|
return; // if the entry is duplicate on one day that it covers - then it will be as well on all the othters |
379 |
} |
} |
380 |
} |
} |
381 |
|
|
397 |
} |
} |
398 |
} |
} |
399 |
} else { |
} else { |
400 |
|
duplicateCount++; |
401 |
logger.info( "Double visit thursday " + addr); |
logger.info( "Double visit thursday " + addr); |
402 |
|
return; // if the entry is duplicate on one day that it covers - then it will be as well on all the othters |
403 |
} |
} |
404 |
} |
} |
405 |
|
|
420 |
} |
} |
421 |
} |
} |
422 |
} else { |
} else { |
423 |
|
duplicateCount++; |
424 |
logger.info( "Double visit friday " + addr); |
logger.info( "Double visit friday " + addr); |
425 |
|
return; // if the entry is duplicate on one day that it covers - then it will be as well on all the othters |
426 |
} |
} |
427 |
} |
} |
428 |
|
|
444 |
} |
} |
445 |
} |
} |
446 |
} else { |
} else { |
447 |
|
duplicateCount++; |
448 |
logger.info( "Double visit saturday " + addr); |
logger.info( "Double visit saturday " + addr); |
449 |
|
return; // if the entry is duplicate on one day that it covers - then it will be as well on all the othters |
450 |
} |
} |
451 |
} |
} |
452 |
|
|
467 |
} |
} |
468 |
} |
} |
469 |
} else { |
} else { |
470 |
|
duplicateCount++; |
471 |
logger.info( "Double visit sunday " + addr); |
logger.info( "Double visit sunday " + addr); |
472 |
|
return; // if the entry is duplicate on one day that it covers - then it will be as well on all the othters |
473 |
} |
} |
474 |
} |
} |
475 |
|
|
497 |
|
|
498 |
|
|
499 |
private void createFromEntry(AddressSourceEntry entry) { |
private void createFromEntry(AddressSourceEntry entry) { |
500 |
|
if (entry.husnr >= 1000) { //husnumre i DK må kun være på 3 cifre |
501 |
|
return; |
502 |
|
} |
503 |
|
|
504 |
if (entry.husnr == 999) { |
if (entry.husnr == 999) { |
505 |
return; |
return; |
506 |
} |
} |
507 |
|
|
508 |
|
if (entry.litra.length() > 1) { //litra må kun være på 1 tegn |
509 |
|
return; |
510 |
|
} |
511 |
|
if (entry.litra.length() == 1) { |
512 |
|
char litra = entry.litra.charAt(0); |
513 |
|
if ( Character.isLetter(litra) == false ) { |
514 |
|
return; |
515 |
|
} |
516 |
|
|
517 |
|
} |
518 |
|
|
519 |
if (entry.kommunekode == 0 || entry.vejkode == 0) { |
if (entry.kommunekode == 0 || entry.vejkode == 0) { |
520 |
return; |
return; |
521 |
} |
} |
526 |
if (entry.gadeid == 0) { |
if (entry.gadeid == 0) { |
527 |
return; |
return; |
528 |
} |
} |
529 |
|
|
530 |
String gadeidStr = Integer.toString(entry.gadeid); |
String gadeidStr = Integer.toString(entry.gadeid); |
531 |
if (gadeidStr.length() != 9) { |
if (gadeidStr.length() != 9) { |
532 |
return; |
return; |
674 |
return Collections.unmodifiableMap( unknownStreets ); |
return Collections.unmodifiableMap( unknownStreets ); |
675 |
} |
} |
676 |
|
|
677 |
|
public int getDuplicateCount() { |
678 |
|
return duplicateCount; |
679 |
|
} |
680 |
|
|
681 |
public int getRejectedCount() { |
public int getRejectedCount() { |
682 |
return rejectedEntries.size(); |
return rejectedEntries.size(); |