Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/exports/ShapeDataCollector.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 | e964a3d8f7bc |
children | 9a828e5a2390 |
comparison
equal
deleted
inserted
replaced
770:d70cac2bafc0 | 771:a0e63136954e |
---|---|
9 import de.intevation.gnv.geobackend.base.Result; | 9 import de.intevation.gnv.geobackend.base.Result; |
10 import de.intevation.gnv.state.exception.StateException; | 10 import de.intevation.gnv.state.exception.StateException; |
11 | 11 |
12 | 12 |
13 /** | 13 /** |
14 * @author Ingo Weinzierl (ingo.weinzierl@intevation.de) | 14 * This class is a specialization of {@link #DefaultDataCollector}. The |
15 * difference between these classes is, that this class extracts points served | |
16 * by a wkt string. | |
17 * | |
18 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | |
15 */ | 19 */ |
16 public class ShapeDataCollector | 20 public class ShapeDataCollector |
17 extends DefaultDataCollector | 21 extends DefaultDataCollector |
18 { | 22 { |
23 /** | |
24 * Logger used for logging with log4j. | |
25 */ | |
19 private Logger log = Logger.getLogger(ShapeDataCollector.class); | 26 private Logger log = Logger.getLogger(ShapeDataCollector.class); |
20 | 27 |
28 /** | |
29 * WKTReader to parse points from wkt strings. | |
30 */ | |
21 protected WKTReader wktReader = new WKTReader(); | 31 protected WKTReader wktReader = new WKTReader(); |
22 | 32 |
33 /** | |
34 * Constructor | |
35 * | |
36 * @param names Attributes used to be extracted. | |
37 */ | |
23 public ShapeDataCollector(String[] names) { | 38 public ShapeDataCollector(String[] names) { |
24 super(names); | 39 super(names); |
25 } | 40 } |
26 | 41 |
42 /** | |
43 * This method takes point from wkt strings as well and split them into x | |
44 * and y coordinate. | |
45 * | |
46 * @see de.intevation.gnv.exports.Export.DataCollector#getData(Result) | |
47 */ | |
27 public String[] getData(Result result) | 48 public String[] getData(Result result) |
28 throws StateException { | 49 throws StateException { |
29 | 50 |
30 if (rd == null) | 51 if (rd == null) |
31 init(result); | 52 init(result); |
53 throw new StateException( | 74 throw new StateException( |
54 "Error occured while parsing a Point from WKT."); | 75 "Error occured while parsing a Point from WKT."); |
55 } | 76 } |
56 } | 77 } |
57 } | 78 } |
79 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |