/[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 590 by torben, Mon Feb 8 19:12:15 2010 UTC revision 591 by torben, Wed Feb 10 14:07:04 2010 UTC
# Line 6  import java.util.List; Line 6  import java.util.List;
6  import java.util.Map;  import java.util.Map;
7  import java.util.logging.Logger;  import java.util.logging.Logger;
8    
9    import com.gargoylesoftware.htmlunit.BrowserVersion;
10  import com.gargoylesoftware.htmlunit.WebClient;  import com.gargoylesoftware.htmlunit.WebClient;
11  import com.gargoylesoftware.htmlunit.html.DomNodeList;  import com.gargoylesoftware.htmlunit.html.DomNodeList;
12  import com.gargoylesoftware.htmlunit.html.HtmlElement;  import com.gargoylesoftware.htmlunit.html.HtmlElement;
# Line 81  public class DepartureFetcher { Line 82  public class DepartureFetcher {
82                                    
83                  List<DepartureBean> departureList = new ArrayList<DepartureBean>();                  List<DepartureBean> departureList = new ArrayList<DepartureBean>();
84                                    
85              final WebClient webClient = new WebClient();              final WebClient webClient = new WebClient( BrowserVersion.FIREFOX_3 );
86              webClient.setTimeout(2500);              webClient.setTimeout(2500);
87              webClient.setJavaScriptEnabled(false);              webClient.setJavaScriptEnabled(false);
88                                                            
# Line 137  public class DepartureFetcher { Line 138  public class DepartureFetcher {
138              } else {              } else {
139                  logger.warning("No departures found for station=" + stationcode + ", type=" + type);                  logger.warning("No departures found for station=" + stationcode + ", type=" + type);
140              }              }
141                webClient.closeAllWindows();
142                            
143              return departureList;              return departureList;
144          }          }
# Line 145  public class DepartureFetcher { Line 147  public class DepartureFetcher {
147                                    
148                  List<DepartureBean> departureList = new ArrayList<DepartureBean>();                  List<DepartureBean> departureList = new ArrayList<DepartureBean>();
149                                    
150              final WebClient webClient = new WebClient();              final WebClient webClient = new WebClient(BrowserVersion.FIREFOX_3);
151              webClient.setTimeout(2500);              webClient.setTimeout(2500);
152              webClient.setJavaScriptEnabled(false);              webClient.setJavaScriptEnabled(false);
153                            
# Line 201  public class DepartureFetcher { Line 203  public class DepartureFetcher {
203              } else {              } else {
204                  logger.warning("No departures found for station=" + stationcode + ", type=" + type);                  logger.warning("No departures found for station=" + stationcode + ", type=" + type);
205              }              }
206                webClient.closeAllWindows();
207                
208                            
209              return departureList;              return departureList;
210          }          }
# Line 249  public class DepartureFetcher { Line 253  public class DepartureFetcher {
253                  }                  }
254                                    
255                                    
                   
256                  return number;                  return number;
257          }          }
258                    

Legend:
Removed from v.590  
changed lines
  Added in v.591

  ViewVC Help
Powered by ViewVC 1.1.20