--- android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/TimetableFetcher.java 2010/02/02 18:42:38 580 +++ android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/TimetableFetcher.java 2010/02/02 18:47:55 581 @@ -31,6 +31,12 @@ Logger logger = Logger.getLogger(TimetableFetcher.class.getName()); + private boolean useTempSite; + + public TimetableFetcher(boolean tmpSite) { + useTempSite = tmpSite; + } + List cachedLookupTimetable(String trainID, String type) throws Exception { String key = trainID+type; @@ -44,8 +50,16 @@ } return list; } + + List lookupTimetable(String trainID, String type) throws Exception { + if (useTempSite == false ){ + return lookupTimetableRealSite(trainID, type); + } else { + return new ArrayList(); // no timetable data on temp site + } + } - List lookupTimetable(String trainID, String type) throws Exception { + List lookupTimetableRealSite(String trainID, String type) throws Exception { List timetableList = new ArrayList(); String url = "http://www.bane.dk/visRute.asp?W=" + type + "&TogNr=" + trainID + "&artikelId=4276";