Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/exports/FlowVelocityExporter.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 | bccc08a46bab |
children | e7a2234e7c3f |
comparison
equal
deleted
inserted
replaced
8201:4b8c5a08de04 | 8202:e4606eae8ea5 |
---|---|
27 /** | 27 /** |
28 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | 28 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
29 */ | 29 */ |
30 public class FlowVelocityExporter extends AbstractExporter { | 30 public class FlowVelocityExporter extends AbstractExporter { |
31 | 31 |
32 private static final Logger logger = | 32 private static final Logger log = |
33 Logger.getLogger(FlowVelocityExporter.class); | 33 Logger.getLogger(FlowVelocityExporter.class); |
34 | 34 |
35 | 35 |
36 public static final String CSV_KM = | 36 public static final String CSV_KM = |
37 "export.flow_velocity.csv.header.km"; | 37 "export.flow_velocity.csv.header.km"; |
62 protected void addData(Object d) { | 62 protected void addData(Object d) { |
63 if (d instanceof CalculationResult) { | 63 if (d instanceof CalculationResult) { |
64 d = ((CalculationResult) d).getData(); | 64 d = ((CalculationResult) d).getData(); |
65 | 65 |
66 if (d instanceof FlowVelocityData[]) { | 66 if (d instanceof FlowVelocityData[]) { |
67 logger.debug("Add new data of type FlowVelocityData"); | 67 log.debug("Add new data of type FlowVelocityData"); |
68 data.add((FlowVelocityData[]) d); | 68 data.add((FlowVelocityData[]) d); |
69 } | 69 } |
70 } | 70 } |
71 } | 71 } |
72 | 72 |
73 | 73 |
74 @Override | 74 @Override |
75 protected void writeCSVData(CSVWriter writer) { | 75 protected void writeCSVData(CSVWriter writer) { |
76 logger.info("FlowVelocityExporter.writeCSVData"); | 76 log.info("FlowVelocityExporter.writeCSVData"); |
77 logger.debug("CSV gets " + data.size() + " FlowVelocityData objects."); | 77 log.debug("CSV gets " + data.size() + " FlowVelocityData objects."); |
78 | 78 |
79 writeCSVHeader(writer); | 79 writeCSVHeader(writer); |
80 | 80 |
81 for (FlowVelocityData[] d: data) { | 81 for (FlowVelocityData[] d: data) { |
82 data2CSV(writer, d); | 82 data2CSV(writer, d); |
95 }); | 95 }); |
96 } | 96 } |
97 | 97 |
98 | 98 |
99 protected void data2CSV(CSVWriter writer, FlowVelocityData[] fData) { | 99 protected void data2CSV(CSVWriter writer, FlowVelocityData[] fData) { |
100 logger.debug("Add next FlowVelocityData to CSV"); | 100 log.debug("Add next FlowVelocityData to CSV"); |
101 | 101 |
102 D4EArtifact flys = (D4EArtifact) master; | 102 D4EArtifact flys = (D4EArtifact) master; |
103 | 103 |
104 for (FlowVelocityData data: fData) { | 104 for (FlowVelocityData data: fData) { |
105 for (int i = 0, n = data.size(); i < n; i++) { | 105 for (int i = 0, n = data.size(); i < n; i++) { |
120 } | 120 } |
121 | 121 |
122 | 122 |
123 @Override | 123 @Override |
124 protected void writePDF(OutputStream out) { | 124 protected void writePDF(OutputStream out) { |
125 logger.error("TODO: Implement FlowVelocityExporter.writePDF"); | 125 log.error("TODO: Implement FlowVelocityExporter.writePDF"); |
126 } | 126 } |
127 } | 127 } |
128 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : | 128 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |