Mercurial > dive4elements > river
annotate artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/SInfoResultType.java @ 9429:bd5f5d2220fa
Work on salix cross sections; waterlevels work now with different colors
Colors and i10n for all themes.
author | gernotbelger |
---|---|
date | Fri, 17 Aug 2018 17:48:01 +0200 |
parents | 7b2b086e45f0 |
children | e44c1a8b0c54 |
rev | line source |
---|---|
8948 | 1 /** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde |
2 * Software engineering by | |
3 * Björnsen Beratende Ingenieure GmbH | |
4 * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt | |
5 * | |
6 * This file is Free Software under the GNU AGPL (>=v3) | |
7 * and comes with ABSOLUTELY NO WARRANTY! Check out the | |
8 * documentation coming with Dive4Elements River for details. | |
9 */ | |
10 package org.dive4elements.river.artifacts.sinfo.common; | |
11 | |
12 import java.text.NumberFormat; | |
13 | |
14 import org.apache.commons.lang.StringUtils; | |
15 import org.dive4elements.artifacts.CallContext; | |
9000 | 16 import org.dive4elements.river.artifacts.common.AbstractResultType; |
17 import org.dive4elements.river.artifacts.common.I18NStrings; | |
8948 | 18 import org.dive4elements.river.artifacts.resources.Resources; |
19 import org.dive4elements.river.artifacts.sinfo.tkhcalculation.SoilKind; | |
9229
0dcd1cd41915
Different themes/facets for left bank and right bank infrastructures in S-Info flood durations, some fixmes done
mschaefer
parents:
9205
diff
changeset
|
20 import org.dive4elements.river.model.Attribute.AttributeKey; |
8948 | 21 import org.dive4elements.river.utils.Formatter; |
22 import org.dive4elements.river.utils.RiverUtils; | |
23 | |
24 /** | |
25 * Result type for data that goes into {@link SInfoResultRow}s. | |
26 * | |
27 * @author Gernot Belger | |
28 */ | |
9000 | 29 public abstract class SInfoResultType extends AbstractResultType { |
8948 | 30 |
9006 | 31 private static final long serialVersionUID = 1L; |
32 | |
9429
bd5f5d2220fa
Work on salix cross sections; waterlevels work now with different colors
gernotbelger
parents:
9318
diff
changeset
|
33 protected SInfoResultType(final String unit, final String csvHeader) { |
9000 | 34 super(unit, csvHeader, csvHeader); |
35 } | |
8948 | 36 |
9429
bd5f5d2220fa
Work on salix cross sections; waterlevels work now with different colors
gernotbelger
parents:
9318
diff
changeset
|
37 protected SInfoResultType(final String unit, final String csvHeader, final String pdfHeader) { |
9000 | 38 super(unit, csvHeader, pdfHeader); |
39 } | |
8948 | 40 |
9145 | 41 public static final SInfoResultType customMultiRowColWaterlevel = new SInfoResultType(null, SInfoI18NStrings.CSV_WATERLEVEL_HEADER, |
42 "sinfo.export.flow_depth.pdf.header.waterlevel") { | |
43 private static final long serialVersionUID = 1L; | |
44 | |
45 @Override | |
46 public String exportValue(final CallContext context, final Object value) { | |
9205
3dae6b78e1da
inundationDuration/floodDuration multiple columns+chartLines refactoring
gernotbelger
parents:
9202
diff
changeset
|
47 throw new UnsupportedOperationException(); |
9145 | 48 } |
49 | |
50 @Override | |
51 protected NumberFormat createFormatter(final CallContext context) { | |
9205
3dae6b78e1da
inundationDuration/floodDuration multiple columns+chartLines refactoring
gernotbelger
parents:
9202
diff
changeset
|
52 throw new UnsupportedOperationException(); |
9145 | 53 } |
54 | |
55 }; | |
56 | |
9176
1614cb14308f
Work on calculations for S-Info flood duration workflow
mschaefer
parents:
9157
diff
changeset
|
57 public static final SInfoResultType floodDischarge = new SInfoResultType(I18NStrings.UNIT_CUBIC_M, "sinfo.export.flood_duration.csv.header.discharge", |
1614cb14308f
Work on calculations for S-Info flood duration workflow
mschaefer
parents:
9157
diff
changeset
|
58 "sinfo.export.flood_duration.pdf.header.discharge") { |
9145 | 59 private static final long serialVersionUID = 1L; |
60 | |
61 @Override | |
62 public String exportValue(final CallContext context, final Object value) { | |
63 final double doubleValue = asDouble(value); | |
9176
1614cb14308f
Work on calculations for S-Info flood duration workflow
mschaefer
parents:
9157
diff
changeset
|
64 return exportDoubleValue(context, doubleValue); |
9145 | 65 } |
66 | |
67 @Override | |
68 protected NumberFormat createFormatter(final CallContext context) { | |
69 return Formatter.getWaterlevelQ(context); | |
70 } | |
71 }; | |
72 | |
9176
1614cb14308f
Work on calculations for S-Info flood duration workflow
mschaefer
parents:
9157
diff
changeset
|
73 public static final SInfoResultType floodDuration = new SInfoResultType(null, "sinfo.export.flood_duration.csv.header.duration", |
1614cb14308f
Work on calculations for S-Info flood duration workflow
mschaefer
parents:
9157
diff
changeset
|
74 "sinfo.export.flood_duration.pdf.header.duration") { |
9145 | 75 private static final long serialVersionUID = 1L; |
76 | |
77 @Override | |
78 public String exportValue(final CallContext context, final Object value) { | |
79 final double doubleValue = asDouble(value); | |
9176
1614cb14308f
Work on calculations for S-Info flood duration workflow
mschaefer
parents:
9157
diff
changeset
|
80 return exportDoubleValue(context, doubleValue); |
1614cb14308f
Work on calculations for S-Info flood duration workflow
mschaefer
parents:
9157
diff
changeset
|
81 } |
1614cb14308f
Work on calculations for S-Info flood duration workflow
mschaefer
parents:
9157
diff
changeset
|
82 |
1614cb14308f
Work on calculations for S-Info flood duration workflow
mschaefer
parents:
9157
diff
changeset
|
83 @Override |
1614cb14308f
Work on calculations for S-Info flood duration workflow
mschaefer
parents:
9157
diff
changeset
|
84 protected NumberFormat createFormatter(final CallContext context) { |
1614cb14308f
Work on calculations for S-Info flood duration workflow
mschaefer
parents:
9157
diff
changeset
|
85 return Formatter.getIntegerFormatter(context); |
1614cb14308f
Work on calculations for S-Info flood duration workflow
mschaefer
parents:
9157
diff
changeset
|
86 } |
1614cb14308f
Work on calculations for S-Info flood duration workflow
mschaefer
parents:
9157
diff
changeset
|
87 }; |
1614cb14308f
Work on calculations for S-Info flood duration workflow
mschaefer
parents:
9157
diff
changeset
|
88 |
9000 | 89 public static final SInfoResultType waterlevel = new SInfoResultType(null, SInfoI18NStrings.CSV_WATERLEVEL_HEADER, |
90 "sinfo.export.flow_depth.pdf.header.waterlevel") { | |
9006 | 91 private static final long serialVersionUID = 1L; |
92 | |
8948 | 93 @Override |
94 public String exportValue(final CallContext context, final Object value) { | |
95 final double doubleValue = asDouble(value); | |
96 return exportDoubleValue(context, doubleValue); | |
97 } | |
98 | |
99 @Override | |
100 protected NumberFormat createFormatter(final CallContext context) { | |
101 // REMARK: other modules use Formatter.getWaterlevelW(context) instead, but that format with a variable number of | |
102 // digits. | |
103 return Formatter.getFlowDepth(context); | |
104 } | |
9000 | 105 }; |
8948 | 106 |
9318
7b2b086e45f0
collision pdf details, ResultType refactoring, bezugswst result
gernotbelger
parents:
9312
diff
changeset
|
107 public static final SInfoResultType infrastructuretype = new SInfoResultType(I18NStrings.UNIT_NONE, |
7b2b086e45f0
collision pdf details, ResultType refactoring, bezugswst result
gernotbelger
parents:
9312
diff
changeset
|
108 "sinfo.export.flood_duration.csv.header.infrastructure_type", "sinfo.export.flood_duration.pdf.header.infrastructure_type") { |
9006 | 109 private static final long serialVersionUID = 1L; |
110 | |
8948 | 111 @Override |
112 public String exportValue(final CallContext context, final Object value) { | |
113 return exportStringValue(value); | |
114 } | |
115 | |
116 @Override | |
117 protected NumberFormat createFormatter(final CallContext context) { | |
118 throw new UnsupportedOperationException(); | |
119 } | |
9000 | 120 }; |
8948 | 121 |
9318
7b2b086e45f0
collision pdf details, ResultType refactoring, bezugswst result
gernotbelger
parents:
9312
diff
changeset
|
122 public static final SInfoResultType dischargeLong = new SInfoResultType(I18NStrings.UNIT_CUBIC_M, "sinfo.export.collision.csv.header.discharge_long") { |
9145 | 123 private static final long serialVersionUID = 1L; |
124 | |
125 @Override | |
126 public String exportValue(final CallContext context, final Object value) { | |
9318
7b2b086e45f0
collision pdf details, ResultType refactoring, bezugswst result
gernotbelger
parents:
9312
diff
changeset
|
127 final double doubleValue = asDouble(value); |
7b2b086e45f0
collision pdf details, ResultType refactoring, bezugswst result
gernotbelger
parents:
9312
diff
changeset
|
128 final double roundedDischarge = RiverUtils.roundQ(doubleValue); |
7b2b086e45f0
collision pdf details, ResultType refactoring, bezugswst result
gernotbelger
parents:
9312
diff
changeset
|
129 return exportDoubleValue(context, roundedDischarge); |
9145 | 130 } |
131 | |
132 @Override | |
133 protected NumberFormat createFormatter(final CallContext context) { | |
9318
7b2b086e45f0
collision pdf details, ResultType refactoring, bezugswst result
gernotbelger
parents:
9312
diff
changeset
|
134 return Formatter.getWaterlevelQ(context); |
9145 | 135 } |
136 }; | |
137 | |
9000 | 138 public static final SInfoResultType discharge = new SInfoResultType(I18NStrings.UNIT_CUBIC_M, SInfoI18NStrings.CSV_DISCHARGE_HEADER) { |
9006 | 139 private static final long serialVersionUID = 1L; |
140 | |
8948 | 141 @Override |
142 public String exportValue(final CallContext context, final Object value) { | |
143 final double doubleValue = asDouble(value); | |
144 final double roundedDischarge = RiverUtils.roundQ(doubleValue); | |
145 return exportDoubleValue(context, roundedDischarge); | |
146 } | |
147 | |
148 @Override | |
149 protected NumberFormat createFormatter(final CallContext context) { | |
150 return Formatter.getWaterlevelQ(context); | |
151 } | |
9000 | 152 }; |
8948 | 153 |
9202
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
154 public static final SInfoResultType discharge1 = new SInfoResultType(I18NStrings.UNIT_CUBIC_M, "sinfo.flood_duration.header.mainvalue.1.q", |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
155 "sinfo.flood_duration.header.pdf.mainvalue.1.q") { |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
156 private static final long serialVersionUID = 1L; |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
157 |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
158 @Override |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
159 public String exportValue(final CallContext context, final Object value) { |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
160 final double doubleValue = asDouble(value); |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
161 final double roundedDischarge = RiverUtils.roundQ(doubleValue); |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
162 return exportDoubleValue(context, roundedDischarge); |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
163 } |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
164 |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
165 @Override |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
166 protected NumberFormat createFormatter(final CallContext context) { |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
167 return Formatter.getWaterlevelQ(context); |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
168 } |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
169 }; |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
170 |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
171 public static final SInfoResultType discharge2 = new SInfoResultType(I18NStrings.UNIT_CUBIC_M, "sinfo.flood_duration.header.mainvalue.2.q", |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
172 "sinfo.flood_duration.header.pdf.mainvalue.2.q") { |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
173 private static final long serialVersionUID = 1L; |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
174 |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
175 @Override |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
176 public String exportValue(final CallContext context, final Object value) { |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
177 final double doubleValue = asDouble(value); |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
178 final double roundedDischarge = RiverUtils.roundQ(doubleValue); |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
179 return exportDoubleValue(context, roundedDischarge); |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
180 } |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
181 |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
182 @Override |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
183 protected NumberFormat createFormatter(final CallContext context) { |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
184 return Formatter.getWaterlevelQ(context); |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
185 } |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
186 }; |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
187 |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
188 public static final SInfoResultType discharge3 = new SInfoResultType(I18NStrings.UNIT_CUBIC_M, "sinfo.flood_duration.header.mainvalue.3.q", |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
189 "sinfo.flood_duration.header.pdf.mainvalue.3.q") { |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
190 private static final long serialVersionUID = 1L; |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
191 |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
192 @Override |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
193 public String exportValue(final CallContext context, final Object value) { |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
194 final double doubleValue = asDouble(value); |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
195 final double roundedDischarge = RiverUtils.roundQ(doubleValue); |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
196 return exportDoubleValue(context, roundedDischarge); |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
197 } |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
198 |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
199 @Override |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
200 protected NumberFormat createFormatter(final CallContext context) { |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
201 return Formatter.getWaterlevelQ(context); |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
202 } |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
203 }; |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
204 |
9000 | 205 public static final SInfoResultType meanBedHeight = new SInfoResultType(null, SInfoI18NStrings.CSV_MEAN_BED_HEIGHT_HEADER, |
206 SInfoI18NStrings.CSV_MEAN_BED_HEIGHT_HEADER_SHORT) { | |
9006 | 207 private static final long serialVersionUID = 1L; |
208 | |
8948 | 209 @Override |
210 public String exportValue(final CallContext context, final Object value) { | |
211 final double doubleValue = asDouble(value); | |
212 return exportDoubleValue(context, doubleValue); | |
213 } | |
214 | |
215 @Override | |
216 protected NumberFormat createFormatter(final CallContext context) { | |
217 return Formatter.getMeanBedHeight(context); | |
218 } | |
9000 | 219 }; |
8948 | 220 |
9000 | 221 public static final SInfoResultType soundingLabel = new SInfoResultType(I18NStrings.UNIT_NONE, SInfoI18NStrings.CSV_SOUNDING_HEADER) { |
9006 | 222 private static final long serialVersionUID = 1L; |
223 | |
8948 | 224 @Override |
225 public String exportValue(final CallContext context, final Object value) { | |
226 return exportStringValue(value); | |
227 } | |
228 | |
229 @Override | |
230 protected NumberFormat createFormatter(final CallContext context) { | |
231 throw new UnsupportedOperationException(); | |
232 } | |
9000 | 233 }; |
234 public static final SInfoResultType flowdepthDevelopmentPerYear = new SInfoResultType(I18NStrings.UNIT_CM_A, | |
9287 | 235 SInfoI18NStrings.CSV_FLOWDEPTH_DEVELOPMENT_PER_YEAR_HEADER, "sinfo.export.pdf.header.flowdepth.development.per.year") { |
9006 | 236 private static final long serialVersionUID = 1L; |
237 | |
9000 | 238 @Override |
239 public String exportValue(final CallContext context, final Object value) { | |
240 final double doubleValue = asDouble(value); | |
241 return exportDoubleValue(context, doubleValue); | |
242 } | |
8948 | 243 |
9000 | 244 @Override |
245 protected NumberFormat createFormatter(final CallContext context) { | |
246 return Formatter.getFlowDepthDevelopmentPerYear(context); | |
247 } | |
248 }; | |
249 | |
250 public static final SInfoResultType flowdepthmin = new SInfoResultType(I18NStrings.UNIT_M, SInfoI18NStrings.CSV_FLOWDEPTH_MIN_HEADER) { | |
9006 | 251 private static final long serialVersionUID = 1L; |
252 | |
8948 | 253 @Override |
254 public String exportValue(final CallContext context, final Object value) { | |
255 final double doubleValue = asDouble(value); | |
256 return exportDoubleValue(context, doubleValue); | |
257 } | |
258 | |
259 @Override | |
260 protected NumberFormat createFormatter(final CallContext context) { | |
261 return Formatter.getFlowDepth(context); | |
262 } | |
9000 | 263 }; |
8948 | 264 |
9000 | 265 public static final SInfoResultType flowdepthmax = new SInfoResultType(I18NStrings.UNIT_M, SInfoI18NStrings.CSV_FLOWDEPTH_MAX_HEADER) { |
9006 | 266 private static final long serialVersionUID = 1L; |
267 | |
8948 | 268 @Override |
269 public String exportValue(final CallContext context, final Object value) { | |
270 final double doubleValue = asDouble(value); | |
271 return exportDoubleValue(context, doubleValue); | |
272 } | |
273 | |
274 @Override | |
275 protected NumberFormat createFormatter(final CallContext context) { | |
276 return Formatter.getFlowDepth(context); | |
277 } | |
9000 | 278 }; |
8948 | 279 |
9145 | 280 public static final SInfoResultType riverside = new SInfoResultType(I18NStrings.UNIT_NONE, "sinfo.export.flood_duration.csv.header.riverside") { |
281 private static final long serialVersionUID = 1L; | |
282 | |
283 @Override | |
284 public String exportValue(final CallContext context, final Object value) { | |
9229
0dcd1cd41915
Different themes/facets for left bank and right bank infrastructures in S-Info flood durations, some fixmes done
mschaefer
parents:
9205
diff
changeset
|
285 return localizeRiverside(context, (AttributeKey) value); |
9145 | 286 } |
287 | |
288 @Override | |
289 protected NumberFormat createFormatter(final CallContext context) { | |
290 throw new UnsupportedOperationException(); | |
291 } | |
292 }; | |
293 | |
9229
0dcd1cd41915
Different themes/facets for left bank and right bank infrastructures in S-Info flood durations, some fixmes done
mschaefer
parents:
9205
diff
changeset
|
294 /** |
0dcd1cd41915
Different themes/facets for left bank and right bank infrastructures in S-Info flood durations, some fixmes done
mschaefer
parents:
9205
diff
changeset
|
295 * Returns the localized text of a riverside |
0dcd1cd41915
Different themes/facets for left bank and right bank infrastructures in S-Info flood durations, some fixmes done
mschaefer
parents:
9205
diff
changeset
|
296 * FIXME: Find a better place for this common method |
0dcd1cd41915
Different themes/facets for left bank and right bank infrastructures in S-Info flood durations, some fixmes done
mschaefer
parents:
9205
diff
changeset
|
297 */ |
0dcd1cd41915
Different themes/facets for left bank and right bank infrastructures in S-Info flood durations, some fixmes done
mschaefer
parents:
9205
diff
changeset
|
298 public static final String localizeRiverside(final CallContext context, final AttributeKey riverside) { |
0dcd1cd41915
Different themes/facets for left bank and right bank infrastructures in S-Info flood durations, some fixmes done
mschaefer
parents:
9205
diff
changeset
|
299 if (riverside == AttributeKey.LEFT) |
0dcd1cd41915
Different themes/facets for left bank and right bank infrastructures in S-Info flood durations, some fixmes done
mschaefer
parents:
9205
diff
changeset
|
300 return Resources.getMsg(context.getMeta(), "riverside.left"); |
0dcd1cd41915
Different themes/facets for left bank and right bank infrastructures in S-Info flood durations, some fixmes done
mschaefer
parents:
9205
diff
changeset
|
301 else if (riverside == AttributeKey.RIGHT) |
0dcd1cd41915
Different themes/facets for left bank and right bank infrastructures in S-Info flood durations, some fixmes done
mschaefer
parents:
9205
diff
changeset
|
302 return Resources.getMsg(context.getMeta(), "riverside.right"); |
0dcd1cd41915
Different themes/facets for left bank and right bank infrastructures in S-Info flood durations, some fixmes done
mschaefer
parents:
9205
diff
changeset
|
303 else |
0dcd1cd41915
Different themes/facets for left bank and right bank infrastructures in S-Info flood durations, some fixmes done
mschaefer
parents:
9205
diff
changeset
|
304 return "?"; |
0dcd1cd41915
Different themes/facets for left bank and right bank infrastructures in S-Info flood durations, some fixmes done
mschaefer
parents:
9205
diff
changeset
|
305 } |
0dcd1cd41915
Different themes/facets for left bank and right bank infrastructures in S-Info flood durations, some fixmes done
mschaefer
parents:
9205
diff
changeset
|
306 |
9000 | 307 public static final SInfoResultType soilkind = new SInfoResultType(I18NStrings.UNIT_NONE, SInfoI18NStrings.CSV_TKHKIND_HEADER, |
308 "sinfo.export.tkh.pdf.header.tkhkind") { | |
9006 | 309 private static final long serialVersionUID = 1L; |
310 | |
8948 | 311 @Override |
312 public String exportValue(final CallContext context, final Object value) { | |
313 | |
314 if (value == null) | |
315 return StringUtils.EMPTY; | |
316 | |
317 final SoilKind kind = (SoilKind) value; | |
318 | |
319 final String key = SInfoI18NStrings.PREFIX_TKH_KIND + kind.name(); | |
320 return Resources.getMsg(context.getMeta(), key, key); | |
321 } | |
322 | |
323 @Override | |
324 protected NumberFormat createFormatter(final CallContext context) { | |
325 throw new UnsupportedOperationException(); | |
326 } | |
9000 | 327 }; |
8950
b0aeed4c97c1
Implemented chart output for sinfo flow depth min/max calculation
gernotbelger
parents:
8949
diff
changeset
|
328 |
9000 | 329 public static final SInfoResultType flowdepth = new SInfoResultType(I18NStrings.UNIT_M, SInfoI18NStrings.CSV_FLOWDEPTH_HEADER) { |
9006 | 330 private static final long serialVersionUID = 1L; |
331 | |
8951 | 332 @Override |
333 public String exportValue(final CallContext context, final Object value) { | |
334 final double doubleValue = asDouble(value); | |
335 return exportDoubleValue(context, doubleValue); | |
336 } | |
337 | |
338 @Override | |
339 protected NumberFormat createFormatter(final CallContext context) { | |
340 return Formatter.getFlowDepth(context); | |
341 } | |
8948 | 342 }; |
343 | |
9000 | 344 public static final SInfoResultType d50 = new SInfoResultType(null, null) { |
9006 | 345 private static final long serialVersionUID = 1L; |
346 | |
9000 | 347 @Override |
348 public String exportValue(final CallContext context, final Object value) { | |
349 final double doubleValue = asDouble(value); | |
350 return exportDoubleValue(context, doubleValue); | |
351 } | |
8948 | 352 |
9000 | 353 @Override |
354 protected NumberFormat createFormatter(final CallContext context) { | |
355 throw new UnsupportedOperationException(); | |
356 } | |
357 }; | |
8948 | 358 |
9000 | 359 public static final SInfoResultType velocity = new SInfoResultType(null, null) { |
9006 | 360 private static final long serialVersionUID = 1L; |
361 | |
9000 | 362 @Override |
363 public String exportValue(final CallContext context, final Object value) { | |
364 final double doubleValue = asDouble(value); | |
365 return exportDoubleValue(context, doubleValue); | |
366 } | |
8948 | 367 |
9000 | 368 @Override |
369 protected NumberFormat createFormatter(final CallContext context) { | |
370 throw new UnsupportedOperationException(); | |
371 } | |
372 }; | |
8948 | 373 |
9000 | 374 public static final SInfoResultType tau = new SInfoResultType(null, null) { |
9006 | 375 private static final long serialVersionUID = 1L; |
376 | |
9000 | 377 @Override |
378 public String exportValue(final CallContext context, final Object value) { | |
379 final double doubleValue = asDouble(value); | |
380 return exportDoubleValue(context, doubleValue); | |
381 } | |
8949
09e4a4909814
Distinguish between csv and pdf column headers
gernotbelger
parents:
8948
diff
changeset
|
382 |
9000 | 383 @Override |
384 protected NumberFormat createFormatter(final CallContext context) { | |
385 throw new UnsupportedOperationException(); | |
386 } | |
387 }; | |
388 | |
389 public static final SInfoResultType tkh = new SInfoResultType(I18NStrings.UNIT_CM, SInfoI18NStrings.CSV_TKH_HEADER, SInfoI18NStrings.CSV_TKH_HEADER_SHORT) { | |
9006 | 390 private static final long serialVersionUID = 1L; |
391 | |
9000 | 392 @Override |
393 public String exportValue(final CallContext context, final Object value) { | |
394 final double doubleValue = asDouble(value); | |
395 return exportDoubleValue(context, doubleValue); | |
396 } | |
397 | |
398 @Override | |
399 protected NumberFormat createFormatter(final CallContext context) { | |
400 return Formatter.getTkh(context); | |
401 } | |
402 }; | |
403 | |
404 public static final SInfoResultType tkhup = new SInfoResultType(I18NStrings.UNIT_M, null) { | |
9006 | 405 private static final long serialVersionUID = 1L; |
406 | |
9000 | 407 @Override |
408 public String exportValue(final CallContext context, final Object value) { | |
409 final double doubleValue = asDouble(value); | |
410 return exportDoubleValue(context, doubleValue); | |
411 } | |
412 | |
413 @Override | |
414 protected NumberFormat createFormatter(final CallContext context) { | |
415 throw new UnsupportedOperationException(); | |
416 } | |
417 }; | |
418 | |
419 public static final SInfoResultType tkhdown = new SInfoResultType(I18NStrings.UNIT_M, null) { | |
9006 | 420 private static final long serialVersionUID = 1L; |
421 | |
9000 | 422 @Override |
423 public String exportValue(final CallContext context, final Object value) { | |
424 final double doubleValue = asDouble(value); | |
425 return exportDoubleValue(context, doubleValue); | |
426 } | |
427 | |
428 @Override | |
429 protected NumberFormat createFormatter(final CallContext context) { | |
430 throw new UnsupportedOperationException(); | |
431 } | |
432 }; | |
433 | |
434 public static final SInfoResultType flowdepthtkh = new SInfoResultType(I18NStrings.UNIT_M, SInfoI18NStrings.CSV_FLOWDEPTHTKH_HEADER) { | |
9006 | 435 private static final long serialVersionUID = 1L; |
436 | |
9000 | 437 @Override |
438 public String exportValue(final CallContext context, final Object value) { | |
439 final double doubleValue = asDouble(value); | |
440 return exportDoubleValue(context, doubleValue); | |
441 } | |
442 | |
443 @Override | |
444 protected NumberFormat createFormatter(final CallContext context) { | |
445 return Formatter.getFlowDepth(context); | |
446 } | |
447 }; | |
448 | |
9112
189cc8ededbd
Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents:
9109
diff
changeset
|
449 public static final SInfoResultType channelWidth = new SInfoResultType(I18NStrings.UNIT_M, SInfoI18NStrings.CSV_CHANNEL_WIDTH_HEADER) { |
189cc8ededbd
Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents:
9109
diff
changeset
|
450 private static final long serialVersionUID = 1L; |
189cc8ededbd
Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents:
9109
diff
changeset
|
451 |
189cc8ededbd
Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents:
9109
diff
changeset
|
452 @Override |
189cc8ededbd
Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents:
9109
diff
changeset
|
453 public String exportValue(final CallContext context, final Object value) { |
189cc8ededbd
Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents:
9109
diff
changeset
|
454 final double doubleValue = asDouble(value); |
189cc8ededbd
Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents:
9109
diff
changeset
|
455 return exportDoubleValue(context, doubleValue); |
189cc8ededbd
Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents:
9109
diff
changeset
|
456 } |
189cc8ededbd
Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents:
9109
diff
changeset
|
457 |
189cc8ededbd
Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents:
9109
diff
changeset
|
458 @Override |
189cc8ededbd
Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents:
9109
diff
changeset
|
459 protected NumberFormat createFormatter(final CallContext context) { |
189cc8ededbd
Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents:
9109
diff
changeset
|
460 return Formatter.getChannelWidth(context); |
189cc8ededbd
Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents:
9109
diff
changeset
|
461 } |
189cc8ededbd
Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents:
9109
diff
changeset
|
462 }; |
189cc8ededbd
Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents:
9109
diff
changeset
|
463 |
189cc8ededbd
Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents:
9109
diff
changeset
|
464 public static final SInfoResultType channelDepth = new SInfoResultType(I18NStrings.UNIT_M, SInfoI18NStrings.CSV_CHANNEL_DEPTH_HEADER) { |
189cc8ededbd
Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents:
9109
diff
changeset
|
465 private static final long serialVersionUID = 1L; |
189cc8ededbd
Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents:
9109
diff
changeset
|
466 |
189cc8ededbd
Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents:
9109
diff
changeset
|
467 @Override |
189cc8ededbd
Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents:
9109
diff
changeset
|
468 public String exportValue(final CallContext context, final Object value) { |
189cc8ededbd
Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents:
9109
diff
changeset
|
469 final double doubleValue = asDouble(value); |
189cc8ededbd
Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents:
9109
diff
changeset
|
470 return exportDoubleValue(context, doubleValue); |
189cc8ededbd
Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents:
9109
diff
changeset
|
471 } |
189cc8ededbd
Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents:
9109
diff
changeset
|
472 |
189cc8ededbd
Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents:
9109
diff
changeset
|
473 @Override |
189cc8ededbd
Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents:
9109
diff
changeset
|
474 protected NumberFormat createFormatter(final CallContext context) { |
189cc8ededbd
Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents:
9109
diff
changeset
|
475 return Formatter.getChannelDepth(context); |
189cc8ededbd
Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents:
9109
diff
changeset
|
476 } |
189cc8ededbd
Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents:
9109
diff
changeset
|
477 }; |
189cc8ededbd
Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents:
9109
diff
changeset
|
478 |
9287 | 479 public static final SInfoResultType flowdepthDevelopment = new SInfoResultType(I18NStrings.UNIT_CM, SInfoI18NStrings.CSV_FLOWDEPTH_DEVELOPMENT_HEADER, |
9000 | 480 SInfoI18NStrings.PDF_FLOWDEPTH_DEVELOPMENT_HEADER) { |
9006 | 481 private static final long serialVersionUID = 1L; |
482 | |
9000 | 483 @Override |
484 public String exportValue(final CallContext context, final Object value) { | |
485 final double doubleValue = asDouble(value); | |
486 return exportDoubleValue(context, doubleValue); | |
487 } | |
488 | |
489 @Override | |
490 protected NumberFormat createFormatter(final CallContext context) { | |
491 return Formatter.getTkh(context); | |
492 } | |
493 }; | |
494 | |
9287 | 495 public static final SInfoResultType waterlevelDifference = new SInfoResultType(I18NStrings.UNIT_CM, SInfoI18NStrings.CSV_WATERLEVEL_DIFFERENCE_HEADER, |
496 SInfoI18NStrings.CSV_WATERLEVEL_DIFFERENCE_HEADER) { | |
9006 | 497 private static final long serialVersionUID = 1L; |
498 | |
9000 | 499 @Override |
500 public String exportValue(final CallContext context, final Object value) { | |
501 final double doubleValue = asDouble(value); | |
502 return exportDoubleValue(context, doubleValue); | |
503 } | |
504 | |
505 @Override | |
506 protected NumberFormat createFormatter(final CallContext context) { | |
507 return Formatter.getTkh(context); | |
508 } | |
509 }; | |
9287 | 510 public static final SInfoResultType bedHeightDifference = new SInfoResultType(I18NStrings.UNIT_CM, SInfoI18NStrings.CSV_MEAN_BED_HEIGHT_DIFFERENCE_HEADER, |
9109 | 511 "sinfo.export.csv.header.mean_bed_height.difference") { |
9006 | 512 private static final long serialVersionUID = 1L; |
513 | |
9000 | 514 @Override |
515 public String exportValue(final CallContext context, final Object value) { | |
516 final double doubleValue = asDouble(value); | |
517 return exportDoubleValue(context, doubleValue); | |
518 } | |
519 | |
520 @Override | |
521 protected NumberFormat createFormatter(final CallContext context) { | |
522 return Formatter.getTkh(context); | |
523 } | |
524 }; | |
525 public static final SInfoResultType flowdepthCurrent = new SInfoResultType(I18NStrings.UNIT_M, SInfoI18NStrings.CSV_FLOWDEPTH_CURRENT_HEADER) { | |
9006 | 526 private static final long serialVersionUID = 1L; |
527 | |
9000 | 528 @Override |
529 public String exportValue(final CallContext context, final Object value) { | |
530 final double doubleValue = asDouble(value); | |
531 return exportDoubleValue(context, doubleValue); | |
532 } | |
533 | |
534 @Override | |
535 protected NumberFormat createFormatter(final CallContext context) { | |
536 return Formatter.getFlowDepth(context); | |
537 } | |
538 }; | |
539 public static final SInfoResultType flowdepthHistorical = new SInfoResultType(I18NStrings.UNIT_M, SInfoI18NStrings.CSV_FLOWDEPTH_HISTORICAL_HEADER) { | |
9006 | 540 private static final long serialVersionUID = 1L; |
541 | |
9000 | 542 @Override |
543 public String exportValue(final CallContext context, final Object value) { | |
544 final double doubleValue = asDouble(value); | |
545 return exportDoubleValue(context, doubleValue); | |
546 } | |
547 | |
548 @Override | |
549 protected NumberFormat createFormatter(final CallContext context) { | |
550 return Formatter.getFlowDepth(context); | |
551 } | |
552 }; | |
553 | |
9202
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
554 public static final SInfoResultType infrastructureHeight = new SInfoResultType(I18NStrings.UNIT_M, SInfoI18NStrings.CSV_INFRASTRUCTURE_HEIGHT_HEADER, |
b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents:
9176
diff
changeset
|
555 SInfoI18NStrings.PDF_INFRASTRUCTURE_HEIGHT_HEADER) { |
9115
a165cd63099f
Added datacage select and chart display for river infrastructure heights loaded from database
mschaefer
parents:
9112
diff
changeset
|
556 private static final long serialVersionUID = 1L; |
a165cd63099f
Added datacage select and chart display for river infrastructure heights loaded from database
mschaefer
parents:
9112
diff
changeset
|
557 |
a165cd63099f
Added datacage select and chart display for river infrastructure heights loaded from database
mschaefer
parents:
9112
diff
changeset
|
558 @Override |
a165cd63099f
Added datacage select and chart display for river infrastructure heights loaded from database
mschaefer
parents:
9112
diff
changeset
|
559 public String exportValue(final CallContext context, final Object value) { |
a165cd63099f
Added datacage select and chart display for river infrastructure heights loaded from database
mschaefer
parents:
9112
diff
changeset
|
560 final double doubleValue = asDouble(value); |
a165cd63099f
Added datacage select and chart display for river infrastructure heights loaded from database
mschaefer
parents:
9112
diff
changeset
|
561 return exportDoubleValue(context, doubleValue); |
a165cd63099f
Added datacage select and chart display for river infrastructure heights loaded from database
mschaefer
parents:
9112
diff
changeset
|
562 } |
a165cd63099f
Added datacage select and chart display for river infrastructure heights loaded from database
mschaefer
parents:
9112
diff
changeset
|
563 |
a165cd63099f
Added datacage select and chart display for river infrastructure heights loaded from database
mschaefer
parents:
9112
diff
changeset
|
564 @Override |
a165cd63099f
Added datacage select and chart display for river infrastructure heights loaded from database
mschaefer
parents:
9112
diff
changeset
|
565 protected NumberFormat createFormatter(final CallContext context) { |
a165cd63099f
Added datacage select and chart display for river infrastructure heights loaded from database
mschaefer
parents:
9112
diff
changeset
|
566 return Formatter.getInfrastructureHeight(context); |
a165cd63099f
Added datacage select and chart display for river infrastructure heights loaded from database
mschaefer
parents:
9112
diff
changeset
|
567 } |
a165cd63099f
Added datacage select and chart display for river infrastructure heights loaded from database
mschaefer
parents:
9112
diff
changeset
|
568 }; |
a165cd63099f
Added datacage select and chart display for river infrastructure heights loaded from database
mschaefer
parents:
9112
diff
changeset
|
569 |
9117
623b51bf03d7
Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents:
9115
diff
changeset
|
570 public static final SInfoResultType collisionCount = new SInfoResultType(I18NStrings.UNIT_NONE, SInfoI18NStrings.CSV_COLLISION_COUNT_HEADER) { |
623b51bf03d7
Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents:
9115
diff
changeset
|
571 private static final long serialVersionUID = 1L; |
623b51bf03d7
Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents:
9115
diff
changeset
|
572 |
623b51bf03d7
Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents:
9115
diff
changeset
|
573 @Override |
623b51bf03d7
Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents:
9115
diff
changeset
|
574 public String exportValue(final CallContext context, final Object value) { |
623b51bf03d7
Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents:
9115
diff
changeset
|
575 final double doubleValue = asDouble(value); |
623b51bf03d7
Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents:
9115
diff
changeset
|
576 return exportDoubleValue(context, doubleValue); |
623b51bf03d7
Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents:
9115
diff
changeset
|
577 } |
623b51bf03d7
Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents:
9115
diff
changeset
|
578 |
623b51bf03d7
Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents:
9115
diff
changeset
|
579 @Override |
623b51bf03d7
Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents:
9115
diff
changeset
|
580 protected NumberFormat createFormatter(final CallContext context) { |
623b51bf03d7
Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents:
9115
diff
changeset
|
581 return Formatter.getCollisionCount(context); |
623b51bf03d7
Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents:
9115
diff
changeset
|
582 } |
623b51bf03d7
Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents:
9115
diff
changeset
|
583 }; |
623b51bf03d7
Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents:
9115
diff
changeset
|
584 |
623b51bf03d7
Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents:
9115
diff
changeset
|
585 public static final SInfoResultType collisionGaugeW = new SInfoResultType(I18NStrings.UNIT_CM, SInfoI18NStrings.CSV_COLLISION_GAUGEW_HEADER) { |
623b51bf03d7
Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents:
9115
diff
changeset
|
586 private static final long serialVersionUID = 1L; |
623b51bf03d7
Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents:
9115
diff
changeset
|
587 |
623b51bf03d7
Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents:
9115
diff
changeset
|
588 @Override |
623b51bf03d7
Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents:
9115
diff
changeset
|
589 public String exportValue(final CallContext context, final Object value) { |
623b51bf03d7
Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents:
9115
diff
changeset
|
590 final double doubleValue = asDouble(value); |
623b51bf03d7
Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents:
9115
diff
changeset
|
591 return exportDoubleValue(context, doubleValue); |
623b51bf03d7
Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents:
9115
diff
changeset
|
592 } |
623b51bf03d7
Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents:
9115
diff
changeset
|
593 |
623b51bf03d7
Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents:
9115
diff
changeset
|
594 @Override |
623b51bf03d7
Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents:
9115
diff
changeset
|
595 protected NumberFormat createFormatter(final CallContext context) { |
623b51bf03d7
Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents:
9115
diff
changeset
|
596 return Formatter.getCollisionGaugeW(context); |
623b51bf03d7
Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents:
9115
diff
changeset
|
597 } |
623b51bf03d7
Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents:
9115
diff
changeset
|
598 }; |
623b51bf03d7
Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents:
9115
diff
changeset
|
599 |
9157
f9bb5d0a6ff3
Added the S-Info collision calculation and chart output
mschaefer
parents:
9145
diff
changeset
|
600 public static final SInfoResultType years = new SInfoResultType(I18NStrings.UNIT_NONE, SInfoI18NStrings.CSV_YEARS_HEADER) { |
f9bb5d0a6ff3
Added the S-Info collision calculation and chart output
mschaefer
parents:
9145
diff
changeset
|
601 private static final long serialVersionUID = 1L; |
f9bb5d0a6ff3
Added the S-Info collision calculation and chart output
mschaefer
parents:
9145
diff
changeset
|
602 |
f9bb5d0a6ff3
Added the S-Info collision calculation and chart output
mschaefer
parents:
9145
diff
changeset
|
603 @Override |
f9bb5d0a6ff3
Added the S-Info collision calculation and chart output
mschaefer
parents:
9145
diff
changeset
|
604 public String exportValue(final CallContext context, final Object value) { |
f9bb5d0a6ff3
Added the S-Info collision calculation and chart output
mschaefer
parents:
9145
diff
changeset
|
605 return exportStringValue(value); |
f9bb5d0a6ff3
Added the S-Info collision calculation and chart output
mschaefer
parents:
9145
diff
changeset
|
606 } |
f9bb5d0a6ff3
Added the S-Info collision calculation and chart output
mschaefer
parents:
9145
diff
changeset
|
607 |
f9bb5d0a6ff3
Added the S-Info collision calculation and chart output
mschaefer
parents:
9145
diff
changeset
|
608 @Override |
f9bb5d0a6ff3
Added the S-Info collision calculation and chart output
mschaefer
parents:
9145
diff
changeset
|
609 protected NumberFormat createFormatter(final CallContext context) { |
f9bb5d0a6ff3
Added the S-Info collision calculation and chart output
mschaefer
parents:
9145
diff
changeset
|
610 throw new UnsupportedOperationException(); |
f9bb5d0a6ff3
Added the S-Info collision calculation and chart output
mschaefer
parents:
9145
diff
changeset
|
611 } |
f9bb5d0a6ff3
Added the S-Info collision calculation and chart output
mschaefer
parents:
9145
diff
changeset
|
612 }; |
f9bb5d0a6ff3
Added the S-Info collision calculation and chart output
mschaefer
parents:
9145
diff
changeset
|
613 |
f9bb5d0a6ff3
Added the S-Info collision calculation and chart output
mschaefer
parents:
9145
diff
changeset
|
614 public static final SInfoResultType dischargeZone = new SInfoResultType(I18NStrings.UNIT_NONE, SInfoI18NStrings.CSV_DISCHARGE_ZONE_HEADER) { |
f9bb5d0a6ff3
Added the S-Info collision calculation and chart output
mschaefer
parents:
9145
diff
changeset
|
615 private static final long serialVersionUID = 1L; |
f9bb5d0a6ff3
Added the S-Info collision calculation and chart output
mschaefer
parents:
9145
diff
changeset
|
616 |
f9bb5d0a6ff3
Added the S-Info collision calculation and chart output
mschaefer
parents:
9145
diff
changeset
|
617 @Override |
f9bb5d0a6ff3
Added the S-Info collision calculation and chart output
mschaefer
parents:
9145
diff
changeset
|
618 public String exportValue(final CallContext context, final Object value) { |
f9bb5d0a6ff3
Added the S-Info collision calculation and chart output
mschaefer
parents:
9145
diff
changeset
|
619 return exportStringValue(value); |
f9bb5d0a6ff3
Added the S-Info collision calculation and chart output
mschaefer
parents:
9145
diff
changeset
|
620 } |
f9bb5d0a6ff3
Added the S-Info collision calculation and chart output
mschaefer
parents:
9145
diff
changeset
|
621 |
f9bb5d0a6ff3
Added the S-Info collision calculation and chart output
mschaefer
parents:
9145
diff
changeset
|
622 @Override |
f9bb5d0a6ff3
Added the S-Info collision calculation and chart output
mschaefer
parents:
9145
diff
changeset
|
623 protected NumberFormat createFormatter(final CallContext context) { |
f9bb5d0a6ff3
Added the S-Info collision calculation and chart output
mschaefer
parents:
9145
diff
changeset
|
624 throw new UnsupportedOperationException(); |
f9bb5d0a6ff3
Added the S-Info collision calculation and chart output
mschaefer
parents:
9145
diff
changeset
|
625 } |
f9bb5d0a6ff3
Added the S-Info collision calculation and chart output
mschaefer
parents:
9145
diff
changeset
|
626 }; |
8948 | 627 } |