Mercurial > dive4elements > river
diff 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 |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/FlowDepthState.java Tue Mar 06 17:14:56 2018 +0100 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/FlowDepthState.java Tue Mar 06 18:51:18 2018 +0100 @@ -20,9 +20,8 @@ import org.dive4elements.river.artifacts.model.EmptyFacet; import org.dive4elements.river.artifacts.model.FacetTypes; import org.dive4elements.river.artifacts.model.ReportFacet; -import org.dive4elements.river.artifacts.resources.Resources; import org.dive4elements.river.artifacts.sinfo.SINFOArtifact; -import org.dive4elements.river.artifacts.sinfo.common.SInfoResultFacet; +import org.dive4elements.river.artifacts.sinfo.common.FlowDepthProcessor; import org.dive4elements.river.artifacts.sinfo.common.TkhProcessor; import org.dive4elements.river.artifacts.states.DefaultState; @@ -34,13 +33,6 @@ private static final long serialVersionUID = 1L; - private static final String I18N_FACET_FLOW_DEPTH_FILTERED_DESCRIPTION = "sinfo.facet.flow_depth.filtered.description"; - - private static final String I18N_FACET_FLOW_DEPTH_TKH_FILTERED_DESCRIPTION = "sinfo.facet.flow_depth.tkh.filtered.description"; - - - private static final String SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL = "sinfo.chart.flow_depth.yaxis.label"; - /** * From this state can only be continued trivially. */ @@ -91,17 +83,11 @@ final FlowDepthCalculationResult result = resultList.get(index); /* filtered (zoom dependent mean) flow depth */ - final String facetFlowDepthFilteredDescription = Resources.getMsg(context.getMeta(), I18N_FACET_FLOW_DEPTH_FILTERED_DESCRIPTION, - I18N_FACET_FLOW_DEPTH_FILTERED_DESCRIPTION, result.getLabel()); - facets.add(new SInfoResultFacet(index, FlowDepthProcessor.FACET_FLOW_DEPTH_FILTERED, facetFlowDepthFilteredDescription, - SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL, ComputeType.ADVANCE, this.id, hash)); + facets.add(FlowDepthProcessor.createFlowDepthFacet(context, hash, this.id, result, index)); if (results.isUseTkh()) { /* filtered (zoom dependent mean) flow depth including tkh */ - final String facetFlowDepthTkhFilteredDescription = Resources.getMsg(context.getMeta(), I18N_FACET_FLOW_DEPTH_TKH_FILTERED_DESCRIPTION, - I18N_FACET_FLOW_DEPTH_TKH_FILTERED_DESCRIPTION, result.getLabel()); - facets.add(new SInfoResultFacet(index, FlowDepthProcessor.FACET_FLOW_DEPTH_TKH_FILTERED, facetFlowDepthTkhFilteredDescription, - SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL, ComputeType.ADVANCE, this.id, hash)); + facets.add(FlowDepthProcessor.createFlowDepthTkhFacet(context, hash, this.id, result, index)); facets.add(TkhProcessor.createTkhFacet(context, hash, this.id, result, index)); }