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

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

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

revision 1834 by torben, Tue Aug 21 06:48:57 2012 UTC revision 2033 by torben, Wed Jul 24 14:50:04 2013 UTC
# Line 140  public class DepartureFetcher { Line 140  public class DepartureFetcher {
140                          try {                          try {
141                                  injectTritinfoData(departureBean, station);                                  injectTritinfoData(departureBean, station);
142                          } catch (Exception ex) { //det er ikke kritisk at vi får perron numre med                          } catch (Exception ex) { //det er ikke kritisk at vi får perron numre med
143                                  ex.printStackTrace();                                  logger.warning("tritinfo failed with " + ex.getClass().getName() + ": " + ex.getMessage() );
144                          }                          }
145                  }                  }
146    
# Line 518  http://mobil.bane.dk/mobilStation.asp?ar Line 518  http://mobil.bane.dk/mobilStation.asp?ar
518                  Element anchorElement = trainTd.getElementsByTag("a").get(0);                  Element anchorElement = trainTd.getElementsByTag("a").get(0);
519                  String href = anchorElement.attr("href");                  String href = anchorElement.attr("href");
520                                    
521                  int pos = href.lastIndexOf('/');                  int pos = href.lastIndexOf('=');
522                  String number = href.substring(pos+1);                  String number = href.substring(pos+1);
523                                    
524                  return number;                  return number;
# Line 557  http://mobil.bane.dk/mobilStation.asp?ar Line 557  http://mobil.bane.dk/mobilStation.asp?ar
557          private void injectTritinfoData(DepartureBean departureBean, StationEntry station) throws Exception {          private void injectTritinfoData(DepartureBean departureBean, StationEntry station) throws Exception {
558              String uri = "http://tritinfo.pallas.dk/webtavle?page=stationcontent&staid=" + station.getTritStation();              String uri = "http://tritinfo.pallas.dk/webtavle?page=stationcontent&staid=" + station.getTritStation();
559              logger.fine("URI:" + uri);              logger.fine("URI:" + uri);
             System.out.println("URI:" + uri);  
560                            
561    
562              JsoupInvocation wrapper = new JsoupInvocation( new URL(uri), settings.getReplyTimeout() );              JsoupInvocation wrapper = new JsoupInvocation( new URL(uri), settings.getReplyTimeout() );

Legend:
Removed from v.1834  
changed lines
  Added in v.2033

  ViewVC Help
Powered by ViewVC 1.1.20