Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/GaugeDischargeState.java @ 3003:e5e6363e6cba
FixA: Explicit model for date ranges.
flys-artifacts/trunk@4559 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 30 May 2012 14:45:36 +0000 |
parents | 89731cb8c385 |
children | 49727e9dcfde |
rev | line source |
---|---|
2723
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.artifacts.states; |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
2 |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
3 import java.util.List; |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
4 |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
5 import org.apache.log4j.Logger; |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
6 |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
7 import de.intevation.artifacts.CallMeta; |
2734
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
8 import de.intevation.artifacts.CallContext; |
2723
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
9 |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
10 import de.intevation.artifactdatabase.state.Facet; |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
11 |
2734
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
12 import de.intevation.flys.artifacts.ChartArtifact; |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
13 import de.intevation.flys.artifacts.GaugeDischargeArtifact; |
2723
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
14 import de.intevation.flys.artifacts.FLYSArtifact; |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
15 |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
16 import de.intevation.flys.artifacts.model.GaugeDischargeFacet; |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
17 import de.intevation.flys.artifacts.model.FacetTypes; |
2734
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
18 import de.intevation.flys.artifacts.model.WQKms; |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
19 import de.intevation.flys.artifacts.model.ReportFacet; |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
20 import de.intevation.flys.artifacts.model.EmptyFacet; |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
21 import de.intevation.flys.artifacts.model.CalculationResult; |
2723
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
22 |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
23 import de.intevation.flys.artifacts.resources.Resources; |
2734
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
24 import de.intevation.flys.utils.FLYSUtils; |
2723
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
25 |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
26 |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
27 /** |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
28 * The only state for an GaugeDischargeState (River and km known). |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
29 */ |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
30 public class GaugeDischargeState |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
31 extends DefaultState |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
32 implements FacetTypes |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
33 { |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
34 /** Developer-centric description of facet. */ |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
35 public static final String I18N_DESCRIPTION = "facet.discharge.curve"; |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
36 |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
37 /** The logger that is used in this state. */ |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
38 private static final Logger logger = Logger.getLogger(GaugeDischargeState.class); |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
39 |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
40 |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
41 /** |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
42 * Add an GaugeDischargeFacet to list of Facets. |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
43 * |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
44 * @param artifact Ignored. |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
45 * @param hash Ignored. |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
46 * @param context Ignored. |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
47 * @param meta CallMeta to be used for internationalization. |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
48 * @param facets List to add AnnotationFacet to. |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
49 * |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
50 * @return null. |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
51 */ |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
52 @Override |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
53 public Object computeInit( |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
54 FLYSArtifact artifact, |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
55 String hash, |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
56 Object context, |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
57 CallMeta meta, |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
58 List<Facet> facets |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
59 ) { |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
60 logger.debug("GaugeDischargeState.computeInit()"); |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
61 |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
62 // TODO caching, / CalculationResultusage |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
63 |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
64 GaugeDischargeFacet facet = new GaugeDischargeFacet( |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
65 0, |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
66 DISCHARGE_CURVE, |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
67 DISCHARGE_CURVE); |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
68 //Resources.getMsg(meta, I18N_DESCRIPTION, I18N_DESCRIPTION)); |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
69 facets.add(facet); |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
70 |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
71 return null; |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
72 } |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
73 //WINFOArtifact#getDischargeCurveData |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
74 |
2734
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
75 |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
76 @Override |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
77 public Object computeAdvance( |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
78 FLYSArtifact artifact, |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
79 String hash, |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
80 CallContext context, |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
81 List<Facet> facets, |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
82 Object old |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
83 ) { |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
84 // TODO why are the facets null here? |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
85 //if (facets == null) facets = new List<Facet>(); |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
86 if (artifact instanceof GaugeDischargeArtifact) { |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
87 logger.debug("GaugeDischargeState.computeAdvance()"); |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
88 GaugeDischargeArtifact dischargeArtifact = (GaugeDischargeArtifact) artifact; |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
89 |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
90 CalculationResult res; |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
91 |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
92 /*if (old instanceof CalculationResult) { |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
93 res = (CalculationResult) old; |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
94 } |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
95 else {*/ |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
96 res = dischargeArtifact.getDischargeCurveData(); |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
97 //} |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
98 |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
99 WQKms[] wqkms = (WQKms[]) res.getData(); |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
100 |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
101 if (wqkms != null && facets != null) { |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
102 logger.debug("GaugeDischargeState.computeAdvance(): create facets"); |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
103 // Create an i18ed name for a (w or q) duration curve facet. |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
104 Object[] args = new Object[] { |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
105 FLYSUtils.getRiver(dischargeArtifact).getName(), |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
106 FLYSUtils.getLocations(dischargeArtifact)[0] |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
107 }; |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
108 |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
109 String nameW = Resources.getMsg( |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
110 context.getMeta(), |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
111 "chart.duration.curve.curve.w", |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
112 "", |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
113 args); |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
114 |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
115 String nameQ = Resources.getMsg( |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
116 context.getMeta(), |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
117 "chart.duration.curve.curve.q", |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
118 "", |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
119 args); |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
120 |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
121 /*Facet w = new DurationCurveFacet(DURATION_W, nameW); |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
122 Facet q = new DurationCurveFacet(DURATION_Q, nameQ); |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
123 |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
124 facets.add(w);*/ |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
125 GaugeDischargeFacet facet = new GaugeDischargeFacet( |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
126 0, |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
127 "A"+DISCHARGE_CURVE, |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
128 "A"+DISCHARGE_CURVE); |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
129 //Resources.getMsg(meta, I18N_DESCRIPTION, I18N_DESCRIPTION)); |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
130 facets.add(facet); |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
131 |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
132 //facets.add(new DataFacet(CSV, "CSV data")); |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
133 //facets.add(new DataFacet(PDF, "PDF data")); |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
134 |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
135 if (res.getReport().hasProblems()) { |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
136 facets.add(new ReportFacet()); |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
137 } |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
138 } |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
139 else { |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
140 if (wqkms == null) |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
141 logger.debug("GaugeDischargeState.computeAdvance(): wqkms 0"); |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
142 else |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
143 logger.debug("GaugeDischargeState.computeAdvance(): facets 0"); |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
144 } |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
145 |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
146 return res; |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
147 } |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
148 else if (artifact instanceof ChartArtifact) { |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
149 ChartArtifact chart = (ChartArtifact)artifact; |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
150 facets.add(new EmptyFacet()); |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
151 return null; |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
152 } |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
153 return null; |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
154 } |
89731cb8c385
More debugging of discharge curve issue.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2723
diff
changeset
|
155 |
2723
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
156 } |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
157 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |