/[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 428 by torben, Fri Oct 9 08:52:37 2009 UTC revision 468 by torben, Thu Oct 22 06:04:45 2009 UTC
# Line 15  import com.gargoylesoftware.htmlunit.htm Line 15  import com.gargoylesoftware.htmlunit.htm
15  import com.gargoylesoftware.htmlunit.html.HtmlElement;  import com.gargoylesoftware.htmlunit.html.HtmlElement;
16  import com.gargoylesoftware.htmlunit.html.HtmlPage;  import com.gargoylesoftware.htmlunit.html.HtmlPage;
17    
18  import dk.thoerup.curcuitbreaker.CircuitBreaker;  import dk.thoerup.circuitbreaker.CircuitBreaker;
19  import dk.thoerup.curcuitbreaker.CircuitBreakerManager;  import dk.thoerup.circuitbreaker.CircuitBreakerManager;
20    
21  public class TimetableFetcher {  public class TimetableFetcher {
22                    
# Line 32  public class TimetableFetcher { Line 32  public class TimetableFetcher {
32          Logger logger = Logger.getLogger(TimetableFetcher.class.getName());          Logger logger = Logger.getLogger(TimetableFetcher.class.getName());
33                    
34                    
35          List<TimetableBean> cachedLookupTimetable(String trainID, String type) throws Throwable {          List<TimetableBean> cachedLookupTimetable(String trainID, String type) throws Exception {
36                  String key = trainID+type;                  String key = trainID+type;
37                  List<TimetableBean> list = cache.get(key);                  List<TimetableBean> list = cache.get(key);
38                                    
# Line 45  public class TimetableFetcher { Line 45  public class TimetableFetcher {
45                  return list;                  return list;
46          }          }
47    
48          List<TimetableBean> lookupTimetable(String trainID, String type) throws Throwable {                      List<TimetableBean> lookupTimetable(String trainID, String type) throws Exception {            
49                  List<TimetableBean> timetableList = new ArrayList<TimetableBean>();                  List<TimetableBean> timetableList = new ArrayList<TimetableBean>();
50                                    
51                  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.428  
changed lines
  Added in v.468

  ViewVC Help
Powered by ViewVC 1.1.20