diff artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/SInfoResultFacet.java @ 9215:0fc9c82e744e

work on collison, flood_duration
author gernotbelger
date Tue, 03 Jul 2018 17:00:48 +0200
parents 3dae6b78e1da
children
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/SInfoResultFacet.java	Tue Jul 03 14:26:56 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/SInfoResultFacet.java	Tue Jul 03 17:00:48 2018 +0200
@@ -22,14 +22,12 @@
 /**
  * Facet of one of the S-Info curves.
  */
-public final class SInfoResultFacet extends DataFacet {
+public class SInfoResultFacet extends DataFacet {
 
     private static final long serialVersionUID = 1L;
 
     private static Logger log = Logger.getLogger(SInfoResultFacet.class);
 
-    private int dataIndex;
-
     private int resultIndex;
 
     public SInfoResultFacet() {
@@ -38,35 +36,24 @@
 
     public SInfoResultFacet(final int resultIndex, final String name, final String description, final String yAxisLabelKey, final ComputeType type,
             final String stateId, final String hash) {
-        // REMARK:
-        this(resultIndex, resultIndex, -1, name, description, yAxisLabelKey, type, stateId, hash);
+        this(resultIndex, resultIndex, name, description, yAxisLabelKey, type, stateId, hash);
     }
 
-    public SInfoResultFacet(final int resultIndex, final int dataIndex, final String name, final String description, final String yAxisLabelKey,
+    public SInfoResultFacet(final int facetIndex, final int resultIndex, final String name, final String description, final String yAxisLabelKey,
             final ComputeType type, final String stateId, final String hash) {
-        // REMARK: in some cases, we have several
-        this(resultIndex, resultIndex, dataIndex, name, description, yAxisLabelKey, type, stateId, hash);
-    }
-
-    public SInfoResultFacet(final int facetIndex, final int resultIndex, final int dataIndex, final String name, final String description,
-            // REMARK: in some cases, we have several data-lines for the same result (which normally determines the facet index) and
-            // facet name. But index and name are used by the client side as unique keys for the chart themes...
-            // So we might have different facet index and result index.
-            final String yAxisLabelKey, final ComputeType type, final String stateId, final String hash) {
+        // REMARK: in some cases, we have several data-lines for the same result (which normally determines the facet index) and
+        // facet name. But index and name are used by the client side as unique keys for the chart themes...
+        // So we might have different facet index and result index.
         super(facetIndex, name, description, type, hash, stateId);
         this.resultIndex = resultIndex;
-        this.dataIndex = dataIndex;
+
         this.metaData.put("X", "sinfo.chart.km.xaxis.label");
         this.metaData.put("Y", yAxisLabelKey);
     }
 
-    public int getDataIndex() {
-        return this.dataIndex;
-    }
-
     @Override
-    public Object getData(final Artifact artifact, final CallContext context) {
-        log.debug("Get data for result at index: " + this.index);
+    public final Object getData(final Artifact artifact, final CallContext context) {
+        log.debug("Get data for result at index: " + this.resultIndex);
 
         final D4EArtifact flys = (D4EArtifact) artifact;
 

http://dive4elements.wald.intevation.org