Mercurial > dive4elements > river
changeset 3826:7a34af684ed4
Add station info to the gauges
flys-client/trunk@5521 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Bjoern Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Wed, 19 Sep 2012 12:41:48 +0000 (2012-09-19) |
parents | e91c5112d67c |
children | ed978af1f089 |
files | flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/server/GaugeOverviewInfoServiceImpl.java flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultGaugeInfo.java flys-client/src/main/java/de/intevation/flys/client/shared/model/GaugeInfo.java |
diffstat | 4 files changed, 34 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-client/ChangeLog Wed Sep 19 07:59:35 2012 +0000 +++ b/flys-client/ChangeLog Wed Sep 19 12:41:48 2012 +0000 @@ -1,3 +1,10 @@ +2012-09-19 Bj�rn Ricks <bjoern.ricks@intevation.de> + + * src/main/java/de/intevation/flys/client/server/GaugeOverviewInfoServiceImpl.java, + src/main/java/de/intevation/flys/client/shared/model/DefaultGaugeInfo.java, + src/main/java/de/intevation/flys/client/shared/model/GaugeInfo.java: + Add station information to the gauges. + 2012-09-19 Bj�rn Ricks <bjoern.ricks@intevation.de> * src/main/webapp/FLYS.css,
--- a/flys-client/src/main/java/de/intevation/flys/client/server/GaugeOverviewInfoServiceImpl.java Wed Sep 19 07:59:35 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/server/GaugeOverviewInfoServiceImpl.java Wed Sep 19 12:41:48 2012 +0000 @@ -123,12 +123,15 @@ ArtifactNamespaceContext.NAMESPACE_URI, "maxq"); String gmaxw = gaugeele.getAttributeNS( ArtifactNamespaceContext.NAMESPACE_URI, "maxw"); + String gstation = gaugeele.getAttributeNS( + ArtifactNamespaceContext.NAMESPACE_URI, "station"); logger.debug("Found gauge with name " + gname); GaugeInfo gaugeinfo = new DefaultGaugeInfo( gname, kmup, + parseDouble(gstation), parseDouble(gstart), parseDouble(gend), parseDouble(gdatum),
--- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultGaugeInfo.java Wed Sep 19 07:59:35 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultGaugeInfo.java Wed Sep 19 12:41:48 2012 +0000 @@ -15,6 +15,7 @@ private Double minw; private Double maxw; private boolean kmup; + private Double station; public DefaultGaugeInfo() { } @@ -22,6 +23,7 @@ public DefaultGaugeInfo( String name, boolean kmup, + Double station, Double start, Double end, Double datum, @@ -31,15 +33,16 @@ Double minw, Double maxw) { - this.name = name; - this.start = start; - this.end = end; - this.datum = datum; - this.aeo = aeo; - this.minq = minq; - this.maxq = maxq; - this.minw = minw; - this.maxw = maxw; + this.name = name; + this.station = station; + this.start = start; + this.end = end; + this.datum = datum; + this.aeo = aeo; + this.minq = minq; + this.maxq = maxq; + this.minw = minw; + this.maxw = maxw; } /** * Returns the name of the gauge @@ -107,4 +110,11 @@ public boolean isKmUp() { return this.kmup; } + + /** + * Returns the station km of the gauge or null if not available + */ + public Double getStation() { + return this.station; + } }
--- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/GaugeInfo.java Wed Sep 19 07:59:35 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/GaugeInfo.java Wed Sep 19 12:41:48 2012 +0000 @@ -53,4 +53,9 @@ Double getAeo(); boolean isKmUp(); + + /** + * Returns the station km of the gauge or null if not available + */ + Double getStation(); }