comparison flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultRiverInfo.java @ 4249:7a889098bcc6

Extend the client RiverInfo model to support MeasurementStations Add method to receive the MeasurementStations from a RiverInfo. Also add methods to set the GaugeInfo and MeasurementStation to the DefaultRiverInfo.
author Björn Ricks <bjoern.ricks@intevation.de>
date Wed, 24 Oct 2012 17:00:37 +0200
parents f3b821735e39
children
comparison
equal deleted inserted replaced
4248:fc742c039f30 4249:7a889098bcc6
16 private Double minq; 16 private Double minq;
17 private Double maxq; 17 private Double maxq;
18 private Long officialnumber; 18 private Long officialnumber;
19 19
20 private List<GaugeInfo> gaugeinfo; 20 private List<GaugeInfo> gaugeinfo;
21 private List<MeasurementStation> mstations;
21 22
22 public DefaultRiverInfo() { 23 public DefaultRiverInfo() {
23 } 24 }
24 25
25 public DefaultRiverInfo( 26 public DefaultRiverInfo(
28 Double start, 29 Double start,
29 Double end, 30 Double end,
30 String wstunit, 31 String wstunit,
31 Double minq, 32 Double minq,
32 Double maxq, 33 Double maxq,
33 Long official, 34 Long official)
34 List<GaugeInfo> gaugeinfo)
35 { 35 {
36 this.name = name; 36 this.name = name;
37 this.kmup = kmup; 37 this.kmup = kmup;
38 this.start = start; 38 this.start = start;
39 this.end = end; 39 this.end = end;
40 this.wstunit = wstunit; 40 this.wstunit = wstunit;
41 this.minq = minq; 41 this.minq = minq;
42 this.maxq = maxq; 42 this.maxq = maxq;
43 this.officialnumber = official; 43 this.officialnumber = official;
44 this.gaugeinfo = gaugeinfo;
45 } 44 }
46
47 45
48 public boolean isKmUp() { 46 public boolean isKmUp() {
49 return this.kmup; 47 return this.kmup;
50 } 48 }
51 49
76 public String getWstUnit() { 74 public String getWstUnit() {
77 return this.wstunit; 75 return this.wstunit;
78 } 76 }
79 77
80 /** 78 /**
81 * Return all gauge info of the river 79 * Return all gauge info of the river or null if they aren't available.
82 */ 80 */
83 public List<GaugeInfo> getGauges() { 81 public List<GaugeInfo> getGauges() {
84 return this.gaugeinfo; 82 return this.gaugeinfo;
85 } 83 }
86 84
102 * Returns the official number of the river 100 * Returns the official number of the river
103 */ 101 */
104 public Long getOfficialNumber() { 102 public Long getOfficialNumber() {
105 return this.officialnumber; 103 return this.officialnumber;
106 } 104 }
105
106 /**
107 * Returns the MeasurementStations on this river or null if they aren't
108 * available.
109 */
110 @Override
111 public List<MeasurementStation> getMeasurementStations() {
112 return this.mstations;
113 }
114
115 public void setGauges(List<GaugeInfo> gauges) {
116 this.gaugeinfo = gauges;
117 }
118
119 public void setMeasurementStations(List<MeasurementStation> mstations) {
120 this.mstations = mstations;
121 }
107 } 122 }

http://dive4elements.wald.intevation.org