# HG changeset patch
# User gernotbelger
# Date 1532613488 -7200
# Node ID 6ffcbb4f35d5a5337e69fee689a2f01219abef2e
# Parent 740d65e4aa145895855f2d9ea73af609fe1d0794
bundu.bezugswst first result stump
diff -r 740d65e4aa14 -r 6ffcbb4f35d5 artifacts/doc/conf/artifacts/bundu.xml
--- a/artifacts/doc/conf/artifacts/bundu.xml Thu Jul 26 15:54:20 2018 +0200
+++ b/artifacts/doc/conf/artifacts/bundu.xml Thu Jul 26 15:58:08 2018 +0200
@@ -129,7 +129,7 @@
-
+
@@ -479,82 +479,20 @@
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
diff -r 740d65e4aa14 -r 6ffcbb4f35d5 artifacts/doc/conf/generators/discharge-diagram-defaults.xml
--- a/artifacts/doc/conf/generators/discharge-diagram-defaults.xml Thu Jul 26 15:54:20 2018 +0200
+++ b/artifacts/doc/conf/generators/discharge-diagram-defaults.xml Thu Jul 26 15:58:08 2018 +0200
@@ -2,7 +2,7 @@
-
diff -r 740d65e4aa14 -r 6ffcbb4f35d5 artifacts/doc/conf/generators/generators.xml
--- a/artifacts/doc/conf/generators/generators.xml Thu Jul 26 15:54:20 2018 +0200
+++ b/artifacts/doc/conf/generators/generators.xml Thu Jul 26 15:58:08 2018 +0200
@@ -40,6 +40,7 @@
+
diff -r 740d65e4aa14 -r 6ffcbb4f35d5 artifacts/doc/conf/jasper/templates/bundu.bezugswst.jrxml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/doc/conf/jasper/templates/bundu.bezugswst.jrxml Thu Jul 26 15:58:08 2018 +0200
@@ -0,0 +1,255 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 740d65e4aa14 -r 6ffcbb4f35d5 artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstCalculation.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstCalculation.java Thu Jul 26 15:58:08 2018 +0200
@@ -0,0 +1,65 @@
+/* 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.bundu.bezugswst;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.dive4elements.artifacts.CallContext;
+import org.dive4elements.river.artifacts.bundu.BUNDUArtifact;
+import org.dive4elements.river.artifacts.common.GeneralResultType;
+import org.dive4elements.river.artifacts.common.ResultRow;
+import org.dive4elements.river.artifacts.model.CalculationResult;
+import org.dive4elements.river.artifacts.resources.Resources;
+import org.dive4elements.river.artifacts.sinfo.util.CalculationUtils;
+import org.dive4elements.river.artifacts.sinfo.util.RiverInfo;
+import org.dive4elements.river.model.River;
+
+class BezugswstCalculation {
+
+ // private static Logger log = Logger.getLogger(FloodDurationCalculation.class);
+
+ private final CallContext context;
+
+ public BezugswstCalculation(final CallContext context) {
+ this.context = context;
+ }
+
+ public CalculationResult calculate(final BUNDUArtifact bunduartifact) {
+
+ final String user = CalculationUtils.findArtifactUser(this.context, bunduartifact);
+
+ /* access input data */
+ final BunduAccess access = new BunduAccess(bunduartifact);
+
+ final River river = access.getRiver();
+ final RiverInfo riverInfo = new RiverInfo(river);
+ final String calcModeLabel = Resources.getMsg(this.context.getMeta(), "bundu_bezugswst");
+ final BezugswstCalculationResults results = new BezugswstCalculationResults(calcModeLabel, user, riverInfo, access.getRange());
+
+ final List list = new ArrayList<>();
+ final ResultRow row = ResultRow.create();
+ row.putValue(GeneralResultType.station, 666.666);
+ row.putValue(GeneralResultType.dischargeQwithUnit, 77.666);
+ row.putValue(GeneralResultType.location, "Tescht");
+ list.add(row);
+
+ final BezugswstCalculationResult result = new BezugswstCalculationResult("label? was fürn label?", list);
+ results.addResult(result, null);
+ return new CalculationResult(results, null);// problems);
+ }
+
+ /**
+ * Calculates one W-MSH differences pair.
+ *
+ * @param infoProvider
+ */
+
+}
\ No newline at end of file
diff -r 740d65e4aa14 -r 6ffcbb4f35d5 artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstCalculationResult.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstCalculationResult.java Thu Jul 26 15:58:08 2018 +0200
@@ -0,0 +1,115 @@
+/* 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.bundu.bezugswst;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.dive4elements.river.artifacts.common.AbstractCalculationExportableResult;
+import org.dive4elements.river.artifacts.common.ExportContextCSV;
+import org.dive4elements.river.artifacts.common.ExportContextPDF;
+import org.dive4elements.river.artifacts.common.GeneralResultType;
+import org.dive4elements.river.artifacts.common.IExportContext;
+import org.dive4elements.river.artifacts.common.MetaAndTableJRDataSource;
+import org.dive4elements.river.artifacts.common.ResultRow;
+import org.dive4elements.river.artifacts.sinfo.util.BedHeightInfo;
+import org.dive4elements.river.artifacts.sinfo.util.RiverInfo;
+import org.dive4elements.river.artifacts.sinfo.util.WstInfo;
+
+/**
+ * Contains the results of a //TODO LINK{@link BezugswstCalculation}.
+ *
+ * @author Gernot Belger
+ */
+final class BezugswstCalculationResult extends AbstractCalculationExportableResult {
+
+ private static final long serialVersionUID = 1L;
+
+ private static final String JASPER_FILE = "/jasper/templates/bundu.bezugswst.jrxml";
+
+ private final WstInfo wst = null;
+ private final BedHeightInfo sounding = null;
+
+ public BezugswstCalculationResult(final String label, final Collection rows // , final BedHeightInfo sounding // ,final WstInfo wst
+ ) {
+ super(label, rows);
+ // this.wst = this.wst; //TODO get Peilung and Wasserstand
+ // this.sounding = sounding;
+ }
+
+ @Override
+ protected void writeCSVResultMetadata(final ExportContextCSV exportContextCSV) {
+
+ // exportContextCSV.writeCSVSoundingMetadata(this.sounding, " ");
+ // exportContextCSV.writeBlankLine();
+ // exportContextCSV.writeCSVWaterlevelMetadata(wst);
+ // exportContextCSV.writeBlankLine();
+ }
+
+ @Override
+ protected String getJasperFile() {
+ return JASPER_FILE;
+ }
+
+ protected String[] formatRow(final IExportContext exportContext, final ResultRow row) {
+
+ final Collection lines = new ArrayList<>(10);
+
+ lines.add(exportContext.formatRowValue(row, GeneralResultType.station));
+ lines.add(exportContext.formatRowValue(row, GeneralResultType.dischargeQwithUnit));
+ // lines.add(exportContext.formatRowValue(row, SInfoResultType.flowdepthDevelopment));
+
+ lines.add(exportContext.formatRowValue(row, GeneralResultType.location));
+
+ return lines.toArray(new String[lines.size()]);
+ }
+
+ @Override
+ public void writeCSVHeader(final ExportContextCSV exportContextCSV, final RiverInfo river) {
+
+ final Collection header = new ArrayList<>(11);
+
+ header.add(exportContextCSV.formatCsvHeader(GeneralResultType.station));
+ header.add(exportContextCSV.formatCsvHeader(GeneralResultType.dischargeQwithUnit));
+ // header.add(exportContextCSV.msgUnitCSV(SInfoResultType.flowdepthDevelopment,
+ // SInfoResultType.flowdepthDevelopment.getUnit()));
+ // header.add(exportContextCSV.msgUnitCSV(SInfoResultType.flowdepthDevelopmentPerYear,
+ // SInfoResultType.flowdepthDevelopmentPerYear.getUnit()));
+ header.add(exportContextCSV.formatCsvHeader(GeneralResultType.location));
+
+ exportContextCSV.writeCSVLine(header.toArray(new String[header.size()]));
+
+ }
+
+ @Override
+ protected String[] formatCSVRow(final ExportContextCSV exportContextCSV, final ResultRow row) {
+
+ return this.formatRow(exportContextCSV, row);
+ }
+
+ @Override
+ protected String[] formatPDFRow(final ExportContextPDF exportContextPDF, final ResultRow row) {
+
+ return this.formatRow(exportContextPDF, row);
+ }
+
+ @Override
+ protected void addJRTableHeader(final ExportContextPDF exportContextPDF, final MetaAndTableJRDataSource source) {
+ /* column headings */
+ exportContextPDF.addJRMetadata(source, "station_header", GeneralResultType.station);
+ exportContextPDF.addJRMetadata(source, "TODO_MAKE_JASPER_REPORT...", GeneralResultType.dischargeQwithUnit);
+ // exportContextPDF.addJRMetadata(source, "flowdepthdevelopment_header", SInfoResultType.flowdepthDevelopment);
+ // exportContextPDF.addJRMetadata(source, "flowdepthdevelopmentperyear_header",
+ // SInfoResultType.flowdepthDevelopmentPerYear);
+
+ exportContextPDF.addJRMetadata(source, "location_header", GeneralResultType.location);
+
+ }
+}
\ No newline at end of file
diff -r 740d65e4aa14 -r 6ffcbb4f35d5 artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstCalculationResults.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstCalculationResults.java Thu Jul 26 15:58:08 2018 +0200
@@ -0,0 +1,29 @@
+/** 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.bundu.bezugswst;
+
+import org.apache.commons.lang.math.DoubleRange;
+import org.dive4elements.river.artifacts.common.AbstractCalculationResults;
+import org.dive4elements.river.artifacts.sinfo.util.RiverInfo;
+
+/**
+ * @author Gernot Belger
+ */
+
+final class BezugswstCalculationResults extends AbstractCalculationResults {
+
+ private static final long serialVersionUID = 1L;
+
+ public BezugswstCalculationResults(final String calcModeLabel, final String user, final RiverInfo river, final DoubleRange calcRange) {
+ super(calcModeLabel, user, river, calcRange);
+
+ }
+
+}
\ No newline at end of file
diff -r 740d65e4aa14 -r 6ffcbb4f35d5 artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstState.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstState.java Thu Jul 26 15:54:20 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstState.java Thu Jul 26 15:58:08 2018 +0200
@@ -8,34 +8,17 @@
package org.dive4elements.river.artifacts.bundu.bezugswst;
-import java.text.DateFormat;
-import java.util.Collection;
-import java.util.Date;
import java.util.List;
import org.apache.log4j.Logger;
import org.dive4elements.artifactdatabase.state.Facet;
import org.dive4elements.artifacts.CallContext;
-import org.dive4elements.artifacts.CallMeta;
import org.dive4elements.river.artifacts.D4EArtifact;
-import org.dive4elements.river.artifacts.access.FixRealizingAccess;
+import org.dive4elements.river.artifacts.bundu.BUNDUArtifact;
import org.dive4elements.river.artifacts.model.CalculationResult;
-import org.dive4elements.river.artifacts.model.CrossSectionWaterLineFacet;
import org.dive4elements.river.artifacts.model.DataFacet;
import org.dive4elements.river.artifacts.model.FacetTypes;
-import org.dive4elements.river.artifacts.model.ReportFacet;
-import org.dive4elements.river.artifacts.model.WQCKms;
-import org.dive4elements.river.artifacts.model.WQKms;
-import org.dive4elements.river.artifacts.model.fixings.FixOutlierFacet;
-import org.dive4elements.river.artifacts.model.fixings.FixRealizingCalculation;
-import org.dive4elements.river.artifacts.model.fixings.FixRealizingResult;
-import org.dive4elements.river.artifacts.model.fixings.FixReferenceEventsFacet;
-import org.dive4elements.river.artifacts.model.fixings.FixWQCurveFacet;
-import org.dive4elements.river.artifacts.model.fixings.FixWaterlevelFacet;
-import org.dive4elements.river.artifacts.resources.Resources;
import org.dive4elements.river.artifacts.states.DefaultState;
-import org.dive4elements.river.utils.Formatter;
-import org.dive4elements.river.utils.UniqueDateFormatter;
/**
* State to compute the fixation realizing (vollmer) results.
@@ -77,93 +60,120 @@
public Object computeAdvance(final D4EArtifact artifact, final String hash, final CallContext context, final List facets, final Object old) {
log.debug("BezugswstState.computeAdvance");
- CalculationResult res;
-
- final FixRealizingAccess access = new FixRealizingAccess(artifact);
-
- if (old instanceof CalculationResult) {
- res = (CalculationResult) old;
- } else {
- final FixRealizingCalculation calc = new FixRealizingCalculation(access);
- res = calc.calculate();
- }
-
- if (facets == null) {
- return res;
- }
-
- if (res.getReport().hasProblems()) {
- facets.add(new ReportFacet());
- }
-
- final String id = getID();
- final CallMeta meta = context.getMeta();
-
- final FixRealizingResult fixRes = (FixRealizingResult) res.getData();
- final WQKms[] wqkms = fixRes != null ? fixRes.getWQKms() : new WQKms[0];
-
- for (int i = 0; i < wqkms.length; i++) {
- String nameW = null;
- String nameQ = null;
-
- if (access.isQ()) {
- nameQ = wqkms[i].getName();
- nameW = "W(" + nameQ + ")";
- } else {
- nameW = wqkms[i].getName();
- nameQ = "Q(" + nameW + ")";
- }
-
- final Facet wq = new FixWaterlevelFacet(i, FIX_WQ_LS, nameW, ComputeType.ADVANCE, hash, id);
-
- final Facet w = new FixWaterlevelFacet(i, LONGITUDINAL_W, nameW, ComputeType.ADVANCE, hash, id);
+ // final CalculationResult res;
+ //
+ // final FixRealizingAccess access = new FixRealizingAccess(artifact);
+ //
+ // if (old instanceof CalculationResult) {
+ // res = (CalculationResult) old;
+ // } else {
+ //
+ // final FixRealizingCalculation calc = new FixRealizingCalculation(access);
+ // res = calc.calculate();
+ // }
+ //
+ // if (facets == null) {
+ // return res;
+ // }
+ //
+ // if (res.getReport().hasProblems()) {
+ // facets.add(new ReportFacet());
+ // }
+ //
+ // final String id = getID();
+ // final CallMeta meta = context.getMeta();
+ //
+ // final FixRealizingResult fixRes = (FixRealizingResult) res.getData();
+ // final WQKms[] wqkms = fixRes != null ? fixRes.getWQKms() : new WQKms[0];
+ //
+ // for (int i = 0; i < wqkms.length; i++) {
+ // String nameW = null;
+ // String nameQ = null;
+ //
+ // if (access.isQ()) {
+ // nameQ = wqkms[i].getName();
+ // nameW = "W(" + nameQ + ")";
+ // } else {
+ // nameW = wqkms[i].getName();
+ // nameQ = "Q(" + nameW + ")";
+ // }
+ //
+ // final Facet wq = new FixWaterlevelFacet(i, FIX_WQ_LS, nameW, ComputeType.ADVANCE, hash, id);
+ //
+ // final Facet w = new FixWaterlevelFacet(i, LONGITUDINAL_W, nameW, ComputeType.ADVANCE, hash, id);
+ //
+ // final Facet q = new FixWaterlevelFacet(i, LONGITUDINAL_Q, nameQ, ComputeType.ADVANCE, hash, id);
+ // final Facet csFacet = new CrossSectionWaterLineFacet(i, nameW);
+ //
+ // facets.add(wq);
+ // facets.add(w);
+ // facets.add(q);
+ // facets.add(csFacet);
+ //
+ // // XXX: THIS CAN NOT HAPPEN! REMOVE IT!
+ // if (wqkms[i] instanceof WQCKms) {
+ // final String nameC = nameW.replace("benutzerdefiniert", "benutzerdefiniert [korrigiert]");
+ //
+ // final Facet c = new FixWaterlevelFacet(i, DISCHARGE_LONGITUDINAL_C, nameC);
+ //
+ // facets.add(c);
+ // }
+ // }
+ //
+ // if (wqkms.length > 0) {
+ // final DateFormat df = Formatter.getDateFormatter(context.getMeta(), "dd.MM.yyyy");
+ // final DateFormat lf = Formatter.getDateFormatter(context.getMeta(), "dd.MM.yyyy'T'HH:mm");
+ //
+ // final Collection reds = fixRes.getReferenceEventsDates();
+ // final UniqueDateFormatter cf = new UniqueDateFormatter(df, lf, reds);
+ //
+ // int i = 0;
+ // for (final Date d : reds) {
+ // facets.add(new FixReferenceEventsFacet((1 << 9) | i, FIX_EVENTS, cf.format(d)));
+ // i++;
+ // }
+ //
+ // facets.add(new DataFacet(CSV, "CSV data", ComputeType.ADVANCE, hash, id));
+ //
+ // facets.add(new DataFacet(WST, "WST data", ComputeType.ADVANCE, hash, id));
+ //
+ // facets.add(new DataFacet(PDF, "PDF data", ComputeType.ADVANCE, hash, id));
+ // }
+ //
+ // facets.add(new DataFacet(AT, "AT data", ComputeType.ADVANCE, hash, id));
+ //
+ // facets.add(new FixWQCurveFacet(0, Resources.getMsg(meta, I18N_WQ_CURVE, I18N_WQ_CURVE) + " (" + access.getFunction()
+ // + ")"));
+ //
+ // if (access.getPreprocessing()) {
+ // facets.add(new FixOutlierFacet(0, FIX_OUTLIER, Resources.getMsg(meta, I18N_WQ_OUTLIER, I18N_WQ_OUTLIER)));
+ // }
+ return compute((BUNDUArtifact) artifact, context, hash, facets, old);
+ }
- final Facet q = new FixWaterlevelFacet(i, LONGITUDINAL_Q, nameQ, ComputeType.ADVANCE, hash, id);
- final Facet csFacet = new CrossSectionWaterLineFacet(i, nameW);
-
- facets.add(wq);
- facets.add(w);
- facets.add(q);
- facets.add(csFacet);
-
- // XXX: THIS CAN NOT HAPPEN! REMOVE IT!
- if (wqkms[i] instanceof WQCKms) {
- final String nameC = nameW.replace("benutzerdefiniert", "benutzerdefiniert [korrigiert]");
-
- final Facet c = new FixWaterlevelFacet(i, DISCHARGE_LONGITUDINAL_C, nameC);
-
- facets.add(c);
- }
- }
-
- if (wqkms.length > 0) {
- final DateFormat df = Formatter.getDateFormatter(context.getMeta(), "dd.MM.yyyy");
- final DateFormat lf = Formatter.getDateFormatter(context.getMeta(), "dd.MM.yyyy'T'HH:mm");
+ @Override
+ public Object computeFeed(final D4EArtifact artifact, final String hash, final CallContext context, final List facets, final Object old) {
- final Collection reds = fixRes.getReferenceEventsDates();
- final UniqueDateFormatter cf = new UniqueDateFormatter(df, lf, reds);
-
- int i = 0;
- for (final Date d : reds) {
- facets.add(new FixReferenceEventsFacet((1 << 9) | i, FIX_EVENTS, cf.format(d)));
- i++;
- }
-
- facets.add(new DataFacet(CSV, "CSV data", ComputeType.ADVANCE, hash, id));
+ return compute((BUNDUArtifact) artifact, context, hash, facets, old);
+ }
- facets.add(new DataFacet(WST, "WST data", ComputeType.ADVANCE, hash, id));
-
- facets.add(new DataFacet(PDF, "PDF data", ComputeType.ADVANCE, hash, id));
- }
+ private Object compute(final BUNDUArtifact artifact, final CallContext context, final String hash, final List facets, final Object old) {
- facets.add(new DataFacet(AT, "AT data", ComputeType.ADVANCE, hash, id));
+ final BezugswstCalculation s = new BezugswstCalculation(context);
+ final CalculationResult res = s.calculate(artifact);
- facets.add(new FixWQCurveFacet(0, Resources.getMsg(meta, I18N_WQ_CURVE, I18N_WQ_CURVE) + " (" + access.getFunction() + ")"));
+ if (facets == null)
+ return res;
- if (access.getPreprocessing()) {
- facets.add(new FixOutlierFacet(0, FIX_OUTLIER, Resources.getMsg(meta, I18N_WQ_OUTLIER, I18N_WQ_OUTLIER)));
- }
+ // if (!((List) res).isEmpty()) {
+ final Facet csv = new DataFacet(FacetTypes.CSV, "CSV data", ComputeType.ADVANCE, hash, this.id);
+ final Facet pdf = new DataFacet(FacetTypes.PDF, "PDF data", ComputeType.ADVANCE, hash, this.id);
+
+ facets.add(csv);
+ facets.add(pdf);
+ // }
return res;
}
+
}
diff -r 740d65e4aa14 -r 6ffcbb4f35d5 artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BunduWstExporter.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BunduWstExporter.java Thu Jul 26 15:58:08 2018 +0200
@@ -0,0 +1,43 @@
+/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
+ * Software engineering by Intevation GmbH
+ *
+ * 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.bundu.bezugswst;
+
+import org.apache.log4j.Logger;
+import org.dive4elements.river.artifacts.common.AbstractCommonExporter;
+import org.dive4elements.river.artifacts.common.ExportContextCSV;
+import org.dive4elements.river.artifacts.common.ExportContextPDF;
+import org.dive4elements.river.artifacts.common.MetaAndTableJRDataSource;
+
+/**
+ * Generates different output formats (wst, csv, pdf) of data that resulted from
+ * a waterlevel computation.
+ *
+ * @author Ingo Weinzierl
+ */
+public class BunduWstExporter extends AbstractCommonExporter {
+
+ /** The log used in this exporter. */
+ private static Logger log = Logger.getLogger(BunduWstExporter.class);
+
+ @Override
+ protected void writeCSVGlobalMetadata(final ExportContextCSV exportContext, final BezugswstCalculationResults results) {
+ exportContext.writeCSVGlobalMetadataDefaults();
+
+ }
+
+ @Override
+ protected void writePDFGlobalMetadata(final ExportContextPDF exportContext, final MetaAndTableJRDataSource source) {
+ exportContext.addJRMetaDataUSINFO(source);
+ // source.addMetaData("flowdepthdevelopment_header_label",
+ // SInfoResultType.flowdepthDevelopment.getCsvHeader(this.context.getMeta()));// (this.context.getMeta()));
+
+ }
+
+}
+// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :