/[projects]/android/TrainInfoCommon/src/dk/thoerup/android/traininfo/common/TimetableEntry.java
ViewVC logotype

Annotation of /android/TrainInfoCommon/src/dk/thoerup/android/traininfo/common/TimetableEntry.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1422 - (hide annotations) (download)
Mon May 2 17:06:53 2011 UTC (13 years, 1 month ago) by torben
File size: 1633 byte(s)
Don't crash old versions
1 torben 1065 package dk.thoerup.android.traininfo.common;
2    
3     import java.io.Serializable;
4    
5     import org.simpleframework.xml.Attribute;
6     import org.simpleframework.xml.Element;
7     import org.simpleframework.xml.Root;
8    
9 torben 1070 @Root(name="entry", strict=false)
10 torben 1065 public class TimetableEntry implements Serializable {
11     @Element
12     private String station;
13    
14     @Element(required=false)
15     private String arrival;
16    
17     @Element(required=false)
18     private String departure;
19    
20     @Attribute
21     private boolean current;
22    
23 torben 1422 @Element(required=false) //TODO: old clients will crash if this one is missing from xml - remove sometime after 0.9.8 release
24     private int stationId=-1;
25    
26 torben 1419 @Element(required=false) //it really should be required but don't crash XML generator if getSimpleByName couln't find a station
27 torben 1412 private StationEntry stationEntry;
28    
29 torben 1065 boolean cancelled;
30    
31     public String getStation() {
32     return station;
33     }
34     public void setStation(String station) {
35     this.station = station;
36     }
37    
38     public String getArrival() {
39     return arrival;
40     }
41     public void setArrival(String arrival) {
42     this.arrival = arrival;
43     }
44    
45     public String getDeparture() {
46     return departure;
47     }
48     public void setDeparture(String departure) {
49     this.departure = departure;
50     }
51    
52     public boolean isCurrent() {
53     return current;
54     }
55     public void setCurrent(boolean current) {
56     this.current = current;
57     }
58 torben 1412 public StationEntry getStationEntry() {
59     return stationEntry;
60 torben 1065 }
61 torben 1412 public void setStationEntry(StationEntry stationEntry) {
62     this.stationEntry = stationEntry;
63 torben 1065 }
64    
65     public boolean isCancelled() {
66     return cancelled;
67     }
68     public void setCancelled(boolean cancelled) {
69     this.cancelled = cancelled;
70     }
71     }

  ViewVC Help
Powered by ViewVC 1.1.20