Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/exports/ODVExport.java @ 771:a0e63136954e
Added and repaired javadoc in de.intevation.gnv.exports package.
gnv-artifacts/trunk@827 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 25 Mar 2010 09:01:14 +0000 |
parents | f28a7eac542a |
children | 9a828e5a2390 |
comparison
equal
deleted
inserted
replaced
770:d70cac2bafc0 | 771:a0e63136954e |
---|---|
1 /** | |
2 * | |
3 */ | |
4 package de.intevation.gnv.exports; | 1 package de.intevation.gnv.exports; |
5 | |
6 | 2 |
7 import java.util.ArrayList; | 3 import java.util.ArrayList; |
8 import java.util.Collection; | 4 import java.util.Collection; |
9 import java.util.HashMap; | 5 import java.util.HashMap; |
10 import java.util.Iterator; | 6 import java.util.Iterator; |
17 import de.intevation.gnv.state.describedata.KeyValueDescibeData; | 13 import de.intevation.gnv.state.describedata.KeyValueDescibeData; |
18 import de.intevation.gnv.state.exception.StateException; | 14 import de.intevation.gnv.state.exception.StateException; |
19 | 15 |
20 | 16 |
21 /** | 17 /** |
22 * @author Tim Englich <tim.englich@intevation.de> | 18 * This class is used to create a specific export document which is similar to |
19 * an CSV document. | |
23 * | 20 * |
21 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a> | |
24 */ | 22 */ |
25 public class ODVExport extends DefaultExport { | 23 public class ODVExport extends DefaultExport { |
26 | 24 |
25 /** | |
26 * Logger used for logging via log4j. | |
27 */ | |
27 private static Logger log = Logger.getLogger(ODVExport.class); | 28 private static Logger log = Logger.getLogger(ODVExport.class); |
28 | 29 |
30 /** | |
31 * Collection of parameters. | |
32 */ | |
29 private Collection parameters = null; | 33 private Collection parameters = null; |
30 | 34 |
31 /** | 35 /** |
32 * Constructor | 36 * Constructor |
33 * @param collector | 37 * @param collector |
35 public ODVExport(DataCollector collector, Collection parameters) { | 39 public ODVExport(DataCollector collector, Collection parameters) { |
36 super(collector); | 40 super(collector); |
37 this.parameters = parameters; | 41 this.parameters = parameters; |
38 } | 42 } |
39 | 43 |
44 /** | |
45 * @see de.intevation.gnv.exports.Export#writeData(Profile, Collection, | |
46 * CSVWriter) | |
47 */ | |
40 @Override | 48 @Override |
41 protected void writeData(Profile profile, Collection result, | 49 protected void writeData(Profile profile, Collection result, |
42 CSVWriter writer) throws StateException { | 50 CSVWriter writer) throws StateException { |
43 Iterator<Result> it = result.iterator(); | 51 Iterator<Result> it = result.iterator(); |
44 | 52 |
100 } | 108 } |
101 writer.writeNext(rowList.toArray(row)); | 109 writer.writeNext(rowList.toArray(row)); |
102 } | 110 } |
103 } | 111 } |
104 | 112 |
113 /** | |
114 * This method is used to search specific value coresponding to its key | |
115 * <code>id</code> and return its description. | |
116 * | |
117 * @param values Collection of parameters. | |
118 * @param id Key used to find the value. | |
119 * | |
120 * @return Description of searched value. | |
121 */ | |
105 protected String findParamTitle(Collection values, String id) { | 122 protected String findParamTitle(Collection values, String id) { |
106 log.debug("find description of dataset"); | 123 log.debug("find description of dataset"); |
107 | 124 |
108 if (values != null){ | 125 if (values != null){ |
109 Iterator it = values.iterator(); | 126 Iterator it = values.iterator(); |
117 return ""; | 134 return ""; |
118 } | 135 } |
119 | 136 |
120 | 137 |
121 } | 138 } |
139 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |