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

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

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

revision 1043 by torben, Mon Sep 13 18:53:30 2010 UTC revision 1050 by torben, Tue Sep 14 11:04:08 2010 UTC
# Line 62  public class MetroFetcher { Line 62  public class MetroFetcher {
62                                                    
63                                    
64                  URL url = new URL("http://www.m.dk/layouts/Metro/Widgets/MetroWidget.ashx?StationId=" + station.getMetro() + "&Congestion=true&Application=MyMetro&Expiration=true");                  URL url = new URL("http://www.m.dk/layouts/Metro/Widgets/MetroWidget.ashx?StationId=" + station.getMetro() + "&Congestion=true&Application=MyMetro&Expiration=true");
65                    logger.fine("URL:" + url);
66                                    
67              JsoupInvocation wrapper = new JsoupInvocation( url, 3000);              JsoupInvocation wrapper = new JsoupInvocation( url, 3000);
68              CircuitBreaker breaker = CircuitBreakerManager.getManager().getCircuitBreaker("metro");              CircuitBreaker breaker = CircuitBreakerManager.getManager().getCircuitBreaker("metro");
# Line 102  public class MetroFetcher { Line 103  public class MetroFetcher {
103                                                                    
104                  bean.operationInfo = contentElems.get(3).text();                  bean.operationInfo = contentElems.get(3).text();
105                                    
106                  int planIndex;                  for (int i=0; i<contentElems.size(); i++) {
107                  if (contentElems.get(4).text().trim().equalsIgnoreCase("stationsinformation")) {                          if (contentElems.get(i).text().trim().equalsIgnoreCase("køreplan")) {
108                          planIndex = 7;                                  bean.plan = contentElems.get(i+1).text();
109                  } else {                          }
                         planIndex = 5;  
110                  }                  }
111                            
                 bean.plan = contentElems.get(planIndex).text();  
                   
112                  return bean;                  return bean;
113          }          }
114                    

Legend:
Removed from v.1043  
changed lines
  Added in v.1050

  ViewVC Help
Powered by ViewVC 1.1.20