annotate artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/SInfoResultType.java @ 9202:b4402594213b

More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
author mschaefer
date Mon, 02 Jul 2018 07:33:53 +0200
parents 1614cb14308f
children 3dae6b78e1da
rev   line source
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
1 /** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
2 * Software engineering by
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
3 * Björnsen Beratende Ingenieure GmbH
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
4 * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
5 *
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
6 * This file is Free Software under the GNU AGPL (>=v3)
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
7 * and comes with ABSOLUTELY NO WARRANTY! Check out the
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
8 * documentation coming with Dive4Elements River for details.
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
9 */
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
10 package org.dive4elements.river.artifacts.sinfo.common;
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
11
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
12 import java.text.NumberFormat;
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
13
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
14 import org.apache.commons.lang.StringUtils;
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
15 import org.dive4elements.artifacts.CallContext;
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
16 import org.dive4elements.river.artifacts.common.AbstractResultType;
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
17 import org.dive4elements.river.artifacts.common.I18NStrings;
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
18 import org.dive4elements.river.artifacts.resources.Resources;
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
19 import org.dive4elements.river.artifacts.sinfo.tkhcalculation.SoilKind;
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
20 import org.dive4elements.river.utils.Formatter;
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
21 import org.dive4elements.river.utils.RiverUtils;
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
22
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
23 /**
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
24 * Result type for data that goes into {@link SInfoResultRow}s.
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
25 *
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
26 * @author Gernot Belger
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
27 */
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
28 public abstract class SInfoResultType extends AbstractResultType {
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
29
9006
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
30 private static final long serialVersionUID = 1L;
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
31
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
32 private SInfoResultType(final String unit, final String csvHeader) {
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
33 super(unit, csvHeader, csvHeader);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
34 }
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
35
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
36 private SInfoResultType(final String unit, final String csvHeader, final String pdfHeader) {
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
37 super(unit, csvHeader, pdfHeader);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
38 }
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
39
9145
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
40 public static final SInfoResultType customMultiRowColWaterlevel = new SInfoResultType(null, SInfoI18NStrings.CSV_WATERLEVEL_HEADER,
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
41 "sinfo.export.flow_depth.pdf.header.waterlevel") {
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
42 private static final long serialVersionUID = 1L;
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
43
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
44 @Override
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
45 public String exportValue(final CallContext context, final Object value) {
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
46 // TODO Auto-generated method stub
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
47 return null;
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
48 }
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
49
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
50 @Override
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
51 protected NumberFormat createFormatter(final CallContext context) {
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
52 // TODO Auto-generated method stub
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
53 return null;
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
54 }
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
55
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
56 };
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
57
9176
1614cb14308f Work on calculations for S-Info flood duration workflow
mschaefer
parents: 9157
diff changeset
58 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
59 "sinfo.export.flood_duration.pdf.header.discharge") {
9145
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
60 private static final long serialVersionUID = 1L;
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
61
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
62 @Override
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
63 public String exportValue(final CallContext context, final Object value) {
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
64 final double doubleValue = asDouble(value);
9176
1614cb14308f Work on calculations for S-Info flood duration workflow
mschaefer
parents: 9157
diff changeset
65 return exportDoubleValue(context, doubleValue);
9145
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
66 }
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
67
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
68 @Override
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
69 protected NumberFormat createFormatter(final CallContext context) {
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
70 return Formatter.getWaterlevelQ(context);
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
71 }
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
72 };
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
73
9176
1614cb14308f Work on calculations for S-Info flood duration workflow
mschaefer
parents: 9157
diff changeset
74 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
75 "sinfo.export.flood_duration.pdf.header.duration") {
9145
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
76 private static final long serialVersionUID = 1L;
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
77
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
78 @Override
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
79 public String exportValue(final CallContext context, final Object value) {
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
80 final double doubleValue = asDouble(value);
9176
1614cb14308f Work on calculations for S-Info flood duration workflow
mschaefer
parents: 9157
diff changeset
81 return exportDoubleValue(context, doubleValue);
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
1614cb14308f Work on calculations for S-Info flood duration workflow
mschaefer
parents: 9157
diff changeset
84 @Override
1614cb14308f Work on calculations for S-Info flood duration workflow
mschaefer
parents: 9157
diff changeset
85 protected NumberFormat createFormatter(final CallContext context) {
1614cb14308f Work on calculations for S-Info flood duration workflow
mschaefer
parents: 9157
diff changeset
86 return Formatter.getIntegerFormatter(context);
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 };
1614cb14308f Work on calculations for S-Info flood duration workflow
mschaefer
parents: 9157
diff changeset
89
9202
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
90 public static final SInfoResultType mainValue1Duration = new SInfoResultType(null, "sinfo.flood_duration.header.mainvalue.1.duration",
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
91 "sinfo.flood_duration.header.pdf.mainvalue.1.duration") {
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
92 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
93
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
94 @Override
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
95 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
96 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
97 return exportDoubleValue(context, doubleValue);
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
98 }
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
99
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
100 @Override
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
101 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
102 return Formatter.getIntegerFormatter(context);
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
103 }
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
104 };
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
105
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
106 public static final SInfoResultType mainValue2Duration = new SInfoResultType(null, "sinfo.flood_duration.header.mainvalue.2.duration",
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
107 "sinfo.flood_duration.header.pdf.mainvalue.2.duration") {
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
108 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
109
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
110 @Override
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
111 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
112 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
113 return exportDoubleValue(context, doubleValue);
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
114 }
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
115
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
116 @Override
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
117 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
118 return Formatter.getIntegerFormatter(context);
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
119 }
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
120 };
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
121
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
122 public static final SInfoResultType mainValue3Duration = new SInfoResultType(null, "sinfo.flood_duration.header.mainvalue.3.duration",
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
123 "sinfo.flood_duration.header.pdf.mainvalue.3.duration") {
9176
1614cb14308f Work on calculations for S-Info flood duration workflow
mschaefer
parents: 9157
diff changeset
124 private static final long serialVersionUID = 1L;
1614cb14308f Work on calculations for S-Info flood duration workflow
mschaefer
parents: 9157
diff changeset
125
1614cb14308f Work on calculations for S-Info flood duration workflow
mschaefer
parents: 9157
diff changeset
126 @Override
1614cb14308f Work on calculations for S-Info flood duration workflow
mschaefer
parents: 9157
diff changeset
127 public String exportValue(final CallContext context, final Object value) {
1614cb14308f Work on calculations for S-Info flood duration workflow
mschaefer
parents: 9157
diff changeset
128 final double doubleValue = asDouble(value);
1614cb14308f Work on calculations for S-Info flood duration workflow
mschaefer
parents: 9157
diff changeset
129 return exportDoubleValue(context, doubleValue);
9145
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
130 }
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
131
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
132 @Override
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
133 protected NumberFormat createFormatter(final CallContext context) {
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
134 return Formatter.getIntegerFormatter(context);
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
135 }
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
136 };
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
137
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
138 public static final SInfoResultType waterlevel = new SInfoResultType(null, SInfoI18NStrings.CSV_WATERLEVEL_HEADER,
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
139 "sinfo.export.flow_depth.pdf.header.waterlevel") {
9006
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
140 private static final long serialVersionUID = 1L;
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
141
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
142 @Override
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
143 public String exportValue(final CallContext context, final Object value) {
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
144 final double doubleValue = asDouble(value);
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
145 return exportDoubleValue(context, doubleValue);
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
146 }
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
147
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
148 @Override
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
149 protected NumberFormat createFormatter(final CallContext context) {
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
150 // REMARK: other modules use Formatter.getWaterlevelW(context) instead, but that format with a variable number of
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
151 // digits.
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
152 return Formatter.getFlowDepth(context);
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
153 }
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
154 };
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
155
9202
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
156 public static final SInfoResultType waterlevel1 = new SInfoResultType(null, "sinfo.flood_duration.header.mainvalue.1.w",
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
157 "sinfo.flood_duration.header.pdf.mainvalue.1.w") {
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
158 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
159
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
160 @Override
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
161 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
162 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
163 return exportDoubleValue(context, doubleValue);
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
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
166 @Override
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
167 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
168 return Formatter.getFlowDepth(context);
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
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
172 public static final SInfoResultType waterlevel2 = new SInfoResultType(null, "sinfo.flood_duration.header.mainvalue.2.w",
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
173 "sinfo.flood_duration.header.pdf.mainvalue.2.w") {
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
174 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
175
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
176 @Override
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
177 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
178 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
179 return exportDoubleValue(context, doubleValue);
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.getFlowDepth(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 waterlevel3 = new SInfoResultType(null, "sinfo.flood_duration.header.mainvalue.3.w",
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.w") {
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 return exportDoubleValue(context, 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 }
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 @Override
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
199 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
200 return Formatter.getFlowDepth(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 }
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
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
204 public static final SInfoResultType waterlevelLabel = new SInfoResultType(I18NStrings.UNIT_NONE, SInfoI18NStrings.CSV_LABEL_HEADER) {
9006
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
205 private static final long serialVersionUID = 1L;
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
206
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
207 @Override
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
208 public String exportValue(final CallContext context, final Object value) {
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
209 return exportStringValue(value);
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
210 }
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
211
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
212 @Override
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
213 protected NumberFormat createFormatter(final CallContext context) {
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
214 throw new UnsupportedOperationException();
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
215 }
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
216 };
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
217
9145
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
218 public static final SInfoResultType infrastructuretype = new SInfoResultType(I18NStrings.UNIT_NONE,
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
219 "sinfo.export.flood_duration.csv.header.infrastructure_type", "sinfo.export.flood_duration.pdf.header.infrastructure_type") {
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
220 private static final long serialVersionUID = 1L;
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
221
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
222 @Override
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
223 public String exportValue(final CallContext context, final Object value) {
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
224 return exportStringValue(value);
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
225 }
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
226
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
227 @Override
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
228 protected NumberFormat createFormatter(final CallContext context) {
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
229 throw new UnsupportedOperationException();
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
230 }
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
231 };
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
232
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
233 public static final SInfoResultType discharge = new SInfoResultType(I18NStrings.UNIT_CUBIC_M, SInfoI18NStrings.CSV_DISCHARGE_HEADER) {
9006
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
234 private static final long serialVersionUID = 1L;
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
235
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
236 @Override
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
237 public String exportValue(final CallContext context, final Object value) {
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
238 final double doubleValue = asDouble(value);
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
239 final double roundedDischarge = RiverUtils.roundQ(doubleValue);
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
240 return exportDoubleValue(context, roundedDischarge);
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
241 }
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
242
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
243 @Override
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
244 protected NumberFormat createFormatter(final CallContext context) {
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
245 return Formatter.getWaterlevelQ(context);
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
246 }
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
247 };
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
248
9202
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
249 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
250 "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
251 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
252
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
253 @Override
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
254 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
255 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
256 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
257 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
258 }
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
259
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
260 @Override
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
261 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
262 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
263 }
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
264 };
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
265
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
266 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
267 "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
268 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
269
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
270 @Override
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
271 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
272 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
273 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
274 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
275 }
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
276
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
277 @Override
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
278 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
279 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
280 }
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
281 };
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
282
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
283 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
284 "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
285 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
286
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
287 @Override
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
288 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
289 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
290 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
291 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
292 }
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
293
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
294 @Override
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
295 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
296 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
297 }
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
298 };
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
299
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
300 public static final SInfoResultType meanBedHeight = new SInfoResultType(null, SInfoI18NStrings.CSV_MEAN_BED_HEIGHT_HEADER,
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
301 SInfoI18NStrings.CSV_MEAN_BED_HEIGHT_HEADER_SHORT) {
9006
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
302 private static final long serialVersionUID = 1L;
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
303
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
304 @Override
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
305 public String exportValue(final CallContext context, final Object value) {
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
306 final double doubleValue = asDouble(value);
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
307 return exportDoubleValue(context, doubleValue);
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
308 }
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
309
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
310 @Override
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
311 protected NumberFormat createFormatter(final CallContext context) {
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
312 return Formatter.getMeanBedHeight(context);
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
313 }
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
314 };
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
315
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
316 public static final SInfoResultType soundingLabel = new SInfoResultType(I18NStrings.UNIT_NONE, SInfoI18NStrings.CSV_SOUNDING_HEADER) {
9006
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
317 private static final long serialVersionUID = 1L;
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
318
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
319 @Override
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
320 public String exportValue(final CallContext context, final Object value) {
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
321 return exportStringValue(value);
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
322 }
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
323
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
324 @Override
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
325 protected NumberFormat createFormatter(final CallContext context) {
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
326 throw new UnsupportedOperationException();
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
327 }
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
328 };
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
329 public static final SInfoResultType flowdepthDevelopmentPerYear = new SInfoResultType(I18NStrings.UNIT_CM_A,
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
330 SInfoI18NStrings.CSV_FLOWDEPTH_DEVELOPMENT_PER_YEAR_HEADER) {
9006
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
331 private static final long serialVersionUID = 1L;
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
332
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
333 @Override
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
334 public String exportValue(final CallContext context, final Object value) {
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
335 final double doubleValue = asDouble(value);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
336 return exportDoubleValue(context, doubleValue);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
337 }
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
338
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
339 @Override
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
340 protected NumberFormat createFormatter(final CallContext context) {
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
341 return Formatter.getFlowDepthDevelopmentPerYear(context);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
342 }
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
343 };
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
344
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
345 public static final SInfoResultType flowdepthmin = new SInfoResultType(I18NStrings.UNIT_M, SInfoI18NStrings.CSV_FLOWDEPTH_MIN_HEADER) {
9006
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
346 private static final long serialVersionUID = 1L;
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
347
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
348 @Override
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
349 public String exportValue(final CallContext context, final Object value) {
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
350 final double doubleValue = asDouble(value);
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
351 return exportDoubleValue(context, doubleValue);
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
352 }
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
353
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
354 @Override
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
355 protected NumberFormat createFormatter(final CallContext context) {
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
356 return Formatter.getFlowDepth(context);
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
357 }
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
358 };
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
359
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
360 public static final SInfoResultType flowdepthmax = new SInfoResultType(I18NStrings.UNIT_M, SInfoI18NStrings.CSV_FLOWDEPTH_MAX_HEADER) {
9006
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
361 private static final long serialVersionUID = 1L;
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
362
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
363 @Override
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
364 public String exportValue(final CallContext context, final Object value) {
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
365 final double doubleValue = asDouble(value);
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
366 return exportDoubleValue(context, doubleValue);
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
367 }
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
368
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
369 @Override
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
370 protected NumberFormat createFormatter(final CallContext context) {
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
371 return Formatter.getFlowDepth(context);
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
372 }
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
373 };
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
374
9145
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
375 public static final SInfoResultType riverside = new SInfoResultType(I18NStrings.UNIT_NONE, "sinfo.export.flood_duration.csv.header.riverside") {
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
376 private static final long serialVersionUID = 1L;
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
377
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
378 @Override
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
379 public String exportValue(final CallContext context, final Object value) {
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
380 return exportStringValue(value);
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
381 }
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
382
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
383 @Override
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
384 protected NumberFormat createFormatter(final CallContext context) {
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
385 throw new UnsupportedOperationException();
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
386 }
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
387 };
e6b63b2b41b9 sinfo.flood_duration pdf, csv, ui
gernotbelger
parents: 9117
diff changeset
388
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
389 public static final SInfoResultType gaugeLabel = new SInfoResultType(I18NStrings.UNIT_NONE, SInfoI18NStrings.CSV_GAUGE_HEADER) {
9006
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
390 private static final long serialVersionUID = 1L;
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
391
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
392 @Override
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
393 public String exportValue(final CallContext context, final Object value) {
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
394 return exportStringValue(value);
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
395 }
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
396
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
397 @Override
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
398 protected NumberFormat createFormatter(final CallContext context) {
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
399 throw new UnsupportedOperationException();
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
400 }
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
401 };
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
402
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
403 public static final SInfoResultType location = new SInfoResultType(I18NStrings.UNIT_NONE, SInfoI18NStrings.CSV_LOCATION_HEADER) {
9006
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
404 private static final long serialVersionUID = 1L;
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
405
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
406 @Override
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
407 public String exportValue(final CallContext context, final Object value) {
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
408 return exportStringValue(value);
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
409 }
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
410
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
411 @Override
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
412 protected NumberFormat createFormatter(final CallContext context) {
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
413 throw new UnsupportedOperationException();
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
414 }
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
415 };
8950
b0aeed4c97c1 Implemented chart output for sinfo flow depth min/max calculation
gernotbelger
parents: 8949
diff changeset
416
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
417 public static final SInfoResultType soilkind = new SInfoResultType(I18NStrings.UNIT_NONE, SInfoI18NStrings.CSV_TKHKIND_HEADER,
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
418 "sinfo.export.tkh.pdf.header.tkhkind") {
9006
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
419 private static final long serialVersionUID = 1L;
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
420
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
421 @Override
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
422 public String exportValue(final CallContext context, final Object value) {
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
423
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
424 if (value == null)
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
425 return StringUtils.EMPTY;
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
426
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
427 final SoilKind kind = (SoilKind) value;
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
428
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
429 final String key = SInfoI18NStrings.PREFIX_TKH_KIND + kind.name();
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
430 return Resources.getMsg(context.getMeta(), key, key);
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
431 }
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
432
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
433 @Override
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
434 protected NumberFormat createFormatter(final CallContext context) {
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
435 throw new UnsupportedOperationException();
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
436 }
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
437 };
8950
b0aeed4c97c1 Implemented chart output for sinfo flow depth min/max calculation
gernotbelger
parents: 8949
diff changeset
438
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
439 public static final SInfoResultType flowdepth = new SInfoResultType(I18NStrings.UNIT_M, SInfoI18NStrings.CSV_FLOWDEPTH_HEADER) {
9006
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
440 private static final long serialVersionUID = 1L;
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
441
8951
322b0e6298ea Work on SINFO FlowDepth-Development
gernotbelger
parents: 8950
diff changeset
442 @Override
322b0e6298ea Work on SINFO FlowDepth-Development
gernotbelger
parents: 8950
diff changeset
443 public String exportValue(final CallContext context, final Object value) {
322b0e6298ea Work on SINFO FlowDepth-Development
gernotbelger
parents: 8950
diff changeset
444 final double doubleValue = asDouble(value);
322b0e6298ea Work on SINFO FlowDepth-Development
gernotbelger
parents: 8950
diff changeset
445 return exportDoubleValue(context, doubleValue);
322b0e6298ea Work on SINFO FlowDepth-Development
gernotbelger
parents: 8950
diff changeset
446 }
322b0e6298ea Work on SINFO FlowDepth-Development
gernotbelger
parents: 8950
diff changeset
447
322b0e6298ea Work on SINFO FlowDepth-Development
gernotbelger
parents: 8950
diff changeset
448 @Override
322b0e6298ea Work on SINFO FlowDepth-Development
gernotbelger
parents: 8950
diff changeset
449 protected NumberFormat createFormatter(final CallContext context) {
322b0e6298ea Work on SINFO FlowDepth-Development
gernotbelger
parents: 8950
diff changeset
450 return Formatter.getFlowDepth(context);
322b0e6298ea Work on SINFO FlowDepth-Development
gernotbelger
parents: 8950
diff changeset
451 }
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
452 };
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
453
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
454 public static final SInfoResultType d50 = new SInfoResultType(null, null) {
9006
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
455 private static final long serialVersionUID = 1L;
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
456
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
457 @Override
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
458 public String exportValue(final CallContext context, final Object value) {
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
459 final double doubleValue = asDouble(value);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
460 return exportDoubleValue(context, doubleValue);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
461 }
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
462
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
463 @Override
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
464 protected NumberFormat createFormatter(final CallContext context) {
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
465 throw new UnsupportedOperationException();
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
466 }
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
467 };
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
468
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
469 public static final SInfoResultType velocity = new SInfoResultType(null, null) {
9006
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
470 private static final long serialVersionUID = 1L;
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
471
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
472 @Override
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
473 public String exportValue(final CallContext context, final Object value) {
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
474 final double doubleValue = asDouble(value);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
475 return exportDoubleValue(context, doubleValue);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
476 }
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
477
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
478 @Override
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
479 protected NumberFormat createFormatter(final CallContext context) {
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
480 throw new UnsupportedOperationException();
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
481 }
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
482 };
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
483
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
484 public static final SInfoResultType tau = new SInfoResultType(null, null) {
9006
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
485 private static final long serialVersionUID = 1L;
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
486
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
487 @Override
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
488 public String exportValue(final CallContext context, final Object value) {
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
489 final double doubleValue = asDouble(value);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
490 return exportDoubleValue(context, doubleValue);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
491 }
8949
09e4a4909814 Distinguish between csv and pdf column headers
gernotbelger
parents: 8948
diff changeset
492
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
493 @Override
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
494 protected NumberFormat createFormatter(final CallContext context) {
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
495 throw new UnsupportedOperationException();
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
496 }
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
497 };
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
498
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
499 public static final SInfoResultType tkh = new SInfoResultType(I18NStrings.UNIT_CM, SInfoI18NStrings.CSV_TKH_HEADER, SInfoI18NStrings.CSV_TKH_HEADER_SHORT) {
9006
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
500 private static final long serialVersionUID = 1L;
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
501
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
502 @Override
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
503 public String exportValue(final CallContext context, final Object value) {
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
504 final double doubleValue = asDouble(value);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
505 return exportDoubleValue(context, doubleValue);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
506 }
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
507
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
508 @Override
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
509 protected NumberFormat createFormatter(final CallContext context) {
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
510 return Formatter.getTkh(context);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
511 }
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
512 };
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
513
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
514 public static final SInfoResultType tkhup = new SInfoResultType(I18NStrings.UNIT_M, null) {
9006
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
515 private static final long serialVersionUID = 1L;
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
516
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
517 @Override
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
518 public String exportValue(final CallContext context, final Object value) {
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
519 final double doubleValue = asDouble(value);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
520 return exportDoubleValue(context, doubleValue);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
521 }
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
522
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
523 @Override
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
524 protected NumberFormat createFormatter(final CallContext context) {
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
525 throw new UnsupportedOperationException();
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
526 }
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
527 };
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
528
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
529 public static final SInfoResultType tkhdown = new SInfoResultType(I18NStrings.UNIT_M, null) {
9006
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
530 private static final long serialVersionUID = 1L;
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
531
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
532 @Override
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
533 public String exportValue(final CallContext context, final Object value) {
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
534 final double doubleValue = asDouble(value);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
535 return exportDoubleValue(context, doubleValue);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
536 }
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
537
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
538 @Override
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
539 protected NumberFormat createFormatter(final CallContext context) {
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
540 throw new UnsupportedOperationException();
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
541 }
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
542 };
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
543
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
544 public static final SInfoResultType flowdepthtkh = new SInfoResultType(I18NStrings.UNIT_M, SInfoI18NStrings.CSV_FLOWDEPTHTKH_HEADER) {
9006
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
545 private static final long serialVersionUID = 1L;
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
546
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
547 @Override
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
548 public String exportValue(final CallContext context, final Object value) {
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
549 final double doubleValue = asDouble(value);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
550 return exportDoubleValue(context, doubleValue);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
551 }
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
552
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
553 @Override
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
554 protected NumberFormat createFormatter(final CallContext context) {
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
555 return Formatter.getFlowDepth(context);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
556 }
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
557 };
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
558
9112
189cc8ededbd Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents: 9109
diff changeset
559 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
560 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
561
189cc8ededbd Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents: 9109
diff changeset
562 @Override
189cc8ededbd Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents: 9109
diff changeset
563 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
564 final double doubleValue = asDouble(value);
189cc8ededbd Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents: 9109
diff changeset
565 return exportDoubleValue(context, doubleValue);
189cc8ededbd Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents: 9109
diff changeset
566 }
189cc8ededbd Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents: 9109
diff changeset
567
189cc8ededbd Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents: 9109
diff changeset
568 @Override
189cc8ededbd Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents: 9109
diff changeset
569 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
570 return Formatter.getChannelWidth(context);
189cc8ededbd Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents: 9109
diff changeset
571 }
189cc8ededbd Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents: 9109
diff changeset
572 };
189cc8ededbd Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents: 9109
diff changeset
573
189cc8ededbd Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents: 9109
diff changeset
574 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
575 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
576
189cc8ededbd Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents: 9109
diff changeset
577 @Override
189cc8ededbd Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents: 9109
diff changeset
578 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
579 final double doubleValue = asDouble(value);
189cc8ededbd Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents: 9109
diff changeset
580 return exportDoubleValue(context, doubleValue);
189cc8ededbd Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents: 9109
diff changeset
581 }
189cc8ededbd Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents: 9109
diff changeset
582
189cc8ededbd Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents: 9109
diff changeset
583 @Override
189cc8ededbd Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents: 9109
diff changeset
584 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
585 return Formatter.getChannelDepth(context);
189cc8ededbd Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents: 9109
diff changeset
586 }
189cc8ededbd Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents: 9109
diff changeset
587 };
189cc8ededbd Added datacage select and chart display for river channel sizes loaded from database
mschaefer
parents: 9109
diff changeset
588
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
589 public static final SInfoResultType flowdepthDevelopment = new SInfoResultType(I18NStrings.UNIT_M, SInfoI18NStrings.CSV_FLOWDEPTH_DEVELOPMENT_HEADER,
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
590 SInfoI18NStrings.PDF_FLOWDEPTH_DEVELOPMENT_HEADER) {
9006
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
591 private static final long serialVersionUID = 1L;
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
592
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
593 @Override
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
594 public String exportValue(final CallContext context, final Object value) {
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
595 final double doubleValue = asDouble(value);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
596 return exportDoubleValue(context, doubleValue);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
597 }
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
598
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
599 @Override
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
600 protected NumberFormat createFormatter(final CallContext context) {
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
601 return Formatter.getTkh(context);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
602 }
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
603 };
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
604
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
605 public static final SInfoResultType depthDevelopmentPerYear = new SInfoResultType(I18NStrings.UNIT_CM_A,
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
606 SInfoI18NStrings.CSV_FLOWDEPTH_DEVELOPMENT_PER_YEAR_HEADER) {
9006
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
607 private static final long serialVersionUID = 1L;
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
608
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
609 @Override
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
610 public String exportValue(final CallContext context, final Object value) {
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
611 final double doubleValue = asDouble(value);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
612 return exportDoubleValue(context, doubleValue);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
613 }
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
614
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
615 @Override
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
616 protected NumberFormat createFormatter(final CallContext context) {
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
617 return Formatter.getFlowDepthDevelopmentPerYear(context);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
618 }
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
619 };
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
620 public static final SInfoResultType waterlevelDifference = new SInfoResultType(I18NStrings.UNIT_M, SInfoI18NStrings.CSV_WATERLEVEL_DIFFERENCE_HEADER,
9109
59cf6e6a452d pdf export enhancements
gernotbelger
parents: 9006
diff changeset
621 "sinfo.export.csv.header.waterlevel.difference") {
9006
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
622 private static final long serialVersionUID = 1L;
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
623
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
624 @Override
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
625 public String exportValue(final CallContext context, final Object value) {
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
626 final double doubleValue = asDouble(value);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
627 return exportDoubleValue(context, doubleValue);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
628 }
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
629
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
630 @Override
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
631 protected NumberFormat createFormatter(final CallContext context) {
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
632 return Formatter.getTkh(context);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
633 }
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
634 };
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
635 public static final SInfoResultType bedHeightDifference = new SInfoResultType(I18NStrings.UNIT_M, SInfoI18NStrings.CSV_MEAN_BED_HEIGHT_DIFFERENCE_HEADER,
9109
59cf6e6a452d pdf export enhancements
gernotbelger
parents: 9006
diff changeset
636 "sinfo.export.csv.header.mean_bed_height.difference") {
9006
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
637 private static final long serialVersionUID = 1L;
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
638
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
639 @Override
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
640 public String exportValue(final CallContext context, final Object value) {
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
641 final double doubleValue = asDouble(value);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
642 return exportDoubleValue(context, doubleValue);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
643 }
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
644
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
645 @Override
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
646 protected NumberFormat createFormatter(final CallContext context) {
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
647 return Formatter.getTkh(context);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
648 }
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
649 };
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
650 public static final SInfoResultType flowdepthCurrent = new SInfoResultType(I18NStrings.UNIT_M, SInfoI18NStrings.CSV_FLOWDEPTH_CURRENT_HEADER) {
9006
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
651 private static final long serialVersionUID = 1L;
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
652
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
653 @Override
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
654 public String exportValue(final CallContext context, final Object value) {
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
655 final double doubleValue = asDouble(value);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
656 return exportDoubleValue(context, doubleValue);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
657 }
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
658
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
659 @Override
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
660 protected NumberFormat createFormatter(final CallContext context) {
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
661 return Formatter.getFlowDepth(context);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
662 }
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
663 };
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
664 public static final SInfoResultType flowdepthHistorical = new SInfoResultType(I18NStrings.UNIT_M, SInfoI18NStrings.CSV_FLOWDEPTH_HISTORICAL_HEADER) {
9006
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
665 private static final long serialVersionUID = 1L;
7134a4c7d1b6 U-Info S-Info general work
gernotbelger
parents: 9000
diff changeset
666
9000
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
667 @Override
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
668 public String exportValue(final CallContext context, final Object value) {
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
669 final double doubleValue = asDouble(value);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
670 return exportDoubleValue(context, doubleValue);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
671 }
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
672
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
673 @Override
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
674 protected NumberFormat createFormatter(final CallContext context) {
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
675 return Formatter.getFlowDepth(context);
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
676 }
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
677 };
50cc99579a46 Work on uinfo
gernotbelger
parents: 8984
diff changeset
678
9202
b4402594213b More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
mschaefer
parents: 9176
diff changeset
679 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
680 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
681 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
682
a165cd63099f Added datacage select and chart display for river infrastructure heights loaded from database
mschaefer
parents: 9112
diff changeset
683 @Override
a165cd63099f Added datacage select and chart display for river infrastructure heights loaded from database
mschaefer
parents: 9112
diff changeset
684 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
685 final double doubleValue = asDouble(value);
a165cd63099f Added datacage select and chart display for river infrastructure heights loaded from database
mschaefer
parents: 9112
diff changeset
686 return exportDoubleValue(context, doubleValue);
a165cd63099f Added datacage select and chart display for river infrastructure heights loaded from database
mschaefer
parents: 9112
diff changeset
687 }
a165cd63099f Added datacage select and chart display for river infrastructure heights loaded from database
mschaefer
parents: 9112
diff changeset
688
a165cd63099f Added datacage select and chart display for river infrastructure heights loaded from database
mschaefer
parents: 9112
diff changeset
689 @Override
a165cd63099f Added datacage select and chart display for river infrastructure heights loaded from database
mschaefer
parents: 9112
diff changeset
690 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
691 return Formatter.getInfrastructureHeight(context);
a165cd63099f Added datacage select and chart display for river infrastructure heights loaded from database
mschaefer
parents: 9112
diff changeset
692 }
a165cd63099f Added datacage select and chart display for river infrastructure heights loaded from database
mschaefer
parents: 9112
diff changeset
693 };
a165cd63099f Added datacage select and chart display for river infrastructure heights loaded from database
mschaefer
parents: 9112
diff changeset
694
9117
623b51bf03d7 Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents: 9115
diff changeset
695 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
696 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
697
623b51bf03d7 Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents: 9115
diff changeset
698 @Override
623b51bf03d7 Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents: 9115
diff changeset
699 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
700 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
701 return exportDoubleValue(context, doubleValue);
623b51bf03d7 Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents: 9115
diff changeset
702 }
623b51bf03d7 Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents: 9115
diff changeset
703
623b51bf03d7 Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents: 9115
diff changeset
704 @Override
623b51bf03d7 Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents: 9115
diff changeset
705 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
706 return Formatter.getCollisionCount(context);
623b51bf03d7 Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents: 9115
diff changeset
707 }
623b51bf03d7 Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents: 9115
diff changeset
708 };
623b51bf03d7 Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents: 9115
diff changeset
709
623b51bf03d7 Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents: 9115
diff changeset
710 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
711 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
712
623b51bf03d7 Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents: 9115
diff changeset
713 @Override
623b51bf03d7 Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents: 9115
diff changeset
714 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
715 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
716 return exportDoubleValue(context, doubleValue);
623b51bf03d7 Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents: 9115
diff changeset
717 }
623b51bf03d7 Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents: 9115
diff changeset
718
623b51bf03d7 Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents: 9115
diff changeset
719 @Override
623b51bf03d7 Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents: 9115
diff changeset
720 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
721 return Formatter.getCollisionGaugeW(context);
623b51bf03d7 Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents: 9115
diff changeset
722 }
623b51bf03d7 Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents: 9115
diff changeset
723 };
623b51bf03d7 Added datacage select and chart display for river bed collision counts loaded from database
mschaefer
parents: 9115
diff changeset
724
9157
f9bb5d0a6ff3 Added the S-Info collision calculation and chart output
mschaefer
parents: 9145
diff changeset
725 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
726 private static final long serialVersionUID = 1L;
f9bb5d0a6ff3 Added the S-Info collision calculation and chart output
mschaefer
parents: 9145
diff changeset
727
f9bb5d0a6ff3 Added the S-Info collision calculation and chart output
mschaefer
parents: 9145
diff changeset
728 @Override
f9bb5d0a6ff3 Added the S-Info collision calculation and chart output
mschaefer
parents: 9145
diff changeset
729 public String exportValue(final CallContext context, final Object value) {
f9bb5d0a6ff3 Added the S-Info collision calculation and chart output
mschaefer
parents: 9145
diff changeset
730 return exportStringValue(value);
f9bb5d0a6ff3 Added the S-Info collision calculation and chart output
mschaefer
parents: 9145
diff changeset
731 }
f9bb5d0a6ff3 Added the S-Info collision calculation and chart output
mschaefer
parents: 9145
diff changeset
732
f9bb5d0a6ff3 Added the S-Info collision calculation and chart output
mschaefer
parents: 9145
diff changeset
733 @Override
f9bb5d0a6ff3 Added the S-Info collision calculation and chart output
mschaefer
parents: 9145
diff changeset
734 protected NumberFormat createFormatter(final CallContext context) {
f9bb5d0a6ff3 Added the S-Info collision calculation and chart output
mschaefer
parents: 9145
diff changeset
735 throw new UnsupportedOperationException();
f9bb5d0a6ff3 Added the S-Info collision calculation and chart output
mschaefer
parents: 9145
diff changeset
736 }
f9bb5d0a6ff3 Added the S-Info collision calculation and chart output
mschaefer
parents: 9145
diff changeset
737 };
f9bb5d0a6ff3 Added the S-Info collision calculation and chart output
mschaefer
parents: 9145
diff changeset
738
f9bb5d0a6ff3 Added the S-Info collision calculation and chart output
mschaefer
parents: 9145
diff changeset
739 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
740 private static final long serialVersionUID = 1L;
f9bb5d0a6ff3 Added the S-Info collision calculation and chart output
mschaefer
parents: 9145
diff changeset
741
f9bb5d0a6ff3 Added the S-Info collision calculation and chart output
mschaefer
parents: 9145
diff changeset
742 @Override
f9bb5d0a6ff3 Added the S-Info collision calculation and chart output
mschaefer
parents: 9145
diff changeset
743 public String exportValue(final CallContext context, final Object value) {
f9bb5d0a6ff3 Added the S-Info collision calculation and chart output
mschaefer
parents: 9145
diff changeset
744 return exportStringValue(value);
f9bb5d0a6ff3 Added the S-Info collision calculation and chart output
mschaefer
parents: 9145
diff changeset
745 }
f9bb5d0a6ff3 Added the S-Info collision calculation and chart output
mschaefer
parents: 9145
diff changeset
746
f9bb5d0a6ff3 Added the S-Info collision calculation and chart output
mschaefer
parents: 9145
diff changeset
747 @Override
f9bb5d0a6ff3 Added the S-Info collision calculation and chart output
mschaefer
parents: 9145
diff changeset
748 protected NumberFormat createFormatter(final CallContext context) {
f9bb5d0a6ff3 Added the S-Info collision calculation and chart output
mschaefer
parents: 9145
diff changeset
749 throw new UnsupportedOperationException();
f9bb5d0a6ff3 Added the S-Info collision calculation and chart output
mschaefer
parents: 9145
diff changeset
750 }
f9bb5d0a6ff3 Added the S-Info collision calculation and chart output
mschaefer
parents: 9145
diff changeset
751 };
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents:
diff changeset
752 }

http://dive4elements.wald.intevation.org