Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/MainValuesArtifact.java @ 5371:92c07d5c433c
MainValuesArtifact: For hist. W/Q diagram mainvalues, get location from gauge.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Fri, 22 Mar 2013 09:09:52 +0100 |
parents | 2a5d7f9f268f |
children | a916e1202f0f |
comparison
equal
deleted
inserted
replaced
5370:2a5d7f9f268f | 5371:92c07d5c433c |
---|---|
202 } | 202 } |
203 else { | 203 else { |
204 logger.error("No location for mainvalues given."); | 204 logger.error("No location for mainvalues given."); |
205 } | 205 } |
206 importData(winfo, "river"); | 206 importData(winfo, "river"); |
207 // In the case of DischargeWQCurves, there are no locations, but a gauge. | |
208 if (getDataAsString("ld_locations") == null) { | |
209 // TODO its a tad difficult to remodel Range/Gauge-Access to | |
210 // do this. | |
211 String refGaugeID = winfo.getDataAsString("reference_gauge"); | |
212 if (refGaugeID != null) { | |
213 Gauge g = Gauge.getGaugeByOfficialNumber(Integer.parseInt(refGaugeID)); | |
214 addData("ld_locations", new DefaultStateData("ld_locations", null, null, | |
215 String.valueOf(g.getStation()))); | |
216 } | |
217 else { | |
218 logger.error("MainValuesArtifact: No location/gauge."); | |
219 } | |
220 } | |
207 } | 221 } |
208 | 222 |
209 | 223 |
210 /** | 224 /** |
211 * Get a list containing the one and only State. | 225 * Get a list containing the one and only State. |