comparison gnv-artifacts/src/main/java/de/intevation/gnv/state/timeseries/TimeSeriesOutputState.java @ 830:3ab5754e72e3

Extract ODV-Generation into its own method that it is possible to override it in subclasses. gnv-artifacts/trunk@924 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Tue, 13 Apr 2010 14:35:30 +0000
parents 499cfbbb61bc
children 2423cefe7d39
comparison
equal deleted inserted replaced
829:95733e564896 830:3ab5754e72e3
479 479
480 XMLUtils.toStream(doc, outputStream); 480 XMLUtils.toStream(doc, outputStream);
481 481
482 } 482 }
483 else if (outputMode.equalsIgnoreCase("odv")) { 483 else if (outputMode.equalsIgnoreCase("odv")) {
484 Collection<Result> odvResult = this.getODVResult(uuid); 484 createODV(outputStream, uuid, callContext);
485 this.createODV(outputStream, odvResult,uuid);
486 } 485 }
487 } catch (IOException e) { 486 } catch (IOException e) {
488 log.error(e, e); 487 log.error(e, e);
489 throw new StateException(e); 488 throw new StateException(e);
490 } catch (TechnicalChartException e) { 489 } catch (TechnicalChartException e) {
492 throw new StateException(e); 491 throw new StateException(e);
493 } catch (StatisticsException e) { 492 } catch (StatisticsException e) {
494 log.error(e, e); 493 log.error(e, e);
495 throw new StateException(e); 494 throw new StateException(e);
496 } 495 }
496 }
497
498
499 /**
500 * @param outputStream
501 * @param uuid
502 * @throws IOException
503 * @throws StateException
504 */
505 protected void createODV(OutputStream outputStream,
506 String uuid,
507 CallContext callContext)
508 throws IOException,
509 StateException {
510 Collection<Result> odvResult = this.getODVResult(uuid);
511 this.createODV(outputStream, odvResult,uuid);
497 } 512 }
498 513
499 514
500 /** 515 /**
501 * Retrieves the export format (e.g. png, gif, jpeg). 516 * Retrieves the export format (e.g. png, gif, jpeg).

http://dive4elements.wald.intevation.org