Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/exports/MiddleBedHeightExporter.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 | 60cd665b1bd6 |
children | d81c4b0d5ca7 |
comparison
equal
deleted
inserted
replaced
8201:4b8c5a08de04 | 8202:e4606eae8ea5 |
---|---|
33 /** | 33 /** |
34 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | 34 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
35 */ | 35 */ |
36 public class MiddleBedHeightExporter extends AbstractExporter { | 36 public class MiddleBedHeightExporter extends AbstractExporter { |
37 | 37 |
38 /** Private logger. */ | 38 /** Private log. */ |
39 private static final Logger logger = | 39 private static final Logger log = |
40 Logger.getLogger(MiddleBedHeightExporter.class); | 40 Logger.getLogger(MiddleBedHeightExporter.class); |
41 | 41 |
42 public static final String CSV_KM = | 42 public static final String CSV_KM = |
43 "export.bedheight_middle.csv.header.km"; | 43 "export.bedheight_middle.csv.header.km"; |
44 | 44 |
100 protected void addData(Object d) { | 100 protected void addData(Object d) { |
101 if (d instanceof CalculationResult) { | 101 if (d instanceof CalculationResult) { |
102 d = ((CalculationResult) d).getData(); | 102 d = ((CalculationResult) d).getData(); |
103 | 103 |
104 if (d instanceof MiddleBedHeightData[]) { | 104 if (d instanceof MiddleBedHeightData[]) { |
105 logger.debug("Add new data of type MiddleBedHeightData"); | 105 log.debug("Add new data of type MiddleBedHeightData"); |
106 for (MiddleBedHeightData mD :(MiddleBedHeightData[]) d) { | 106 for (MiddleBedHeightData mD :(MiddleBedHeightData[]) d) { |
107 data.add(mD); | 107 data.add(mD); |
108 } | 108 } |
109 } | 109 } |
110 } | 110 } |
111 } | 111 } |
112 | 112 |
113 | 113 |
114 @Override | 114 @Override |
115 protected void writeCSVData(CSVWriter writer) { | 115 protected void writeCSVData(CSVWriter writer) { |
116 logger.info("MiddleBedHeightExporter.writeCSVData"); | 116 log.info("MiddleBedHeightExporter.writeCSVData"); |
117 logger.debug("CSV gets " + data.size() + " MiddleBedHeightData objects."); | 117 log.debug("CSV gets " + data.size() + " MiddleBedHeightData objects."); |
118 | 118 |
119 | 119 |
120 Collections.sort(data); | 120 Collections.sort(data); |
121 | 121 |
122 for (MiddleBedHeightData d: data) { | 122 for (MiddleBedHeightData d: data) { |
140 }); | 140 }); |
141 } | 141 } |
142 | 142 |
143 | 143 |
144 protected void data2CSV(CSVWriter writer, MiddleBedHeightData data) { | 144 protected void data2CSV(CSVWriter writer, MiddleBedHeightData data) { |
145 logger.debug("Add next MiddleBedHeightData to CSV"); | 145 log.debug("Add next MiddleBedHeightData to CSV"); |
146 | 146 |
147 D4EArtifact flys = (D4EArtifact) master; | 147 D4EArtifact flys = (D4EArtifact) master; |
148 | 148 |
149 writeMetaData(writer, data); | 149 writeMetaData(writer, data); |
150 | 150 |
232 writer.writeNext(new String[]{"#"}); | 232 writer.writeNext(new String[]{"#"}); |
233 } | 233 } |
234 | 234 |
235 @Override | 235 @Override |
236 protected void writePDF(OutputStream out) { | 236 protected void writePDF(OutputStream out) { |
237 logger.error("TODO: Implement FlowVelocityExporter.writePDF"); | 237 log.error("TODO: Implement FlowVelocityExporter.writePDF"); |
238 } | 238 } |
239 } | 239 } |
240 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : | 240 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |