changeset 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 fc742c039f30
children ef154fbf58f1
files flys-client/src/main/java/de/intevation/flys/client/client/services/RiverInfoService.java flys-client/src/main/java/de/intevation/flys/client/client/services/RiverInfoServiceAsync.java flys-client/src/main/java/de/intevation/flys/client/server/RiverInfoServiceImpl.java flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultRiverInfo.java flys-client/src/main/java/de/intevation/flys/client/shared/model/RiverInfo.java
diffstat 2 files changed, 26 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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;
+    }
 }
--- 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();
 }
 
 

http://dive4elements.wald.intevation.org