Mercurial > dive4elements > river
changeset 3838:70976b711b7e
Extend RiverInfo and GaugeInfo to store also the info http url
flys-client/trunk@5553 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Bjoern Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Fri, 21 Sep 2012 10:52:42 +0000 |
parents | 6b2ae2ec5b01 |
children | 509ef6ec93af |
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/DefaultRiverInfo.java flys-client/src/main/java/de/intevation/flys/client/shared/model/GaugeInfo.java flys-client/src/main/java/de/intevation/flys/client/shared/model/RiverInfo.java |
diffstat | 6 files changed, 48 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-client/ChangeLog Fri Sep 21 08:57:18 2012 +0000 +++ b/flys-client/ChangeLog Fri Sep 21 10:52:42 2012 +0000 @@ -1,3 +1,13 @@ +2012-09-21 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/DefaultRiverInfo.java, + src/main/java/de/intevation/flys/client/shared/model/DefaultGaugeInfo.java, + src/main/java/de/intevation/flys/client/shared/model/RiverInfo.java, + src/main/java/de/intevation/flys/client/shared/model/GaugeInfo.java: + Extend GaugeInfo and RiverInfo to store also the http url for additional + info. + 2012-09-21 Björn Ricks <bjoern.ricks@intevation.de> * src/main/java/de/intevation/flys/client/client/ui/GaugePanel.java,
--- a/flys-client/src/main/java/de/intevation/flys/client/server/GaugeOverviewInfoServiceImpl.java Fri Sep 21 08:57:18 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/server/GaugeOverviewInfoServiceImpl.java Fri Sep 21 10:52:42 2012 +0000 @@ -81,6 +81,8 @@ ArtifactNamespaceContext.NAMESPACE_URI, "minq"); String rmaxq = riverresp.getAttributeNS( ArtifactNamespaceContext.NAMESPACE_URI, "maxq"); + String rinfourl = riverresp.getAttributeNS( + ArtifactNamespaceContext.NAMESPACE_URI, "info-url"); logger.debug("River is " + rname); @@ -125,6 +127,8 @@ ArtifactNamespaceContext.NAMESPACE_URI, "maxw"); String gstation = gaugeele.getAttributeNS( ArtifactNamespaceContext.NAMESPACE_URI, "station"); + String ginfourl = riverresp.getAttributeNS( + ArtifactNamespaceContext.NAMESPACE_URI, "info-url"); logger.debug("Found gauge with name " + gname); @@ -140,7 +144,8 @@ parseDouble(gmaxq), parseDouble(gminw), parseDouble(gmaxw), - rwstunit + rwstunit, + ginfourl ); gauges.add(gaugeinfo); @@ -155,6 +160,7 @@ rwstunit, parseDouble(rminq), parseDouble(rmaxq), + rinfourl, gauges); logger.debug("Finished RiverInfoService.");
--- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultGaugeInfo.java Fri Sep 21 08:57:18 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultGaugeInfo.java Fri Sep 21 10:52:42 2012 +0000 @@ -17,6 +17,7 @@ private boolean kmup; private Double station; private String wstunit; + private String infourl; public DefaultGaugeInfo() { } @@ -33,7 +34,8 @@ Double maxq, Double minw, Double maxw, - String wstunit) + String wstunit, + String infourl) { this.name = name; this.station = station; @@ -46,6 +48,7 @@ this.minw = minw; this.maxw = maxw; this.wstunit = wstunit; + this.infourl = infourl; } /** * Returns the name of the gauge @@ -127,4 +130,11 @@ public String getWstUnit() { return this.wstunit; } + + /** + * Returns the URL where to find additional information about this gauge + */ + public String getInfoURL() { + return this.infourl; + } }
--- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultRiverInfo.java Fri Sep 21 08:57:18 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultRiverInfo.java Fri Sep 21 10:52:42 2012 +0000 @@ -15,6 +15,7 @@ private String wstunit; private Double minq; private Double maxq; + private String infourl; private List<GaugeInfo> gaugeinfo; @@ -29,6 +30,7 @@ String wstunit, Double minq, Double maxq, + String infourl, List<GaugeInfo> gaugeinfo) { this.name = name; @@ -38,6 +40,7 @@ this.wstunit = wstunit; this.minq = minq; this.maxq = maxq; + this.infourl = infourl; this.gaugeinfo = gaugeinfo; } @@ -94,4 +97,11 @@ public Double getMaxQ() { return maxq; } + + /** + * Returns the URL where to find additional information about this river + */ + public String getInfoURL() { + return this.infourl; + } }
--- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/GaugeInfo.java Fri Sep 21 08:57:18 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/GaugeInfo.java Fri Sep 21 10:52:42 2012 +0000 @@ -63,4 +63,9 @@ * Returns the wst unit as a String */ String getWstUnit(); + + /** + * Returns the URL where to find additional information about this gauge + */ + String getInfoURL(); }
--- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/RiverInfo.java Fri Sep 21 08:57:18 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/RiverInfo.java Fri Sep 21 10:52:42 2012 +0000 @@ -45,6 +45,11 @@ * Returns the max q value of the river */ Double getMaxQ(); + + /** + * Returns the URL where to find additional information about this river + */ + String getInfoURL(); }