Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/transition/timeseries/TimeSeriesOutputTransition.java @ 315:63f8b3fb7d9a
Localization of chart axis with locale which fits best to server and browser settings.
gnv-artifacts/trunk@373 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 26 Nov 2009 08:47:44 +0000 |
parents | 45625b5cd6d4 |
children | 5f2820e821e0 |
comparison
equal
deleted
inserted
replaced
314:6f72e335e2c9 | 315:63f8b3fb7d9a |
---|---|
213 Collection<KeyValueDescibeData> measurements = this.getMeasurements(uuid); | 213 Collection<KeyValueDescibeData> measurements = this.getMeasurements(uuid); |
214 Collection<KeyValueDescibeData> dates = this.getDates(uuid); | 214 Collection<KeyValueDescibeData> dates = this.getDates(uuid); |
215 ChartLabels chartLables = new ChartLabels(this.getFisName(callMeta.getLanguages())+" "+this | 215 ChartLabels chartLables = new ChartLabels(this.getFisName(callMeta.getLanguages())+" "+this |
216 .getSelectedFeatureName(uuid), this.domainLable); | 216 .getSelectedFeatureName(uuid), this.domainLable); |
217 | 217 |
218 String exportFormat = getExportFormat(mimeType); | 218 String exportFormat = getExportFormat(mimeType); |
219 | |
220 PreferredLocale[] locales = callMeta.getLanguages(); | |
221 Locale[] serverLocales = | |
222 RessourceFactory.getInstance().getLocales(); | |
223 Locale locale = | |
224 callMeta.getPreferredLocale(serverLocales); | |
225 | |
226 log.debug( | |
227 "Best locale - regarding intersection of server and " + | |
228 "browser locales - is " + locale.toString() | |
229 ); | |
219 | 230 |
220 this.createChart( | 231 this.createChart( |
221 outputStream, | 232 outputStream, |
222 parameters, | 233 parameters, |
223 measurements, | 234 measurements, |
224 dates, | 235 dates, |
225 chartLables, | 236 chartLables, |
226 uuid, | 237 uuid, |
227 exportFormat, | 238 exportFormat, |
239 locale, | |
228 chartWidth, | 240 chartWidth, |
229 chartHeight | 241 chartHeight |
230 ); | 242 ); |
231 } else if (outputMode.equalsIgnoreCase("csv")) { | 243 } else if (outputMode.equalsIgnoreCase("csv")) { |
232 log.debug("CSV-File will be generated."); | 244 log.debug("CSV-File will be generated."); |
397 Collection measurements, | 409 Collection measurements, |
398 Collection dates, | 410 Collection dates, |
399 ChartLabels chartLables, | 411 ChartLabels chartLables, |
400 String uuid, | 412 String uuid, |
401 String exportFormat, | 413 String exportFormat, |
414 Locale locale, | |
402 int width, | 415 int width, |
403 int height | 416 int height |
404 ) | 417 ) |
405 throws IOException, TechnicalChartException | 418 throws IOException, TechnicalChartException |
406 { | 419 { |
409 chartLables, | 422 chartLables, |
410 parameters, | 423 parameters, |
411 measurements, | 424 measurements, |
412 dates, | 425 dates, |
413 getChartResult(uuid), | 426 getChartResult(uuid), |
414 null, // Locale | 427 locale, // Locale |
415 uuid | 428 uuid |
416 ); | 429 ); |
417 | 430 |
418 if (chart == null) { | 431 if (chart == null) { |
419 log.error("Could not initialize chart."); | 432 log.error("Could not initialize chart."); |
459 parameters, | 472 parameters, |
460 measurements, | 473 measurements, |
461 dates, | 474 dates, |
462 result, | 475 result, |
463 timeGapDefinitions, | 476 timeGapDefinitions, |
464 null | 477 locale |
465 ); | 478 ); |
466 chart.generateChart(); | 479 chart.generateChart(); |
467 | 480 |
468 if (CACHE_CHART) { | 481 if (CACHE_CHART) { |
469 log.info("Put chart into cache."); | 482 log.info("Put chart into cache."); |
589 } | 602 } |
590 } | 603 } |
591 return null; | 604 return null; |
592 } | 605 } |
593 } | 606 } |
607 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |