Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/BunduResultType.java @ 9330:0a0937f33bb5
bundu.bezugswst first result for missing volume added
author | gernotbelger |
---|---|
date | Fri, 27 Jul 2018 17:19:27 +0200 |
parents | 7b2b086e45f0 |
children | 127638669052 |
comparison
equal
deleted
inserted
replaced
9329:6a7758923762 | 9330:0a0937f33bb5 |
---|---|
24 | 24 |
25 protected BunduResultType(final String unit, final String csvHeader, final String pdfHeader) { | 25 protected BunduResultType(final String unit, final String csvHeader, final String pdfHeader) { |
26 super(unit, csvHeader, pdfHeader); | 26 super(unit, csvHeader, pdfHeader); |
27 } | 27 } |
28 | 28 |
29 protected BunduResultType(final String unit, final String csvHeader) { | |
30 super(unit, csvHeader, csvHeader); | |
31 } | |
32 | |
29 private static final long serialVersionUID = 1L; | 33 private static final long serialVersionUID = 1L; |
30 | 34 |
31 public static final BunduResultType bezugswst = new BunduResultType(I18NStrings.CSV_META_HEIGHT_UNIT_RIVER, "bundu.wst.export.csv.meta.header.bezugswst", | 35 public static final BunduResultType bezugswst = new BunduResultType(I18NStrings.UNIT_NONE, "bundu.wst.export.csv.meta.header.bezugswst", |
32 "bundu.wst.export.csv.meta.header.bezugswst") { // UNIT needed? | 36 "bundu.wst.export.pdf.meta.header.bezugswst") { // Unit |
33 private static final long serialVersionUID = 1L; | 37 // dynamic |
34 | 38 private static final long serialVersionUID = 1L; |
35 @Override | 39 |
36 public String exportValue(final CallContext context, final Object value) { | 40 @Override |
37 final double doubleValue = asDouble(value); | 41 public String exportValue(final CallContext context, final Object value) { |
38 return exportDoubleValue(context, doubleValue); | 42 final double doubleValue = asDouble(value); |
39 } | 43 return exportDoubleValue(context, doubleValue); |
40 | 44 } |
41 @Override | 45 |
42 protected NumberFormat createFormatter(final CallContext context) { | 46 @Override |
43 return Formatter.getWaterlevelQ(context); // Richtiges Format? TODO check! | 47 protected NumberFormat createFormatter(final CallContext context) { |
44 } | 48 return Formatter.getWaterlevelQ(context); // Richtiges Format? TODO check! |
45 }; | 49 } |
46 | 50 }; |
51 | |
52 public static final BunduResultType sounding = new BunduResultType(I18NStrings.UNIT_NONE, "bundu.export.bezugswst.csv.meta.miss.sounding") { | |
53 private static final long serialVersionUID = 1L; | |
54 | |
55 @Override | |
56 public String exportValue(final CallContext context, final Object value) { | |
57 return exportStringValue(value); | |
58 } | |
59 | |
60 @Override | |
61 protected NumberFormat createFormatter(final CallContext context) { | |
62 throw new UnsupportedOperationException(); | |
63 } | |
64 }; | |
65 | |
66 public static final BunduResultType channelLowerEdge = new BunduResultType(I18NStrings.UNIT_NONE, "bundu.export.bezugswst.csv.meta.miss.channel.lower_edge", | |
67 "bundu.export.bezugswst.pdf.meta.miss.channel.lower_edge") { // Unit dynamic | |
68 private static final long serialVersionUID = 1L; | |
69 | |
70 @Override | |
71 public String exportValue(final CallContext context, final Object value) { | |
72 final double doubleValue = asDouble(value); | |
73 return exportDoubleValue(context, doubleValue); | |
74 } | |
75 | |
76 @Override | |
77 protected NumberFormat createFormatter(final CallContext context) { | |
78 return Formatter.getWaterlevelQ(context); // Richtiges Format? TODO check! | |
79 } | |
80 }; | |
81 | |
82 public static final BunduResultType channelMinDepth = new BunduResultType(I18NStrings.UNIT_M, "bundu.export.bezugswst.csv.meta.miss.channel.min_depth", | |
83 "bundu.export.bezugswst.pdf.meta.miss.channel.min_depth") { | |
84 private static final long serialVersionUID = 1L; | |
85 | |
86 @Override | |
87 public String exportValue(final CallContext context, final Object value) { | |
88 final double doubleValue = asDouble(value); | |
89 return exportDoubleValue(context, doubleValue); | |
90 } | |
91 | |
92 @Override | |
93 protected NumberFormat createFormatter(final CallContext context) { | |
94 return Formatter.getWaterlevelQ(context); // Richtiges Format? TODO check! | |
95 } | |
96 }; | |
97 | |
98 public static final BunduResultType hasMissingDepth = new BunduResultType(I18NStrings.UNIT_NONE, "bundu.export.bezugswst.csv.meta.miss.exists", | |
99 "bundu.export.bezugswst.pdf.meta.miss.exists") { | |
100 private static final long serialVersionUID = 1L; | |
101 | |
102 @Override | |
103 public String exportValue(final CallContext context, final Object value) { | |
104 return exportStringValue(value); | |
105 } | |
106 | |
107 @Override | |
108 protected NumberFormat createFormatter(final CallContext context) { | |
109 throw new UnsupportedOperationException(); | |
110 } | |
111 }; | |
112 public static final BunduResultType missVolume = new BunduResultType(I18NStrings.UNIT_CUBIC_M, "bundu.export.bezugswst.csv.meta.miss.volume") { | |
113 private static final long serialVersionUID = 1L; | |
114 | |
115 @Override | |
116 public String exportValue(final CallContext context, final Object value) { | |
117 final double doubleValue = asDouble(value); | |
118 return exportDoubleValue(context, doubleValue); | |
119 } | |
120 | |
121 @Override | |
122 protected NumberFormat createFormatter(final CallContext context) { | |
123 return Formatter.getWaterlevelQ(context); // Richtiges Format? TODO check! | |
124 } | |
125 }; | |
126 | |
127 public static final BunduResultType missMass = new BunduResultType(I18NStrings.UNIT_TON, "bundu.export.bezugswst.csv.meta.miss.mass", | |
128 "bundu.export.bezugswst.csv.meta.miss.mass") { | |
129 private static final long serialVersionUID = 1L; | |
130 | |
131 @Override | |
132 public String exportValue(final CallContext context, final Object value) { | |
133 final double doubleValue = asDouble(value); | |
134 return exportDoubleValue(context, doubleValue); | |
135 } | |
136 | |
137 @Override | |
138 protected NumberFormat createFormatter(final CallContext context) { | |
139 return Formatter.getWaterlevelQ(context); // Richtiges Format? TODO check! | |
140 } | |
141 }; | |
142 | |
143 public static final BunduResultType excavationVolume = new BunduResultType(I18NStrings.UNIT_CUBIC_M, "bundu.export.bezugswst.csv.meta.miss.excavation", | |
144 "bundu.export.bezugswst.pdf.meta.miss.excavation") { | |
145 private static final long serialVersionUID = 1L; | |
146 | |
147 @Override | |
148 public String exportValue(final CallContext context, final Object value) { | |
149 final double doubleValue = asDouble(value); | |
150 return exportDoubleValue(context, doubleValue); | |
151 } | |
152 | |
153 @Override | |
154 protected NumberFormat createFormatter(final CallContext context) { | |
155 return Formatter.getWaterlevelQ(context); // Richtiges Format? TODO check! | |
156 } | |
157 }; | |
158 | |
159 public static final BunduResultType excavationCosts = new BunduResultType(I18NStrings.UNIT_EURO, "bundu.export.bezugswst.csv.meta.miss.costs", | |
160 "bundu.export.bezugswst.pdf.meta.miss.costs") { | |
161 private static final long serialVersionUID = 1L; | |
162 | |
163 @Override | |
164 public String exportValue(final CallContext context, final Object value) { | |
165 final double doubleValue = asDouble(value); | |
166 return exportDoubleValue(context, doubleValue); | |
167 } | |
168 | |
169 @Override | |
170 protected NumberFormat createFormatter(final CallContext context) { | |
171 return Formatter.getWaterlevelQ(context); // Richtiges Format? TODO check! | |
172 } | |
173 }; | |
174 | |
175 public static final BunduResultType channelWidth = new BunduResultType(I18NStrings.UNIT_M, "bundu.export.bezugswst.csv.meta.miss.channel.width", | |
176 "bundu.export.bezugswst.pdf.meta.miss.channel.width") { | |
177 private static final long serialVersionUID = 1L; | |
178 | |
179 @Override | |
180 public String exportValue(final CallContext context, final Object value) { | |
181 final double doubleValue = asDouble(value); | |
182 return exportDoubleValue(context, doubleValue); | |
183 } | |
184 | |
185 @Override | |
186 protected NumberFormat createFormatter(final CallContext context) { | |
187 return Formatter.getWaterlevelQ(context); // Richtiges Format? TODO check! | |
188 } | |
189 }; | |
190 | |
191 public static final BunduResultType density = new BunduResultType(I18NStrings.UNIT_M, "bundu.export.bezugswst.csv.meta.miss.density", | |
192 "bundu.export.bezugswst.pdf.meta.miss.density") { | |
193 private static final long serialVersionUID = 1L; | |
194 | |
195 @Override | |
196 public String exportValue(final CallContext context, final Object value) { | |
197 final double doubleValue = asDouble(value); | |
198 return exportDoubleValue(context, doubleValue); | |
199 } | |
200 | |
201 @Override | |
202 protected NumberFormat createFormatter(final CallContext context) { | |
203 return Formatter.getWaterlevelQ(context); // Richtiges Format? TODO check! | |
204 } | |
205 }; | |
206 | |
207 public static final BunduResultType field = new BunduResultType(I18NStrings.UNIT_NONE, "bundu.export.bezugswst.csv.meta.miss.field") { | |
208 private static final long serialVersionUID = 1L; // unit steht in der zelle jedesmal: z.B. 1125 [m³] / 1912.5 [t] (Dezimaltrennzeichen bwt) | |
209 // ist warscheinlich schwierig mit dem Replacement von "{0}" | |
210 | |
211 @Override | |
212 public String exportValue(final CallContext context, final Object value) { | |
213 final double doubleValue = asDouble(value); | |
214 return exportDoubleValue(context, doubleValue); | |
215 } | |
216 | |
217 @Override | |
218 protected NumberFormat createFormatter(final CallContext context) { | |
219 return Formatter.getWaterlevelQ(context); // Richtiges Format? TODO check! | |
220 } | |
221 }; | |
222 | |
223 public static final BunduResultType meanBedheight = new BunduResultType(I18NStrings.UNIT_NONE, "bundu.export.bezugswst.csv.meta.miss.mean_bedheight") { | |
224 private static final long serialVersionUID = 1L; // unit steht in der zelle jedesmal: z.B. 1125 [m³] / 1912.5 [t] (Dezimaltrennzeichen bwt) | |
225 | |
226 @Override | |
227 public String exportValue(final CallContext context, final Object value) { | |
228 final double doubleValue = asDouble(value); | |
229 return exportDoubleValue(context, doubleValue); | |
230 } | |
231 | |
232 @Override | |
233 protected NumberFormat createFormatter(final CallContext context) { | |
234 return Formatter.getWaterlevelQ(context); // Richtiges Format? TODO check! | |
235 } | |
236 }; | |
47 } | 237 } |