String station_uic = (String) request.getAttribute("station_uic");
if(station_uic == null || station_uic.isEmpty()) {
for(List<TheoricalTrainData> l : trains.values()) {
//data.addAll(l);
for(TheoricalTrainData ttd : l) {
Paris_S p_s = new Paris_S();
p_s.update(selection, ttd);
json.add(p_s);
}
}
}
else {
//data = trains.get(station_uic);
for(TheoricalTrainData ttd : trains.get(station_uic)) {
Paris_S p_s = new Paris_S();
p_s.update(selection, ttd);
json.add(p_s);
}
}
//Collections.sort(data);
Collections.sort(json);