87 |
} |
} |
88 |
} |
} |
89 |
} |
} |
90 |
|
|
91 |
|
StationBean bean = dao.dumpAll(); |
92 |
|
|
93 |
|
//////////////////////////////// |
94 |
|
sb.append("<h2>Duplicate ID's in DB</h2>\n"); |
95 |
|
sb.append("<ul>"); |
96 |
|
Map<String,String> stationIDS = new TreeMap<String,String>(); |
97 |
|
for (StationEntry station : bean.entries) { |
98 |
|
if (station.isRegional()) { |
99 |
|
String id = station.getRegional(); |
100 |
|
String oldstation = stationIDS.get(id); |
101 |
|
if (oldstation == null) { |
102 |
|
stationIDS.put(id, station.getName()); |
103 |
|
} else { |
104 |
|
sb.append("<li> Duplicate found on key=" + id + " old station=" + oldstation + " current=" + station.getName()); |
105 |
|
} |
106 |
|
} |
107 |
|
if (station.isStrain()) { |
108 |
|
String id = station.getStrain(); |
109 |
|
String oldstation= stationIDS.get(id); |
110 |
|
if (oldstation == null) { |
111 |
|
stationIDS.put(id, station.getName()); |
112 |
|
} else { |
113 |
|
sb.append("<li> Duplicate found on key=" + id + " old station=" + oldstation + " current=" + station.getName()); |
114 |
|
} |
115 |
|
} |
116 |
|
} |
117 |
|
sb.append("</ul>"); |
118 |
|
|
119 |
|
//////////////////////////////// |
120 |
|
|
121 |
sb.append("<h2>Active stations in DB</h2>\n"); |
sb.append("<h2>Active stations in DB</h2>\n"); |
122 |
sb.append("<ul>"); |
sb.append("<ul>"); |
123 |
|
|
124 |
StationBean bean = dao.dumpAll(); |
|
125 |
for (StationEntry station : bean.entries) { |
for (StationEntry station : bean.entries) { |
126 |
if (station.isRegional() || station.isStrain()) { |
if (station.isRegional() || station.isStrain()) { |
127 |
String href = banedkStations.get(station.getName() ); |
String href = banedkStations.get(station.getName() ); |