Mercurial > dive4elements > river
annotate artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/FixRealizingCompute.java @ 9479:2b83d3a96703
i18n TODO "benutzerdefiniert" = "custom" fixed
author | gernotbelger |
---|---|
date | Mon, 10 Sep 2018 15:31:55 +0200 |
parents | 7d7aa54afe0c |
children |
rev | line source |
---|---|
5863
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5849
diff
changeset
|
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde |
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5849
diff
changeset
|
2 * Software engineering by Intevation GmbH |
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5849
diff
changeset
|
3 * |
5994
af13ceeba52a
Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5867
diff
changeset
|
4 * This file is Free Software under the GNU AGPL (>=v3) |
5863
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5849
diff
changeset
|
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the |
5994
af13ceeba52a
Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5867
diff
changeset
|
6 * documentation coming with Dive4Elements River for details. |
5863
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5849
diff
changeset
|
7 */ |
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5849
diff
changeset
|
8 |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5730
diff
changeset
|
9 package org.dive4elements.river.artifacts.states.fixation; |
3413
4c4d88c0af6a
FixA: Renamed FixationVolmerCompute to FixRealizingCompute.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
10 |
7525
6650485c2c9b
Part fix for flys/issue1585: Use result from fitting to display interpolated W/Q points, too. TODO: Draw interpolated as circles.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6511
diff
changeset
|
11 import java.text.DateFormat; |
6650485c2c9b
Part fix for flys/issue1585: Use result from fitting to display interpolated W/Q points, too. TODO: Draw interpolated as circles.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6511
diff
changeset
|
12 import java.util.Collection; |
3466
8160e62bbb3a
Registered new output 'fix_vollmer_wq_curve' for the vollmer path of fixings analysis module; create required Facets for it after calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3462
diff
changeset
|
13 import java.util.List; |
8160e62bbb3a
Registered new output 'fix_vollmer_wq_curve' for the vollmer path of fixings analysis module; create required Facets for it after calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3462
diff
changeset
|
14 |
9415
9744ce3c3853
Rework of fixanalysis computation and dWt and WQ facets. Got rid of strange remapping and bitshifting code by explicitely saving the column information and using it in the facets.
gernotbelger
parents:
9360
diff
changeset
|
15 import org.apache.commons.lang.math.DoubleRange; |
3466
8160e62bbb3a
Registered new output 'fix_vollmer_wq_curve' for the vollmer path of fixings analysis module; create required Facets for it after calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3462
diff
changeset
|
16 import org.apache.log4j.Logger; |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5730
diff
changeset
|
17 import org.dive4elements.artifactdatabase.state.Facet; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5730
diff
changeset
|
18 import org.dive4elements.artifacts.CallContext; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5730
diff
changeset
|
19 import org.dive4elements.artifacts.CallMeta; |
5867
59ff03ff48f1
River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5863
diff
changeset
|
20 import org.dive4elements.river.artifacts.D4EArtifact; |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5730
diff
changeset
|
21 import org.dive4elements.river.artifacts.access.FixRealizingAccess; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5730
diff
changeset
|
22 import org.dive4elements.river.artifacts.model.CalculationResult; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5730
diff
changeset
|
23 import org.dive4elements.river.artifacts.model.CrossSectionWaterLineFacet; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5730
diff
changeset
|
24 import org.dive4elements.river.artifacts.model.DataFacet; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5730
diff
changeset
|
25 import org.dive4elements.river.artifacts.model.FacetTypes; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5730
diff
changeset
|
26 import org.dive4elements.river.artifacts.model.ReportFacet; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5730
diff
changeset
|
27 import org.dive4elements.river.artifacts.model.WQCKms; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5730
diff
changeset
|
28 import org.dive4elements.river.artifacts.model.WQKms; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5730
diff
changeset
|
29 import org.dive4elements.river.artifacts.model.fixings.FixRealizingCalculation; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5730
diff
changeset
|
30 import org.dive4elements.river.artifacts.model.fixings.FixRealizingResult; |
7525
6650485c2c9b
Part fix for flys/issue1585: Use result from fitting to display interpolated W/Q points, too. TODO: Draw interpolated as circles.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6511
diff
changeset
|
31 import org.dive4elements.river.artifacts.model.fixings.FixReferenceEventsFacet; |
9415
9744ce3c3853
Rework of fixanalysis computation and dWt and WQ facets. Got rid of strange remapping and bitshifting code by explicitely saving the column information and using it in the facets.
gernotbelger
parents:
9360
diff
changeset
|
32 import org.dive4elements.river.artifacts.model.fixings.FixResultColumn; |
9744ce3c3853
Rework of fixanalysis computation and dWt and WQ facets. Got rid of strange remapping and bitshifting code by explicitely saving the column information and using it in the facets.
gernotbelger
parents:
9360
diff
changeset
|
33 import org.dive4elements.river.artifacts.model.fixings.FixResultColumns; |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5730
diff
changeset
|
34 import org.dive4elements.river.artifacts.model.fixings.FixWQCurveFacet; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5730
diff
changeset
|
35 import org.dive4elements.river.artifacts.model.fixings.FixWaterlevelFacet; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5730
diff
changeset
|
36 import org.dive4elements.river.artifacts.resources.Resources; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5730
diff
changeset
|
37 import org.dive4elements.river.artifacts.states.DefaultState; |
7525
6650485c2c9b
Part fix for flys/issue1585: Use result from fitting to display interpolated W/Q points, too. TODO: Draw interpolated as circles.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6511
diff
changeset
|
38 import org.dive4elements.river.utils.Formatter; |
3460
d625f4d06b6a
Create proper facets for Ws and Qs in FixRealizingCompute state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3459
diff
changeset
|
39 |
3413
4c4d88c0af6a
FixA: Renamed FixationVolmerCompute to FixRealizingCompute.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
40 /** |
5646
14009b194871
Doc, Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5055
diff
changeset
|
41 * State to compute the fixation realizing (vollmer) results. |
14009b194871
Doc, Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5055
diff
changeset
|
42 * |
3413
4c4d88c0af6a
FixA: Renamed FixationVolmerCompute to FixRealizingCompute.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
43 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a> |
4c4d88c0af6a
FixA: Renamed FixationVolmerCompute to FixRealizingCompute.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
44 */ |
3457
35ead8fadc36
Add waterlevel facet and longitudinal_section out for fixationrealization.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3414
diff
changeset
|
45 public class FixRealizingCompute extends DefaultState implements FacetTypes { |
3413
4c4d88c0af6a
FixA: Renamed FixationVolmerCompute to FixRealizingCompute.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
46 |
9415
9744ce3c3853
Rework of fixanalysis computation and dWt and WQ facets. Got rid of strange remapping and bitshifting code by explicitely saving the column information and using it in the facets.
gernotbelger
parents:
9360
diff
changeset
|
47 private static final long serialVersionUID = 1L; |
9744ce3c3853
Rework of fixanalysis computation and dWt and WQ facets. Got rid of strange remapping and bitshifting code by explicitely saving the column information and using it in the facets.
gernotbelger
parents:
9360
diff
changeset
|
48 |
8202
e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents:
7525
diff
changeset
|
49 /** The log used in this class. */ |
e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents:
7525
diff
changeset
|
50 private static Logger log = Logger.getLogger(FixRealizingCompute.class); |
3413
4c4d88c0af6a
FixA: Renamed FixationVolmerCompute to FixRealizingCompute.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
51 |
3466
8160e62bbb3a
Registered new output 'fix_vollmer_wq_curve' for the vollmer path of fixings analysis module; create required Facets for it after calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3462
diff
changeset
|
52 public static final String I18N_WQ_CURVE = "fix.vollmer.wq.curve"; |
8160e62bbb3a
Registered new output 'fix_vollmer_wq_curve' for the vollmer path of fixings analysis module; create required Facets for it after calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3462
diff
changeset
|
53 |
3413
4c4d88c0af6a
FixA: Renamed FixationVolmerCompute to FixRealizingCompute.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
54 /** |
4c4d88c0af6a
FixA: Renamed FixationVolmerCompute to FixRealizingCompute.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
55 * The default constructor that initializes an empty State object. |
4c4d88c0af6a
FixA: Renamed FixationVolmerCompute to FixRealizingCompute.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
56 */ |
4c4d88c0af6a
FixA: Renamed FixationVolmerCompute to FixRealizingCompute.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
57 public FixRealizingCompute() { |
4c4d88c0af6a
FixA: Renamed FixationVolmerCompute to FixRealizingCompute.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
58 } |
3414
1bb6fb621167
FixA: Added stub for the "Ausgelagerte Wasserspiegellagen" calculation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3413
diff
changeset
|
59 |
1bb6fb621167
FixA: Added stub for the "Ausgelagerte Wasserspiegellagen" calculation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3413
diff
changeset
|
60 @Override |
9082 | 61 public Object computeAdvance(final D4EArtifact artifact, final String hash, final CallContext context, final List<Facet> facets, final Object old) { |
8202
e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents:
7525
diff
changeset
|
62 log.debug("FixRealizingCompute.computeAdvance"); |
3414
1bb6fb621167
FixA: Added stub for the "Ausgelagerte Wasserspiegellagen" calculation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3413
diff
changeset
|
63 |
1bb6fb621167
FixA: Added stub for the "Ausgelagerte Wasserspiegellagen" calculation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3413
diff
changeset
|
64 CalculationResult res; |
1bb6fb621167
FixA: Added stub for the "Ausgelagerte Wasserspiegellagen" calculation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3413
diff
changeset
|
65 |
9082 | 66 final FixRealizingAccess access = new FixRealizingAccess(artifact); |
3414
1bb6fb621167
FixA: Added stub for the "Ausgelagerte Wasserspiegellagen" calculation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3413
diff
changeset
|
67 |
1bb6fb621167
FixA: Added stub for the "Ausgelagerte Wasserspiegellagen" calculation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3413
diff
changeset
|
68 if (old instanceof CalculationResult) { |
5646
14009b194871
Doc, Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5055
diff
changeset
|
69 res = (CalculationResult) old; |
9082 | 70 } else { |
71 final FixRealizingCalculation calc = new FixRealizingCalculation(access); | |
9479
2b83d3a96703
i18n TODO "benutzerdefiniert" = "custom" fixed
gernotbelger
parents:
9467
diff
changeset
|
72 res = calc.calculate(context.getMeta()); |
3414
1bb6fb621167
FixA: Added stub for the "Ausgelagerte Wasserspiegellagen" calculation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3413
diff
changeset
|
73 } |
1bb6fb621167
FixA: Added stub for the "Ausgelagerte Wasserspiegellagen" calculation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3413
diff
changeset
|
74 |
1bb6fb621167
FixA: Added stub for the "Ausgelagerte Wasserspiegellagen" calculation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3413
diff
changeset
|
75 if (facets == null) { |
1bb6fb621167
FixA: Added stub for the "Ausgelagerte Wasserspiegellagen" calculation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3413
diff
changeset
|
76 return res; |
1bb6fb621167
FixA: Added stub for the "Ausgelagerte Wasserspiegellagen" calculation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3413
diff
changeset
|
77 } |
1bb6fb621167
FixA: Added stub for the "Ausgelagerte Wasserspiegellagen" calculation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3413
diff
changeset
|
78 |
3461
1481322efc02
FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3460
diff
changeset
|
79 if (res.getReport().hasProblems()) { |
1481322efc02
FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3460
diff
changeset
|
80 facets.add(new ReportFacet()); |
1481322efc02
FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3460
diff
changeset
|
81 } |
1481322efc02
FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3460
diff
changeset
|
82 |
9425
3f49835a00c3
Extended CrossSectionFacet so it may fetch different data from within the artifact result.
gernotbelger
parents:
9415
diff
changeset
|
83 final String stateId = getID(); |
9082 | 84 final CallMeta meta = context.getMeta(); |
3775
d52c4ca93ffb
More infrastructure stuff for the "Auslagerung extremer Wasserspiegellagen".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3466
diff
changeset
|
85 |
9082 | 86 final FixRealizingResult fixRes = (FixRealizingResult) res.getData(); |
87 final WQKms[] wqkms = fixRes != null ? fixRes.getWQKms() : new WQKms[0]; | |
3460
d625f4d06b6a
Create proper facets for Ws and Qs in FixRealizingCompute state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3459
diff
changeset
|
88 |
d625f4d06b6a
Create proper facets for Ws and Qs in FixRealizingCompute state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3459
diff
changeset
|
89 for (int i = 0; i < wqkms.length; i++) { |
d625f4d06b6a
Create proper facets for Ws and Qs in FixRealizingCompute state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3459
diff
changeset
|
90 String nameW = null; |
d625f4d06b6a
Create proper facets for Ws and Qs in FixRealizingCompute state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3459
diff
changeset
|
91 String nameQ = null; |
d625f4d06b6a
Create proper facets for Ws and Qs in FixRealizingCompute state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3459
diff
changeset
|
92 |
d625f4d06b6a
Create proper facets for Ws and Qs in FixRealizingCompute state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3459
diff
changeset
|
93 if (access.isQ()) { |
d625f4d06b6a
Create proper facets for Ws and Qs in FixRealizingCompute state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3459
diff
changeset
|
94 nameQ = wqkms[i].getName(); |
d625f4d06b6a
Create proper facets for Ws and Qs in FixRealizingCompute state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3459
diff
changeset
|
95 nameW = "W(" + nameQ + ")"; |
9082 | 96 } else { |
3460
d625f4d06b6a
Create proper facets for Ws and Qs in FixRealizingCompute state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3459
diff
changeset
|
97 nameW = wqkms[i].getName(); |
d625f4d06b6a
Create proper facets for Ws and Qs in FixRealizingCompute state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3459
diff
changeset
|
98 nameQ = "Q(" + nameW + ")"; |
d625f4d06b6a
Create proper facets for Ws and Qs in FixRealizingCompute state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3459
diff
changeset
|
99 } |
d625f4d06b6a
Create proper facets for Ws and Qs in FixRealizingCompute state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3459
diff
changeset
|
100 |
9425
3f49835a00c3
Extended CrossSectionFacet so it may fetch different data from within the artifact result.
gernotbelger
parents:
9415
diff
changeset
|
101 facets.add(new FixWaterlevelFacet(i, FIX_WQ_LS, nameW, ComputeType.ADVANCE, hash, stateId)); |
3f49835a00c3
Extended CrossSectionFacet so it may fetch different data from within the artifact result.
gernotbelger
parents:
9415
diff
changeset
|
102 facets.add(new FixWaterlevelFacet(i, LONGITUDINAL_W, nameW, ComputeType.ADVANCE, hash, stateId)); |
3f49835a00c3
Extended CrossSectionFacet so it may fetch different data from within the artifact result.
gernotbelger
parents:
9415
diff
changeset
|
103 facets.add(new FixWaterlevelFacet(i, LONGITUDINAL_Q, nameQ, ComputeType.ADVANCE, hash, stateId)); |
3f49835a00c3
Extended CrossSectionFacet so it may fetch different data from within the artifact result.
gernotbelger
parents:
9415
diff
changeset
|
104 facets.add(new CrossSectionWaterLineFacet(i, nameW, ComputeType.ADVANCE, hash, stateId, Integer.valueOf(i))); |
3460
d625f4d06b6a
Create proper facets for Ws and Qs in FixRealizingCompute state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3459
diff
changeset
|
105 |
7525
6650485c2c9b
Part fix for flys/issue1585: Use result from fitting to display interpolated W/Q points, too. TODO: Draw interpolated as circles.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6511
diff
changeset
|
106 // XXX: THIS CAN NOT HAPPEN! REMOVE IT! |
3460
d625f4d06b6a
Create proper facets for Ws and Qs in FixRealizingCompute state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3459
diff
changeset
|
107 if (wqkms[i] instanceof WQCKms) { |
9082 | 108 final String nameC = nameW.replace("benutzerdefiniert", "benutzerdefiniert [korrigiert]"); |
9360
ddcd52d239cd
Outliers in fixation calculation are now shown within the other 'B' event themes and get a separate symbol (triangle).
gernotbelger
parents:
9342
diff
changeset
|
109 facets.add(new FixWaterlevelFacet(i, DISCHARGE_LONGITUDINAL_C, nameC)); |
3460
d625f4d06b6a
Create proper facets for Ws and Qs in FixRealizingCompute state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3459
diff
changeset
|
110 } |
3414
1bb6fb621167
FixA: Added stub for the "Ausgelagerte Wasserspiegellagen" calculation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3413
diff
changeset
|
111 } |
1bb6fb621167
FixA: Added stub for the "Ausgelagerte Wasserspiegellagen" calculation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3413
diff
changeset
|
112 |
9415
9744ce3c3853
Rework of fixanalysis computation and dWt and WQ facets. Got rid of strange remapping and bitshifting code by explicitely saving the column information and using it in the facets.
gernotbelger
parents:
9360
diff
changeset
|
113 int facetIndex = 0; |
7525
6650485c2c9b
Part fix for flys/issue1585: Use result from fitting to display interpolated W/Q points, too. TODO: Draw interpolated as circles.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6511
diff
changeset
|
114 |
9415
9744ce3c3853
Rework of fixanalysis computation and dWt and WQ facets. Got rid of strange remapping and bitshifting code by explicitely saving the column information and using it in the facets.
gernotbelger
parents:
9360
diff
changeset
|
115 if (fixRes != null && wqkms.length > 0) { |
5730
4ce126aa130c
FixRealizingCompute: Add one FixEventFacet per selected Event.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5702
diff
changeset
|
116 |
9415
9744ce3c3853
Rework of fixanalysis computation and dWt and WQ facets. Got rid of strange remapping and bitshifting code by explicitely saving the column information and using it in the facets.
gernotbelger
parents:
9360
diff
changeset
|
117 final DateFormat df = Formatter.getDateFormatter(context.getMeta(), "dd.MM.yyyy"); |
9744ce3c3853
Rework of fixanalysis computation and dWt and WQ facets. Got rid of strange remapping and bitshifting code by explicitely saving the column information and using it in the facets.
gernotbelger
parents:
9360
diff
changeset
|
118 final UniqueDateFormatter cf = new UniqueDateFormatter(df); |
9744ce3c3853
Rework of fixanalysis computation and dWt and WQ facets. Got rid of strange remapping and bitshifting code by explicitely saving the column information and using it in the facets.
gernotbelger
parents:
9360
diff
changeset
|
119 |
9744ce3c3853
Rework of fixanalysis computation and dWt and WQ facets. Got rid of strange remapping and bitshifting code by explicitely saving the column information and using it in the facets.
gernotbelger
parents:
9360
diff
changeset
|
120 final FixResultColumns columns = fixRes.getFixResultColumns(); |
9744ce3c3853
Rework of fixanalysis computation and dWt and WQ facets. Got rid of strange remapping and bitshifting code by explicitely saving the column information and using it in the facets.
gernotbelger
parents:
9360
diff
changeset
|
121 final Collection<FixResultColumn> fixEvents = columns.getSortedColumns(); |
9744ce3c3853
Rework of fixanalysis computation and dWt and WQ facets. Got rid of strange remapping and bitshifting code by explicitely saving the column information and using it in the facets.
gernotbelger
parents:
9360
diff
changeset
|
122 for (final FixResultColumn event : fixEvents) { |
9744ce3c3853
Rework of fixanalysis computation and dWt and WQ facets. Got rid of strange remapping and bitshifting code by explicitely saving the column information and using it in the facets.
gernotbelger
parents:
9360
diff
changeset
|
123 |
9744ce3c3853
Rework of fixanalysis computation and dWt and WQ facets. Got rid of strange remapping and bitshifting code by explicitely saving the column information and using it in the facets.
gernotbelger
parents:
9360
diff
changeset
|
124 final String facetDescription = cf.format(event.getDate()); |
9744ce3c3853
Rework of fixanalysis computation and dWt and WQ facets. Got rid of strange remapping and bitshifting code by explicitely saving the column information and using it in the facets.
gernotbelger
parents:
9360
diff
changeset
|
125 final DoubleRange stationRange = event.getStationRange(); |
9744ce3c3853
Rework of fixanalysis computation and dWt and WQ facets. Got rid of strange remapping and bitshifting code by explicitely saving the column information and using it in the facets.
gernotbelger
parents:
9360
diff
changeset
|
126 |
9744ce3c3853
Rework of fixanalysis computation and dWt and WQ facets. Got rid of strange remapping and bitshifting code by explicitely saving the column information and using it in the facets.
gernotbelger
parents:
9360
diff
changeset
|
127 facets.add(new FixReferenceEventsFacet(facetIndex++, event.getColumnId(), FIX_EVENTS, facetDescription, stationRange)); |
8703
e4f9e2316e92
Avoid NPE: fixRes is null if wqkms.lenght==0.
Tom Gottfried <tom@intevation.de>
parents:
8202
diff
changeset
|
128 } |
e4f9e2316e92
Avoid NPE: fixRes is null if wqkms.lenght==0.
Tom Gottfried <tom@intevation.de>
parents:
8202
diff
changeset
|
129 |
9467 | 130 facets.add(new DataFacet(FIX_PARAMETERS, "parameters", ComputeType.ADVANCE, hash, this.id)); |
9425
3f49835a00c3
Extended CrossSectionFacet so it may fetch different data from within the artifact result.
gernotbelger
parents:
9415
diff
changeset
|
131 facets.add(new DataFacet(CSV, "CSV data", ComputeType.ADVANCE, hash, stateId)); |
3f49835a00c3
Extended CrossSectionFacet so it may fetch different data from within the artifact result.
gernotbelger
parents:
9415
diff
changeset
|
132 facets.add(new DataFacet(WST, "WST data", ComputeType.ADVANCE, hash, stateId)); |
3f49835a00c3
Extended CrossSectionFacet so it may fetch different data from within the artifact result.
gernotbelger
parents:
9415
diff
changeset
|
133 facets.add(new DataFacet(PDF, "PDF data", ComputeType.ADVANCE, hash, stateId)); |
3460
d625f4d06b6a
Create proper facets for Ws and Qs in FixRealizingCompute state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3459
diff
changeset
|
134 } |
3459
7485338aedff
Also add Q-facets for fixrealization.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3457
diff
changeset
|
135 |
9425
3f49835a00c3
Extended CrossSectionFacet so it may fetch different data from within the artifact result.
gernotbelger
parents:
9415
diff
changeset
|
136 facets.add(new DataFacet(AT, "AT data", ComputeType.ADVANCE, hash, stateId)); |
5055
3b974a24a8e1
Fixed AT-Export in 'ausgel. WSPL'.
Raimund Renkert <rrenkert@intevation.de>
parents:
4866
diff
changeset
|
137 |
9342
0c621beceb2f
2.3.4.2.5 Beseitigung des Fehlers beim Laden eines Projektes
gernotbelger
parents:
9082
diff
changeset
|
138 if (fixRes != null) |
0c621beceb2f
2.3.4.2.5 Beseitigung des Fehlers beim Laden eines Projektes
gernotbelger
parents:
9082
diff
changeset
|
139 facets.add(new FixWQCurveFacet(0, Resources.getMsg(meta, I18N_WQ_CURVE, I18N_WQ_CURVE) + " (" + access.getFunction() + ")")); |
3466
8160e62bbb3a
Registered new output 'fix_vollmer_wq_curve' for the vollmer path of fixings analysis module; create required Facets for it after calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3462
diff
changeset
|
140 |
3414
1bb6fb621167
FixA: Added stub for the "Ausgelagerte Wasserspiegellagen" calculation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3413
diff
changeset
|
141 return res; |
1bb6fb621167
FixA: Added stub for the "Ausgelagerte Wasserspiegellagen" calculation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3413
diff
changeset
|
142 } |
9342
0c621beceb2f
2.3.4.2.5 Beseitigung des Fehlers beim Laden eines Projektes
gernotbelger
parents:
9082
diff
changeset
|
143 } |