Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/FacetTypes.java @ 5838:5aa05a7a34b7
Rename modules to more fitting names.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Thu, 25 Apr 2013 15:23:37 +0200 |
parents | flys-artifacts/src/main/java/org/dive4elements/river/artifacts/model/FacetTypes.java@bd047b71ab37 |
children | 4897a58c8746 |
comparison
equal
deleted
inserted
replaced
5837:d9901a08d0a6 | 5838:5aa05a7a34b7 |
---|---|
1 package org.dive4elements.river.artifacts.model; | |
2 | |
3 /** 'Types' of facets. */ | |
4 public interface FacetTypes { | |
5 | |
6 /** Static helper class to determine if a Facet name is of a generalized | |
7 * 'type'. */ | |
8 public static class IS { | |
9 public static boolean WQ_KM(String type) { | |
10 return type.equals(DISCHARGE_LONGITUDINAL_W) | |
11 || type.equals(LONGITUDINAL_W); | |
12 } | |
13 public static boolean W_KM(String type) { | |
14 return type.equals(STATIC_WKMS) | |
15 || type.equals(HEIGHTMARKS_POINTS) | |
16 || WQ_KM(type); | |
17 } | |
18 public static boolean AREA(String type) { | |
19 return type.equals(AREA) | |
20 || type.equals(CROSS_SECTION_AREA) | |
21 || type.equals(LONGITUDINAL_SECTION_AREA); | |
22 } | |
23 public static boolean W(String type) { | |
24 return type.equals(LONGITUDINAL_W) | |
25 || type.equals(DISCHARGE_LONGITUDINAL_W) | |
26 || type.equals(DURATION_W) | |
27 || type.equals(STATIC_WKMS) | |
28 || type.equals(STATIC_WQKMS_W); | |
29 } | |
30 public static boolean Q(String type) { | |
31 return type.equals(LONGITUDINAL_Q) | |
32 || type.equals(DISCHARGE_LONGITUDINAL_Q) | |
33 || type.equals(DURATION_Q) | |
34 || type.equals(STATIC_WQKMS_Q); | |
35 } | |
36 public static boolean V(String type) { | |
37 return type.equals(FLOW_VELOCITY_MAINCHANNEL) | |
38 || type.equals(FLOW_VELOCITY_TOTALCHANNEL); | |
39 } | |
40 public static boolean T(String type) { | |
41 return type.equals(FLOW_VELOCITY_TAU); | |
42 } | |
43 public static boolean H(String type) { | |
44 return type.equals(MIDDLE_BED_HEIGHT_SINGLE) | |
45 || type.equals(MIDDLE_BED_HEIGHT_EPOCH); | |
46 } | |
47 public static boolean MANUALPOINTS(String type) { | |
48 return type.endsWith("manualpoints"); | |
49 } | |
50 public static boolean MANUALLINE(String type) { | |
51 return type.endsWith("manualline"); | |
52 } | |
53 public static boolean SQ_CURVE(String type) { | |
54 if (type.equals(SQ_A_CURVE) | |
55 || type.equals(SQ_B_CURVE) | |
56 || type.equals(SQ_C_CURVE) | |
57 || type.equals(SQ_D_CURVE) | |
58 || type.equals(SQ_E_CURVE) | |
59 || type.equals(SQ_F_CURVE) | |
60 || type.equals(SQ_A_OUTLIER_CURVE) | |
61 || type.equals(SQ_B_OUTLIER_CURVE) | |
62 || type.equals(SQ_C_OUTLIER_CURVE) | |
63 || type.equals(SQ_D_OUTLIER_CURVE) | |
64 || type.equals(SQ_E_OUTLIER_CURVE) | |
65 || type.equals(SQ_F_OUTLIER_CURVE) | |
66 ) | |
67 { | |
68 return true; | |
69 } | |
70 | |
71 return false; | |
72 } | |
73 public static boolean SQ_MEASUREMENT(String type) { | |
74 if (type.equals(SQ_A_MEASUREMENT) | |
75 || type.equals(SQ_B_MEASUREMENT) | |
76 || type.equals(SQ_C_MEASUREMENT) | |
77 || type.equals(SQ_D_MEASUREMENT) | |
78 || type.equals(SQ_E_MEASUREMENT) | |
79 || type.equals(SQ_F_MEASUREMENT) | |
80 || type.equals(SQ_A_OUTLIER_MEASUREMENT) | |
81 || type.equals(SQ_B_OUTLIER_MEASUREMENT) | |
82 || type.equals(SQ_C_OUTLIER_MEASUREMENT) | |
83 || type.equals(SQ_D_OUTLIER_MEASUREMENT) | |
84 || type.equals(SQ_E_OUTLIER_MEASUREMENT) | |
85 || type.equals(SQ_F_OUTLIER_MEASUREMENT) | |
86 ) | |
87 { | |
88 return true; | |
89 } | |
90 | |
91 return false; | |
92 } | |
93 public static boolean SQ_OUTLIER(String type) { | |
94 if (type.equals(SQ_A_OUTLIER) | |
95 || type.equals(SQ_B_OUTLIER) | |
96 || type.equals(SQ_C_OUTLIER) | |
97 || type.equals(SQ_D_OUTLIER) | |
98 || type.equals(SQ_E_OUTLIER) | |
99 || type.equals(SQ_F_OUTLIER)) | |
100 { | |
101 return true; | |
102 } | |
103 | |
104 return false; | |
105 } | |
106 public static boolean SEDIMENT_LOAD(String type) { | |
107 return type.startsWith("sedimentload"); | |
108 } | |
109 public static boolean SEDIMENT_LOAD_NO_FLOAT(String type) { | |
110 return type.startsWith("sedimentload") && !type.contains("susp"); | |
111 } | |
112 }; | |
113 | |
114 /** Available diagram/chart-types. This enum is evaluated at certain | |
115 * places to iterate over chart-types to e.g. dynamically generate | |
116 * Facet-names (ManualPoints for example). */ | |
117 public enum ChartType { | |
118 FD("fix_derivate_curve"), | |
119 LS("longitudinal_section"), | |
120 CS("cross_section"), | |
121 DLS("discharge_longitudinal_section"), | |
122 CDC("computed_discharge_curve"), | |
123 DUC("duration_curve"), | |
124 DIC("discharge_curve"), | |
125 RC("reference_curve"), | |
126 RCN("reference_curve_normalized"), | |
127 WD("wdifferences"), | |
128 FWQC("fix_wq_curve"), | |
129 FDWC("fix_deltawt_curve"), | |
130 FLSC("fix_longitudinal_section_curve"), | |
131 FDC("fix_derivate_curve"), | |
132 EWQ("extreme_wq_curve"), | |
133 BHM("bedheight_middle"), | |
134 BLS("bed_longitudinal_section"), | |
135 SLS("sedimentload_ls"), | |
136 FV("flow_velocity"), | |
137 SQA("sq_relation_a"), | |
138 SQB("sq_relation_b"), | |
139 W_D("w_differences"), | |
140 SQC("sq_relation_c"), | |
141 SQD("sq_relation_d"), | |
142 SQE("sq_relation_e"), | |
143 SQF("sq_relation_f"), | |
144 HD("historical_discharge"), | |
145 HDWQ("historical_discharge_wq"); | |
146 | |
147 private String chartTypeString; | |
148 | |
149 ChartType(String description) { | |
150 this.chartTypeString = description; | |
151 } | |
152 | |
153 @Override | |
154 public String toString() { | |
155 return chartTypeString; | |
156 } | |
157 } | |
158 | |
159 String AREA = "area"; | |
160 String CROSS_SECTION_AREA = "cross_section.area"; | |
161 String LONGITUDINAL_SECTION_AREA = "longitudinal_section.area"; | |
162 | |
163 String FLOODMAP_WSPLGEN = "floodmap.wsplgen"; | |
164 String FLOODMAP_BARRIERS = "floodmap.barriers"; | |
165 String FLOODMAP_USERSHAPE = "floodmap.usershape"; | |
166 String FLOODMAP_RIVERAXIS = "floodmap.riveraxis"; | |
167 @Deprecated | |
168 String FLOODMAP_WMSBACKGROUND = "floodmap.wmsbackground"; | |
169 String FLOODMAP_KMS = "floodmap.kms"; | |
170 String FLOODMAP_QPS = "floodmap.qps"; | |
171 String FLOODMAP_HWS_LINES = "floodmap.hws_lines"; | |
172 String FLOODMAP_HWS_POINTS = "floodmap.hws_points"; | |
173 String FLOODMAP_HYDR_BOUNDARY = "floodmap.hydr_boundaries"; | |
174 String FLOODMAP_HYDR_BOUNDARY_POLY = "floodmap.hydr_boundaries_poly"; | |
175 String FLOODMAP_CATCHMENT = "floodmap.catchment"; | |
176 String FLOODMAP_FLOODPLAIN = "floodmap.floodplain"; | |
177 String FLOODMAP_LINES = "floodmap.lines"; | |
178 String FLOODMAP_BUILDINGS = "floodmap.buildings"; | |
179 String FLOODMAP_FIXPOINTS = "floodmap.fixpoints"; | |
180 String FLOODMAP_FLOODMARKS = "floodmap.floodmarks"; | |
181 String FLOODMAP_FLOODMAPS = "floodmap.floodmaps"; | |
182 String FLOODMAP_GAUGE_LOCATION = "floodmap.gauge_location"; | |
183 String FLOODMAP_EXTERNAL_WMS = "floodmap.externalwms"; | |
184 String FLOODMAP_JETTIES = "floodmap.jetties"; | |
185 | |
186 String DISCHARGE_LONGITUDINAL_W = "discharge_longitudinal_section.w"; | |
187 String DISCHARGE_LONGITUDINAL_Q = "discharge_longitudinal_section.q"; | |
188 String DISCHARGE_LONGITUDINAL_Q_INFOLD = "discharge_longitudinal_section.q.infolding"; | |
189 String DISCHARGE_LONGITUDINAL_Q_INFOLD_CUT = "discharge_longitudinal_section.q.cutting"; | |
190 String DISCHARGE_LONGITUDINAL_C = "discharge_longitudinal_section.c"; | |
191 | |
192 String LONGITUDINAL_W = "longitudinal_section.w"; | |
193 String LONGITUDINAL_Q = "longitudinal_section.q"; | |
194 String LONGITUDINAL_ANNOTATION = "longitudinal_section.annotations"; | |
195 String LONGITUDINAL_MANUALPOINTS = "longitudinal_section.manualpoints"; | |
196 | |
197 String W_DIFFERENCES = "w_differences"; | |
198 | |
199 String COMPUTED_DISCHARGE_Q = "computed_discharge_curve.q"; | |
200 String COMPUTED_DISCHARGE_MAINVALUES_Q = "computed_discharge_curve.mainvalues.q"; | |
201 String COMPUTED_DISCHARGE_MAINVALUES_W = "computed_discharge_curve.mainvalues.w"; | |
202 | |
203 String MAINVALUES_Q = "mainvalues.q"; | |
204 String MAINVALUES_W = "mainvalues.w"; | |
205 | |
206 String CROSS_SECTION = "cross_section"; | |
207 String CROSS_SECTION_WATER_LINE = "cross_section_water_line"; | |
208 | |
209 String HYK = "hyk"; | |
210 | |
211 String DISCHARGE_CURVE = "discharge_curve.curve"; | |
212 String GAUGE_DISCHARGE_CURVE = "gauge_discharge_curve"; | |
213 String GAUGE_DISCHARGE_CURVE_AT_EXPORT = "gauge_discharge_curve_at_export"; | |
214 | |
215 String DURATION_W = "duration_curve.w"; | |
216 String DURATION_Q = "duration_curve.q"; | |
217 String DURATION_MAINVALUES_Q = "duration_curve.mainvalues.q"; | |
218 | |
219 String MANUALPOINTS = "manualpoints"; | |
220 String MANUALLINE = "manualline"; | |
221 | |
222 String QSECTOR = "qsectors"; | |
223 | |
224 String STATIC_WQ = "other.wq"; | |
225 String STATIC_WQ_ANNOTATIONS = "other.wq.annotations"; | |
226 String STATIC_WKMS = "other.wkms"; | |
227 String STATIC_WKMS_MARKS = "other.wkms.marks"; | |
228 String STATIC_WQKMS = "other.wqkms"; | |
229 String STATIC_WQKMS_W = "other.wqkms.w"; | |
230 String STATIC_WQKMS_Q = "other.wqkms.q"; | |
231 String STATIC_WKMS_INTERPOL = "other.wkms.interpol"; | |
232 | |
233 String HEIGHTMARKS_POINTS = "heightmarks_points"; | |
234 | |
235 String CSV = "csv"; | |
236 String WST = "wst"; | |
237 String AT = "at"; | |
238 String PDF = "pdf"; | |
239 | |
240 String REPORT = "report"; | |
241 | |
242 String HISTORICAL_DISCHARGE_Q = "historical_discharge.historicalq"; | |
243 String HISTORICAL_DISCHARGE_Q_DIFF = "historical_discharge.historicalq.diff"; | |
244 String HISTORICAL_DISCHARGE_W = "historical_discharge.historicalw"; | |
245 String HISTORICAL_DISCHARGE_W_DIFF = "historical_discharge.historicalw.diff"; | |
246 String HISTORICAL_DISCHARGE_WQ_Q = "historical_discharge.wq.q"; | |
247 String HISTORICAL_DISCHARGE_WQ_W = "historical_discharge.wq.w"; | |
248 String HISTORICAL_DISCHARGE_WQ_CURVE = "historical_discharge.wq.curve"; | |
249 String HISTORICAL_DISCHARGE_MAINVALUES_Q = "historical_discharge.mainvalues.q"; | |
250 String HISTORICAL_DISCHARGE_MAINVALUES_W = "historical_discharge.mainvalues.w"; | |
251 | |
252 String REFERENCE_CURVE = "reference_curve"; | |
253 String REFERENCE_CURVE_NORMALIZED = "reference_curve_normalized"; | |
254 | |
255 String FLOW_VELOCITY_MAINCHANNEL = "flow_velocity.mainchannel"; | |
256 String FLOW_VELOCITY_TOTALCHANNEL = "flow_velocity.totalchannel"; | |
257 String FLOW_VELOCITY_TAU = "flow_velocity.tau"; | |
258 String FLOW_VELOCITY_MAINCHANNEL_FILTERED = "flow_velocity.mainchannel.filtered"; | |
259 String FLOW_VELOCITY_TOTALCHANNEL_FILTERED = "flow_velocity.totalchannel.filtered"; | |
260 String FLOW_VELOCITY_TAU_FILTERED = "flow_velocity.tau.filtered"; | |
261 String FLOW_VELOCITY_ANNOTATION = "flow_velocity.annotation"; | |
262 String FLOW_VELOCITY_MEASUREMENT = "flow_velocity.measurement"; | |
263 String FLOW_VELOCITY_DISCHARGE = "flow_velocity.discharge"; | |
264 | |
265 String MIDDLE_BED_HEIGHT_SINGLE = "bedheight_middle.single"; | |
266 String MIDDLE_BED_HEIGHT_EPOCH = "bedheight_middle.epoch"; | |
267 String MIDDLE_BED_HEIGHT_ANNOTATION = "bedheight_middle.annotation"; | |
268 | |
269 String BED_QUALITY_POROSITY_TOPLAYER = "bed_longitudinal_section.porosity_toplayer"; | |
270 String BED_QUALITY_POROSITY_SUBLAYER = "bed_longitudinal_section.porosity_sublayer"; | |
271 String BED_QUALITY_BED_DIAMETER_TOPLAYER = "bed_longitudinal_section.bed_diameter_toplayer"; | |
272 String BED_QUALITY_BED_DIAMETER_SUBLAYER = "bed_longitudinal_section.bed_diameter_sublayer"; | |
273 String BED_QUALITY_SEDIMENT_DENSITY_TOPLAYER = "bed_longitudinal_section.sediment_density_toplayer"; | |
274 String BED_QUALITY_SEDIMENT_DENSITY_SUBLAYER = "bed_longitudinal_section.sediment_density_sublayer"; | |
275 String BED_QUALITY_BEDLOAD_DIAMETER = "bed_longitudinal_section.bedload_diameter"; | |
276 | |
277 String BED_DIFFERENCE_YEAR = "bedheight_difference.year"; | |
278 String BED_DIFFERENCE_YEAR_FILTERED = "bedheight_difference.year.filtered"; | |
279 String BED_DIFFERENCE_HEIGHT_YEAR = "bedheight_difference.height_year"; | |
280 String BED_DIFFERENCE_HEIGHT_YEAR_FILTERED = "bedheight_difference.height_year.filtered"; | |
281 String BED_DIFFERENCE_EPOCH = "bedheight_difference.epoch"; | |
282 String BED_DIFFERENCE_EPOCH_FILTERED = "bedheight_difference.epoch.filtered"; | |
283 String BED_DIFFERENCE_MORPH_WIDTH = "bedheight_difference.morph_width"; | |
284 String BED_DIFFERENCE_YEAR_HEIGHT1 = "bedheight_difference.year.height1"; | |
285 String BED_DIFFERENCE_YEAR_HEIGHT2 = "bedheight_difference.year.height2"; | |
286 String BED_DIFFERENCE_YEAR_HEIGHT1_FILTERED = "bedheight_difference.year.height1.filtered"; | |
287 String BED_DIFFERENCE_YEAR_HEIGHT2_FILTERED = "bedheight_difference.year.height2.filtered"; | |
288 String BED_DIFFERENCE_EPOCH_HEIGHT1 = "bedheight_difference.epoch.height1"; | |
289 String BED_DIFFERENCE_EPOCH_HEIGHT2 = "bedheight_difference.epoch.height2"; | |
290 String BED_DIFFERENCE_EPOCH_HEIGHT1_FILTERED = "bedheight_difference.epoch.height1.filtered"; | |
291 String BED_DIFFERENCE_EPOCH_HEIGHT2_FILTERED = "bedheight_difference.epoch.height2.filtered"; | |
292 String MORPHOLOGIC_WIDTH = "morph-width"; | |
293 | |
294 String SEDIMENT_LOAD_COARSE = "sedimentload.coarse"; | |
295 String SEDIMENT_LOAD_SAND = "sedimentload.sand"; | |
296 String SEDIMENT_LOAD_FINEMIDDLE = "sedimentload.finemiddle"; | |
297 String SEDIMENT_LOAD_SUSP_SAND = "sedimentload.susp_sand"; | |
298 String SEDIMENT_LOAD_SUSP_SAND_BED = "sedimentload.susp_sand_bed"; | |
299 String SEDIMENT_LOAD_SUSP_SEDIMENT = "sedimentload.susp_sediment"; | |
300 String SEDIMENT_LOAD_TOTAL = "sedimentload.total"; | |
301 String SEDIMENT_LOAD_TOTAL_LOAD = "sedimentload.total_load"; | |
302 | |
303 String SQ_OVERVIEW = "sq_overview"; | |
304 | |
305 String SQ_A_CURVE = "sq_a_curve"; | |
306 String SQ_A_MEASUREMENT = "sq_a_measurement"; | |
307 String SQ_A_OUTLIER = "sq_a_outlier"; | |
308 String SQ_A_OUTLIER_CURVE = "sq_a_outlier_curve"; | |
309 String SQ_A_OUTLIER_MEASUREMENT = "sq_a_outlier_measurement"; | |
310 | |
311 String SQ_B_CURVE = "sq_b_curve"; | |
312 String SQ_B_MEASUREMENT = "sq_b_measurement"; | |
313 String SQ_B_OUTLIER = "sq_b_outlier"; | |
314 String SQ_B_OUTLIER_CURVE = "sq_b_outlier_curve"; | |
315 String SQ_B_OUTLIER_MEASUREMENT = "sq_b_outlier_measurement"; | |
316 | |
317 String SQ_C_CURVE = "sq_c_curve"; | |
318 String SQ_C_MEASUREMENT = "sq_c_measurement"; | |
319 String SQ_C_OUTLIER = "sq_c_outlier"; | |
320 String SQ_C_OUTLIER_CURVE = "sq_c_outlier_curve"; | |
321 String SQ_C_OUTLIER_MEASUREMENT = "sq_c_outlier_measurement"; | |
322 | |
323 String SQ_D_CURVE = "sq_d_curve"; | |
324 String SQ_D_MEASUREMENT = "sq_d_measurement"; | |
325 String SQ_D_OUTLIER = "sq_d_outlier"; | |
326 String SQ_D_OUTLIER_CURVE = "sq_d_outlier_curve"; | |
327 String SQ_D_OUTLIER_MEASUREMENT = "sq_d_outlier_measurement"; | |
328 | |
329 String SQ_E_CURVE = "sq_e_curve"; | |
330 String SQ_E_MEASUREMENT = "sq_e_measurement"; | |
331 String SQ_E_OUTLIER = "sq_e_outlier"; | |
332 String SQ_E_OUTLIER_CURVE = "sq_e_outlier_curve"; | |
333 String SQ_E_OUTLIER_MEASUREMENT = "sq_e_outlier_curve_measurement"; | |
334 | |
335 String SQ_F_CURVE = "sq_f_curve"; | |
336 String SQ_F_MEASUREMENT = "sq_f_measurement"; | |
337 String SQ_F_OUTLIER = "sq_f_outlier"; | |
338 String SQ_F_OUTLIER_CURVE = "sq_f_outlier_curve"; | |
339 String SQ_F_OUTLIER_MEASUREMENT = "sq_f_outlier_measurement"; | |
340 | |
341 String RELATIVE_POINT = "relativepoint"; | |
342 | |
343 String FIX_ANALYSIS_EVENTS_DWT = "fix_analysis_events_dwt"; | |
344 String FIX_ANALYSIS_EVENTS_LS = "fix_analysis_events_ls"; | |
345 String FIX_ANALYSIS_EVENTS_WQ = "fix_analysis_events_wq"; | |
346 | |
347 String FIX_EVENTS = "fix_events_wqkms"; | |
348 | |
349 String FIX_REFERENCE_EVENTS_DWT = "fix_reference_events_dwt"; | |
350 String FIX_REFERENCE_EVENTS_LS = "fix_reference_events_ls"; | |
351 String FIX_REFERENCE_EVENTS_WQ = "fix_reference_events_wq"; | |
352 String FIX_REFERENCE_PERIOD_DWT = "fix_reference_period_dwt"; | |
353 | |
354 // Note that AVERAGE_DWT will get a postfix (e.g. ..._dwt_1) | |
355 String FIX_SECTOR_AVERAGE_DWT = "fix_sector_average_dwt"; | |
356 String FIX_SECTOR_AVERAGE_LS = "fix_sector_average_ls"; | |
357 String FIX_SECTOR_AVERAGE_WQ = "fix_sector_average_wq"; | |
358 String FIX_SECTOR_AVERAGE_LS_DEVIATION = "fix_sector_average_ls_deviation"; | |
359 | |
360 String FIX_WQ_CURVE = "fix_wq_curve"; | |
361 String FIX_OUTLIER = "fix_outlier"; | |
362 | |
363 String FIX_ANALYSIS_PERIODS_DWT = "fix_analysis_periods_dwt"; | |
364 String FIX_ANALYSIS_PERIODS_LS = "fix_analysis_periods_ls"; | |
365 String FIX_ANALYSIS_PERIODS_WQ = "fix_analysis_periods_wq"; | |
366 | |
367 String FIX_DERIVATE_CURVE = "fix_derivate_curve"; | |
368 | |
369 String FIX_DEVIATION_DWT = "fix_deviation_dwt"; | |
370 String FIX_DEVIATION_LS = "fix_deviation_ls"; | |
371 | |
372 String FIX_PARAMETERS = "fix_parameters"; | |
373 | |
374 String STATIC_BEDHEIGHT = "static_bedheight"; | |
375 | |
376 String EXTREME_WQ_CURVE = "extreme_wq_curve"; | |
377 | |
378 String EXTREME_WQ_CURVE_BASE = "extreme_wq_curve_base"; | |
379 } | |
380 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |