[Dive4elements-commits] [PATCH 7 of 8] Extend the client RiverInfo model to support MeasurementStations
Wald Commits
scm-commit at wald.intevation.org
Wed Oct 24 17:09:27 CEST 2012
# HG changeset patch
# User Björn Ricks <bjoern.ricks at intevation.de>
# Date 1351090837 -7200
# Node ID 7a889098bcc6d91669b269ff84011c6e5fdc4da5
# Parent fc742c039f3045340488e2fb5c25db2f87e653b4
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.
diff -r fc742c039f30 -r 7a889098bcc6 flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultRiverInfo.java
--- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultRiverInfo.java Wed Oct 24 16:57:53 2012 +0200
+++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultRiverInfo.java Wed Oct 24 17:00:37 2012 +0200
@@ -18,6 +18,7 @@
private Long officialnumber;
private List<GaugeInfo> gaugeinfo;
+ private List<MeasurementStation> mstations;
public DefaultRiverInfo() {
}
@@ -30,8 +31,7 @@
String wstunit,
Double minq,
Double maxq,
- Long official,
- List<GaugeInfo> gaugeinfo)
+ Long official)
{
this.name = name;
this.kmup = kmup;
@@ -41,10 +41,8 @@
this.minq = minq;
this.maxq = maxq;
this.officialnumber = official;
- this.gaugeinfo = gaugeinfo;
}
-
public boolean isKmUp() {
return this.kmup;
}
@@ -78,7 +76,7 @@
}
/**
- * Return all gauge info of the river
+ * Return all gauge info of the river or null if they aren't available.
*/
public List<GaugeInfo> getGauges() {
return this.gaugeinfo;
@@ -104,4 +102,21 @@
public Long getOfficialNumber() {
return this.officialnumber;
}
+
+ /**
+ * Returns the MeasurementStations on this river or null if they aren't
+ * available.
+ */
+ @Override
+ public List<MeasurementStation> getMeasurementStations() {
+ return this.mstations;
+ }
+
+ public void setGauges(List<GaugeInfo> gauges) {
+ this.gaugeinfo = gauges;
+ }
+
+ public void setMeasurementStations(List<MeasurementStation> mstations) {
+ this.mstations = mstations;
+ }
}
diff -r fc742c039f30 -r 7a889098bcc6 flys-client/src/main/java/de/intevation/flys/client/shared/model/RiverInfo.java
--- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/RiverInfo.java Wed Oct 24 16:57:53 2012 +0200
+++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/RiverInfo.java Wed Oct 24 17:00:37 2012 +0200
@@ -50,6 +50,12 @@
* Returns the official number of the river
*/
Long getOfficialNumber();
+
+ /**
+ * Returns the MeasurementStations on this river or null if they aren't
+ * available.
+ */
+ List<MeasurementStation> getMeasurementStations();
}
More information about the Dive4elements-commits
mailing list