22 |
|
|
23 |
Logger logger = Logger.getLogger(DepartureFetcher.class.getName()); |
Logger logger = Logger.getLogger(DepartureFetcher.class.getName()); |
24 |
|
|
25 |
Map<Integer, List<DepartureBean>> cache = new TimeoutMap<Integer,List<DepartureBean>>(120 * 1000); |
Map<Integer, List<DepartureBean>> cache; |
26 |
|
|
27 |
private boolean useTempSite; |
private boolean useTempSite; |
28 |
|
|
29 |
public DepartureFetcher(boolean tempSite) { |
public DepartureFetcher(boolean tempSite, int cacheTimeout) { |
30 |
useTempSite = tempSite; |
useTempSite = tempSite; |
31 |
|
cache = new TimeoutMap<Integer,List<DepartureBean>>(cacheTimeout); |
32 |
} |
} |
33 |
|
|
34 |
|
|
191 |
DepartureBean departure = new DepartureBean(); |
DepartureBean departure = new DepartureBean(); |
192 |
|
|
193 |
String time = fields.get(0).asText().trim(); |
String time = fields.get(0).asText().trim(); |
194 |
logger.info("time:" + time); |
|
195 |
if (time.equals("")) |
if (time.equals("")) |
196 |
time = "0:00"; //Bane.dk bug work-around |
time = "0:00"; //Bane.dk bug work-around |
197 |
departure.setTime(time); |
departure.setTime(time); |