comparison gnv-artifacts/src/main/java/de/intevation/gnv/transition/timeseries/TimeSeriesOutputTransition.java @ 171:7fb9441dd8af

Format Code to max 80 Chars per Row and Cleanup gnv-artifacts/trunk@208 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Fri, 09 Oct 2009 07:54:48 +0000
parents 4841808819d9
children 08b8b79b30ff
comparison
equal deleted inserted replaced
170:7be22e76c270 171:7fb9441dd8af
60 */ 60 */
61 private static Logger log = Logger 61 private static Logger log = Logger
62 .getLogger(TimeSeriesOutputTransition.class); 62 .getLogger(TimeSeriesOutputTransition.class);
63 63
64 protected String domainLable = "Zeit [UTC]"; 64 protected String domainLable = "Zeit [UTC]";
65 65
66 protected String featureValuesName = "featureid"; 66 protected String featureValuesName = "featureid";
67 protected String parameterValuesName = "parameterid"; 67 protected String parameterValuesName = "parameterid";
68 protected String measuremenValueName = "measurementid"; 68 protected String measuremenValueName = "measurementid";
69 69
70 /** 70 /**
75 } 75 }
76 76
77 /** 77 /**
78 * @see de.intevation.gnv.transition.Transition#validate() 78 * @see de.intevation.gnv.transition.Transition#validate()
79 */ 79 */
80 @Override
80 public boolean validate() { 81 public boolean validate() {
81 return true; 82 return true;
82 } 83 }
83 84
84 /** 85 /**
127 } else if (outputMode.equalsIgnoreCase("csv")) { 128 } else if (outputMode.equalsIgnoreCase("csv")) {
128 log.debug("CSV-File will be generated."); 129 log.debug("CSV-File will be generated.");
129 if (chartResult != null) { 130 if (chartResult != null) {
130 CSVWriter writer = new CSVWriter(new OutputStreamWriter( 131 CSVWriter writer = new CSVWriter(new OutputStreamWriter(
131 outputStream, "ISO-8859-1"), ','); // USE THIS 132 outputStream, "ISO-8859-1"), ','); // USE THIS
132 // ENCODING 133 // ENCODING
133 // BECAUSE OF 134 // BECAUSE OF
134 // PROBLEMS WITH 135 // PROBLEMS WITH
135 // EXCEL AND 136 // EXCEL AND
136 // UTF-8 137 // UTF-8
137 Iterator<Result> it = chartResult.iterator(); 138 Iterator<Result> it = chartResult.iterator();
138 while (it.hasNext()) { 139 while (it.hasNext()) {
139 Result result = it.next(); 140 Result result = it.next();
140 int i = 0; 141 int i = 0;
141 String[] entries = new String[5]; 142 String[] entries = new String[5];
274 } 275 }
275 276
276 @Override 277 @Override
277 public void setup(Node configuration) { 278 public void setup(Node configuration) {
278 super.setup(configuration); 279 super.setup(configuration);
279 String featureNameValue = Config.getStringXPath(configuration, "value-names/value-name[@name='feature']/@value"); 280 String featureNameValue = Config.getStringXPath(configuration,
280 if (featureNameValue != null){ 281 "value-names/value-name[@name='feature']/@value");
282 if (featureNameValue != null) {
281 this.featureValuesName = featureNameValue; 283 this.featureValuesName = featureNameValue;
282 } 284 }
283 String parameterNameValue = Config.getStringXPath(configuration, "value-names/value-name[@name='parameter']/@value"); 285 String parameterNameValue = Config.getStringXPath(configuration,
284 if (parameterNameValue != null){ 286 "value-names/value-name[@name='parameter']/@value");
287 if (parameterNameValue != null) {
285 this.parameterValuesName = parameterNameValue; 288 this.parameterValuesName = parameterNameValue;
286 } 289 }
287 String measurementNameValue = Config.getStringXPath(configuration, "value-names/value-name[@name='measurement']/@value"); 290 String measurementNameValue = Config.getStringXPath(configuration,
288 if (measurementNameValue != null){ 291 "value-names/value-name[@name='measurement']/@value");
292 if (measurementNameValue != null) {
289 this.measuremenValueName = measurementNameValue; 293 this.measuremenValueName = measurementNameValue;
290 } 294 }
291 } 295 }
292 296
293 /** 297 /**

http://dive4elements.wald.intevation.org