Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/minfo/SedimentLoadCalculate.java @ 4546:af1938d4e957
New field in sediment load object and calculation.
* Factory reads total load value.
* New field in sediment load object.
* State adds new facet to generate output for this type of data.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Thu, 15 Nov 2012 17:44:07 +0100 |
parents | 3e1810e72199 |
children | b195fede1c3b |
comparison
equal
deleted
inserted
replaced
4545:bb8b1c182913 | 4546:af1938d4e957 |
---|---|
35 public static final String I18N_FACET_SEDIMENTLOAD_SAND = "facet.sedimentload.sand"; | 35 public static final String I18N_FACET_SEDIMENTLOAD_SAND = "facet.sedimentload.sand"; |
36 public static final String I18N_FACET_SEDIMENTLOAD_FINE_MIDDLE = "facet.sedimentload.fine_middle"; | 36 public static final String I18N_FACET_SEDIMENTLOAD_FINE_MIDDLE = "facet.sedimentload.fine_middle"; |
37 public static final String I18N_FACET_SEDIMENTLOAD_SUSPSAND = "facet.sedimentload.susp_sand"; | 37 public static final String I18N_FACET_SEDIMENTLOAD_SUSPSAND = "facet.sedimentload.susp_sand"; |
38 public static final String I18N_FACET_SEDIMENTLOAD_SUSPSANDBED = "facet.sediemntload.susp_sand_bed"; | 38 public static final String I18N_FACET_SEDIMENTLOAD_SUSPSANDBED = "facet.sediemntload.susp_sand_bed"; |
39 public static final String I18N_FACET_SEDIMENTLOAD_SUSPSEDIMENT = "facet.sedimentload.susp_sediment"; | 39 public static final String I18N_FACET_SEDIMENTLOAD_SUSPSEDIMENT = "facet.sedimentload.susp_sediment"; |
40 public static final String I18N_FACET_SEDIMENTLOAD_TOTAL_LOAD = "facet.sedimentload.total_load"; | |
40 public static final String I18N_FACET_SEDIMENTLOAD_TOTAL = "facet.sedimentload.total"; | 41 public static final String I18N_FACET_SEDIMENTLOAD_TOTAL = "facet.sedimentload.total"; |
41 | 42 |
42 @Override | 43 @Override |
43 public Object computeAdvance(FLYSArtifact artifact, String hash, | 44 public Object computeAdvance(FLYSArtifact artifact, String hash, |
44 CallContext context, List<Facet> facets, Object old) { | 45 CallContext context, List<Facet> facets, Object old) { |
276 ComputeType.ADVANCE, | 277 ComputeType.ADVANCE, |
277 stateId, | 278 stateId, |
278 hash)); | 279 hash)); |
279 | 280 |
280 } | 281 } |
282 if (res.hasTotalLoadData()) { | |
283 newFacets.add(new SedimentLoadFacet( | |
284 idx, | |
285 SEDIMENT_LOAD_TOTAL_LOAD, | |
286 Resources.getMsg( | |
287 meta, | |
288 I18N_FACET_SEDIMENTLOAD_TOTAL_LOAD, | |
289 I18N_FACET_SEDIMENTLOAD_TOTAL_LOAD) + | |
290 " - " + res.getStartYear() + "-" + res.getEndYear(), | |
291 ComputeType.ADVANCE, | |
292 stateId, | |
293 hash)); | |
294 } | |
281 if (res.hasTotalData()) { | 295 if (res.hasTotalData()) { |
282 newFacets.add(new SedimentLoadFacet( | 296 newFacets.add(new SedimentLoadFacet( |
283 idx, | 297 idx, |
284 SEDIMENT_LOAD_TOTAL, | 298 SEDIMENT_LOAD_TOTAL, |
285 Resources.getMsg( | 299 Resources.getMsg( |
385 ComputeType.ADVANCE, | 399 ComputeType.ADVANCE, |
386 stateId, | 400 stateId, |
387 hash)); | 401 hash)); |
388 | 402 |
389 } | 403 } |
404 if (res.hasTotalLoadData()) { | |
405 newFacets.add(new SedimentLoadFacet( | |
406 idx, | |
407 SEDIMENT_LOAD_TOTAL_LOAD, | |
408 Resources.getMsg( | |
409 meta, | |
410 I18N_FACET_SEDIMENTLOAD_TOTAL_LOAD, | |
411 I18N_FACET_SEDIMENTLOAD_TOTAL_LOAD) + | |
412 " - " + res.getStartYear() + "-" + res.getEndYear(), | |
413 ComputeType.ADVANCE, | |
414 stateId, | |
415 hash)); | |
416 } | |
390 if (res.hasTotalData()) { | 417 if (res.hasTotalData()) { |
391 newFacets.add(new SedimentLoadFacet( | 418 newFacets.add(new SedimentLoadFacet( |
392 idx, | 419 idx, |
393 SEDIMENT_LOAD_TOTAL, | 420 SEDIMENT_LOAD_TOTAL, |
394 Resources.getMsg( | 421 Resources.getMsg( |