Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/FacetTypes.java @ 2206:e2124ca11adb
Add manual point handling for many different chart types.
flys-artifacts/trunk@3830 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Mon, 30 Jan 2012 13:33:18 +0000 |
parents | 65dac9cf6ff5 |
children | ebbb18ed78c4 |
comparison
equal
deleted
inserted
replaced
2205:a22e0cb6eace | 2206:e2124ca11adb |
---|---|
1 package de.intevation.flys.artifacts.model; | 1 package de.intevation.flys.artifacts.model; |
2 | 2 |
3 /** 'Types' of facets. */ | |
3 public interface FacetTypes { | 4 public interface FacetTypes { |
4 | 5 |
5 public class IS { | 6 public class IS { |
6 public static boolean WQ_KM(String type) { | 7 public static boolean WQ_KM(String type) { |
7 return type.equals(DISCHARGE_LONGITUDINAL_W) | 8 return type.equals(DISCHARGE_LONGITUDINAL_W) |
28 return type.equals(LONGITUDINAL_Q) | 29 return type.equals(LONGITUDINAL_Q) |
29 || type.equals(DISCHARGE_LONGITUDINAL_Q) | 30 || type.equals(DISCHARGE_LONGITUDINAL_Q) |
30 || type.equals(DURATION_Q) | 31 || type.equals(DURATION_Q) |
31 || type.equals(STATIC_WQKMS_Q); | 32 || type.equals(STATIC_WQKMS_Q); |
32 } | 33 } |
34 public static boolean MANUALPOINTS(String type) { | |
35 return type.endsWith("manualpoints"); | |
36 } | |
33 }; | 37 }; |
38 | |
39 public enum ChartType { | |
40 LS("longitudinal_section"), | |
41 CS("cross_section"), | |
42 DLS("discharge_longitudinal_section"), | |
43 CDC("computed_discharge_curve"), | |
44 DC("duration_curve"), | |
45 WD("wdifferences"); | |
46 | |
47 private String chartTypeString; | |
48 | |
49 ChartType(String description) { | |
50 this.chartTypeString = description; | |
51 } | |
52 | |
53 public String toString() { | |
54 return chartTypeString; | |
55 } | |
56 } | |
34 | 57 |
35 String AREA = "area"; | 58 String AREA = "area"; |
36 String CROSS_SECTION_AREA = "cross_section.area"; | 59 String CROSS_SECTION_AREA = "cross_section.area"; |
37 String LONGITUDINAL_SECTION_AREA = "longitudinal_section.area"; | 60 String LONGITUDINAL_SECTION_AREA = "longitudinal_section.area"; |
38 | 61 |
55 String DISCHARGE_LONGITUDINAL_C = "discharge_longitudinal_section.c"; | 78 String DISCHARGE_LONGITUDINAL_C = "discharge_longitudinal_section.c"; |
56 | 79 |
57 String LONGITUDINAL_W = "longitudinal_section.w"; | 80 String LONGITUDINAL_W = "longitudinal_section.w"; |
58 String LONGITUDINAL_Q = "longitudinal_section.q"; | 81 String LONGITUDINAL_Q = "longitudinal_section.q"; |
59 String LONGITUDINAL_ANNOTATION = "longitudinal_section.annotations"; | 82 String LONGITUDINAL_ANNOTATION = "longitudinal_section.annotations"; |
83 String LONGITUDINAL_MANUALPOINTS = "longitudinal_section.manualpoints"; | |
60 | 84 |
61 String W_DIFFERENCES = "w_differences"; | 85 String W_DIFFERENCES = "w_differences"; |
62 | 86 |
63 String COMPUTED_DISCHARGE_Q = "computed_discharge_curve.q"; | 87 String COMPUTED_DISCHARGE_Q = "computed_discharge_curve.q"; |
64 String COMPUTED_DISCHARGE_MAINVALUES_Q = "computed_discharge_curve.mainvalues.q"; | 88 String COMPUTED_DISCHARGE_MAINVALUES_Q = "computed_discharge_curve.mainvalues.q"; |