Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/MiddleBedHeightData.java @ 3450:22790758b132
FixA/Vollmer: return the result now.
flys-artifacts/trunk@5113 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 23 Jul 2012 15:59:51 +0000 |
parents | 4bd3d8bbb60c |
children | 5fced192b95c |
rev | line source |
---|---|
2713
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.artifacts.model; |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
3 import java.io.Serializable; |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
4 |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
5 import gnu.trove.TDoubleArrayList; |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
6 |
2714
2952f6dee5cf
Added an exporter for middle bed height values.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2713
diff
changeset
|
7 import de.intevation.artifacts.CallContext; |
2952f6dee5cf
Added an exporter for middle bed height values.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2713
diff
changeset
|
8 |
2952f6dee5cf
Added an exporter for middle bed height values.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2713
diff
changeset
|
9 import de.intevation.flys.artifacts.resources.Resources; |
2952f6dee5cf
Added an exporter for middle bed height values.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2713
diff
changeset
|
10 |
2713
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 public class MiddleBedHeightData implements Serializable { |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
13 |
2714
2952f6dee5cf
Added an exporter for middle bed height values.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2713
diff
changeset
|
14 public static final String I18N_SINGLE_NAME = "facet.bedheight_middle.single"; |
2952f6dee5cf
Added an exporter for middle bed height values.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2713
diff
changeset
|
15 public static final String I18N_EPOCH_NAME = "facet.bedheight_middle.epoch"; |
2952f6dee5cf
Added an exporter for middle bed height values.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2713
diff
changeset
|
16 |
2713
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
17 private int startYear; |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
18 private int endYear; |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
19 private String evaluatedBy; |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
20 private String description; |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
21 |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 private TDoubleArrayList km; |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
23 private TDoubleArrayList middleHeight; |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 private TDoubleArrayList uncertainty; |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 private TDoubleArrayList soundingWidth; |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 private TDoubleArrayList dataGap; |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 private TDoubleArrayList width; |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 protected MiddleBedHeightData(int start, int end, String eval, String desc) { |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
31 this.startYear = start; |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
32 this.endYear = end; |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
33 this.evaluatedBy = eval; |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
34 this.description = desc; |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
35 |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
36 this.km = new TDoubleArrayList(); |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
37 this.middleHeight = new TDoubleArrayList(); |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
38 this.uncertainty = new TDoubleArrayList(); |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
39 this.soundingWidth = new TDoubleArrayList(); |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
40 this.dataGap = new TDoubleArrayList(); |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
41 this.width = new TDoubleArrayList(); |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
42 } |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
43 |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
44 |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
45 public int getStartYear() { |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
46 return startYear; |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
47 } |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
48 |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
49 public int getEndYear() { |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
50 return endYear; |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
51 } |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
52 |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
53 public String getEvaluatedBy() { |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
54 return evaluatedBy; |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
55 } |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
56 |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
57 public String getDescription() { |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
58 return description; |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
59 } |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
60 |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
61 |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
62 public void addKM(double km) { |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
63 this.km.add(km); |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
64 } |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
65 |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
66 public double getKM(int idx) { |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
67 return km.get(idx); |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
68 } |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
69 |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
70 public void addMiddleHeight(double middleHeight) { |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
71 this.middleHeight.add(middleHeight); |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
72 } |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
73 |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
74 public double getMiddleHeight(int idx) { |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
75 return middleHeight.get(idx); |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
76 } |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
77 |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
78 public void addUncertainty(double uncertainty) { |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
79 this.uncertainty.add(uncertainty); |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
80 } |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
81 |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
82 public double getUncertainty(int idx) { |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
83 return uncertainty.get(idx); |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
84 } |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
85 |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
86 public void addSoundingWidth(double soundingWidth) { |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
87 this.soundingWidth.add(soundingWidth); |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
88 } |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
89 |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
90 public double getSoundingWidth(int idx) { |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
91 return soundingWidth.get(idx); |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
92 } |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
93 |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
94 public void addDataGap(double gap) { |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
95 this.dataGap.add(gap); |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
96 } |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
97 |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
98 public double getDataGap(int idx) { |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
99 return dataGap.get(idx); |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
100 } |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
101 |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
102 public void addWidth(double width) { |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
103 this.width.add(width); |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
104 } |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
105 |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
106 public double getWidth(int idx) { |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
107 return width.get(idx); |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
108 } |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
109 |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
110 public int size() { |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
111 return km.size(); |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
112 } |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
113 |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
114 |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
115 public double[][] getMiddleHeightsPoints() { |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
116 double[][] points = new double[2][size()]; |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
117 |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
118 for (int i = 0, n = size(); i < n; i++) { |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
119 points[0][i] = getKM(i); |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
120 points[1][i] = getMiddleHeight(i); |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
121 } |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
122 |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
123 return points; |
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
124 } |
2714
2952f6dee5cf
Added an exporter for middle bed height values.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2713
diff
changeset
|
125 |
2952f6dee5cf
Added an exporter for middle bed height values.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2713
diff
changeset
|
126 |
2952f6dee5cf
Added an exporter for middle bed height values.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2713
diff
changeset
|
127 public String getSoundingName(CallContext context) { |
2952f6dee5cf
Added an exporter for middle bed height values.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2713
diff
changeset
|
128 if (getStartYear() == getEndYear()) { |
2952f6dee5cf
Added an exporter for middle bed height values.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2713
diff
changeset
|
129 return Resources.getMsg( |
2952f6dee5cf
Added an exporter for middle bed height values.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2713
diff
changeset
|
130 context.getMeta(), |
2952f6dee5cf
Added an exporter for middle bed height values.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2713
diff
changeset
|
131 I18N_SINGLE_NAME, |
2952f6dee5cf
Added an exporter for middle bed height values.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2713
diff
changeset
|
132 I18N_SINGLE_NAME, |
2952f6dee5cf
Added an exporter for middle bed height values.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2713
diff
changeset
|
133 new Object[] { getStartYear() } |
2952f6dee5cf
Added an exporter for middle bed height values.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2713
diff
changeset
|
134 ); |
2952f6dee5cf
Added an exporter for middle bed height values.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2713
diff
changeset
|
135 } |
2952f6dee5cf
Added an exporter for middle bed height values.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2713
diff
changeset
|
136 else { |
2952f6dee5cf
Added an exporter for middle bed height values.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2713
diff
changeset
|
137 return Resources.getMsg( |
2952f6dee5cf
Added an exporter for middle bed height values.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2713
diff
changeset
|
138 context.getMeta(), |
2952f6dee5cf
Added an exporter for middle bed height values.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2713
diff
changeset
|
139 I18N_EPOCH_NAME, |
2952f6dee5cf
Added an exporter for middle bed height values.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2713
diff
changeset
|
140 I18N_EPOCH_NAME, |
2952f6dee5cf
Added an exporter for middle bed height values.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2713
diff
changeset
|
141 new Object[] { getStartYear(), getEndYear() } |
2952f6dee5cf
Added an exporter for middle bed height values.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2713
diff
changeset
|
142 ); |
2952f6dee5cf
Added an exporter for middle bed height values.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2713
diff
changeset
|
143 } |
2952f6dee5cf
Added an exporter for middle bed height values.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2713
diff
changeset
|
144 } |
2713
b60751cfdd6c
Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
145 } |
3083
4bd3d8bbb60c
Added missing vim lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2714
diff
changeset
|
146 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |