75 |
StationEntry station = stationDao.getById(stationID); |
StationEntry station = stationDao.getById(stationID); |
76 |
|
|
77 |
departureBean.stationName = station.getName(); |
departureBean.stationName = station.getName(); |
78 |
|
|
79 |
if (station.getRegional() != null && (type == FetchTrainType.REGIONAL||type == FetchTrainType.BOTH) ) { |
if (station.getRegional() != null && (type == FetchTrainType.REGIONAL||type == FetchTrainType.BOTH) ) { |
80 |
DepartureBean tempBean = lookupDepartures(station.getRegional(), TrainType.REGIONAL, arrival); |
DepartureBean tempBean = lookupDepartures(station.getRegional(), TrainType.REGIONAL, arrival); |
81 |
departureBean.entries.addAll( tempBean.entries ); |
departureBean.entries.addAll( tempBean.entries ); |
92 |
logger.info("No departures found for station " + stationID); |
logger.info("No departures found for station " + stationID); |
93 |
} |
} |
94 |
|
|
95 |
Collections.sort( departureBean.entries ); |
if (type == FetchTrainType.BOTH) { //if we have both S-tog and regional order by departure/arrival time |
96 |
|
Collections.sort( departureBean.entries ); |
97 |
|
} |
98 |
|
|
99 |
|
|
100 |
return departureBean; |
return departureBean; |