annotate artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadDataCalculate.java @ 8173:16be0ceee25b

Only calculated sums of fractions should be initially shown in diagram.
author Tom Gottfried <tom@intevation.de>
date Mon, 01 Sep 2014 17:50:22 +0200
parents bb770daccd1d
children 4b2b7593815c
rev   line source
8085
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
2 * Software engineering by Intevation GmbH
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
3 *
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
4 * This file is Free Software under the GNU AGPL (>=v3)
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
6 * documentation coming with Dive4Elements River for details.
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
7 */
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
8
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
9 package org.dive4elements.river.artifacts.states.minfo;
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
10
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
11 import java.util.List;
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
12
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
13 import org.apache.log4j.Logger;
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
14 import org.dive4elements.artifactdatabase.state.Facet;
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
15 import org.dive4elements.artifactdatabase.state.FacetActivity;
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
16 import org.dive4elements.artifacts.Artifact;
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
17 import org.dive4elements.artifacts.CallContext;
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
18 import org.dive4elements.river.artifacts.D4EArtifact;
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
19 import org.dive4elements.river.artifacts.access.SedimentLoadAccess;
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
20 import org.dive4elements.river.artifacts.model.CalculationResult;
8126
353f93d5d9f7 Correctly output problems in SedimentLoadDataCalculate
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8125
diff changeset
21 import org.dive4elements.river.artifacts.model.Calculation;
8085
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
22 import org.dive4elements.river.artifacts.model.DataFacet;
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
23 import org.dive4elements.river.artifacts.model.FacetTypes;
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
24 import org.dive4elements.river.artifacts.model.ReportFacet;
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
25 import org.dive4elements.river.artifacts.model.minfo.SedimentLoadDataCalculation;
8125
f01c65261963 (issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8085
diff changeset
26 import org.dive4elements.river.artifacts.model.minfo.SedimentLoadDataResult;
f01c65261963 (issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8085
diff changeset
27 import org.dive4elements.river.artifacts.model.minfo.SedimentLoadDataResult.Fraction;
f01c65261963 (issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8085
diff changeset
28 import org.dive4elements.river.artifacts.model.minfo.SedimentLoadDataFacet;
8085
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
29 import org.dive4elements.river.artifacts.states.DefaultState;
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
30
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
31 /** State in which Sediment Load(s) are calculated/retrieved. */
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
32 public class SedimentLoadDataCalculate
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
33 extends DefaultState
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
34 implements FacetTypes
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
35 {
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
36
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
37 private static final long serialVersionUID = 1L;
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
38
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
39 private static final Logger logger = Logger
8125
f01c65261963 (issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8085
diff changeset
40 .getLogger(SedimentLoadDataCalculate.class);
8085
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
41
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
42 public static final String I18N_FACET_SEDIMENTLOAD_COARSE = "facet.sedimentload.coarse";
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
43 public static final String I18N_FACET_SEDIMENTLOAD_SAND = "facet.sedimentload.sand";
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
44 public static final String I18N_FACET_SEDIMENTLOAD_FINE_MIDDLE = "facet.sedimentload.fine_middle";
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
45 public static final String I18N_FACET_SEDIMENTLOAD_SUSPSAND = "facet.sedimentload.susp_sand";
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
46 public static final String I18N_FACET_SEDIMENTLOAD_SUSPSANDBED = "facet.sediemntload.susp_sand_bed";
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
47 public static final String I18N_FACET_SEDIMENTLOAD_SUSPSEDIMENT = "facet.sedimentload.susp_sediment";
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
48 public static final String I18N_FACET_SEDIMENTLOAD_TOTAL_LOAD = "facet.sedimentload.total_load";
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
49 public static final String I18N_FACET_SEDIMENTLOAD_TOTAL = "facet.sedimentload.total";
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
50
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
51 static {
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
52 // Active/deactivate facets.
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
53 FacetActivity.Registry.getInstance().register(
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
54 "minfo",
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
55 new FacetActivity() {
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
56 @Override
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
57 public Boolean isInitialActive(
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
58 Artifact artifact,
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
59 Facet facet,
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
60 String output
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
61 ) {
8173
16be0ceee25b Only calculated sums of fractions should be initially shown in diagram.
Tom Gottfried <tom@intevation.de>
parents: 8171
diff changeset
62 String name = facet.getName();
16be0ceee25b Only calculated sums of fractions should be initially shown in diagram.
Tom Gottfried <tom@intevation.de>
parents: 8171
diff changeset
63 if (name.endsWith("total") || name.endsWith("bed_load")
16be0ceee25b Only calculated sums of fractions should be initially shown in diagram.
Tom Gottfried <tom@intevation.de>
parents: 8171
diff changeset
64 || name.endsWith("bed_load_susp_sand")) {
16be0ceee25b Only calculated sums of fractions should be initially shown in diagram.
Tom Gottfried <tom@intevation.de>
parents: 8171
diff changeset
65 return Boolean.TRUE;
16be0ceee25b Only calculated sums of fractions should be initially shown in diagram.
Tom Gottfried <tom@intevation.de>
parents: 8171
diff changeset
66 }
16be0ceee25b Only calculated sums of fractions should be initially shown in diagram.
Tom Gottfried <tom@intevation.de>
parents: 8171
diff changeset
67 return Boolean.FALSE;
8085
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
68 }
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
69 });
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
70 }
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
71
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
72 public SedimentLoadDataCalculate() {
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
73 }
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
74
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
75 @Override
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
76 public Object computeAdvance(D4EArtifact artifact, String hash,
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
77 CallContext context, List<Facet> facets, Object old) {
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
78 logger.debug("SedimentLoadDataCalculate.computeAdvance");
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
79
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
80 SedimentLoadAccess access = new SedimentLoadAccess(artifact);
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
81
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
82 CalculationResult res = old instanceof CalculationResult
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
83 ? (CalculationResult) old
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
84 : new SedimentLoadDataCalculation().calculate(access);
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
85
8125
f01c65261963 (issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8085
diff changeset
86
f01c65261963 (issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8085
diff changeset
87 if (res == null) {
f01c65261963 (issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8085
diff changeset
88 logger.error ("No calculation result.");
f01c65261963 (issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8085
diff changeset
89 }
f01c65261963 (issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8085
diff changeset
90
8133
45b1d71110c3 Correctly handle not creating facets and error reports.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8126
diff changeset
91 if (facets == null) {
45b1d71110c3 Correctly handle not creating facets and error reports.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8126
diff changeset
92 /* No need to create facets as they already exist in this case. */
45b1d71110c3 Correctly handle not creating facets and error reports.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8126
diff changeset
93 return res;
45b1d71110c3 Correctly handle not creating facets and error reports.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8126
diff changeset
94 }
45b1d71110c3 Correctly handle not creating facets and error reports.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8126
diff changeset
95
45b1d71110c3 Correctly handle not creating facets and error reports.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8126
diff changeset
96 Calculation report = res.getReport();
45b1d71110c3 Correctly handle not creating facets and error reports.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8126
diff changeset
97
45b1d71110c3 Correctly handle not creating facets and error reports.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8126
diff changeset
98 if (report != null && report.hasProblems()) {
45b1d71110c3 Correctly handle not creating facets and error reports.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8126
diff changeset
99 facets.add(new ReportFacet(ComputeType.ADVANCE, hash, id));
45b1d71110c3 Correctly handle not creating facets and error reports.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8126
diff changeset
100 logger.warn ("Problems : " + report.problemsToString());
45b1d71110c3 Correctly handle not creating facets and error reports.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8126
diff changeset
101 }
45b1d71110c3 Correctly handle not creating facets and error reports.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8126
diff changeset
102
8125
f01c65261963 (issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8085
diff changeset
103 Object raw = res.getData();
f01c65261963 (issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8085
diff changeset
104 if (raw == null) {
f01c65261963 (issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8085
diff changeset
105 logger.warn("No result data.");
8085
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
106 return res;
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
107 }
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
108
8126
353f93d5d9f7 Correctly output problems in SedimentLoadDataCalculate
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8125
diff changeset
109 SedimentLoadDataResult sdRes;
8125
f01c65261963 (issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8085
diff changeset
110 if (raw instanceof SedimentLoadDataResult) {
f01c65261963 (issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8085
diff changeset
111 sdRes = (SedimentLoadDataResult) raw;
f01c65261963 (issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8085
diff changeset
112 } else {
f01c65261963 (issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8085
diff changeset
113 logger.error ("Unknown result");
f01c65261963 (issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8085
diff changeset
114 return null;
f01c65261963 (issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8085
diff changeset
115 }
8133
45b1d71110c3 Correctly handle not creating facets and error reports.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8126
diff changeset
116 String unit = access.getUnit().replace("_per_","/");
8125
f01c65261963 (issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8085
diff changeset
117
f01c65261963 (issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8085
diff changeset
118 int i = 0;
f01c65261963 (issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8085
diff changeset
119 for (Fraction fract: sdRes.getFractions()) {
8146
ce35bdf3d750 Let the facet know the period of it's data.
Tom Gottfried <tom@intevation.de>
parents: 8137
diff changeset
120 logger.debug("Adding facet for fraction '" + fract.getName() +
ce35bdf3d750 Let the facet know the period of it's data.
Tom Gottfried <tom@intevation.de>
parents: 8137
diff changeset
121 "' and period '" + fract.getPeriod() + "'");
8133
45b1d71110c3 Correctly handle not creating facets and error reports.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8126
diff changeset
122 facets.add(new SedimentLoadDataFacet(i++, fract.getName(),
8146
ce35bdf3d750 Let the facet know the period of it's data.
Tom Gottfried <tom@intevation.de>
parents: 8137
diff changeset
123 unit, fract.getPeriod(),
ce35bdf3d750 Let the facet know the period of it's data.
Tom Gottfried <tom@intevation.de>
parents: 8137
diff changeset
124 ComputeType.ADVANCE, id, hash, context));
8125
f01c65261963 (issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8085
diff changeset
125 }
f01c65261963 (issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8085
diff changeset
126
8133
45b1d71110c3 Correctly handle not creating facets and error reports.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8126
diff changeset
127 facets.add(
8125
f01c65261963 (issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8085
diff changeset
128 new DataFacet(CSV, "CSV data", ComputeType.ADVANCE, hash, id));
f01c65261963 (issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8085
diff changeset
129
8085
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
130 return res;
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
131 }
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
132
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
133 }
75e62ea0e307 Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff changeset
134 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org