comparison artifacts/src/main/java/org/dive4elements/river/exports/ChartGenerator2.java @ 7077:0a337f0005c2 generator-refactoring

Extended init() of OutGenerator to take name of the out to serve.
author Sascha L. Teichmann <teichmann@intevation.de>
date Fri, 20 Sep 2013 16:34:09 +0200
parents 726d998dce29
children 48e30e2c5db9
comparison
equal deleted inserted replaced
7074:a2abd87c0d3b 7077:0a337f0005c2
126 /** List of annotations to insert in plot. */ 126 /** List of annotations to insert in plot. */
127 protected List<RiverAnnotation> annotations = new ArrayList<RiverAnnotation>(); 127 protected List<RiverAnnotation> annotations = new ArrayList<RiverAnnotation>();
128 128
129 protected abstract List<AxisSection> buildYAxisSections(); 129 protected abstract List<AxisSection> buildYAxisSections();
130 130
131 protected String outName;
132
131 /** 133 /**
132 * Default constructor that initializes internal data structures. 134 * Default constructor that initializes internal data structures.
133 */ 135 */
134 public ChartGenerator2() { 136 public ChartGenerator2() {
135 datasets = new TreeMap<Integer, AxisDataset>(); 137 datasets = new TreeMap<Integer, AxisDataset>();
305 } 307 }
306 } 308 }
307 309
308 310
309 @Override 311 @Override
310 public void init(Document request, OutputStream out, CallContext context) { 312 public void init(String outName, Document request, OutputStream out, CallContext context) {
311 logger.debug("ChartGenerator2.init"); 313 logger.debug("ChartGenerator2.init");
312 314
315 this.outName = outName;
313 this.request = request; 316 this.request = request;
314 this.out = out; 317 this.out = out;
315 this.context = context; 318 this.context = context;
316 } 319 }
317 320

http://dive4elements.wald.intevation.org