66 |
|
|
67 |
try { |
try { |
68 |
beans = fetcher.cachedLookupDepartures(station, arrival); |
beans = fetcher.cachedLookupDepartures(station, arrival); |
69 |
|
beans.arrival = arrival; |
70 |
} catch (java.io.IOException ioe) { |
} catch (java.io.IOException ioe) { |
71 |
logger.warning("Read failed, station="+station + ". " + ioe.getMessage() ); |
logger.warning("Read failed, station="+station + ". " + ioe.getMessage() ); |
72 |
Statistics.getInstance().incrementDepartureErrors(); |
Statistics.getInstance().incrementDepartureErrors(); |
89 |
|
|
90 |
if (format.equalsIgnoreCase("xml")) { |
if (format.equalsIgnoreCase("xml")) { |
91 |
resp.setContentType("text/xml"); |
resp.setContentType("text/xml"); |
92 |
resp.getWriter().print( formatXml(beans, arrival) ); |
resp.getWriter().print( formatXml(beans) ); |
93 |
} else if (format.equalsIgnoreCase("html")) { |
} else if (format.equalsIgnoreCase("html")) { |
94 |
|
|
95 |
String advStr = req.getParameter("advanced"); |
String advStr = req.getParameter("advanced"); |
105 |
|
|
106 |
} |
} |
107 |
|
|
108 |
protected String formatXml(DepartureBean beans, boolean arrival) throws ServletException{ |
protected String formatXml(DepartureBean beans) throws ServletException{ |
109 |
|
|
110 |
Serializer serializer = new Persister(); |
Serializer serializer = new Persister(); |
111 |
|
|