diff artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/PredefinedTkhProcessor.java @ 9033:384eee4b4135

Added datacage select and chart display for flow depth evolution series loaded from database, and a correction for the tkh data
author mschaefer
date Fri, 27 Apr 2018 17:41:59 +0200
parents 6e5ff436febe
children 1cc7653ca84f
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/PredefinedTkhProcessor.java	Fri Apr 27 17:35:12 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/PredefinedTkhProcessor.java	Fri Apr 27 17:41:59 2018 +0200
@@ -11,7 +11,6 @@
 package org.dive4elements.river.artifacts.sinfo.common;
 
 import java.util.HashSet;
-import java.util.Map;
 import java.util.Set;
 
 import org.apache.log4j.Logger;
@@ -37,10 +36,6 @@
 
     private static final String I18N_AXIS_LABEL = "sinfo.chart.tkh.section.yaxis.label";
 
-    private static final String I18N_FACET_TKH_DESCRIPTION = "sinfo.facet.tkh.description";
-
-    private static final String SINFO_CHART_TKH_YAXIS_LABEL = "sinfo.chart.tkh.yaxis.label";
-
     private static final Set<String> HANDLED_FACET_TYPES = new HashSet<>();
 
     static {
@@ -51,40 +46,6 @@
         super(I18N_AXIS_LABEL, HANDLED_FACET_TYPES);
     }
 
-    protected String generateSeries1(final DiagramGenerator generator, final ArtifactAndFacet bundle, final ThemeDocument theme, final boolean visible) {
-        final CallContext context = generator.getCallContext();
-        final Map<String, String> metaData = bundle.getFacet().getMetaData(bundle.getArtifact(), context);
-        final StyledXYSeries series = new StyledXYSeries(bundle.getFacetDescription(), theme);
-        series.putMetaData(metaData, bundle.getArtifact(), context);
-
-        final Object raw = bundle.getData(context);
-        if (raw == null) {
-            return null;
-        }
-        if (!(raw instanceof double[][])) {
-            log.error("Unkown datatype: " + raw.getClass().getName());
-            return null;
-        }
-        final double[][] data = (double[][]) raw;
-        StyledSeriesBuilder.addPoints(series, data, true);
-
-        // REMARK: we add " " because the description is misused as id, which must be unique.
-        final StyledXYSeries seriesDown = new StyledXYSeries(bundle.getFacetDescription() + " ", theme);
-        // final double[][] pointsDown = data.getTkhDownPoints();
-        final double[][] datadown = (double[][]) raw;
-        for (int i = 0; i <= datadown[0].length - 1; i++)
-            datadown[1][i] = 0;
-        StyledSeriesBuilder.addPoints(seriesDown, datadown, true);
-
-        final StyledAreaSeriesCollection area = new StyledAreaSeriesCollection(theme);
-        area.setMode(StyledAreaSeriesCollection.FILL_MODE.BETWEEN);
-        area.addSeries(series);
-        area.addSeries(seriesDown);
-        generator.addAreaSeries(area, getAxisName(), visible);
-        // generator.addAxisSeries(series, getAxisName(), visible);
-        return null;
-    }
-
     @Override
     protected String generateSeries(final DiagramGenerator generator, final ArtifactAndFacet bundle, final ThemeDocument theme, final boolean visible) {
         final CallContext context = generator.getCallContext();

http://dive4elements.wald.intevation.org