Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/exports/DurationCurveExporter.java @ 7116:3c7471b929d1
Merge branch generator-refectoring into default.
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Tue, 24 Sep 2013 12:29:44 +0200 |
parents | 41567bf1e131 |
children | e4606eae8ea5 |
comparison
equal
deleted
inserted
replaced
7095:bdadffad35b1 | 7116:3c7471b929d1 |
---|---|
16 import java.util.HashMap; | 16 import java.util.HashMap; |
17 import java.util.Date; | 17 import java.util.Date; |
18 import java.text.DateFormat; | 18 import java.text.DateFormat; |
19 import java.util.Locale; | 19 import java.util.Locale; |
20 | 20 |
21 import org.w3c.dom.Document; | |
22 | |
23 import org.apache.log4j.Logger; | 21 import org.apache.log4j.Logger; |
24 | 22 |
25 import au.com.bytecode.opencsv.CSVWriter; | 23 import au.com.bytecode.opencsv.CSVWriter; |
26 | 24 |
27 import net.sf.jasperreports.engine.JasperExportManager; | 25 import net.sf.jasperreports.engine.JasperExportManager; |
28 import net.sf.jasperreports.engine.JasperFillManager; | 26 import net.sf.jasperreports.engine.JasperFillManager; |
29 import net.sf.jasperreports.engine.JasperPrint; | 27 import net.sf.jasperreports.engine.JasperPrint; |
30 import net.sf.jasperreports.engine.JRException; | 28 import net.sf.jasperreports.engine.JRException; |
31 | 29 |
32 import org.dive4elements.artifacts.CallContext; | |
33 import org.dive4elements.artifacts.CallMeta; | 30 import org.dive4elements.artifacts.CallMeta; |
34 import org.dive4elements.artifacts.common.utils.Config; | 31 import org.dive4elements.artifacts.common.utils.Config; |
35 | 32 |
36 import org.dive4elements.river.artifacts.D4EArtifact; | 33 import org.dive4elements.river.artifacts.D4EArtifact; |
37 | 34 |
71 public static final String JASPER_FILE = "export.duration.pdf.file"; | 68 public static final String JASPER_FILE = "export.duration.pdf.file"; |
72 | 69 |
73 /** The storage that contains all WQKms objects for the different facets. */ | 70 /** The storage that contains all WQKms objects for the different facets. */ |
74 protected List<WQDay> data; | 71 protected List<WQDay> data; |
75 | 72 |
76 | 73 public DurationCurveExporter() { |
77 public void init(Document request, OutputStream out, CallContext context) { | 74 data = new ArrayList<WQDay>(); |
78 logger.debug("DurationCurveExporter.init"); | 75 } |
79 | |
80 super.init(request, out, context); | |
81 | |
82 this.data = new ArrayList<WQDay>(); | |
83 } | |
84 | |
85 | 76 |
86 @Override | 77 @Override |
87 protected void addData(Object d) { | 78 protected void addData(Object d) { |
88 if (d instanceof CalculationResult) { | 79 if (d instanceof CalculationResult) { |
89 d = ((CalculationResult)d).getData(); | 80 d = ((CalculationResult)d).getData(); |