1 |
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 |
@Root(name="entry", strict=false) |
10 |
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 |
@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 |
@Element(required=false) //it really should be required but don't crash XML generator if getSimpleByName couln't find a station |
27 |
private StationEntry stationEntry; |
28 |
|
29 |
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 |
public StationEntry getStationEntry() { |
59 |
return stationEntry; |
60 |
} |
61 |
public void setStationEntry(StationEntry stationEntry) { |
62 |
this.stationEntry = stationEntry; |
63 |
} |
64 |
|
65 |
public boolean isCancelled() { |
66 |
return cancelled; |
67 |
} |
68 |
public void setCancelled(boolean cancelled) { |
69 |
this.cancelled = cancelled; |
70 |
} |
71 |
} |