changeset 9280:d1ce60b760bd

Fixed: tkh that got loaded via datacage (SINFO/Transportkörperhöhen) did not show up.
author gernotbelger
date Fri, 20 Jul 2018 14:57:16 +0200
parents 83ef08b5e1ac
children 72b6388c252a
files artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/predefinedtkh/PredefinedTkhFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/predefinedtkh/PredefinedTkhQueryCalculationResult.java
diffstat 2 files changed, 63 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/predefinedtkh/PredefinedTkhFacet.java	Fri Jul 20 14:56:27 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/predefinedtkh/PredefinedTkhFacet.java	Fri Jul 20 14:57:16 2018 +0200
@@ -17,7 +17,6 @@
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
 import org.dive4elements.river.artifacts.D4EArtifact;
-import org.dive4elements.river.artifacts.common.DefaultCalculationResult;
 import org.dive4elements.river.artifacts.common.GeneralResultType;
 import org.dive4elements.river.artifacts.common.ResultRow;
 import org.dive4elements.river.artifacts.model.BlackboardDataFacet;
@@ -80,7 +79,7 @@
             row.putValue(SInfoResultType.tkhdown, tkhValue.getTkhDownCm(bedMobility == SoilKind.mobil));
             rows.add(row);
         }
-        return new DefaultCalculationResult(series.getName(), rows);// new PredefinedTkhQueryCalculationResult(series.getName(), rows);
+        return new PredefinedTkhQueryCalculationResult(series.getName(), rows);
     }
 
     /**
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/predefinedtkh/PredefinedTkhQueryCalculationResult.java	Fri Jul 20 14:57:16 2018 +0200
@@ -0,0 +1,62 @@
+/** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde
+ * Software engineering by 
+ *  Björnsen Beratende Ingenieure GmbH 
+ *  Dr. Schumacher Ingenieurbüro für Wasser und Umwelt
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+package org.dive4elements.river.artifacts.sinfo.predefinedtkh;
+
+import java.util.Collection;
+
+import org.dive4elements.river.artifacts.common.ExportContextCSV;
+import org.dive4elements.river.artifacts.common.ExportContextPDF;
+import org.dive4elements.river.artifacts.common.MetaAndTableJRDataSource;
+import org.dive4elements.river.artifacts.common.ResultRow;
+import org.dive4elements.river.artifacts.sinfo.common.AbstractTkhCalculationResult;
+import org.dive4elements.river.artifacts.sinfo.util.RiverInfo;
+
+/**
+ * @author Gernot Belger
+ *
+ */
+final class PredefinedTkhQueryCalculationResult extends AbstractTkhCalculationResult {
+
+    private static final long serialVersionUID = 1L;
+
+    public PredefinedTkhQueryCalculationResult(String label, Collection<ResultRow> rows) {
+        super(label, null, true, rows);
+    }
+
+    @Override
+    public void writeCSVHeader(ExportContextCSV exportContextCSV, RiverInfo river) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    protected void writeCSVResultMetadata(ExportContextCSV exportContextCSV) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    protected String[] formatCSVRow(ExportContextCSV exportContextCSV, ResultRow row) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    protected String[] formatPDFRow(ExportContextPDF exportContextPDF, ResultRow row) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    protected String getJasperFile() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    protected void addJRTableHeader(ExportContextPDF exportContext, MetaAndTableJRDataSource source) {
+        throw new UnsupportedOperationException();
+    }
+}
\ No newline at end of file

http://dive4elements.wald.intevation.org