comparison gnv-artifacts/src/main/java/de/intevation/gnv/statistics/HorizontalProfileStatistics.java @ 814:9d427dd2a96a

Added Javadoc in statistic package. gnv-artifacts/trunk@898 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 09 Apr 2010 14:34:45 +0000
parents c4156275c1e1
children 499cfbbb61bc
comparison
equal deleted inserted replaced
813:79c1db3ca7cc 814:9d427dd2a96a
16 import java.util.Collection; 16 import java.util.Collection;
17 17
18 import org.apache.log4j.Logger; 18 import org.apache.log4j.Logger;
19 19
20 /** 20 /**
21 * This class is used to create a statistic for 'Horizontalprofil' products.
22 *
21 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a> 23 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a>
22 * 24 *
23 */ 25 */
24 public class HorizontalProfileStatistics extends TimeseriesStatistics { 26 public class HorizontalProfileStatistics extends TimeseriesStatistics {
25 27
36 */ 38 */
37 public HorizontalProfileStatistics() { 39 public HorizontalProfileStatistics() {
38 super(); 40 super();
39 } 41 }
40 42
41 /** 43
42 * @see de.intevation.gnv.statistics.TimeseriesStatistics#calculateXOrdinateValue(de.intevation.gnv.geobackend.base.Result, de.intevation.gnv.geobackend.base.Result)
43 */
44 @Override 44 @Override
45 protected double calculateXOrdinateValue(Result previousRow,Result row) 45 protected double calculateXOrdinateValue(Result previousRow,Result row)
46 throws SQLException { 46 throws SQLException {
47 try { 47 try {
48 Point start = (Point)this.wktReader.read(previousRow.getString("SHAPE")); 48 Point start = (Point)this.wktReader.read(previousRow.getString("SHAPE"));
49 Point current = (Point)this.wktReader.read(row.getString("SHAPE")); 49 Point current = (Point)this.wktReader.read(row.getString("SHAPE"));
50 double delta = this.dc.calculateDistance(start, current); 50 @SuppressWarnings("static-access")
51 double delta = DistanceCalculator.calculateDistance(start, current);
51 52
52 if (!Double.isNaN(delta)){ 53 if (!Double.isNaN(delta)){
53 this.distance = this.distance + delta; 54 this.distance = this.distance + delta;
54 } 55 }
55 } catch (ParseException e) { 56 } catch (ParseException e) {
56 log.error(e,e); 57 log.error(e,e);
57 } 58 }
58 return this.distance; 59 return this.distance;
59 } 60 }
60 61
61 /** 62
62 * @see de.intevation.gnv.statistics.TimeseriesStatistics#generateStatisticsName(java.lang.String, java.lang.String, java.lang.String, java.util.Collection, java.util.Collection, java.util.Collection)
63 */
64 @Override 63 @Override
65 protected String generateStatisticsName( 64 protected String generateStatisticsName(
66 String break1, 65 String break1,
67 String break2, 66 String break2,
68 String break3, 67 String break3,
72 return (this.findValueTitle(parameters, break1)+ " "+ 71 return (this.findValueTitle(parameters, break1)+ " "+
73 this.findValueTitle(measurements,break2)).trim()+" "+ 72 this.findValueTitle(measurements,break2)).trim()+" "+
74 this.findValueTitle(dates,break3); 73 this.findValueTitle(dates,break3);
75 } 74 }
76 75
77 /** 76
78 * @see de.intevation.gnv.statistics.TimeseriesStatistics#clearStatistics()
79 */
80 @Override 77 @Override
81 protected void clearStatistics() { 78 protected void clearStatistics() {
82 log.debug("HorizontalProfileStatistics.clearStatistics"); 79 log.debug("HorizontalProfileStatistics.clearStatistics");
83 super.clearStatistics(); 80 super.clearStatistics();
84 this.distance = 0; 81 this.distance = 0;

http://dive4elements.wald.intevation.org