[PATCH 2 of 2] Fixed: tkh that got loaded via datacage (SINFO/Transportkörperhöhen) did not show up

Wald Commits scm-commit at wald.intevation.org
Fri Jul 20 14:57:22 CEST 2018


# HG changeset patch
# User gernotbelger
# Date 1532091436 -7200
# Node ID d1ce60b760bdebf57d0205a6d3bbe3b9673ef166
# Parent  83ef08b5e1ac1ed38cb55f971d3451fd29868b57
Fixed: tkh that got loaded via datacage (SINFO/Transportkörperhöhen) did not show up.

diff -r 83ef08b5e1ac -r d1ce60b760bd artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/predefinedtkh/PredefinedTkhFacet.java
--- 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);
     }
 
     /**
diff -r 83ef08b5e1ac -r d1ce60b760bd artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/predefinedtkh/PredefinedTkhQueryCalculationResult.java
--- /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


More information about the Dive4Elements-commits mailing list