/[projects]/android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/TimetableFetcher.java
ViewVC logotype

Diff of /android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/TimetableFetcher.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 580 by torben, Thu Oct 22 06:04:45 2009 UTC revision 581 by torben, Tue Feb 2 18:47:55 2010 UTC
# Line 31  public class TimetableFetcher { Line 31  public class TimetableFetcher {
31                    
32          Logger logger = Logger.getLogger(TimetableFetcher.class.getName());          Logger logger = Logger.getLogger(TimetableFetcher.class.getName());
33                    
34            private boolean useTempSite;
35            
36            public TimetableFetcher(boolean tmpSite) {
37                    useTempSite = tmpSite;
38            }
39            
40                    
41          List<TimetableBean> cachedLookupTimetable(String trainID, String type) throws Exception {          List<TimetableBean> cachedLookupTimetable(String trainID, String type) throws Exception {
42                  String key = trainID+type;                  String key = trainID+type;
# Line 44  public class TimetableFetcher { Line 50  public class TimetableFetcher {
50                  }                  }
51                  return list;                  return list;
52          }          }
53            
54            List<TimetableBean> lookupTimetable(String trainID, String type) throws Exception {
55                    if (useTempSite == false ){
56                            return lookupTimetableRealSite(trainID, type);
57                    } else {
58                            return new ArrayList<TimetableBean>(); // no timetable data on temp site
59                    }
60            }
61    
62          List<TimetableBean> lookupTimetable(String trainID, String type) throws Exception {                      List<TimetableBean> lookupTimetableRealSite(String trainID, String type) throws Exception {            
63                  List<TimetableBean> timetableList = new ArrayList<TimetableBean>();                  List<TimetableBean> timetableList = new ArrayList<TimetableBean>();
64                                    
65                  String url = "http://www.bane.dk/visRute.asp?W=" + type + "&TogNr=" + trainID + "&artikelId=4276";                  String url = "http://www.bane.dk/visRute.asp?W=" + type + "&TogNr=" + trainID + "&artikelId=4276";

Legend:
Removed from v.580  
changed lines
  Added in v.581

  ViewVC Help
Powered by ViewVC 1.1.20