comparison flys-client/src/main/java/de/intevation/flys/client/server/GaugeOverviewInfoServiceImpl.java @ 3847:f3b821735e39

Calculate the info url via i18n Don't fetch the info url from the artifact service and use i18n to calculate the url by using the official gauge and river number. flys-client/trunk@5582 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Bjoern Ricks <bjoern.ricks@intevation.de>
date Mon, 24 Sep 2012 08:39:22 +0000
parents 8e169e4e1b57
children c434dd2e84cf
comparison
equal deleted inserted replaced
3846:84a48acabd78 3847:f3b821735e39
79 ArtifactNamespaceContext.NAMESPACE_URI, "wstunit"); 79 ArtifactNamespaceContext.NAMESPACE_URI, "wstunit");
80 String rminq = riverresp.getAttributeNS( 80 String rminq = riverresp.getAttributeNS(
81 ArtifactNamespaceContext.NAMESPACE_URI, "minq"); 81 ArtifactNamespaceContext.NAMESPACE_URI, "minq");
82 String rmaxq = riverresp.getAttributeNS( 82 String rmaxq = riverresp.getAttributeNS(
83 ArtifactNamespaceContext.NAMESPACE_URI, "maxq"); 83 ArtifactNamespaceContext.NAMESPACE_URI, "maxq");
84 String rinfourl = riverresp.getAttributeNS( 84 String rofficial = riverresp.getAttributeNS(
85 ArtifactNamespaceContext.NAMESPACE_URI, "info-url"); 85 ArtifactNamespaceContext.NAMESPACE_URI, "official");
86 86
87 logger.debug("River is " + rname); 87 logger.debug("River is " + rname);
88 88
89 boolean kmup = rkmup.equalsIgnoreCase("true"); 89 boolean kmup = rkmup.equalsIgnoreCase("true");
90 90
125 ArtifactNamespaceContext.NAMESPACE_URI, "maxq"); 125 ArtifactNamespaceContext.NAMESPACE_URI, "maxq");
126 String gmaxw = gaugeele.getAttributeNS( 126 String gmaxw = gaugeele.getAttributeNS(
127 ArtifactNamespaceContext.NAMESPACE_URI, "maxw"); 127 ArtifactNamespaceContext.NAMESPACE_URI, "maxw");
128 String gstation = gaugeele.getAttributeNS( 128 String gstation = gaugeele.getAttributeNS(
129 ArtifactNamespaceContext.NAMESPACE_URI, "station"); 129 ArtifactNamespaceContext.NAMESPACE_URI, "station");
130 String ginfourl = riverresp.getAttributeNS( 130 String gofficial = gaugeele.getAttributeNS(
131 ArtifactNamespaceContext.NAMESPACE_URI, "info-url");
132 String gofficial = riverresp.getAttributeNS(
133 ArtifactNamespaceContext.NAMESPACE_URI, "official"); 131 ArtifactNamespaceContext.NAMESPACE_URI, "official");
134 132
135 logger.debug("Found gauge with name " + gname); 133 logger.debug("Found gauge with name " + gname);
136 134
137 GaugeInfo gaugeinfo = new DefaultGaugeInfo( 135 GaugeInfo gaugeinfo = new DefaultGaugeInfo(
145 parseDouble(gminq), 143 parseDouble(gminq),
146 parseDouble(gmaxq), 144 parseDouble(gmaxq),
147 parseDouble(gminw), 145 parseDouble(gminw),
148 parseDouble(gmaxw), 146 parseDouble(gmaxw),
149 rwstunit, 147 rwstunit,
150 ginfourl,
151 parseLong(gofficial) 148 parseLong(gofficial)
152 ); 149 );
153 150
154 gauges.add(gaugeinfo); 151 gauges.add(gaugeinfo);
155 } 152 }
161 parseDouble(rstart), 158 parseDouble(rstart),
162 parseDouble(rend), 159 parseDouble(rend),
163 rwstunit, 160 rwstunit,
164 parseDouble(rminq), 161 parseDouble(rminq),
165 parseDouble(rmaxq), 162 parseDouble(rmaxq),
166 rinfourl, 163 parseLong(rofficial),
167 gauges); 164 gauges);
168 165
169 logger.debug("Finished RiverInfoService."); 166 logger.debug("Finished RiverInfoService.");
170 167
171 return riverinfo; 168 return riverinfo;

http://dive4elements.wald.intevation.org