/[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 1423 by torben, Mon May 2 11:59:40 2011 UTC revision 1424 by torben, Mon May 2 17:19:30 2011 UTC
# Line 78  public class DepartureFetcher { Line 78  public class DepartureFetcher {
78                                    
79                  departureBean.stationName = station.getName();                  departureBean.stationName = station.getName();
80    
81                    //TODO: FetchTraintype.Both should be removed some time after 0.9.5 release
82                  if (station.getRegional() != null && (type == FetchTrainType.REGIONAL||type == FetchTrainType.BOTH) ) {                  if (station.getRegional() != null && (type == FetchTrainType.REGIONAL||type == FetchTrainType.BOTH) ) {
83                          DepartureBean tempBean = lookupDepartures(station.getRegional(), TrainType.REGIONAL, arrival);                          DepartureBean tempBean = lookupDepartures(station.getRegional(), TrainType.REGIONAL, arrival);
84                          departureBean.entries.addAll( tempBean.entries );                          departureBean.entries.addAll( tempBean.entries );
# Line 94  public class DepartureFetcher { Line 95  public class DepartureFetcher {
95                          logger.info("No departures found for station " + stationID);                          logger.info("No departures found for station " + stationID);
96                  }                  }
97                                    
98                    //TODO: FetchTraintype.Both should be removed some time after 0.9.5 release
99                  if (type == FetchTrainType.BOTH) { //if we have both S-tog and regional order by departure/arrival time                  if (type == FetchTrainType.BOTH) { //if we have both S-tog and regional order by departure/arrival time
100                          Collections.sort( departureBean.entries );                          Collections.sort( departureBean.entries );
101                  }                  }
# Line 241  public class DepartureFetcher { Line 243  public class DepartureFetcher {
243                            
244              stationcode = URLEncoder.encode(stationcode,"ISO-8859-1");              stationcode = URLEncoder.encode(stationcode,"ISO-8859-1");
245    
246              //String uri = "http://trafikinfo.bane.dk/Trafikinformation/AfgangAnkomst/" + arrivalDeparture + "/" + stationcode + "/" + typeString + "/UdvidetVisning";                    
247              String uri = "http://mobil.bane.dk/mobilStation.asp?artikelID=5332&stat_kode=" + stationcode + "&webprofil=" + typeString  +"&beskrivelse=&mode=ankomstafgang&ankomstafgang=" + arrivalDeparture + "&gemstation=&fuldvisning=1";              String uri = "http://mobil.bane.dk/mobilStation.asp?artikelID=5332&stat_kode=" + stationcode + "&webprofil=" + typeString  +"&beskrivelse=&mode=ankomstafgang&ankomstafgang=" + arrivalDeparture + "&gemstation=&fuldvisning=1";
248              logger.fine("URI: " + uri);                  logger.fine("URI: " + uri);    
249              JsoupInvocation wrapper = new JsoupInvocation( new URL(uri), settings.getReplyTimeout() );              JsoupInvocation wrapper = new JsoupInvocation( new URL(uri), settings.getReplyTimeout() );

Legend:
Removed from v.1423  
changed lines
  Added in v.1424

  ViewVC Help
Powered by ViewVC 1.1.20