Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadDataCalculate.java @ 8085:75e62ea0e307
Added the broken calculation state of the new sediment load calc.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Mon, 11 Aug 2014 17:18:36 +0200 |
parents | |
children | f01c65261963 |
comparison
equal
deleted
inserted
replaced
8084:640fffb0ad60 | 8085:75e62ea0e307 |
---|---|
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.artifacts.states.minfo; | |
10 | |
11 import java.util.ArrayList; | |
12 import java.util.Date; | |
13 import java.util.List; | |
14 | |
15 import org.apache.log4j.Logger; | |
16 import org.dive4elements.artifactdatabase.state.Facet; | |
17 import org.dive4elements.artifactdatabase.state.FacetActivity; | |
18 import org.dive4elements.artifacts.Artifact; | |
19 import org.dive4elements.artifacts.CallContext; | |
20 import org.dive4elements.artifacts.CallMeta; | |
21 import org.dive4elements.river.artifacts.D4EArtifact; | |
22 import org.dive4elements.river.artifacts.access.SedimentLoadAccess; | |
23 import org.dive4elements.river.artifacts.model.CalculationResult; | |
24 import org.dive4elements.river.artifacts.model.DataFacet; | |
25 import org.dive4elements.river.artifacts.model.FacetTypes; | |
26 import org.dive4elements.river.artifacts.model.ReportFacet; | |
27 import org.dive4elements.river.artifacts.model.minfo.SedimentLoadDataCalculation; | |
28 import org.dive4elements.river.artifacts.model.minfo.SedimentLoadLSData; | |
29 import org.dive4elements.river.artifacts.model.minfo.SedimentLoadFacet; | |
30 import org.dive4elements.river.artifacts.model.minfo.SedimentLoadFactory; | |
31 import org.dive4elements.river.artifacts.model.minfo.SedimentLoadResult; | |
32 import org.dive4elements.river.artifacts.model.minfo.SedimentLoadUnknownFacet; | |
33 import org.dive4elements.river.artifacts.resources.Resources; | |
34 import org.dive4elements.river.artifacts.states.DefaultState; | |
35 | |
36 /** State in which Sediment Load(s) are calculated/retrieved. */ | |
37 public class SedimentLoadDataCalculate | |
38 extends DefaultState | |
39 implements FacetTypes | |
40 { | |
41 | |
42 private static final long serialVersionUID = 1L; | |
43 | |
44 private static final Logger logger = Logger | |
45 .getLogger(SedimentLoadCalculate.class); | |
46 | |
47 public static final String I18N_FACET_SEDIMENTLOAD_COARSE = "facet.sedimentload.coarse"; | |
48 public static final String I18N_FACET_SEDIMENTLOAD_SAND = "facet.sedimentload.sand"; | |
49 public static final String I18N_FACET_SEDIMENTLOAD_FINE_MIDDLE = "facet.sedimentload.fine_middle"; | |
50 public static final String I18N_FACET_SEDIMENTLOAD_SUSPSAND = "facet.sedimentload.susp_sand"; | |
51 public static final String I18N_FACET_SEDIMENTLOAD_SUSPSANDBED = "facet.sediemntload.susp_sand_bed"; | |
52 public static final String I18N_FACET_SEDIMENTLOAD_SUSPSEDIMENT = "facet.sedimentload.susp_sediment"; | |
53 public static final String I18N_FACET_SEDIMENTLOAD_TOTAL_LOAD = "facet.sedimentload.total_load"; | |
54 public static final String I18N_FACET_SEDIMENTLOAD_TOTAL = "facet.sedimentload.total"; | |
55 | |
56 static { | |
57 // Active/deactivate facets. | |
58 FacetActivity.Registry.getInstance().register( | |
59 "minfo", | |
60 new FacetActivity() { | |
61 @Override | |
62 public Boolean isInitialActive( | |
63 Artifact artifact, | |
64 Facet facet, | |
65 String output | |
66 ) { | |
67 return null; | |
68 //XXX: This is all broken. | |
69 /* | |
70 String name = facet.getName(); | |
71 if (name.equals(SEDIMENT_LOAD_TA_COARSE) || | |
72 name.equals(SEDIMENT_LOAD_TA_FINEMIDDLE) || | |
73 name.equals(SEDIMENT_LOAD_TA_SAND) || | |
74 name.equals(SEDIMENT_LOAD_TA_SUSP_SAND) || | |
75 name.equals(SEDIMENT_LOAD_TA_SUSP_SEDIMENT) || | |
76 name.equals(SEDIMENT_LOAD_TA_SUSP_SAND_BED) || | |
77 name.equals(SEDIMENT_LOAD_M3A_COARSE) || | |
78 name.equals(SEDIMENT_LOAD_M3A_FINEMIDDLE) || | |
79 name.equals(SEDIMENT_LOAD_M3A_SAND) || | |
80 name.equals(SEDIMENT_LOAD_M3A_SUSP_SAND) || | |
81 name.equals(SEDIMENT_LOAD_M3A_SUSP_SEDIMENT) || | |
82 name.equals(SEDIMENT_LOAD_M3A_SUSP_SAND_BED)){ | |
83 return Boolean.FALSE; | |
84 } | |
85 else if (name.equals(SEDIMENT_LOAD_TA_UNKNOWN) | |
86 || name.equals(SEDIMENT_LOAD_M3A_UNKNOWN)) { | |
87 D4EArtifact d4e = (D4EArtifact)artifact; | |
88 SedimentLoadUnknownFacet f = | |
89 (SedimentLoadUnknownFacet) | |
90 d4e.getNativeFacet(facet, null); | |
91 SedimentLoadLSData load = | |
92 (SedimentLoadLSData)f.getData(artifact, null); | |
93 SedimentLoadAccess access = | |
94 new SedimentLoadAccess(d4e); | |
95 List<int[]> dates = new ArrayList<int[]>(); | |
96 if (access.getYearEpoch().equals("year")) { | |
97 dates.add(access.getPeriod()); | |
98 } | |
99 else { | |
100 int[][] epochs = access.getEpochs(); | |
101 for (int i = 0; i < epochs.length; i++) { | |
102 dates.add(epochs[i]); | |
103 } | |
104 } | |
105 for (int[] date: dates) { | |
106 try { | |
107 Date s = | |
108 DateUtil.getStartDateFromYear(date[0]); | |
109 Date e = | |
110 DateUtil.getEndDateFromYear(date[1]); | |
111 if (!(s.after(load.getEnd()) || | |
112 e.before(load.getStart()))) { | |
113 return Boolean.TRUE; | |
114 } | |
115 } | |
116 catch (IllegalArgumentException iae) { | |
117 return Boolean.FALSE; | |
118 } | |
119 } | |
120 return Boolean.FALSE; | |
121 } | |
122 else { | |
123 return null; | |
124 } | |
125 */ | |
126 } | |
127 }); | |
128 } | |
129 | |
130 public SedimentLoadDataCalculate() { | |
131 } | |
132 | |
133 @Override | |
134 public Object computeAdvance(D4EArtifact artifact, String hash, | |
135 CallContext context, List<Facet> facets, Object old) { | |
136 logger.debug("SedimentLoadDataCalculate.computeAdvance"); | |
137 | |
138 List<Facet> newFacets = new ArrayList<Facet>(); | |
139 | |
140 SedimentLoadAccess access = new SedimentLoadAccess(artifact); | |
141 | |
142 CalculationResult res = old instanceof CalculationResult | |
143 ? (CalculationResult) old | |
144 : new SedimentLoadDataCalculation().calculate(access); | |
145 | |
146 if (facets == null || res == null) { | |
147 return res; | |
148 } | |
149 | |
150 /* XXX: THIS IS ALL BROKEN | |
151 | |
152 SedimentLoadResult[] results = (SedimentLoadResult[]) res.getData(); | |
153 | |
154 if (results == null || results.length == 0) { | |
155 logger.warn("Calculation computed no results!"); | |
156 return res; | |
157 } | |
158 | |
159 String type = access.getYearEpoch(); | |
160 if (type.equals("year")) { | |
161 generateYearFacets(context, newFacets, results, getID(), hash, access); | |
162 } | |
163 else if (type.equals("epoch")) { | |
164 generateEpochFacets(context, newFacets, results, getID(), hash, access); | |
165 } | |
166 else if (type.equals("off_epoch")) { | |
167 generateOffEpochFacets(context, newFacets, results, getID(), hash, access); | |
168 } | |
169 logger.debug("Created " + newFacets.size() + " new Facets."); | |
170 | |
171 String river = access.getRiverName(); | |
172 SedimentLoadLSData[] unknown = | |
173 SedimentLoadFactory.getSedimentLoadUnknown(river, | |
174 access.getUnit().replace("_per_","/"), type); | |
175 | |
176 boolean isUnitTA = access.getUnit().startsWith("t"); | |
177 | |
178 if (res.getReport().hasProblems()) { | |
179 newFacets.add(new ReportFacet(ComputeType.ADVANCE, hash, id)); | |
180 } | |
181 | |
182 for (int i = 0; i < unknown.length; i++) { | |
183 newFacets.add(new SedimentLoadUnknownFacet( | |
184 i, | |
185 (isUnitTA)? SEDIMENT_LOAD_TA_UNKNOWN:SEDIMENT_LOAD_M3A_UNKNOWN, | |
186 unknown[i].getDescription(), | |
187 ComputeType.ADVANCE, | |
188 getID(), | |
189 hash)); | |
190 } | |
191 | |
192 newFacets.add( | |
193 new DataFacet(CSV, "CSV data", ComputeType.ADVANCE, hash, id)); | |
194 | |
195 facets.addAll(newFacets); | |
196 | |
197 */ | |
198 | |
199 return res; | |
200 } | |
201 | |
202 /* | |
203 private String facetNameInfo(SedimentLoadResult result, String unit) { | |
204 return " - " + result.getStartYear() + " " + unit; | |
205 } | |
206 | |
207 protected void generateYearFacets(CallContext context, | |
208 List<Facet> newFacets, | |
209 SedimentLoadResult[] results, | |
210 String stateId, | |
211 String hash, | |
212 SedimentLoadAccess access | |
213 ) { | |
214 logger.debug("SedimentLoadCalculate.generateFacets " + access.getUnit()); | |
215 | |
216 CallMeta meta = context.getMeta(); | |
217 boolean isUnitTA = access.getUnit().startsWith("t"); | |
218 String unit = (isUnitTA) | |
219 ? Resources.getMsg(context.getMeta(), "state.minfo.sediment.load.t_per_a", "(t/a)") | |
220 : Resources.getMsg(context.getMeta(), "state.minfo.sediment.load.m3_per_a", "(m^3/a)"); | |
221 | |
222 // newFacets.add(new DataFacet(CSV, "CSV data", ComputeType.ADVANCE, hash, id)); | |
223 for (int idx = 0; idx < results.length; idx++) { | |
224 SedimentLoadResult res = results[idx]; | |
225 if (res.hasCoarseData()) { | |
226 newFacets.add(new SedimentLoadFacet( | |
227 idx, | |
228 (isUnitTA) | |
229 ?SEDIMENT_LOAD_TA_COARSE | |
230 :SEDIMENT_LOAD_M3A_COARSE, | |
231 Resources.getMsg( | |
232 meta, | |
233 I18N_FACET_SEDIMENTLOAD_COARSE, | |
234 I18N_FACET_SEDIMENTLOAD_COARSE) + | |
235 facetNameInfo(res, unit), | |
236 ComputeType.ADVANCE, | |
237 stateId, | |
238 hash)); | |
239 } | |
240 if (res.hasSandData()) { | |
241 newFacets.add(new SedimentLoadFacet( | |
242 idx, | |
243 (isUnitTA) | |
244 ?SEDIMENT_LOAD_TA_SAND | |
245 :SEDIMENT_LOAD_M3A_SAND, | |
246 Resources.getMsg( | |
247 meta, | |
248 I18N_FACET_SEDIMENTLOAD_SAND, | |
249 I18N_FACET_SEDIMENTLOAD_SAND) + | |
250 facetNameInfo(res, unit), | |
251 ComputeType.ADVANCE, | |
252 stateId, | |
253 hash)); | |
254 } | |
255 if (res.hasFineMiddleData()) { | |
256 newFacets.add(new SedimentLoadFacet( | |
257 idx, | |
258 (isUnitTA) | |
259 ?SEDIMENT_LOAD_TA_FINEMIDDLE | |
260 :SEDIMENT_LOAD_M3A_FINEMIDDLE, | |
261 Resources.getMsg( | |
262 meta, | |
263 I18N_FACET_SEDIMENTLOAD_FINE_MIDDLE, | |
264 I18N_FACET_SEDIMENTLOAD_FINE_MIDDLE) + | |
265 facetNameInfo(res, unit), | |
266 ComputeType.ADVANCE, | |
267 stateId, | |
268 hash)); | |
269 } | |
270 if (res.hasSuspSandData()) { | |
271 newFacets.add(new SedimentLoadFacet( | |
272 idx, | |
273 (isUnitTA) | |
274 ?SEDIMENT_LOAD_TA_SUSP_SAND | |
275 :SEDIMENT_LOAD_M3A_SUSP_SAND, | |
276 Resources.getMsg( | |
277 meta, | |
278 I18N_FACET_SEDIMENTLOAD_SUSPSAND, | |
279 I18N_FACET_SEDIMENTLOAD_SUSPSAND) + | |
280 facetNameInfo(res, unit), | |
281 ComputeType.ADVANCE, | |
282 stateId, | |
283 hash)); | |
284 } | |
285 if (res.hasSuspSandBedData()) { | |
286 newFacets.add(new SedimentLoadFacet( | |
287 idx, | |
288 (isUnitTA) | |
289 ?SEDIMENT_LOAD_TA_SUSP_SAND_BED | |
290 :SEDIMENT_LOAD_M3A_SUSP_SAND_BED, | |
291 Resources.getMsg( | |
292 meta, | |
293 I18N_FACET_SEDIMENTLOAD_SUSPSANDBED, | |
294 I18N_FACET_SEDIMENTLOAD_SUSPSANDBED) + | |
295 facetNameInfo(res, unit), | |
296 ComputeType.ADVANCE, | |
297 stateId, | |
298 hash)); | |
299 } | |
300 if (res.hasSuspSedimentData()) { | |
301 newFacets.add(new SedimentLoadFacet( | |
302 idx, | |
303 (isUnitTA) | |
304 ?SEDIMENT_LOAD_TA_SUSP_SEDIMENT | |
305 :SEDIMENT_LOAD_M3A_SUSP_SEDIMENT, | |
306 Resources.getMsg( | |
307 meta, | |
308 I18N_FACET_SEDIMENTLOAD_SUSPSEDIMENT, | |
309 I18N_FACET_SEDIMENTLOAD_SUSPSEDIMENT) + | |
310 facetNameInfo(res, unit), | |
311 ComputeType.ADVANCE, | |
312 stateId, | |
313 hash)); | |
314 | |
315 } | |
316 if (res.hasTotalData()) { | |
317 newFacets.add(new SedimentLoadFacet( | |
318 idx, | |
319 (isUnitTA) | |
320 ?SEDIMENT_LOAD_TA_TOTAL | |
321 :SEDIMENT_LOAD_M3A_TOTAL, | |
322 Resources.getMsg( | |
323 meta, | |
324 I18N_FACET_SEDIMENTLOAD_TOTAL, | |
325 I18N_FACET_SEDIMENTLOAD_TOTAL) + | |
326 facetNameInfo(res, unit), | |
327 ComputeType.ADVANCE, | |
328 stateId, | |
329 hash)); | |
330 } | |
331 } | |
332 } | |
333 | |
334 private String epochFacetNameInfo(SedimentLoadResult result, String unit) { | |
335 return " - " + result.getStartYear() + "-" + result.getEndYear() + " " + unit; | |
336 } | |
337 | |
338 protected void generateEpochFacets( | |
339 CallContext context, | |
340 List<Facet> newFacets, | |
341 SedimentLoadResult[] results, | |
342 String stateId, | |
343 String hash, | |
344 SedimentLoadAccess access | |
345 ) { | |
346 logger.debug("SedimentLoadCalculate.generateEpochFacets "); | |
347 | |
348 CallMeta meta = context.getMeta(); | |
349 boolean isUnitTA = access.getUnit().startsWith("t"); | |
350 String unit = (isUnitTA) | |
351 ? Resources.getMsg(context.getMeta(), "state.minfo.sediment.load.t_per_a", "(t/a)") | |
352 : Resources.getMsg(context.getMeta(), "state.minfo.sediment.load.m3_per_a", "(m^3/a)"); | |
353 | |
354 // newFacets.add(new DataFacet(CSV, "CSV data", ComputeType.ADVANCE, hash, id)); | |
355 for (int idx = 0; idx < results.length; idx++) { | |
356 SedimentLoadResult res = results[idx]; | |
357 if (res.hasCoarseData()) { | |
358 newFacets.add(new SedimentLoadFacet( | |
359 idx, | |
360 (isUnitTA) | |
361 ?SEDIMENT_LOAD_TA_COARSE | |
362 :SEDIMENT_LOAD_M3A_COARSE, | |
363 Resources.getMsg( | |
364 meta, | |
365 I18N_FACET_SEDIMENTLOAD_COARSE, | |
366 I18N_FACET_SEDIMENTLOAD_COARSE) + | |
367 epochFacetNameInfo(res,unit), | |
368 ComputeType.ADVANCE, | |
369 stateId, | |
370 hash)); | |
371 } | |
372 if (res.hasSandData()) { | |
373 newFacets.add(new SedimentLoadFacet( | |
374 idx, | |
375 (isUnitTA) | |
376 ?SEDIMENT_LOAD_TA_SAND | |
377 :SEDIMENT_LOAD_M3A_SAND, | |
378 Resources.getMsg( | |
379 meta, | |
380 I18N_FACET_SEDIMENTLOAD_SAND, | |
381 I18N_FACET_SEDIMENTLOAD_SAND) + | |
382 epochFacetNameInfo(res,unit), | |
383 ComputeType.ADVANCE, | |
384 stateId, | |
385 hash)); | |
386 } | |
387 if (res.hasFineMiddleData()) { | |
388 newFacets.add(new SedimentLoadFacet( | |
389 idx, | |
390 (isUnitTA) | |
391 ?SEDIMENT_LOAD_TA_FINEMIDDLE | |
392 :SEDIMENT_LOAD_M3A_FINEMIDDLE, | |
393 Resources.getMsg( | |
394 meta, | |
395 I18N_FACET_SEDIMENTLOAD_FINE_MIDDLE, | |
396 I18N_FACET_SEDIMENTLOAD_FINE_MIDDLE) + | |
397 epochFacetNameInfo(res,unit), | |
398 ComputeType.ADVANCE, | |
399 stateId, | |
400 hash)); | |
401 } | |
402 if (res.hasSuspSandData()) { | |
403 newFacets.add(new SedimentLoadFacet( | |
404 idx, | |
405 (isUnitTA) | |
406 ?SEDIMENT_LOAD_TA_SUSP_SAND | |
407 :SEDIMENT_LOAD_M3A_SUSP_SAND, | |
408 Resources.getMsg( | |
409 meta, | |
410 I18N_FACET_SEDIMENTLOAD_SUSPSAND, | |
411 I18N_FACET_SEDIMENTLOAD_SUSPSAND) + | |
412 epochFacetNameInfo(res,unit), | |
413 ComputeType.ADVANCE, | |
414 stateId, | |
415 hash)); | |
416 } | |
417 if (res.hasSuspSandBedData()) { | |
418 newFacets.add(new SedimentLoadFacet( | |
419 idx, | |
420 (isUnitTA) | |
421 ?SEDIMENT_LOAD_TA_SUSP_SAND_BED | |
422 :SEDIMENT_LOAD_M3A_SUSP_SAND, | |
423 Resources.getMsg( | |
424 meta, | |
425 I18N_FACET_SEDIMENTLOAD_SUSPSANDBED, | |
426 I18N_FACET_SEDIMENTLOAD_SUSPSANDBED) + | |
427 epochFacetNameInfo(res,unit), | |
428 ComputeType.ADVANCE, | |
429 stateId, | |
430 hash)); | |
431 } | |
432 if (res.hasSuspSedimentData()) { | |
433 newFacets.add(new SedimentLoadFacet( | |
434 idx, | |
435 (isUnitTA) | |
436 ?SEDIMENT_LOAD_TA_SUSP_SEDIMENT | |
437 :SEDIMENT_LOAD_M3A_SUSP_SEDIMENT, | |
438 Resources.getMsg( | |
439 meta, | |
440 I18N_FACET_SEDIMENTLOAD_SUSPSEDIMENT, | |
441 I18N_FACET_SEDIMENTLOAD_SUSPSEDIMENT) + | |
442 epochFacetNameInfo(res,unit), | |
443 ComputeType.ADVANCE, | |
444 stateId, | |
445 hash)); | |
446 | |
447 } | |
448 if (res.hasTotalLoadData()) { | |
449 newFacets.add(new SedimentLoadFacet( | |
450 idx, | |
451 (isUnitTA) | |
452 ?SEDIMENT_LOAD_TA_TOTAL_LOAD | |
453 :SEDIMENT_LOAD_M3A_TOTAL_LOAD, | |
454 Resources.getMsg( | |
455 meta, | |
456 I18N_FACET_SEDIMENTLOAD_TOTAL_LOAD, | |
457 I18N_FACET_SEDIMENTLOAD_TOTAL_LOAD) + | |
458 epochFacetNameInfo(res,unit), | |
459 ComputeType.ADVANCE, | |
460 stateId, | |
461 hash)); | |
462 } | |
463 if (res.hasTotalData()) { | |
464 newFacets.add(new SedimentLoadFacet( | |
465 idx, | |
466 (isUnitTA) | |
467 ?SEDIMENT_LOAD_TA_TOTAL | |
468 :SEDIMENT_LOAD_M3A_TOTAL, | |
469 Resources.getMsg( | |
470 meta, | |
471 I18N_FACET_SEDIMENTLOAD_TOTAL, | |
472 I18N_FACET_SEDIMENTLOAD_TOTAL) + | |
473 epochFacetNameInfo(res,unit), | |
474 ComputeType.ADVANCE, | |
475 stateId, | |
476 hash)); | |
477 } | |
478 } | |
479 } | |
480 | |
481 protected void generateOffEpochFacets( | |
482 CallContext context, | |
483 List<Facet> newFacets, | |
484 SedimentLoadResult[] results, | |
485 String stateId, | |
486 String hash, | |
487 SedimentLoadAccess access | |
488 ) { | |
489 logger.debug("SedimentLoadCalculate.generateOffEpochFacets"); | |
490 | |
491 CallMeta meta = context.getMeta(); | |
492 boolean isUnitTA = access.getUnit().startsWith("t"); | |
493 String unit = (isUnitTA) | |
494 ? Resources.getMsg(context.getMeta(), "state.minfo.sediment.load.t_per_a", "(t/a)") | |
495 : Resources.getMsg(context.getMeta(), "state.minfo.sediment.load.m3_per_a", "(m^3/a)"); | |
496 | |
497 // newFacets.add(new DataFacet(CSV, "CSV data", ComputeType.ADVANCE, hash, id)); | |
498 for (int idx = 0; idx < results.length; idx++) { | |
499 SedimentLoadResult res = results[idx]; | |
500 if (res.hasCoarseData()) { | |
501 newFacets.add(new SedimentLoadFacet( | |
502 idx, | |
503 (isUnitTA) | |
504 ?SEDIMENT_LOAD_TA_COARSE | |
505 :SEDIMENT_LOAD_M3A_COARSE, | |
506 Resources.getMsg( | |
507 meta, | |
508 I18N_FACET_SEDIMENTLOAD_COARSE, | |
509 I18N_FACET_SEDIMENTLOAD_COARSE) + | |
510 epochFacetNameInfo(res,unit), | |
511 ComputeType.ADVANCE, | |
512 stateId, | |
513 hash)); | |
514 } | |
515 if (res.hasSandData()) { | |
516 newFacets.add(new SedimentLoadFacet( | |
517 idx, | |
518 (isUnitTA) | |
519 ?SEDIMENT_LOAD_TA_SAND | |
520 :SEDIMENT_LOAD_M3A_SAND, | |
521 Resources.getMsg( | |
522 meta, | |
523 I18N_FACET_SEDIMENTLOAD_SAND, | |
524 I18N_FACET_SEDIMENTLOAD_SAND) + | |
525 epochFacetNameInfo(res,unit), | |
526 ComputeType.ADVANCE, | |
527 stateId, | |
528 hash)); | |
529 } | |
530 if (res.hasFineMiddleData()) { | |
531 newFacets.add(new SedimentLoadFacet( | |
532 idx, | |
533 (isUnitTA) | |
534 ?SEDIMENT_LOAD_TA_FINEMIDDLE | |
535 :SEDIMENT_LOAD_M3A_FINEMIDDLE, | |
536 Resources.getMsg( | |
537 meta, | |
538 I18N_FACET_SEDIMENTLOAD_FINE_MIDDLE, | |
539 I18N_FACET_SEDIMENTLOAD_FINE_MIDDLE) + | |
540 epochFacetNameInfo(res,unit), | |
541 ComputeType.ADVANCE, | |
542 stateId, | |
543 hash)); | |
544 } | |
545 if (res.hasSuspSandData()) { | |
546 newFacets.add(new SedimentLoadFacet( | |
547 idx, | |
548 (isUnitTA) | |
549 ?SEDIMENT_LOAD_TA_SUSP_SAND | |
550 :SEDIMENT_LOAD_M3A_SUSP_SAND, | |
551 Resources.getMsg( | |
552 meta, | |
553 I18N_FACET_SEDIMENTLOAD_SUSPSAND, | |
554 I18N_FACET_SEDIMENTLOAD_SUSPSAND) + | |
555 epochFacetNameInfo(res,unit), | |
556 ComputeType.ADVANCE, | |
557 stateId, | |
558 hash)); | |
559 } | |
560 if (res.hasSuspSandBedData()) { | |
561 newFacets.add(new SedimentLoadFacet( | |
562 idx, | |
563 (isUnitTA) | |
564 ?SEDIMENT_LOAD_TA_SUSP_SAND_BED | |
565 :SEDIMENT_LOAD_M3A_SUSP_SAND_BED, | |
566 Resources.getMsg( | |
567 meta, | |
568 I18N_FACET_SEDIMENTLOAD_SUSPSANDBED, | |
569 I18N_FACET_SEDIMENTLOAD_SUSPSANDBED) + | |
570 epochFacetNameInfo(res,unit), | |
571 ComputeType.ADVANCE, | |
572 stateId, | |
573 hash)); | |
574 } | |
575 if (res.hasSuspSedimentData()) { | |
576 newFacets.add(new SedimentLoadFacet( | |
577 idx, | |
578 (isUnitTA) | |
579 ?SEDIMENT_LOAD_TA_SUSP_SEDIMENT | |
580 :SEDIMENT_LOAD_M3A_SUSP_SEDIMENT, | |
581 Resources.getMsg( | |
582 meta, | |
583 I18N_FACET_SEDIMENTLOAD_SUSPSEDIMENT, | |
584 I18N_FACET_SEDIMENTLOAD_SUSPSEDIMENT) + | |
585 epochFacetNameInfo(res,unit), | |
586 ComputeType.ADVANCE, | |
587 stateId, | |
588 hash)); | |
589 | |
590 } | |
591 if (res.hasTotalLoadData()) { | |
592 newFacets.add(new SedimentLoadFacet( | |
593 idx, | |
594 (isUnitTA) | |
595 ?SEDIMENT_LOAD_TA_TOTAL_LOAD | |
596 :SEDIMENT_LOAD_M3A_TOTAL_LOAD, | |
597 Resources.getMsg( | |
598 meta, | |
599 I18N_FACET_SEDIMENTLOAD_TOTAL_LOAD, | |
600 I18N_FACET_SEDIMENTLOAD_TOTAL_LOAD) + | |
601 epochFacetNameInfo(res,unit), | |
602 ComputeType.ADVANCE, | |
603 stateId, | |
604 hash)); | |
605 } | |
606 if (res.hasTotalData()) { | |
607 newFacets.add(new SedimentLoadFacet( | |
608 idx, | |
609 (isUnitTA) | |
610 ?SEDIMENT_LOAD_TA_TOTAL | |
611 :SEDIMENT_LOAD_M3A_TOTAL, | |
612 Resources.getMsg( | |
613 meta, | |
614 I18N_FACET_SEDIMENTLOAD_TOTAL, | |
615 I18N_FACET_SEDIMENTLOAD_TOTAL) + | |
616 epochFacetNameInfo(res,unit), | |
617 ComputeType.ADVANCE, | |
618 stateId, | |
619 hash)); | |
620 } | |
621 } | |
622 } | |
623 */ | |
624 } | |
625 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |