Mercurial > dive4elements > gnv-client
annotate gnv-artifacts/src/main/java/de/intevation/gnv/statistics/VerticalProfileStatistics.java @ 1087:92fce3b3d07f
Centered histograms in pdf exports.
gnv-artifacts/trunk@1189 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 10 Jun 2010 09:23:33 +0000 |
parents | 05bf8534a35a |
children | f953c9a559d8 |
rev | line source |
---|---|
98
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.gnv.statistics; |
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
2 |
779
b1f5f2a8840f
Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
778
diff
changeset
|
3 import de.intevation.gnv.geobackend.base.Result; |
b1f5f2a8840f
Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
778
diff
changeset
|
4 |
b1f5f2a8840f
Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
778
diff
changeset
|
5 import de.intevation.gnv.state.describedata.KeyValueDescibeData; |
b1f5f2a8840f
Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
778
diff
changeset
|
6 |
98
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
7 import java.sql.SQLException; |
779
b1f5f2a8840f
Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
778
diff
changeset
|
8 |
253
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
197
diff
changeset
|
9 import java.util.Collection; |
98
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
10 |
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
11 /** |
814
9d427dd2a96a
Added Javadoc in statistic package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
12 * This class is used to create a statistic in 'Vertikalprofil' products. |
835
2423cefe7d39
Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
814
diff
changeset
|
13 * |
780
c4156275c1e1
Bring @author javadoc tags in form '@author <a href="john.doe@example.com">John Doe</a>'
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
779
diff
changeset
|
14 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a> |
98
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
15 */ |
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
16 public class VerticalProfileStatistics extends TimeseriesStatistics { |
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
17 |
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
18 /** |
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
19 * Constructor |
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
20 */ |
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
21 public VerticalProfileStatistics() { |
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
22 super(); |
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
23 } |
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
24 |
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
25 @Override |
255
5403452c06fc
Added proper values for calculating the Statistics of VerticalProfiles and HorizontalProfiles issue86
Tim Englich <tim.englich@intevation.de>
parents:
253
diff
changeset
|
26 protected double calculateXOrdinateValue(Result previousRow, Result row) throws SQLException { |
5403452c06fc
Added proper values for calculating the Statistics of VerticalProfiles and HorizontalProfiles issue86
Tim Englich <tim.englich@intevation.de>
parents:
253
diff
changeset
|
27 return row.getDouble("XORDINATE"); |
98
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
28 } |
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
29 |
253
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
197
diff
changeset
|
30 @Override |
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
197
diff
changeset
|
31 protected String generateStatisticsName( |
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
197
diff
changeset
|
32 String break1, |
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
197
diff
changeset
|
33 String break2, |
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
197
diff
changeset
|
34 String break3, |
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
197
diff
changeset
|
35 Collection<KeyValueDescibeData> parameters, |
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
197
diff
changeset
|
36 Collection<KeyValueDescibeData> measurements, |
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
197
diff
changeset
|
37 Collection<KeyValueDescibeData> dates) { |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
335
diff
changeset
|
38 |
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
335
diff
changeset
|
39 return (this.findValueTitle(parameters, break1)+ " "+ |
253
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
197
diff
changeset
|
40 this.findValueTitle(measurements,break2)).trim(); |
07650fc6014c
Put a name to each Statistic group which is similar to the name of the
Tim Englich <tim.englich@intevation.de>
parents:
197
diff
changeset
|
41 } |
98
156db25ad4b4
Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
42 } |
836
05bf8534a35a
Using unix line endings only.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
835
diff
changeset
|
43 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |