Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/transition/timeseries/TimeSeriesOutputTransition.java @ 207:d87347142702
Store the Results of an Artifact not in the Artifact but in an ehcache instance. issue3
gnv-artifacts/trunk@263 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Fri, 23 Oct 2009 08:50:50 +0000 |
parents | f2c76f35da5a |
children | 3dcd2b0b456e |
comparison
equal
deleted
inserted
replaced
206:01ac348ac4a4 | 207:d87347142702 |
---|---|
117 } | 117 } |
118 } catch (NumberFormatException e) { | 118 } catch (NumberFormatException e) { |
119 log.error(e, e); | 119 log.error(e, e); |
120 throw new TransitionException(e); | 120 throw new TransitionException(e); |
121 } | 121 } |
122 Collection<KeyValueDescibeData> parameters = this | 122 Collection<KeyValueDescibeData> parameters = this.getParameters(uuid); |
123 .getParameters(); | 123 Collection<KeyValueDescibeData> measurements = this.getMeasurements(uuid); |
124 Collection<KeyValueDescibeData> measurements = this | 124 Collection<KeyValueDescibeData> dates = this.getDates(uuid); |
125 .getMeasurements(); | |
126 Collection<KeyValueDescibeData> dates = this | |
127 .getDates(); | |
128 ChartStyle chartStyle = this | 125 ChartStyle chartStyle = this |
129 .creatStyle(chartWidth, chartHeight); | 126 .creatStyle(chartWidth, chartHeight); |
130 ChartLabels chartLables = new ChartLabels(this.getFisName(callMeta.getLanguages())+" "+this | 127 ChartLabels chartLables = new ChartLabels(this.getFisName(callMeta.getLanguages())+" "+this |
131 .getSelectedFeatureName(), this.domainLable); | 128 .getSelectedFeatureName(uuid), this.domainLable); |
132 this.createChart(outputStream, parameters, measurements,dates, | 129 this.createChart(outputStream, parameters, measurements,dates, |
133 chartStyle, chartLables, uuid); | 130 chartStyle, chartLables, uuid); |
134 } else if (outputMode.equalsIgnoreCase("csv")) { | 131 } else if (outputMode.equalsIgnoreCase("csv")) { |
135 log.debug("CSV-File will be generated."); | 132 log.debug("CSV-File will be generated."); |
136 this.createCSV(outputStream, chartResult); | 133 this.createCSV(outputStream, chartResult); |
236 | 233 |
237 } | 234 } |
238 return doc; | 235 return doc; |
239 } | 236 } |
240 | 237 |
241 protected String getSelectedFeatureName() { | 238 protected String getSelectedFeatureName(String uuid) { |
242 Collection<KeyValueDescibeData> values = this | 239 Collection<KeyValueDescibeData> values = this |
243 .getCollection(featureValuesName); | 240 .getCollection(featureValuesName, uuid); |
244 if (values != null) { | 241 if (values != null) { |
245 Iterator<KeyValueDescibeData> it = values.iterator(); | 242 Iterator<KeyValueDescibeData> it = values.iterator(); |
246 while (it.hasNext()) { | 243 while (it.hasNext()) { |
247 KeyValueDescibeData data = it.next(); | 244 KeyValueDescibeData data = it.next(); |
248 if (data.isSelected()) { | 245 if (data.isSelected()) { |
295 inputData.getValue()); | 292 inputData.getValue()); |
296 } | 293 } |
297 return returnValue; | 294 return returnValue; |
298 } | 295 } |
299 | 296 |
300 protected Collection<KeyValueDescibeData> getParameters() { | 297 protected Collection<KeyValueDescibeData> getParameters(String uuid) { |
301 return this.getCollection(parameterValuesName); | 298 return this.getCollection(parameterValuesName, uuid); |
302 } | 299 } |
303 | 300 |
304 protected Collection<KeyValueDescibeData> getMeasurements() { | 301 protected Collection<KeyValueDescibeData> getMeasurements(String uuid) { |
305 return this.getCollection(measuremenValueName); | 302 return this.getCollection(measuremenValueName, uuid); |
306 } | 303 } |
307 protected Collection<KeyValueDescibeData> getDates() { | 304 protected Collection<KeyValueDescibeData> getDates(String uuid) { |
308 return this.getCollection(dateValueName); | 305 return this.getCollection(dateValueName,uuid); |
309 } | 306 } |
310 | 307 |
311 @Override | 308 @Override |
312 public void setup(Node configuration) { | 309 public void setup(Node configuration) { |
313 super.setup(configuration); | 310 super.setup(configuration); |
337 /** | 334 /** |
338 * @param collectionName | 335 * @param collectionName |
339 * @return | 336 * @return |
340 */ | 337 */ |
341 protected Collection<KeyValueDescibeData> getCollection( | 338 protected Collection<KeyValueDescibeData> getCollection( |
342 String collectionName) { | 339 String collectionName, |
343 Iterator<Object> it = this.descibeData.iterator(); | 340 String uuid) { |
341 Iterator<Object> it = this.getDescibeData(uuid).iterator(); | |
344 while (it.hasNext()) { | 342 while (it.hasNext()) { |
345 | 343 |
346 Object o = it.next(); | 344 Object o = it.next(); |
347 | 345 |
348 if (o instanceof NamedCollection<?>) { | 346 if (o instanceof NamedCollection<?>) { |