/[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 994 by torben, Wed Jul 14 19:22:23 2010 UTC revision 1021 by torben, Mon Aug 30 13:59:54 2010 UTC
# Line 63  public class DepartureFetcher { Line 63  public class DepartureFetcher {
63                                    
64                  StationBean station = stationDao.getById(stationID);                  StationBean station = stationDao.getById(stationID);
65                                    
66                    departureBean.stationName = station.getName();
67                    
68                  if (station.getRegional() != null) {                  if (station.getRegional() != null) {
69                          DepartureBean tempBean = lookupDepartures(station.getRegional(), TrainType.REGIONAL, arrival);                          DepartureBean tempBean = lookupDepartures(station.getRegional(), TrainType.REGIONAL, arrival);
70                          departureBean.departureEntries.addAll( tempBean.departureEntries );                          departureBean.departureEntries.addAll( tempBean.departureEntries );
# Line 128  public class DepartureFetcher { Line 130  public class DepartureFetcher {
130              if (table != null) {              if (table != null) {
131                      Elements tableRows =  table.getElementsByTag("tr");                      Elements tableRows =  table.getElementsByTag("tr");
132                                            
133                        boolean tidsstregExists = (table.getElementsByAttributeValue("class", "Tidsstreg").size() > 0);
134                        boolean passedTidsstreg = false;
135                        
136                      for (Element currentRow : tableRows) {                      for (Element currentRow : tableRows) {
137                          String rowClass = currentRow.attr("class");                          String rowClass = currentRow.attr("class");
138                            
139                            if (tidsstregExists == true && passedTidsstreg == false) {
140                                    if (currentRow.getElementsByAttributeValue("class", "Tidsstreg").size() > 0) {
141                                            passedTidsstreg = true;
142                                    } else {
143                                            continue;
144                                    }
145                            }
146                            
147                          if (rowClass != null && rowClass.toLowerCase().contains("station") ) {                          if (rowClass != null && rowClass.toLowerCase().contains("station") ) {
148                                    
149                                  Elements fields = currentRow.getElementsByTag("td");                                  Elements fields = currentRow.getElementsByTag("td");
150                    
151                                  DepartureEntry departure = new DepartureEntry();                                  DepartureEntry departure = new DepartureEntry();

Legend:
Removed from v.994  
changed lines
  Added in v.1021

  ViewVC Help
Powered by ViewVC 1.1.20