comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/FlowDepthState.java @ 8940:82998242ba84

Preparing for additional outputs of SINFO-Tkh
author gernotbelger
date Tue, 06 Mar 2018 18:51:18 +0100
parents 5d5d0051723f
children b194fa64506a
comparison
equal deleted inserted replaced
8939:2970368ae1e3 8940:82998242ba84
18 import org.dive4elements.river.artifacts.model.CalculationResult; 18 import org.dive4elements.river.artifacts.model.CalculationResult;
19 import org.dive4elements.river.artifacts.model.DataFacet; 19 import org.dive4elements.river.artifacts.model.DataFacet;
20 import org.dive4elements.river.artifacts.model.EmptyFacet; 20 import org.dive4elements.river.artifacts.model.EmptyFacet;
21 import org.dive4elements.river.artifacts.model.FacetTypes; 21 import org.dive4elements.river.artifacts.model.FacetTypes;
22 import org.dive4elements.river.artifacts.model.ReportFacet; 22 import org.dive4elements.river.artifacts.model.ReportFacet;
23 import org.dive4elements.river.artifacts.resources.Resources;
24 import org.dive4elements.river.artifacts.sinfo.SINFOArtifact; 23 import org.dive4elements.river.artifacts.sinfo.SINFOArtifact;
25 import org.dive4elements.river.artifacts.sinfo.common.SInfoResultFacet; 24 import org.dive4elements.river.artifacts.sinfo.common.FlowDepthProcessor;
26 import org.dive4elements.river.artifacts.sinfo.common.TkhProcessor; 25 import org.dive4elements.river.artifacts.sinfo.common.TkhProcessor;
27 import org.dive4elements.river.artifacts.states.DefaultState; 26 import org.dive4elements.river.artifacts.states.DefaultState;
28 27
29 /** State in which a waterlevel has been calculated. */ 28 /** State in which a waterlevel has been calculated. */
30 public class FlowDepthState extends DefaultState { 29 public class FlowDepthState extends DefaultState {
31 30
32 /// ** The log that is used in this state. */ 31 /// ** The log that is used in this state. */
33 // private static Logger log = Logger.getLogger(FlowDepthState.class); 32 // private static Logger log = Logger.getLogger(FlowDepthState.class);
34 33
35 private static final long serialVersionUID = 1L; 34 private static final long serialVersionUID = 1L;
36
37 private static final String I18N_FACET_FLOW_DEPTH_FILTERED_DESCRIPTION = "sinfo.facet.flow_depth.filtered.description";
38
39 private static final String I18N_FACET_FLOW_DEPTH_TKH_FILTERED_DESCRIPTION = "sinfo.facet.flow_depth.tkh.filtered.description";
40
41
42 private static final String SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL = "sinfo.chart.flow_depth.yaxis.label";
43 35
44 /** 36 /**
45 * From this state can only be continued trivially. 37 * From this state can only be continued trivially.
46 */ 38 */
47 @Override 39 @Override
89 for (int index = 0; index < resultList.size(); index++) { 81 for (int index = 0; index < resultList.size(); index++) {
90 82
91 final FlowDepthCalculationResult result = resultList.get(index); 83 final FlowDepthCalculationResult result = resultList.get(index);
92 84
93 /* filtered (zoom dependent mean) flow depth */ 85 /* filtered (zoom dependent mean) flow depth */
94 final String facetFlowDepthFilteredDescription = Resources.getMsg(context.getMeta(), I18N_FACET_FLOW_DEPTH_FILTERED_DESCRIPTION, 86 facets.add(FlowDepthProcessor.createFlowDepthFacet(context, hash, this.id, result, index));
95 I18N_FACET_FLOW_DEPTH_FILTERED_DESCRIPTION, result.getLabel());
96 facets.add(new SInfoResultFacet(index, FlowDepthProcessor.FACET_FLOW_DEPTH_FILTERED, facetFlowDepthFilteredDescription,
97 SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL, ComputeType.ADVANCE, this.id, hash));
98 87
99 if (results.isUseTkh()) { 88 if (results.isUseTkh()) {
100 /* filtered (zoom dependent mean) flow depth including tkh */ 89 /* filtered (zoom dependent mean) flow depth including tkh */
101 final String facetFlowDepthTkhFilteredDescription = Resources.getMsg(context.getMeta(), I18N_FACET_FLOW_DEPTH_TKH_FILTERED_DESCRIPTION, 90 facets.add(FlowDepthProcessor.createFlowDepthTkhFacet(context, hash, this.id, result, index));
102 I18N_FACET_FLOW_DEPTH_TKH_FILTERED_DESCRIPTION, result.getLabel());
103 facets.add(new SInfoResultFacet(index, FlowDepthProcessor.FACET_FLOW_DEPTH_TKH_FILTERED, facetFlowDepthTkhFilteredDescription,
104 SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL, ComputeType.ADVANCE, this.id, hash));
105 91
106 facets.add(TkhProcessor.createTkhFacet(context, hash, this.id, result, index)); 92 facets.add(TkhProcessor.createTkhFacet(context, hash, this.id, result, index));
107 } 93 }
108 } 94 }
109 95

http://dive4elements.wald.intevation.org