--- android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/CompareStations.java 2013/01/04 10:37:36 1906
+++ android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/CompareStations.java 2013/01/04 10:53:49 1907
@@ -87,11 +87,41 @@
}
}
}
+
+ StationBean bean = dao.dumpAll();
+
+ ////////////////////////////////
+ sb.append("
Duplicate ID's in DB
\n");
+ sb.append("");
+ Map stationIDS = new TreeMap();
+ for (StationEntry station : bean.entries) {
+ if (station.isRegional()) {
+ String id = station.getRegional();
+ String oldstation = stationIDS.get(id);
+ if (oldstation == null) {
+ stationIDS.put(id, station.getName());
+ } else {
+ sb.append("- Duplicate found on key=" + id + " old station=" + oldstation + " current=" + station.getName());
+ }
+ }
+ if (station.isStrain()) {
+ String id = station.getStrain();
+ String oldstation= stationIDS.get(id);
+ if (oldstation == null) {
+ stationIDS.put(id, station.getName());
+ } else {
+ sb.append("
- Duplicate found on key=" + id + " old station=" + oldstation + " current=" + station.getName());
+ }
+ }
+ }
+ sb.append("
");
+
+ ////////////////////////////////
sb.append("Active stations in DB
\n");
sb.append("");
- StationBean bean = dao.dumpAll();
+
for (StationEntry station : bean.entries) {
if (station.isRegional() || station.isStrain()) {
String href = banedkStations.get(station.getName() );