comparison backend/src/main/java/org/dive4elements/river/importer/Config.java @ 7730:e1b831fe435a slt-simplify-cross-sections

Merged default into slt-simplify-cross-sections branch and updated package and class names.
author Tom Gottfried <tom@intevation.de>
date Mon, 20 Jan 2014 14:04:20 +0100
parents flys-backend/src/main/java/de/intevation/flys/importer/Config.java@7bbee0cfc171 flys-backend/src/main/java/de/intevation/flys/importer/Config.java@4c3ccf2b0304
children 8036688f24e1
comparison
equal deleted inserted replaced
5084:ca45dd039b54 7730:e1b831fe435a
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
2 * Software engineering by Intevation GmbH
3 *
4 * This file is Free Software under the GNU AGPL (>=v3)
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the
6 * documentation coming with Dive4Elements River for details.
7 */
8
9 package org.dive4elements.river.importer;
10
11 public class Config
12 {
13 public static final String SKIP_DEFAULT =
14 "flys.backend.importer.skip.default";
15
16 public static final String DRY_RUN =
17 "flys.backend.importer.dry.run";
18
19 public static final String INFO_GEW_FILE =
20 "flys.backend.importer.infogew.file";
21
22 public static final String ANNOTATION_TYPES =
23 "flys.backend.importer.annotation.types";
24
25 public static final String SKIP_GAUGES =
26 "flys.backend.importer.skip.gauges";
27
28 public static final String SKIP_BWASTR =
29 "flys.backend.importer.skip.bwastr";
30
31 public static final String SKIP_HISTORICAL_DISCHARGE_TABLES =
32 "flys.backend.importer.skip.historical.discharge.tables";
33
34 public static final String SKIP_ANNOTATIONS =
35 "flys.backend.importer.skip.annotations";
36
37 public static final String SKIP_PRFS =
38 "flys.backend.importer.skip.prfs";
39
40 public static final String SKIP_DA50S =
41 "flys.backend.importer.skip.da50s";
42
43 public static final String SKIP_W80S =
44 "flys.backend.importer.skip.w80s";
45
46 public static final String SKIP_W80_CSVS =
47 "flys.backend.importer.skip.w80.csvs";
48
49 public static final String SKIP_HYKS =
50 "flys.backend.importer.skip.hyks";
51
52 public static final String SKIP_WST =
53 "flys.backend.importer.skip.wst";
54
55 public static final String SKIP_EXTRA_WSTS =
56 "flys.backend.importer.skip.extra.wsts";
57
58 public static final String SKIP_FIXATIONS =
59 "flys.backend.importer.skip.fixations";
60
61 public static final String SKIP_OFFICIAL_LINES =
62 "flys.backend.importer.skip.official.lines";
63
64 public static final String SKIP_FLOOD_WATER =
65 "flys.backend.importer.skip.flood.water";
66
67 public static final String SKIP_FLOOD_PROTECTION =
68 "flys.backend.importer.skip.flood.protection";
69
70 public static final String SKIP_BED_HEIGHT_SINGLE =
71 "flys.backend.importer.skip.bed.height.single";
72
73 public static final String SKIP_DA66S =
74 "flys.backend.importer.skip.da66s";
75
76 public static final String SKIP_BED_HEIGHT_EPOCH =
77 "flys.backend.importer.skip.bed.height.epoch";
78
79 public static final String SKIP_SEDIMENT_DENSITY =
80 "flys.backend.importer.skip.sediment.density";
81
82 public static final String SKIP_MORPHOLOGICAL_WIDTH =
83 "flys.backend.importer.skip.morphological.width";
84
85 public static final String SKIP_FLOW_VELOCITY =
86 "flys.backend.importer.skip.flow.velocity";
87
88 public static final String SKIP_SEDIMENT_YIELD =
89 "flys.backend.importer.skip.sediment.yield";
90
91 public static final String SKIP_WATERLEVELS =
92 "flys.backend.importer.skip.waterlevels";
93
94 public static final String SKIP_WATERLEVEL_DIFFERENCES =
95 "flys.backend.importer.skip.waterlevel.differences";
96
97 public static final String SKIP_MEASUREMENT_STATIONS =
98 "flys.backend.importer.skip.measurement.stations";
99
100 public static final String SKIP_SQ_RELATION =
101 "flys.backend.importer.skip.sq.relation";
102
103 public static final Double CROSS_SECTION_SIMPLIFICATION_EPSILON =
104 getDouble("flys.backend.importer.cross.section.simplification.epsilon");
105
106
107 public static final Config INSTANCE = new Config();
108
109 private Config () {
110 }
111
112 public static final boolean getFlag(String key) {
113 String flag = System.getProperty(key);
114 return flag != null
115 ? Boolean.valueOf(flag)
116 : Boolean.getBoolean(SKIP_DEFAULT);
117 }
118
119 public static final Double getDouble(String key) {
120 try {
121 String value = System.getProperty(key);
122 return value != null
123 ? Double.valueOf(value)
124 : null;
125 } catch (NumberFormatException nfe) {
126 return null;
127 }
128 }
129
130 public Double getCrossSectionSimplificationEpsilon() {
131 return CROSS_SECTION_SIMPLIFICATION_EPSILON;
132 }
133
134 public boolean dryRun() {
135 return getFlag(DRY_RUN);
136 }
137
138 public String getInfoGewFile() {
139 return System.getProperty(INFO_GEW_FILE);
140 }
141
142 public String getAnnotationTypes() {
143 return System.getProperty(ANNOTATION_TYPES);
144 }
145
146 public boolean skipGauges() {
147 return getFlag(SKIP_GAUGES);
148 }
149
150 public boolean skipHistoricalDischargeTables() {
151 return getFlag(SKIP_HISTORICAL_DISCHARGE_TABLES);
152 }
153
154 public boolean skipBWASTR() {
155 return getFlag(SKIP_BWASTR);
156 }
157
158 public boolean skipAnnotations() {
159 return getFlag(SKIP_ANNOTATIONS);
160 }
161
162 public boolean skipPRFs() {
163 return getFlag(SKIP_PRFS);
164 }
165
166 public boolean skipDA50s() {
167 return getFlag(SKIP_DA50S);
168 }
169
170 public boolean skipW80CSVs() {
171 return getFlag(SKIP_W80_CSVS);
172 }
173
174 public boolean skipW80s() {
175 return getFlag(SKIP_W80S);
176 }
177
178 public boolean skipHYKs() {
179 return getFlag(SKIP_HYKS);
180 }
181
182 public boolean skipWst() {
183 return getFlag(SKIP_WST);
184 }
185
186 public boolean skipExtraWsts() {
187 return getFlag(SKIP_EXTRA_WSTS);
188 }
189
190 public boolean skipFixations() {
191 return getFlag(SKIP_FIXATIONS);
192 }
193
194 public boolean skipOfficialLines() {
195 return getFlag(SKIP_OFFICIAL_LINES);
196 }
197
198 public boolean skipFloodWater() {
199 return getFlag(SKIP_FLOOD_WATER);
200 }
201
202 public boolean skipFloodProtection() {
203 return getFlag(SKIP_FLOOD_PROTECTION);
204 }
205
206 public boolean skipDA66s() {
207 return getFlag(SKIP_DA66S);
208 }
209
210 public boolean skipBedHeightSingle() {
211 return getFlag(SKIP_BED_HEIGHT_SINGLE);
212 }
213
214 public boolean skipBedHeightEpoch() {
215 return getFlag(SKIP_BED_HEIGHT_EPOCH);
216 }
217
218 public boolean skipSedimentDensity() {
219 return getFlag(SKIP_SEDIMENT_DENSITY);
220 }
221
222 public boolean skipMorphologicalWidth() {
223 return getFlag(SKIP_MORPHOLOGICAL_WIDTH);
224 }
225
226 public boolean skipFlowVelocity() {
227 return getFlag(SKIP_FLOW_VELOCITY);
228 }
229
230 public boolean skipSedimentYield() {
231 return getFlag(SKIP_SEDIMENT_YIELD);
232 }
233
234 public boolean skipWaterlevels() {
235 return getFlag(SKIP_WATERLEVELS);
236 }
237
238 public boolean skipWaterlevelDifferences() {
239 return getFlag(SKIP_WATERLEVEL_DIFFERENCES);
240 }
241
242 public boolean skipMeasurementStations() {
243 return getFlag(SKIP_MEASUREMENT_STATIONS);
244 }
245
246 public boolean skipSQRelation() {
247 return getFlag(SKIP_SQ_RELATION);
248 }
249 }
250 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org