--- android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/DepartureServlet.java 2011/03/30 19:52:31 1247 +++ android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/DepartureServlet.java 2011/03/31 17:13:19 1248 @@ -26,6 +26,7 @@ import dk.thoerup.circuitbreaker.CircuitBreakerException; import dk.thoerup.traininfoservice.StationDAO; import dk.thoerup.traininfoservice.Statistics; +import dk.thoerup.traininfoservice.banedk.DepartureFetcher.FetchTrainType; /** * Servlet implementation class DepartureServlet @@ -87,10 +88,15 @@ int station = Integer.parseInt( req.getParameter("station") ); String format = req.getParameter("format"); - DepartureBean beans; + DepartureBean beans; + + DepartureFetcher.FetchTrainType type = FetchTrainType.BOTH; + if ( req.getParameter("type") != null) { + type = FetchTrainType.valueOf( req.getParameter("type") ); + } try { - beans = fetcher.cachedLookupDepartures(station, arrival); + beans = fetcher.cachedLookupDepartures(station, arrival, type); beans.arrival = arrival; } catch (java.io.IOException ioe) { logger.warning("Read failed, station="+station + ". " + ioe.getMessage() );