33 |
|
|
34 |
Map<Integer, TreeMap<Short, ArrayList<Address>> > searchStructure; |
Map<Integer, TreeMap<Short, ArrayList<Address>> > searchStructure; |
35 |
|
|
36 |
ArrayList<AddressSourceEntry> afvisteEntries = new ArrayList<AddressSourceEntry>(); |
ArrayList<AddressSourceEntry> rejectedEntries = new ArrayList<AddressSourceEntry>(); |
37 |
|
|
38 |
|
Map<Integer,String> unknownStreets = new TreeMap<Integer, String>(); |
39 |
|
|
40 |
Map<Short,Short> dbkBaneMap = new TreeMap<Short,Short>(); |
Map<Short,Short> dbkBaneMap = new TreeMap<Short,Short>(); |
41 |
|
|
226 |
private void visitSingle(AddressSourceEntry entry) { |
private void visitSingle(AddressSourceEntry entry) { |
227 |
TreeMap<Short, ArrayList<Address>> gade = searchStructure.get( entry.gadeid ); |
TreeMap<Short, ArrayList<Address>> gade = searchStructure.get( entry.gadeid ); |
228 |
if (gade == null) { |
if (gade == null) { |
229 |
|
unknownStreets.putIfAbsent(entry.gadeid, entry.vejnavn); |
230 |
createFromEntry(entry); // if we get here there was no match - so we need to create it |
createFromEntry(entry); // if we get here there was no match - so we need to create it |
231 |
return; |
return; |
232 |
} |
} |
253 |
|
|
254 |
TreeMap<Short, ArrayList<Address>> gade = searchStructure.get( entry.gadeid ); |
TreeMap<Short, ArrayList<Address>> gade = searchStructure.get( entry.gadeid ); |
255 |
if (gade == null) { |
if (gade == null) { |
256 |
|
unknownStreets.putIfAbsent(entry.gadeid, entry.vejnavn); |
257 |
System.out.println("[Range] Ukendt gadeID " + entry); |
System.out.println("[Range] Ukendt gadeID " + entry); |
258 |
return; |
return; |
259 |
} |
} |
293 |
|
|
294 |
private void updateAddress(Address addr, AddressSourceEntry entry) { |
private void updateAddress(Address addr, AddressSourceEntry entry) { |
295 |
if ( addr.distributor != null && addr.distributor.equals(entry.distributor) == false) { |
if ( addr.distributor != null && addr.distributor.equals(entry.distributor) == false) { |
296 |
afvisteEntries.add(entry); |
rejectedEntries.add(entry); |
297 |
System.out.println("Afviser " + entry); |
System.out.println("Afviser " + entry); |
298 |
return; |
return; |
299 |
} |
} |
620 |
return Collections.unmodifiableList(addressList); |
return Collections.unmodifiableList(addressList); |
621 |
} |
} |
622 |
|
|
623 |
|
public Map<Integer,String> getUnknownStreets() { |
624 |
|
return Collections.unmodifiableMap( unknownStreets ); |
625 |
|
} |
626 |
|
|
627 |
|
|
628 |
|
|
629 |
public int getAfvistAntal() { |
public int getRejectedCount() { |
630 |
return afvisteEntries.size(); |
return rejectedEntries.size(); |
631 |
} |
} |
632 |
|
|
633 |
} |
} |