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

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

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

android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/DepartureFetcher.java revision 1061 by torben, Thu Sep 16 14:04:28 2010 UTC android/TrainInfoServiceGoogle/src/dk/thoerup/traininfoservice/banedk/DepartureFetcher.java revision 1080 by torben, Mon Sep 20 20:11:55 2010 UTC
# Line 65  public class DepartureFetcher { Line 65  public class DepartureFetcher {
65                                    
66                  DepartureBean departureBean = new DepartureBean();                  DepartureBean departureBean = new DepartureBean();
67                                    
68                  StationEntry station = stationDao.getById(stationID);                  StationEntry station = new StationEntry(); // stationDao.getById(stationID);
69                    station.setId(82);
70                    station.setName("Test Station");
71                    station.setRegional("HS");
72                                    
73                  departureBean.stationName = station.getName();                  departureBean.stationName = station.getName();
74                                    
75                  if (station.getRegional() != null) {                  if (station.getRegional() != null) {
76                          DepartureBean tempBean = lookupDepartures(station.getRegional(), TrainType.REGIONAL, arrival);                          DepartureBean tempBean = lookupDepartures(station.getRegional(), TrainType.REGIONAL, arrival);
77                          departureBean.departureEntries.addAll( tempBean.departureEntries );                          departureBean.entries.addAll( tempBean.entries );
78                          departureBean.notifications.addAll(tempBean.notifications);                          departureBean.notifications.addAll(tempBean.notifications);
79                  }                  }
80                                    
81                  if (station.getStrain() != null) {                  if (station.getStrain() != null) {
82                          DepartureBean tempBean = lookupDepartures(station.getStrain(), TrainType.STOG, arrival);                          DepartureBean tempBean = lookupDepartures(station.getStrain(), TrainType.STOG, arrival);
83                          departureBean.departureEntries.addAll( tempBean.departureEntries );                          departureBean.entries.addAll( tempBean.entries );
84                          departureBean.notifications.addAll(tempBean.notifications);                          departureBean.notifications.addAll(tempBean.notifications);
85                  }                                }              
86                                    
87                  if (departureBean.departureEntries.size() == 0) {                  if (departureBean.entries.size() == 0) {
88                          logger.info("No departures found for station " + stationID);                          logger.info("No departures found for station " + stationID);
89                  }                  }
90                                    
91                  Collections.sort( departureBean.departureEntries );                  Collections.sort( departureBean.entries );
92    
93                                    
94                  return departureBean;                  return departureBean;
# Line 195  public class DepartureFetcher { Line 198  public class DepartureFetcher {
198                                                                    
199                                  departure.setType(typeString);                                  departure.setType(typeString);
200                                                                    
201                                  departureBean.departureEntries.add( departure );                                  departureBean.entries.add( departure );
202                          }                          }
203                      }                      }
204              } else {              } else {
# Line 305  public class DepartureFetcher { Line 308  public class DepartureFetcher {
308                                                                    
309                                  departure.setType(type);                                  departure.setType(type);
310                                                                    
311                                  departureBean.departureEntries.add(departure);                                  departureBean.entries.add(departure);
312                                                                    
313                                                                    
314                          }                          }

Legend:
Removed from v.1061  
changed lines
  Added in v.1080

  ViewVC Help
Powered by ViewVC 1.1.20