diff artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/FlowDepthState.java @ 8916:5d5d0051723f

Working on outputmodes of tkh calculation
author gernotbelger
date Wed, 28 Feb 2018 18:55:39 +0100
parents e3519c3e7a0a
children 82998242ba84
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/FlowDepthState.java	Wed Feb 28 17:27:15 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/FlowDepthState.java	Wed Feb 28 18:55:39 2018 +0100
@@ -22,6 +22,8 @@
 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.TkhProcessor;
 import org.dive4elements.river.artifacts.states.DefaultState;
 
 /** State in which a waterlevel has been calculated. */
@@ -36,12 +38,9 @@
 
     private static final String I18N_FACET_FLOW_DEPTH_TKH_FILTERED_DESCRIPTION = "sinfo.facet.flow_depth.tkh.filtered.description";
 
-    private static final String I18N_FACET_TKH_DESCRIPTION = "sinfo.facet.tkh.description";
 
     private static final String SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL = "sinfo.chart.flow_depth.yaxis.label";
 
-    private static final String SINFO_CHART_TKX_YAXIS_LABEL = "sinfo.chart.tkh.yaxis.label";
-
     /**
      * From this state can only be continued trivially.
      */
@@ -94,29 +93,18 @@
             /* 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 FlowDepthFacet(index, FlowDepthProcessor.FACET_FLOW_DEPTH_FILTERED, facetFlowDepthFilteredDescription,
+            facets.add(new SInfoResultFacet(index, FlowDepthProcessor.FACET_FLOW_DEPTH_FILTERED, facetFlowDepthFilteredDescription,
                     SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL, ComputeType.ADVANCE, this.id, hash));
 
             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 FlowDepthFacet(index, FlowDepthProcessor.FACET_FLOW_DEPTH_TKH_FILTERED, facetFlowDepthTkhFilteredDescription,
+                facets.add(new SInfoResultFacet(index, FlowDepthProcessor.FACET_FLOW_DEPTH_TKH_FILTERED, facetFlowDepthTkhFilteredDescription,
                         SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL, ComputeType.ADVANCE, this.id, hash));
 
-                // FIXME: add other themes
-                // - Streckenfavoriten
-
-                // FIXME:
-                // - Gemittelte Linie der Fließtiefe mitsamt TKH
-                // - Transportkörperhöhen (oben/unten/schraffur)
-                final String facetTkhDescription = Resources.getMsg(context.getMeta(), I18N_FACET_TKH_DESCRIPTION, I18N_FACET_TKH_DESCRIPTION,
-                        result.getLabel());
-                facets.add(new FlowDepthFacet(index, TkhProcessor.FACET_TKH, facetTkhDescription, SINFO_CHART_TKX_YAXIS_LABEL, ComputeType.ADVANCE, this.id,
-                        hash));
+                facets.add(TkhProcessor.createTkhFacet(context, hash, this.id, result, index));
             }
-
-            // FIXME: Datenkorbkonfiguration
         }
 
         if (!resultList.isEmpty()) {

http://dive4elements.wald.intevation.org