Mercurial > dive4elements > gnv-client
annotate gnv-artifacts/src/main/java/de/intevation/gnv/statistics/TimeseriesStatistics.java @ 115:158e89c2263b
Removed needless imports.
gnv-artifacts/trunk@166 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 01 Oct 2009 08:57:49 +0000 |
parents | 156db25ad4b4 |
children | 7fb9441dd8af |
rev | line source |
---|---|
93
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1 /** |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
2 * Title: TimeseriesStatistics, $Header: /share/gdi/SDI-Suite/Repository/projekte/BSH-GDI/genericViewer/src/main/java/de/conterra/bsh/gdi/gnviewer/output/statistics/TimeseriesStatistics.java,v 1.3 2008/08/18 14:50:33 drewnak Exp $ |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
3 * Source: $Source: /share/gdi/SDI-Suite/Repository/projekte/BSH-GDI/genericViewer/src/main/java/de/conterra/bsh/gdi/gnviewer/output/statistics/TimeseriesStatistics.java,v $ |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
4 * created by: Stefan Blume (blume) |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
5 * erstellt am: 06.12.2007 |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
6 * Copyright: con terra GmbH, 2005 |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
7 * |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
8 * modified by: $Author: drewnak $ |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
9 * modified on: $Date: 2008/08/18 14:50:33 $ |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
10 * Version: $Revision: 1.3 $ |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
11 * TAG: $Name: $ |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
12 * locked from: $Locker: $ |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
13 * CVS State: $State: Exp $ |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
14 * Project: $ProjectName$ |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
15 */ |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
16 package de.intevation.gnv.statistics; |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
17 |
98
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
97
diff
changeset
|
18 import java.sql.SQLException; |
93
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
19 import java.util.ArrayList; |
94
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
20 import java.util.Collection; |
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
21 import java.util.Iterator; |
93
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
22 |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
23 import org.apache.commons.math.stat.descriptive.DescriptiveStatistics; |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
24 import org.apache.commons.math.stat.regression.SimpleRegression; |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
25 import org.apache.log4j.Logger; |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
26 |
94
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
27 import de.intevation.gnv.geobackend.base.Result; |
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
28 import de.intevation.gnv.statistics.exception.StatisticsException; |
93
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
29 |
94
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
30 |
93
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
31 |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
32 /** |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
33 * The class <code>TimeseriesStatistics</code> fulfills the following purposes: |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
34 * <ol> |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
35 * <li></li> |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
36 * </ol> |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
37 * |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
38 * @author blume |
94
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
39 * @author Tim Englich <tim.englich@intevation.de> |
93
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
40 * @version 1.0 |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
41 * @serial 1.0 |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
42 * @see |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
43 * @since 06.12.2007 18:02:27 |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
44 */ |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
45 public class TimeseriesStatistics implements Statistics { |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
46 |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
47 /** |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
48 * Default Logging instance |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
49 */ |
95
13402ac8d8fe
Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents:
94
diff
changeset
|
50 private static Logger log = Logger.getLogger(TimeseriesStatistics.class); |
13402ac8d8fe
Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents:
94
diff
changeset
|
51 private static boolean sDebug = log.isDebugEnabled(); |
93
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
52 |
95
13402ac8d8fe
Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents:
94
diff
changeset
|
53 private Collection<Statistic> statistics = null; |
93
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
54 |
95
13402ac8d8fe
Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents:
94
diff
changeset
|
55 public TimeseriesStatistics(){ |
13402ac8d8fe
Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents:
94
diff
changeset
|
56 super(); |
13402ac8d8fe
Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents:
94
diff
changeset
|
57 } |
13402ac8d8fe
Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents:
94
diff
changeset
|
58 |
98
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
97
diff
changeset
|
59 /** |
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
97
diff
changeset
|
60 * @see de.intevation.gnv.statistics.Statistics#calculateStatistics(java.util.Collection) |
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
97
diff
changeset
|
61 */ |
95
13402ac8d8fe
Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents:
94
diff
changeset
|
62 public Collection<Statistic> calculateStatistics(Collection<Result> resultSet) throws StatisticsException { |
93
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
63 DescriptiveStatistics lStatistics = null; |
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
64 SimpleRegression lRegression = null; |
95
13402ac8d8fe
Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents:
94
diff
changeset
|
65 statistics = new ArrayList<Statistic>(); |
98
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
97
diff
changeset
|
66 String break1, break2; |
94
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
67 int lSeries = 1; |
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
68 try{ |
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
69 |
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
70 Iterator<Result> resultIterator = resultSet.iterator(); |
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
71 if (resultIterator.hasNext()){ |
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
72 Result row = resultIterator.next(); |
98
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
97
diff
changeset
|
73 break1 = row.getString("GROUP1"); |
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
97
diff
changeset
|
74 break2 = row.getString("GROUP2"); |
94
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
75 lRegression = new SimpleRegression(); |
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
76 lStatistics = DescriptiveStatistics.newInstance(); |
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
77 while (resultIterator.hasNext()) { |
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
78 |
98
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
97
diff
changeset
|
79 if (!break1.equals(row.getString("GROUP1")) |
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
97
diff
changeset
|
80 || !break2.equals(row.getString("GROUP2"))) { |
95
13402ac8d8fe
Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents:
94
diff
changeset
|
81 addStatisticsValues(lStatistics, lRegression, lSeries); |
94
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
82 |
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
83 lStatistics.clear(); |
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
84 lRegression.clear(); |
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
85 |
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
86 lStatistics.addValue(row.getDouble("YORDINATE")); |
98
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
97
diff
changeset
|
87 Double x = this.calculateXOrdinateValue(row); |
94
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
88 lRegression.addData(x ,row.getDouble("YORDINATE")); |
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
89 |
98
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
97
diff
changeset
|
90 break1 = row.getString("GROUP1"); |
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
97
diff
changeset
|
91 break2 = row.getString("GROUP2"); |
97
fce237b6fdb8
Bug fixed. Now all Values will be used to calculate the Statistics
Tim Englich <tim.englich@intevation.de>
parents:
95
diff
changeset
|
92 row = resultIterator.next(); |
94
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
93 lSeries ++; |
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
94 } |
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
95 else{ |
97
fce237b6fdb8
Bug fixed. Now all Values will be used to calculate the Statistics
Tim Englich <tim.englich@intevation.de>
parents:
95
diff
changeset
|
96 |
94
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
97 lStatistics.addValue(row.getDouble("YORDINATE")); |
98
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
97
diff
changeset
|
98 Double x = this.calculateXOrdinateValue(row); |
94
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
99 lRegression.addData(x,row.getDouble("YORDINATE")); |
97
fce237b6fdb8
Bug fixed. Now all Values will be used to calculate the Statistics
Tim Englich <tim.englich@intevation.de>
parents:
95
diff
changeset
|
100 row = resultIterator.next(); |
94
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
101 } |
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
102 |
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
103 } |
95
13402ac8d8fe
Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents:
94
diff
changeset
|
104 addStatisticsValues(lStatistics, lRegression,lSeries); |
94
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
105 lStatistics.clear(); |
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
106 lRegression.clear(); |
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
107 } |
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
108 } |
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
109 catch (Exception e){ |
95
13402ac8d8fe
Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents:
94
diff
changeset
|
110 log.error(e.getMessage(), e); |
94
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
111 } |
95
13402ac8d8fe
Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents:
94
diff
changeset
|
112 |
13402ac8d8fe
Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents:
94
diff
changeset
|
113 return statistics; |
93
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
114 } |
95
13402ac8d8fe
Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents:
94
diff
changeset
|
115 |
98
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
97
diff
changeset
|
116 |
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
97
diff
changeset
|
117 protected double calculateXOrdinateValue(Result row) throws SQLException{ |
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
97
diff
changeset
|
118 return new Double( (row.getDate("XORDINATE")).getTime()/1000/3600) ; |
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
97
diff
changeset
|
119 } |
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
97
diff
changeset
|
120 |
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
97
diff
changeset
|
121 |
94
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
122 /** |
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
123 * @param lStatistics |
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
124 * @param lRegression |
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
125 * @param lStats |
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
126 * @param lSeries |
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
127 */ |
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
128 private void addStatisticsValues(DescriptiveStatistics lStatistics, |
95
13402ac8d8fe
Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents:
94
diff
changeset
|
129 SimpleRegression lRegression, int lSeries) { |
13402ac8d8fe
Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents:
94
diff
changeset
|
130 statistics.add(new Statistic("gnviewer.statistics.series",(double)lSeries)); |
13402ac8d8fe
Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents:
94
diff
changeset
|
131 statistics.add(new Statistic("gnviewer.statistics.descriptive.arithmeticMean", lStatistics.getMean())); |
13402ac8d8fe
Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents:
94
diff
changeset
|
132 statistics.add(new Statistic("gnviewer.statistics.descriptive.kurtosis", lStatistics.getKurtosis())); |
13402ac8d8fe
Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents:
94
diff
changeset
|
133 statistics.add(new Statistic("gnviewer.statistics.descriptive.max", lStatistics.getMax())); |
13402ac8d8fe
Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents:
94
diff
changeset
|
134 statistics.add(new Statistic("gnviewer.statistics.descriptive.min", lStatistics.getMin())); |
13402ac8d8fe
Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents:
94
diff
changeset
|
135 statistics.add(new Statistic("gnviewer.statistics.descriptive.n", lStatistics.getN())); |
13402ac8d8fe
Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents:
94
diff
changeset
|
136 statistics.add(new Statistic("gnviewer.statistics.descriptive.percentile.90", lStatistics.getPercentile(90))); |
13402ac8d8fe
Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents:
94
diff
changeset
|
137 statistics.add(new Statistic("gnviewer.statistics.descriptive.percentile.75", lStatistics.getPercentile(75))); |
13402ac8d8fe
Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents:
94
diff
changeset
|
138 statistics.add(new Statistic("gnviewer.statistics.descriptive.percentile.50", lStatistics.getPercentile(50))); |
13402ac8d8fe
Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents:
94
diff
changeset
|
139 statistics.add(new Statistic("gnviewer.statistics.descriptive.percentile.10", lStatistics.getPercentile(10))); |
13402ac8d8fe
Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents:
94
diff
changeset
|
140 statistics.add(new Statistic("gnviewer.statistics.descriptive.deviation", lStatistics.getStandardDeviation())); |
13402ac8d8fe
Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents:
94
diff
changeset
|
141 statistics.add(new Statistic("gnviewer.statistics.descriptive.variance", lStatistics.getVariance())); |
13402ac8d8fe
Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents:
94
diff
changeset
|
142 statistics.add(new Statistic("gnviewer.statistics.descriptive.intercept", lRegression.getIntercept())); |
13402ac8d8fe
Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents:
94
diff
changeset
|
143 statistics.add(new Statistic("gnviewer.statistics.descriptive.slope", lRegression.getSlope())); |
94
6a825a184883
Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents:
93
diff
changeset
|
144 } |
93
c476fbbaa4ca
Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
145 } |