Mercurial > dive4elements > river
annotate artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadDataCalculate.java @ 8856:5e38e2924c07 3.2.x
Fix code style.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Thu, 18 Jan 2018 20:12:01 +0100 |
parents | e4606eae8ea5 |
children | 0a5239a1e46e |
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 |
8202
e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents:
8174
diff
changeset
|
39 private static final Logger log = 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 |
8856 | 42 public static final String I18N_FACET_SEDIMENTLOAD_COARSE = |
43 "facet.sedimentload.coarse"; | |
44 public static final String I18N_FACET_SEDIMENTLOAD_SAND = | |
45 "facet.sedimentload.sand"; | |
46 public static final String I18N_FACET_SEDIMENTLOAD_FINE_MIDDLE = | |
47 "facet.sedimentload.fine_middle"; | |
48 public static final String I18N_FACET_SEDIMENTLOAD_SUSPSAND = | |
49 "facet.sedimentload.susp_sand"; | |
50 public static final String I18N_FACET_SEDIMENTLOAD_SUSPSANDBED = | |
51 "facet.sediemntload.susp_sand_bed"; | |
52 public static final String I18N_FACET_SEDIMENTLOAD_SUSPSEDIMENT = | |
53 "facet.sedimentload.susp_sediment"; | |
54 public static final String I18N_FACET_SEDIMENTLOAD_TOTAL_LOAD = | |
55 "facet.sedimentload.total_load"; | |
56 public static final String I18N_FACET_SEDIMENTLOAD_TOTAL = | |
57 "facet.sedimentload.total"; | |
8085
75e62ea0e307
Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
58 |
75e62ea0e307
Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
59 static { |
75e62ea0e307
Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
60 // Active/deactivate facets. |
75e62ea0e307
Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
61 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
|
62 "minfo", |
75e62ea0e307
Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
63 new FacetActivity() { |
75e62ea0e307
Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
64 @Override |
75e62ea0e307
Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
65 public Boolean isInitialActive( |
75e62ea0e307
Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
66 Artifact artifact, |
75e62ea0e307
Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
67 Facet facet, |
75e62ea0e307
Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
68 String output |
75e62ea0e307
Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
69 ) { |
8173
16be0ceee25b
Only calculated sums of fractions should be initially shown in diagram.
Tom Gottfried <tom@intevation.de>
parents:
8171
diff
changeset
|
70 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
|
71 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
|
72 || 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
|
73 return Boolean.TRUE; |
16be0ceee25b
Only calculated sums of fractions should be initially shown in diagram.
Tom Gottfried <tom@intevation.de>
parents:
8171
diff
changeset
|
74 } |
16be0ceee25b
Only calculated sums of fractions should be initially shown in diagram.
Tom Gottfried <tom@intevation.de>
parents:
8171
diff
changeset
|
75 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
|
76 } |
75e62ea0e307
Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
77 }); |
75e62ea0e307
Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
78 } |
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 public SedimentLoadDataCalculate() { |
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 |
75e62ea0e307
Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
83 @Override |
75e62ea0e307
Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
84 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
|
85 CallContext context, List<Facet> facets, Object old) { |
8202
e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents:
8174
diff
changeset
|
86 log.debug("SedimentLoadDataCalculate.computeAdvance"); |
8085
75e62ea0e307
Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
87 |
75e62ea0e307
Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
88 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
|
89 |
75e62ea0e307
Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
90 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
|
91 ? (CalculationResult) old |
75e62ea0e307
Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
92 : 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
|
93 |
8125
f01c65261963
(issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8085
diff
changeset
|
94 |
f01c65261963
(issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8085
diff
changeset
|
95 if (res == null) { |
8202
e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents:
8174
diff
changeset
|
96 log.error ("No calculation result."); |
8125
f01c65261963
(issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8085
diff
changeset
|
97 } |
f01c65261963
(issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8085
diff
changeset
|
98 |
8133
45b1d71110c3
Correctly handle not creating facets and error reports.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8126
diff
changeset
|
99 if (facets == null) { |
45b1d71110c3
Correctly handle not creating facets and error reports.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8126
diff
changeset
|
100 /* 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
|
101 return res; |
45b1d71110c3
Correctly handle not creating facets and error reports.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8126
diff
changeset
|
102 } |
45b1d71110c3
Correctly handle not creating facets and error reports.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8126
diff
changeset
|
103 |
45b1d71110c3
Correctly handle not creating facets and error reports.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8126
diff
changeset
|
104 Calculation report = res.getReport(); |
45b1d71110c3
Correctly handle not creating facets and error reports.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8126
diff
changeset
|
105 |
45b1d71110c3
Correctly handle not creating facets and error reports.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8126
diff
changeset
|
106 if (report != null && report.hasProblems()) { |
45b1d71110c3
Correctly handle not creating facets and error reports.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8126
diff
changeset
|
107 facets.add(new ReportFacet(ComputeType.ADVANCE, hash, id)); |
8202
e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents:
8174
diff
changeset
|
108 log.warn ("Problems : " + report.problemsToString()); |
8133
45b1d71110c3
Correctly handle not creating facets and error reports.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8126
diff
changeset
|
109 } |
45b1d71110c3
Correctly handle not creating facets and error reports.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8126
diff
changeset
|
110 |
8125
f01c65261963
(issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8085
diff
changeset
|
111 Object raw = res.getData(); |
f01c65261963
(issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8085
diff
changeset
|
112 if (raw == null) { |
8202
e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents:
8174
diff
changeset
|
113 log.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
|
114 return res; |
75e62ea0e307
Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
115 } |
75e62ea0e307
Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
116 |
8126
353f93d5d9f7
Correctly output problems in SedimentLoadDataCalculate
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8125
diff
changeset
|
117 SedimentLoadDataResult sdRes; |
8125
f01c65261963
(issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8085
diff
changeset
|
118 if (raw instanceof SedimentLoadDataResult) { |
f01c65261963
(issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8085
diff
changeset
|
119 sdRes = (SedimentLoadDataResult) raw; |
f01c65261963
(issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8085
diff
changeset
|
120 } else { |
8202
e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents:
8174
diff
changeset
|
121 log.error ("Unknown result"); |
8125
f01c65261963
(issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8085
diff
changeset
|
122 return null; |
f01c65261963
(issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8085
diff
changeset
|
123 } |
8133
45b1d71110c3
Correctly handle not creating facets and error reports.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8126
diff
changeset
|
124 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
|
125 |
f01c65261963
(issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8085
diff
changeset
|
126 int i = 0; |
f01c65261963
(issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8085
diff
changeset
|
127 for (Fraction fract: sdRes.getFractions()) { |
8202
e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents:
8174
diff
changeset
|
128 log.debug("Adding facet for fraction '" + fract.getName() + |
8146
ce35bdf3d750
Let the facet know the period of it's data.
Tom Gottfried <tom@intevation.de>
parents:
8137
diff
changeset
|
129 "' and period '" + fract.getPeriod() + "'"); |
8174
4b2b7593815c
Make sedimentload loadable as old calculation.
Tom Gottfried <tom@intevation.de>
parents:
8173
diff
changeset
|
130 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
|
131 unit, fract.getPeriod(), |
ce35bdf3d750
Let the facet know the period of it's data.
Tom Gottfried <tom@intevation.de>
parents:
8137
diff
changeset
|
132 ComputeType.ADVANCE, id, hash, context)); |
8174
4b2b7593815c
Make sedimentload loadable as old calculation.
Tom Gottfried <tom@intevation.de>
parents:
8173
diff
changeset
|
133 i++; |
8125
f01c65261963
(issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8085
diff
changeset
|
134 } |
f01c65261963
(issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8085
diff
changeset
|
135 |
8133
45b1d71110c3
Correctly handle not creating facets and error reports.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8126
diff
changeset
|
136 facets.add( |
8125
f01c65261963
(issue1448) Add WIP SedimentLoadDataFacet and use it in calculation.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8085
diff
changeset
|
137 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
|
138 |
8085
75e62ea0e307
Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
139 return res; |
75e62ea0e307
Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
140 } |
75e62ea0e307
Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
141 |
75e62ea0e307
Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
142 } |
75e62ea0e307
Added the broken calculation state of the new sediment load calc.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
143 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |