comparison artifacts/src/main/java/org/dive4elements/river/exports/DurationCurveExporter.java @ 8202:e4606eae8ea5

sed src/**/*.java 's/logger/log/g'
author Sascha L. Teichmann <teichmann@intevation.de>
date Fri, 05 Sep 2014 12:58:17 +0200
parents 41567bf1e131
children 2b0ff11cef3f
comparison
equal deleted inserted replaced
8201:4b8c5a08de04 8202:e4606eae8ea5
45 /** 45 /**
46 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> 46 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
47 */ 47 */
48 public class DurationCurveExporter extends AbstractExporter { 48 public class DurationCurveExporter extends AbstractExporter {
49 49
50 /** The logger used in this exporter. */ 50 /** The log used in this exporter. */
51 private static Logger logger = Logger.getLogger(DurationCurveExporter.class); 51 private static Logger log = Logger.getLogger(DurationCurveExporter.class);
52 52
53 53
54 public static final String CSV_DURATION_HEADER = 54 public static final String CSV_DURATION_HEADER =
55 "export.duration.curve.csv.header.duration"; 55 "export.duration.curve.csv.header.duration";
56 56
84 } 84 }
85 } 85 }
86 86
87 87
88 protected void writeCSVData(CSVWriter writer) { 88 protected void writeCSVData(CSVWriter writer) {
89 logger.info("DurationCurveExporter.writeData"); 89 log.info("DurationCurveExporter.writeData");
90 90
91 writeCSVHeader(writer); 91 writeCSVHeader(writer);
92 92
93 for (WQDay wqday: data) { 93 for (WQDay wqday: data) {
94 wQDay2CSV(writer, wqday); 94 wQDay2CSV(writer, wqday);
95 } 95 }
96 } 96 }
97 97
98 98
99 protected void writeCSVHeader(CSVWriter writer) { 99 protected void writeCSVHeader(CSVWriter writer) {
100 logger.info("DurationCurveExporter.writeCSVHeader"); 100 log.info("DurationCurveExporter.writeCSVHeader");
101 101
102 writer.writeNext(new String[] { 102 writer.writeNext(new String[] {
103 msg(CSV_W_HEADER, DEFAULT_CSV_W_HEADER), 103 msg(CSV_W_HEADER, DEFAULT_CSV_W_HEADER),
104 msg(CSV_Q_HEADER, DEFAULT_CSV_Q_HEADER), 104 msg(CSV_Q_HEADER, DEFAULT_CSV_Q_HEADER),
105 msg(CSV_DURATION_HEADER, DEFAULT_CSV_DURATION_HEADER) 105 msg(CSV_DURATION_HEADER, DEFAULT_CSV_DURATION_HEADER)
106 }); 106 });
107 } 107 }
108 108
109 109
110 protected void wQDay2CSV(CSVWriter writer, WQDay wqday) { 110 protected void wQDay2CSV(CSVWriter writer, WQDay wqday) {
111 logger.debug("DurationCurveExporter.wQDay2CSV"); 111 log.debug("DurationCurveExporter.wQDay2CSV");
112 112
113 int size = wqday.size(); 113 int size = wqday.size();
114 114
115 NumberFormat wf = getWFormatter(); 115 NumberFormat wf = getWFormatter();
116 NumberFormat qf = getQFormatter(); 116 NumberFormat qf = getQFormatter();
187 parameters, 187 parameters,
188 source); 188 source);
189 JasperExportManager.exportReportToPdfStream(print, out); 189 JasperExportManager.exportReportToPdfStream(print, out);
190 } 190 }
191 catch(JRException je) { 191 catch(JRException je) {
192 logger.warn("Error generating PDF Report!"); 192 log.warn("Error generating PDF Report!");
193 je.printStackTrace(); 193 je.printStackTrace();
194 } 194 }
195 } 195 }
196 196
197 protected WKmsJRDataSource createJRData() { 197 protected WKmsJRDataSource createJRData() {

http://dive4elements.wald.intevation.org