[PATCH] bundu.bezugswst first result for missing volume added
Wald Commits
scm-commit at wald.intevation.org
Fri Jul 27 17:19:35 CEST 2018
# HG changeset patch
# User gernotbelger
# Date 1532704767 -7200
# Node ID 0a0937f33bb5568ef6f5f6df47d3b631cefbdee9
# Parent 6a77589237627e6b0e1fdfb07e4ac585f3dc5b4e
bundu.bezugswst first result for missing volume added
diff -r 6a7758923762 -r 0a0937f33bb5 artifacts/doc/conf/jasper/templates/bundu.bezugswst.jrxml
--- a/artifacts/doc/conf/jasper/templates/bundu.bezugswst.jrxml Fri Jul 27 16:19:09 2018 +0200
+++ b/artifacts/doc/conf/jasper/templates/bundu.bezugswst.jrxml Fri Jul 27 17:19:27 2018 +0200
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.5.1.final using JasperReports Library version 4.5.0 -->
-<!-- 2018-07-27T10:34:43 -->
+<!-- 2018-07-27T16:56:16 -->
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="flysreport" language="groovy" pageWidth="595" pageHeight="842" columnWidth="545" leftMargin="30" rightMargin="20" topMargin="20" bottomMargin="20">
<property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="0"/>
@@ -8,6 +8,8 @@
<style name="htmlStyle" isDefault="true" mode="Transparent" markup="html" fontName="Roboto">
<paragraph lineSpacing="Single"/>
</style>
+ <field name="meta:totalpages" class="java.lang.Integer"/>
+ <field name="meta:startpageoffset" class="java.lang.Integer"/>
<field name="meta:header" class="java.lang.String"/>
<field name="meta:calcMode" class="java.lang.String"/>
<field name="meta:version_label" class="java.lang.String"/>
@@ -135,31 +137,31 @@
<textFieldExpression><![CDATA[$F{meta:station_header}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
- <reportElement style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="70" y="0" width="110" height="24"/>
+ <reportElement style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="70" y="0" width="90" height="24"/>
<box padding="5"/>
<textElement textAlignment="Right" verticalAlignment="Bottom"/>
<textFieldExpression><![CDATA[$F{meta:bezugswst_header}+" ["+$F{meta:river_unit}+"]"]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
- <reportElement style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="180" y="0" width="70" height="24"/>
+ <reportElement style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="160" y="0" width="70" height="24"/>
<box padding="5"/>
<textElement textAlignment="Right" verticalAlignment="Bottom"/>
<textFieldExpression><![CDATA[$F{meta:discharge_header}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
- <reportElement style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="250" y="0" width="70" height="24"/>
+ <reportElement style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="230" y="0" width="70" height="24"/>
<box padding="5"/>
<textElement textAlignment="Left" verticalAlignment="Bottom"/>
<textFieldExpression><![CDATA[$F{meta:waterlevel_name_header}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
- <reportElement style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="320" y="0" width="110" height="24"/>
+ <reportElement style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="300" y="0" width="110" height="24"/>
<box padding="5"/>
<textElement textAlignment="Left" verticalAlignment="Bottom"/>
<textFieldExpression><![CDATA[$F{meta:gauge_header}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
- <reportElement style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="430" y="0" width="110" height="24"/>
+ <reportElement style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="410" y="0" width="110" height="24"/>
<box padding="5"/>
<textElement textAlignment="Left" verticalAlignment="Bottom"/>
<textFieldExpression><![CDATA[$F{meta:location_header}]]></textFieldExpression>
@@ -180,7 +182,7 @@
<textFieldExpression><![CDATA[$F{data:0}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
- <reportElement style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="70" y="0" width="110" height="15"/>
+ <reportElement style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="70" y="0" width="90" height="15"/>
<box topPadding="2" leftPadding="5" bottomPadding="0" rightPadding="5">
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
@@ -191,7 +193,7 @@
<textFieldExpression><![CDATA[$F{data:1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
- <reportElement style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="180" y="0" width="70" height="15"/>
+ <reportElement style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="160" y="0" width="70" height="15"/>
<box topPadding="2" leftPadding="5" bottomPadding="0" rightPadding="5">
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
@@ -202,7 +204,7 @@
<textFieldExpression><![CDATA[$F{data:2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
- <reportElement style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="250" y="0" width="70" height="15"/>
+ <reportElement style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="230" y="0" width="70" height="15"/>
<box topPadding="2" leftPadding="5" bottomPadding="0" rightPadding="5">
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
@@ -213,7 +215,7 @@
<textFieldExpression><![CDATA[$F{data:3}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
- <reportElement style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="320" y="0" width="110" height="15"/>
+ <reportElement style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="300" y="0" width="110" height="15"/>
<box topPadding="2" leftPadding="5" bottomPadding="0" rightPadding="5">
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
@@ -224,7 +226,7 @@
<textFieldExpression><![CDATA[$F{data:4}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
- <reportElement style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="430" y="0" width="110" height="15"/>
+ <reportElement style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="410" y="0" width="110" height="15"/>
<box topPadding="2" leftPadding="5" bottomPadding="0" rightPadding="5">
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
@@ -242,12 +244,12 @@
<reportElement style="htmlStyle" x="437" y="0" width="55" height="15"/>
<box topPadding="2" rightPadding="3"/>
<textElement textAlignment="Right"/>
- <textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
+ <textFieldExpression><![CDATA[$V{PAGE_NUMBER} +(($F{meta:startpageoffset} != null) ? $F{meta:startpageoffset} : 0 )]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" evaluationTime="Report">
<reportElement style="htmlStyle" x="493" y="0" width="57" height="15"/>
<box topPadding="2" leftPadding="0" bottomPadding="0" rightPadding="0"/>
- <textFieldExpression><![CDATA["/ " + $V{PAGE_NUMBER}]]></textFieldExpression>
+ <textFieldExpression><![CDATA["/ " + ( $V{PAGE_NUMBER}+( ($F{meta:totalpages} != null) ? $F{meta:totalpages} -$V{PAGE_NUMBER} : 0 ) )]]></textFieldExpression>
</textField>
</band>
</pageFooter>
diff -r 6a7758923762 -r 0a0937f33bb5 artifacts/doc/conf/jasper/templates/bundu.bezugswst.result1.jrxml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/doc/conf/jasper/templates/bundu.bezugswst.result1.jrxml Fri Jul 27 17:19:27 2018 +0200
@@ -0,0 +1,404 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Created with Jaspersoft Studio version 6.5.1.final using JasperReports Library version 4.5.0 -->
+<!-- 2018-07-27T17:10:54 -->
+<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="flysreport" language="groovy" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="762" leftMargin="60" rightMargin="20" topMargin="20" bottomMargin="20">
+ <property name="ireport.zoom" value="1.0"/>
+ <property name="ireport.x" value="0"/>
+ <property name="ireport.y" value="0"/>
+ <style name="htmlStyle" isDefault="true" mode="Transparent" markup="html" fontName="Roboto" fontSize="8">
+ <paragraph lineSpacing="Single"/>
+ </style>
+ <field name="meta:totalpages" class="java.lang.Integer"/>
+ <field name="meta:startpageoffset" class="java.lang.Integer"/>
+ <field name="meta:header" class="java.lang.String"/>
+ <field name="meta:calcMode" class="java.lang.String"/>
+ <field name="meta:version_label" class="java.lang.String"/>
+ <field name="meta:version" class="java.lang.String"/>
+ <field name="meta:user_label" class="java.lang.String"/>
+ <field name="meta:user" class="java.lang.String"/>
+ <field name="meta:date_label" class="java.lang.String"/>
+ <field name="meta:date" class="java.lang.String"/>
+ <field name="meta:river_label" class="java.lang.String"/>
+ <field name="meta:river" class="java.lang.String"/>
+ <field name="meta:range_label" class="java.lang.String"/>
+ <field name="meta:range" class="java.lang.String"/>
+ <field name="meta:calculation_label" class="java.lang.String"/>
+ <field name="meta:calculation_name" class="java.lang.String"/>
+ <field name="meta:station_header" class="java.lang.String"/>
+ <field name="meta:flowdepthdevelopment_header" class="java.lang.String"/>
+ <field name="meta:flowdepthdevelopmentperyear_header" class="java.lang.String"/>
+ <field name="meta:waterleveldifference_header" class="java.lang.String"/>
+ <field name="meta:waterleveldifference_header2" class="java.lang.String"/>
+ <field name="meta:waterleveldifference_header_label" class="java.lang.String"/>
+ <field name="meta:bedheightdifference_header" class="java.lang.String"/>
+ <field name="meta:bedheightdifference_header2" class="java.lang.String"/>
+ <field name="meta:bedheightdifference_header_label" class="java.lang.String"/>
+ <field name="meta:flowdepthcurrent_header" class="java.lang.String"/>
+ <field name="meta:flowdepthcurrent_header2" class="java.lang.String"/>
+ <field name="meta:flowdepthhistorical_header" class="java.lang.String"/>
+ <field name="meta:flowdepthhistorical_header2" class="java.lang.String"/>
+ <field name="meta:flowdepthcurrent_header_label" class="java.lang.String"/>
+ <field name="meta:flowdepthhistorical_header_label" class="java.lang.String"/>
+ <field name="meta:flowdepth_header" class="java.lang.String"/>
+ <field name="meta:flowdepthdevelopment" class="java.lang.String"/>
+ <field name="meta:flowdepthmin_header" class="java.lang.String"/>
+ <field name="meta:flowdepthmax_header" class="java.lang.String"/>
+ <field name="meta:flowdepthdevelopment_header_label" class="java.lang.String"/>
+ <field name="meta:flowdepth_tkh_header" class="java.lang.String"/>
+ <field name="meta:tkh_header" class="java.lang.String"/>
+ <field name="meta:tkhkind_header" class="java.lang.String"/>
+ <field name="meta:waterlevel_header" class="java.lang.String"/>
+ <field name="meta:discharge_header" class="java.lang.String"/>
+ <field name="meta:waterlevel_name_header" class="java.lang.String"/>
+ <field name="meta:gauge_header" class="java.lang.String"/>
+ <field name="meta:bedheight_header" class="java.lang.String"/>
+ <field name="meta:sounding_name_header" class="java.lang.String"/>
+ <field name="meta:location_header" class="java.lang.String"/>
+ <field name="meta:river_unit" class="java.lang.String"/>
+ <field name="meta:riverside_header" class="java.lang.String"/>
+ <field name="meta:inundationduration_header" class="java.lang.String"/>
+ <field name="meta:inundationduration_q_header" class="java.lang.String"/>
+ <field name="meta:infrastructure_height_header" class="java.lang.String"/>
+ <field name="meta:infrastructure_type_header" class="java.lang.String"/>
+ <field name="meta:w_1_header" class="java.lang.String"/>
+ <field name="meta:q_1_header" class="java.lang.String"/>
+ <field name="meta:bezeichnung_1_header" class="java.lang.String"/>
+ <field name="meta:duration_1_header" class="java.lang.String"/>
+ <field name="meta:w_2_header" class="java.lang.String"/>
+ <field name="meta:q_2_header" class="java.lang.String"/>
+ <field name="meta:bezeichnung_2_header" class="java.lang.String"/>
+ <field name="meta:duration_2_header" class="java.lang.String"/>
+ <field name="meta:w_3_header" class="java.lang.String"/>
+ <field name="meta:q_3_header" class="java.lang.String"/>
+ <field name="meta:bezeichnung_3_header" class="java.lang.String"/>
+ <field name="meta:duration_3_header" class="java.lang.String"/>
+ <field name="meta:bezugswst_result_header" class="java.lang.String"/>
+ <field name="meta:bezugswst_header" class="java.lang.String"/>
+ <field name="meta:sounding_header" class="java.lang.String"/>
+ <field name="meta:channel_lower_edge_header" class="java.lang.String"/>
+ <field name="meta:channel_min_depth_header" class="java.lang.String"/>
+ <field name="meta:channel_miss_depth_header" class="java.lang.String"/>
+ <field name="meta:channel_miss_volume_header" class="java.lang.String"/>
+ <field name="meta:channel_miss_mass_header" class="java.lang.String"/>
+ <field name="meta:excavation_volume_header" class="java.lang.String"/>
+ <field name="meta:excavation_costs_header" class="java.lang.String"/>
+ <field name="meta:channel_width_header" class="java.lang.String"/>
+ <field name="meta:density_header" class="java.lang.String"/>
+ <field name="data:0" class="java.lang.String"/>
+ <field name="data:1" class="java.lang.String"/>
+ <field name="data:2" class="java.lang.String"/>
+ <field name="data:3" class="java.lang.String"/>
+ <field name="data:4" class="java.lang.String"/>
+ <field name="data:5" class="java.lang.String"/>
+ <field name="data:6" class="java.lang.String"/>
+ <field name="data:7" class="java.lang.String"/>
+ <field name="data:8" class="java.lang.String"/>
+ <field name="data:9" class="java.lang.String"/>
+ <field name="data:10" class="java.lang.String"/>
+ <field name="data:11" class="java.lang.String"/>
+ <field name="data:12" class="java.lang.String"/>
+ <field name="data:13" class="java.lang.String"/>
+ <field name="data:14" class="java.lang.String"/>
+ <background>
+ <band splitType="Stretch"/>
+ </background>
+ <title>
+ <band height="30" splitType="Stretch">
+ <textField>
+ <reportElement style="htmlStyle" x="0" y="0" width="515" height="30"/>
+ <textElement>
+ <font size="18"/>
+ </textElement>
+ <textFieldExpression><![CDATA[$F{meta:bezugswst_result_header}]]></textFieldExpression>
+ </textField>
+ </band>
+ </title>
+ <columnHeader>
+ <band height="25" splitType="Stretch">
+ <line>
+ <reportElement style="htmlStyle" positionType="FixRelativeToBottom" x="-36" y="24" width="805" height="1"/>
+ </line>
+ <textField isStretchWithOverflow="true">
+ <reportElement style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="-36" y="0" width="50" height="24">
+ <property name="net.sf.jasperreports.text.hyphenation" value="true"/>
+ <property name="net.sf.jasperreports.text.save.line.breaks" value="true"/>
+ <property name="net.sf.jasperreports.export.xls.wrap.text" value="true"/>
+ </reportElement>
+ <box padding="2"/>
+ <textElement textAlignment="Right" verticalAlignment="Bottom"/>
+ <textFieldExpression><![CDATA[$F{meta:bezugswst_header}]]></textFieldExpression>
+ </textField>
+ <textField isStretchWithOverflow="true">
+ <reportElement style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="14" y="0" width="40" height="24"/>
+ <box padding="2"/>
+ <textElement textAlignment="Right" verticalAlignment="Bottom"/>
+ <textFieldExpression><![CDATA[$F{meta:discharge_header}]]></textFieldExpression>
+ </textField>
+ <textField isStretchWithOverflow="true">
+ <reportElement key="" style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="54" y="0" width="50" height="24"/>
+ <box padding="2"/>
+ <textElement textAlignment="Left" verticalAlignment="Bottom"/>
+ <textFieldExpression><![CDATA[$F{meta:waterlevel_name_header}]]></textFieldExpression>
+ </textField>
+ <textField isStretchWithOverflow="true">
+ <reportElement key="" style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="104" y="0" width="66" height="24"/>
+ <box padding="2"/>
+ <textElement textAlignment="Left" verticalAlignment="Bottom"/>
+ <textFieldExpression><![CDATA[$F{meta:gauge_header}]]></textFieldExpression>
+ </textField>
+ <textField isStretchWithOverflow="true">
+ <reportElement key="" style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="170" y="0" width="96" height="24"/>
+ <box padding="2"/>
+ <textElement textAlignment="Left" verticalAlignment="Bottom"/>
+ <textFieldExpression><![CDATA[$F{meta:sounding_header}]]></textFieldExpression>
+ </textField>
+ <textField isStretchWithOverflow="true">
+ <reportElement key="" style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="266" y="0" width="50" height="24"/>
+ <box padding="2"/>
+ <textElement textAlignment="Left" verticalAlignment="Bottom"/>
+ <textFieldExpression><![CDATA[$F{meta:channel_lower_edge_header}]]></textFieldExpression>
+ </textField>
+ <textField isStretchWithOverflow="true">
+ <reportElement key="" style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="316" y="0" width="45" height="24"/>
+ <box padding="2"/>
+ <textElement textAlignment="Right" verticalAlignment="Bottom"/>
+ <textFieldExpression><![CDATA[$F{meta:channel_min_depth_header}]]></textFieldExpression>
+ </textField>
+ <textField isStretchWithOverflow="true">
+ <reportElement key="" style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="361" y="0" width="35" height="24"/>
+ <box padding="2"/>
+ <textElement textAlignment="Left" verticalAlignment="Bottom"/>
+ <textFieldExpression><![CDATA[$F{meta:channel_miss_depth_header}]]></textFieldExpression>
+ </textField>
+ <textField isStretchWithOverflow="true">
+ <reportElement key="" style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="396" y="0" width="50" height="24"/>
+ <box padding="2"/>
+ <textElement textAlignment="Right" verticalAlignment="Bottom"/>
+ <textFieldExpression><![CDATA[$F{meta:channel_miss_volume_header}]]></textFieldExpression>
+ </textField>
+ <textField isStretchWithOverflow="true">
+ <reportElement key="" style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="446" y="0" width="50" height="24"/>
+ <box padding="2"/>
+ <textElement textAlignment="Right" verticalAlignment="Bottom"/>
+ <textFieldExpression><![CDATA[$F{meta:channel_miss_mass_header}]]></textFieldExpression>
+ </textField>
+ <textField isStretchWithOverflow="true">
+ <reportElement key="" style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="496" y="0" width="50" height="24"/>
+ <box padding="2"/>
+ <textElement textAlignment="Right" verticalAlignment="Bottom"/>
+ <textFieldExpression><![CDATA[$F{meta:excavation_volume_header}]]></textFieldExpression>
+ </textField>
+ <textField isStretchWithOverflow="true">
+ <reportElement key="" style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="546" y="0" width="50" height="24"/>
+ <box padding="2"/>
+ <textElement textAlignment="Right" verticalAlignment="Bottom"/>
+ <textFieldExpression><![CDATA[$F{meta:excavation_costs_header}]]></textFieldExpression>
+ </textField>
+ <textField isStretchWithOverflow="true">
+ <reportElement key="" style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="596" y="0" width="50" height="24"/>
+ <box padding="2"/>
+ <textElement textAlignment="Right" verticalAlignment="Bottom"/>
+ <textFieldExpression><![CDATA[$F{meta:channel_width_header}]]></textFieldExpression>
+ </textField>
+ <textField isStretchWithOverflow="true">
+ <reportElement key="" style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="646" y="0" width="50" height="24"/>
+ <box padding="2"/>
+ <textElement textAlignment="Right" verticalAlignment="Bottom"/>
+ <textFieldExpression><![CDATA[$F{meta:density_header}]]></textFieldExpression>
+ </textField>
+ <textField isStretchWithOverflow="true">
+ <reportElement key="wOpt" style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="696" y="0" width="75" height="24"/>
+ <box padding="2"/>
+ <textElement textAlignment="Left" verticalAlignment="Bottom"/>
+ <textFieldExpression><![CDATA[$F{meta:location_header}]]></textFieldExpression>
+ </textField>
+ </band>
+ </columnHeader>
+ <detail>
+ <band height="15" splitType="Prevent">
+ <textField isStretchWithOverflow="true" isBlankWhenNull="true">
+ <reportElement style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="-36" y="0" width="50" height="15"/>
+ <box padding="2">
+ <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ </box>
+ <textElement textAlignment="Right" verticalAlignment="Top"/>
+ <textFieldExpression><![CDATA[$F{data:0}]]></textFieldExpression>
+ </textField>
+ <textField isStretchWithOverflow="true" isBlankWhenNull="true">
+ <reportElement style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="14" y="0" width="40" height="15"/>
+ <box padding="2">
+ <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ </box>
+ <textElement textAlignment="Right"/>
+ <textFieldExpression><![CDATA[$F{data:1}]]></textFieldExpression>
+ </textField>
+ <textField isStretchWithOverflow="true" isBlankWhenNull="true">
+ <reportElement key="" style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="54" y="0" width="50" height="15"/>
+ <box padding="2">
+ <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ </box>
+ <textElement textAlignment="Left"/>
+ <textFieldExpression><![CDATA[$F{data:2}]]></textFieldExpression>
+ </textField>
+ <textField isStretchWithOverflow="true" isBlankWhenNull="true">
+ <reportElement key="" style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="104" y="0" width="66" height="15"/>
+ <box padding="2">
+ <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ </box>
+ <textElement textAlignment="Left"/>
+ <textFieldExpression><![CDATA[$F{data:3}]]></textFieldExpression>
+ </textField>
+ <textField isStretchWithOverflow="true" isBlankWhenNull="true">
+ <reportElement key="" style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="170" y="0" width="96" height="15"/>
+ <box padding="2">
+ <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ </box>
+ <textElement textAlignment="Left"/>
+ <textFieldExpression><![CDATA[$F{data:4}]]></textFieldExpression>
+ </textField>
+ <textField isStretchWithOverflow="true" isBlankWhenNull="true">
+ <reportElement key="" style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="266" y="0" width="50" height="15"/>
+ <box padding="2">
+ <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ </box>
+ <textElement textAlignment="Left"/>
+ <textFieldExpression><![CDATA[$F{data:5}]]></textFieldExpression>
+ </textField>
+ <textField isStretchWithOverflow="true" isBlankWhenNull="true">
+ <reportElement key="" style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="316" y="0" width="45" height="15"/>
+ <box padding="2">
+ <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ </box>
+ <textElement textAlignment="Right"/>
+ <textFieldExpression><![CDATA[$F{data:6}]]></textFieldExpression>
+ </textField>
+ <textField isStretchWithOverflow="true" isBlankWhenNull="true">
+ <reportElement key="" style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="361" y="0" width="35" height="15"/>
+ <box padding="2">
+ <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ </box>
+ <textElement textAlignment="Left"/>
+ <textFieldExpression><![CDATA[$F{data:7}]]></textFieldExpression>
+ </textField>
+ <textField isStretchWithOverflow="true" isBlankWhenNull="true">
+ <reportElement key="" style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="396" y="0" width="50" height="15"/>
+ <box padding="2">
+ <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ </box>
+ <textElement textAlignment="Right"/>
+ <textFieldExpression><![CDATA[$F{data:8}]]></textFieldExpression>
+ </textField>
+ <textField isStretchWithOverflow="true" isBlankWhenNull="true">
+ <reportElement key="" style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="446" y="0" width="50" height="15"/>
+ <box padding="2">
+ <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ </box>
+ <textElement textAlignment="Right"/>
+ <textFieldExpression><![CDATA[$F{data:9}]]></textFieldExpression>
+ </textField>
+ <textField isStretchWithOverflow="true" isBlankWhenNull="true">
+ <reportElement key="" style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="496" y="0" width="50" height="15"/>
+ <box padding="2">
+ <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ </box>
+ <textElement textAlignment="Right"/>
+ <textFieldExpression><![CDATA[$F{data:10}]]></textFieldExpression>
+ </textField>
+ <textField isStretchWithOverflow="true" isBlankWhenNull="true">
+ <reportElement key="" style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="546" y="0" width="50" height="15"/>
+ <box padding="2">
+ <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ </box>
+ <textElement textAlignment="Right"/>
+ <textFieldExpression><![CDATA[$F{data:11}]]></textFieldExpression>
+ </textField>
+ <textField isStretchWithOverflow="true" isBlankWhenNull="true">
+ <reportElement key="" style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="596" y="0" width="50" height="15"/>
+ <box padding="2">
+ <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ </box>
+ <textElement textAlignment="Right"/>
+ <textFieldExpression><![CDATA[$F{data:12}]]></textFieldExpression>
+ </textField>
+ <textField isStretchWithOverflow="true" isBlankWhenNull="true">
+ <reportElement key="" style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="646" y="0" width="50" height="15"/>
+ <box padding="2">
+ <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ </box>
+ <textElement textAlignment="Right"/>
+ <textFieldExpression><![CDATA[$F{data:13}]]></textFieldExpression>
+ </textField>
+ <textField isStretchWithOverflow="true" isBlankWhenNull="true">
+ <reportElement key="wOpt" style="htmlStyle" positionType="Float" stretchType="RelativeToBandHeight" x="696" y="0" width="75" height="15"/>
+ <box padding="2">
+ <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+ </box>
+ <textElement textAlignment="Left"/>
+ <textFieldExpression><![CDATA[$F{data:14}]]></textFieldExpression>
+ </textField>
+ </band>
+ </detail>
+ <pageFooter>
+ <band height="15" splitType="Stretch">
+ <textField isStretchWithOverflow="true">
+ <reportElement style="htmlStyle" x="634" y="0" width="55" height="15"/>
+ <box topPadding="2" rightPadding="3"/>
+ <textElement textAlignment="Right"/>
+ <textFieldExpression><![CDATA[$V{PAGE_NUMBER} +(($F{meta:startpageoffset} != null) ? $F{meta:startpageoffset} : 0 )]]></textFieldExpression>
+ </textField>
+ <textField isStretchWithOverflow="true" evaluationTime="Report">
+ <reportElement style="htmlStyle" x="690" y="0" width="57" height="15"/>
+ <box topPadding="2" leftPadding="0" bottomPadding="0" rightPadding="0"/>
+ <textFieldExpression><![CDATA["/ " + ( $V{PAGE_NUMBER}+( ($F{meta:totalpages} != null) ? $F{meta:totalpages} -$V{PAGE_NUMBER} : 0 ) )]]></textFieldExpression>
+ </textField>
+ </band>
+ </pageFooter>
+ <summary>
+ <band height="30" splitType="Stretch"/>
+ </summary>
+</jasperReport>
diff -r 6a7758923762 -r 0a0937f33bb5 artifacts/doc/conf/jasper/templates/sinfo.collision.detail.jrxml
--- a/artifacts/doc/conf/jasper/templates/sinfo.collision.detail.jrxml Fri Jul 27 16:19:09 2018 +0200
+++ b/artifacts/doc/conf/jasper/templates/sinfo.collision.detail.jrxml Fri Jul 27 17:19:27 2018 +0200
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.5.1.final using JasperReports Library version 4.5.0 -->
-<!-- 2018-07-27T10:06:32 -->
+<!-- 2018-07-27T15:40:03 -->
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="flysreport" language="groovy" pageWidth="595" pageHeight="842" columnWidth="515" leftMargin="60" rightMargin="20" topMargin="20" bottomMargin="20">
<property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="0"/>
diff -r 6a7758923762 -r 0a0937f33bb5 artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/BunduResultType.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/BunduResultType.java Fri Jul 27 16:19:09 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/BunduResultType.java Fri Jul 27 17:19:27 2018 +0200
@@ -26,10 +26,15 @@
super(unit, csvHeader, pdfHeader);
}
+ protected BunduResultType(final String unit, final String csvHeader) {
+ super(unit, csvHeader, csvHeader);
+ }
+
private static final long serialVersionUID = 1L;
- public static final BunduResultType bezugswst = new BunduResultType(I18NStrings.CSV_META_HEIGHT_UNIT_RIVER, "bundu.wst.export.csv.meta.header.bezugswst",
- "bundu.wst.export.csv.meta.header.bezugswst") { // UNIT needed?
+ public static final BunduResultType bezugswst = new BunduResultType(I18NStrings.UNIT_NONE, "bundu.wst.export.csv.meta.header.bezugswst",
+ "bundu.wst.export.pdf.meta.header.bezugswst") { // Unit
+ // dynamic
private static final long serialVersionUID = 1L;
@Override
@@ -44,4 +49,189 @@
}
};
+ public static final BunduResultType sounding = new BunduResultType(I18NStrings.UNIT_NONE, "bundu.export.bezugswst.csv.meta.miss.sounding") {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public String exportValue(final CallContext context, final Object value) {
+ return exportStringValue(value);
+ }
+
+ @Override
+ protected NumberFormat createFormatter(final CallContext context) {
+ throw new UnsupportedOperationException();
+ }
+ };
+
+ public static final BunduResultType channelLowerEdge = new BunduResultType(I18NStrings.UNIT_NONE, "bundu.export.bezugswst.csv.meta.miss.channel.lower_edge",
+ "bundu.export.bezugswst.pdf.meta.miss.channel.lower_edge") { // Unit dynamic
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public String exportValue(final CallContext context, final Object value) {
+ final double doubleValue = asDouble(value);
+ return exportDoubleValue(context, doubleValue);
+ }
+
+ @Override
+ protected NumberFormat createFormatter(final CallContext context) {
+ return Formatter.getWaterlevelQ(context); // Richtiges Format? TODO check!
+ }
+ };
+
+ public static final BunduResultType channelMinDepth = new BunduResultType(I18NStrings.UNIT_M, "bundu.export.bezugswst.csv.meta.miss.channel.min_depth",
+ "bundu.export.bezugswst.pdf.meta.miss.channel.min_depth") {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public String exportValue(final CallContext context, final Object value) {
+ final double doubleValue = asDouble(value);
+ return exportDoubleValue(context, doubleValue);
+ }
+
+ @Override
+ protected NumberFormat createFormatter(final CallContext context) {
+ return Formatter.getWaterlevelQ(context); // Richtiges Format? TODO check!
+ }
+ };
+
+ public static final BunduResultType hasMissingDepth = new BunduResultType(I18NStrings.UNIT_NONE, "bundu.export.bezugswst.csv.meta.miss.exists",
+ "bundu.export.bezugswst.pdf.meta.miss.exists") {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public String exportValue(final CallContext context, final Object value) {
+ return exportStringValue(value);
+ }
+
+ @Override
+ protected NumberFormat createFormatter(final CallContext context) {
+ throw new UnsupportedOperationException();
+ }
+ };
+ public static final BunduResultType missVolume = new BunduResultType(I18NStrings.UNIT_CUBIC_M, "bundu.export.bezugswst.csv.meta.miss.volume") {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public String exportValue(final CallContext context, final Object value) {
+ final double doubleValue = asDouble(value);
+ return exportDoubleValue(context, doubleValue);
+ }
+
+ @Override
+ protected NumberFormat createFormatter(final CallContext context) {
+ return Formatter.getWaterlevelQ(context); // Richtiges Format? TODO check!
+ }
+ };
+
+ public static final BunduResultType missMass = new BunduResultType(I18NStrings.UNIT_TON, "bundu.export.bezugswst.csv.meta.miss.mass",
+ "bundu.export.bezugswst.csv.meta.miss.mass") {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public String exportValue(final CallContext context, final Object value) {
+ final double doubleValue = asDouble(value);
+ return exportDoubleValue(context, doubleValue);
+ }
+
+ @Override
+ protected NumberFormat createFormatter(final CallContext context) {
+ return Formatter.getWaterlevelQ(context); // Richtiges Format? TODO check!
+ }
+ };
+
+ public static final BunduResultType excavationVolume = new BunduResultType(I18NStrings.UNIT_CUBIC_M, "bundu.export.bezugswst.csv.meta.miss.excavation",
+ "bundu.export.bezugswst.pdf.meta.miss.excavation") {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public String exportValue(final CallContext context, final Object value) {
+ final double doubleValue = asDouble(value);
+ return exportDoubleValue(context, doubleValue);
+ }
+
+ @Override
+ protected NumberFormat createFormatter(final CallContext context) {
+ return Formatter.getWaterlevelQ(context); // Richtiges Format? TODO check!
+ }
+ };
+
+ public static final BunduResultType excavationCosts = new BunduResultType(I18NStrings.UNIT_EURO, "bundu.export.bezugswst.csv.meta.miss.costs",
+ "bundu.export.bezugswst.pdf.meta.miss.costs") {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public String exportValue(final CallContext context, final Object value) {
+ final double doubleValue = asDouble(value);
+ return exportDoubleValue(context, doubleValue);
+ }
+
+ @Override
+ protected NumberFormat createFormatter(final CallContext context) {
+ return Formatter.getWaterlevelQ(context); // Richtiges Format? TODO check!
+ }
+ };
+
+ public static final BunduResultType channelWidth = new BunduResultType(I18NStrings.UNIT_M, "bundu.export.bezugswst.csv.meta.miss.channel.width",
+ "bundu.export.bezugswst.pdf.meta.miss.channel.width") {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public String exportValue(final CallContext context, final Object value) {
+ final double doubleValue = asDouble(value);
+ return exportDoubleValue(context, doubleValue);
+ }
+
+ @Override
+ protected NumberFormat createFormatter(final CallContext context) {
+ return Formatter.getWaterlevelQ(context); // Richtiges Format? TODO check!
+ }
+ };
+
+ public static final BunduResultType density = new BunduResultType(I18NStrings.UNIT_M, "bundu.export.bezugswst.csv.meta.miss.density",
+ "bundu.export.bezugswst.pdf.meta.miss.density") {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public String exportValue(final CallContext context, final Object value) {
+ final double doubleValue = asDouble(value);
+ return exportDoubleValue(context, doubleValue);
+ }
+
+ @Override
+ protected NumberFormat createFormatter(final CallContext context) {
+ return Formatter.getWaterlevelQ(context); // Richtiges Format? TODO check!
+ }
+ };
+
+ public static final BunduResultType field = new BunduResultType(I18NStrings.UNIT_NONE, "bundu.export.bezugswst.csv.meta.miss.field") {
+ private static final long serialVersionUID = 1L; // unit steht in der zelle jedesmal: z.B. 1125 [m³] / 1912.5 [t] (Dezimaltrennzeichen bwt)
+ // ist warscheinlich schwierig mit dem Replacement von "{0}"
+
+ @Override
+ public String exportValue(final CallContext context, final Object value) {
+ final double doubleValue = asDouble(value);
+ return exportDoubleValue(context, doubleValue);
+ }
+
+ @Override
+ protected NumberFormat createFormatter(final CallContext context) {
+ return Formatter.getWaterlevelQ(context); // Richtiges Format? TODO check!
+ }
+ };
+
+ public static final BunduResultType meanBedheight = new BunduResultType(I18NStrings.UNIT_NONE, "bundu.export.bezugswst.csv.meta.miss.mean_bedheight") {
+ private static final long serialVersionUID = 1L; // unit steht in der zelle jedesmal: z.B. 1125 [m³] / 1912.5 [t] (Dezimaltrennzeichen bwt)
+
+ @Override
+ public String exportValue(final CallContext context, final Object value) {
+ final double doubleValue = asDouble(value);
+ return exportDoubleValue(context, doubleValue);
+ }
+
+ @Override
+ protected NumberFormat createFormatter(final CallContext context) {
+ return Formatter.getWaterlevelQ(context); // Richtiges Format? TODO check!
+ }
+ };
}
\ No newline at end of file
diff -r 6a7758923762 -r 0a0937f33bb5 artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstCalculation.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstCalculation.java Fri Jul 27 16:19:09 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstCalculation.java Fri Jul 27 17:19:27 2018 +0200
@@ -13,6 +13,7 @@
import java.util.List;
import org.dive4elements.artifacts.CallContext;
+import org.dive4elements.artifacts.CallMeta;
import org.dive4elements.river.artifacts.bundu.BUNDUArtifact;
import org.dive4elements.river.artifacts.bundu.BunduResultType;
import org.dive4elements.river.artifacts.common.GeneralResultType;
@@ -38,13 +39,13 @@
public CalculationResult calculate(final BUNDUArtifact bunduartifact) {
final String user = CalculationUtils.findArtifactUser(this.context, bunduartifact);
-
+ final CallMeta m = this.context.getMeta();
/* 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 String calcModeLabel = Resources.getMsg(m, "bundu_bezugswst");
final BezugswstCalculationResults results = new BezugswstCalculationResults(calcModeLabel, user, riverInfo, access.getRange());
// TODO: get wst, sounding for river
@@ -60,6 +61,7 @@
final double[] qs = access.getQs();
final Double missingVolFrom = access.getMissingVolFrom();
final Double missingVolTo = access.getMissingVolTo();
+
final List<ResultRow> list = new ArrayList<>();
final ResultRow row = ResultRow.create();
row.putValue(GeneralResultType.station, 666.666);
@@ -70,9 +72,39 @@
row.putValue(GeneralResultType.location, "keine Lage");
list.add(row);
- final BezugswstCalculationResult result = new BezugswstCalculationResult("label? was fürn label?", list, sounding, wstInfo, function, preprocessing,
- startYear, endYear, ud, qs, missingVolFrom, missingVolTo);
+ final BezugswstMainCalculationResult result = new BezugswstMainCalculationResult("label? was fürn label?", list, sounding, wstInfo, function,
+ preprocessing, startYear, endYear, ud, qs, missingVolFrom, missingVolTo);
results.addResult(result, null);
+
+ // missing volume calculation
+ if (access.getMissingVolFrom() != null) {
+
+ final List<ResultRow> listResult1 = new ArrayList<>();
+ final ResultRow rowResult1 = ResultRow.create();
+ rowResult1.putValue(BunduResultType.bezugswst, 45.15);
+ rowResult1.putValue(GeneralResultType.dischargeQwithUnit, 890);
+ rowResult1.putValue(GeneralResultType.waterlevelLabel, "GLQ");
+ rowResult1.putValue(GeneralResultType.gaugeLabel, "Bonn");
+
+ rowResult1.putValue(BunduResultType.sounding, "NIEDERRHEIN_QP-2002");
+ rowResult1.putValue(BunduResultType.channelLowerEdge, 42.65);
+ rowResult1.putValue(BunduResultType.channelMinDepth, 2.5);
+ rowResult1.putValue(BunduResultType.hasMissingDepth, Resources.getMsg(m, "true"));
+ rowResult1.putValue(BunduResultType.missVolume, 2250);
+ rowResult1.putValue(BunduResultType.missMass, 3897);
+ rowResult1.putValue(BunduResultType.excavationVolume, 2475);
+ rowResult1.putValue(BunduResultType.excavationCosts, 999.99);
+ rowResult1.putValue(BunduResultType.channelWidth, 150);
+ rowResult1.putValue(BunduResultType.density, 1732);
+
+ rowResult1.putValue(GeneralResultType.location, "Spitzenlage");
+ listResult1.add(rowResult1);
+
+ final BezugswstMissVolCalculationResult1 r1 = new BezugswstMissVolCalculationResult1(
+ Resources.getMsg(m, "bundu.export.csv.title.bezugswst.result1"), listResult1);
+ results.addResult(r1, null);
+ }
+
return new CalculationResult(results, null);// problems);
}
diff -r 6a7758923762 -r 0a0937f33bb5 artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstCalculationResult.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstCalculationResult.java Fri Jul 27 16:19:09 2018 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,147 +0,0 @@
-/* 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.bundu.BunduResultType;
-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;
- private final BedHeightInfo sounding;
- private final String function;
- private final boolean preprocessing;
- private final int startYear;
- private final int endYear;
- private final Double missingVolumeFrom;
- private final Double missingVolumeTo;
- private final Integer ud;
- private final double[] qOfGauges;
-
- public BezugswstCalculationResult(final String label, final Collection<ResultRow> rows, final BedHeightInfo sounding, final WstInfo wst,
- final String function, final boolean preprocessing, final int startYear, final int endYear, final Integer ud, final double[] qOfGauges,
- final Double missingVolumeFrom, final Double missingVolumeTo) {
- super(label, rows);
- this.wst = wst;
- this.sounding = sounding;
- this.function = function;
- this.preprocessing = preprocessing;
- this.startYear = startYear;
- this.endYear = endYear;
- this.missingVolumeTo = missingVolumeTo;
- this.missingVolumeFrom = missingVolumeFrom;
- this.ud = ud;
- this.qOfGauges = qOfGauges;
- }
-
- @Override
- protected void writeCSVResultMetadata(final ExportContextCSV exportContextCSV) {
-
- // TODO: wenn wst und peilung vorhanden sind, sollte dieser Teil wieder einkommentiert werden
- // exportContextCSV.writeCSVWaterlevelMetadata(wst);
- // exportContextCSV.writeBlankLine();
- // exportContextCSV.writeCSVSoundingMetadata(this.sounding, " ");
-
- // Reihenfolge in der LV anders; ich finde sie aber so sinnvoller
- exportContextCSV.writeCSVMetaEntry("bundu.export.bezugswst.csv.meta.function", this.function);
- exportContextCSV.writeCSVMetaEntry("bundu.export.bezugswst.csv.meta.preprocessing", String.valueOf(this.preprocessing));
- exportContextCSV.writeCSVMetaEntry("bundu.export.bezugswst.csv.meta.q_period", String.valueOf(this.startYear), String.valueOf(this.endYear));
- if (this.ud != null)
- exportContextCSV.writeCSVMetaEntry("bundu.export.bezugswst.csv.meta.ud", this.ud);
- else if (this.qOfGauges != null)
- exportContextCSV.writeCSVMetaEntry("common.export.waterlevel.csv.meta.q", this.qOfGauges); // was auch immer dieser String beinhalten mag
-
- exportContextCSV.writeCSVMetaEntry("bundu.export.bezugswst.csv.meta.function", this.function);
- exportContextCSV.writeCSVMetaEntry("bundu.export.bezugswst.csv.meta.missing_volume_range", this.missingVolumeFrom, this.missingVolumeTo);
-
- exportContextCSV.writeBlankLine();
- }
-
- @Override
- protected String getJasperFile() {
- return JASPER_FILE;
- }
-
- protected String[] formatRow(final IExportContext exportContext, final ResultRow row) {
-
- final Collection<String> lines = new ArrayList<>(10);
-
- lines.add(exportContext.formatRowValue(row, GeneralResultType.station));
- lines.add(exportContext.formatRowValue(row, BunduResultType.bezugswst));
- lines.add(exportContext.formatRowValue(row, GeneralResultType.dischargeQwithUnit));
-
- lines.add(exportContext.formatRowValue(row, GeneralResultType.waterlevelLabel));
- lines.add(exportContext.formatRowValue(row, GeneralResultType.gaugeLabel));
- 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<String> header = new ArrayList<>(11);
-
- header.add(exportContextCSV.formatCsvHeader(GeneralResultType.station));
- header.add(exportContextCSV.formatCsvHeader(BunduResultType.bezugswst));
- header.add(exportContextCSV.formatCsvHeader(GeneralResultType.dischargeQwithUnit));
- header.add(exportContextCSV.formatCsvHeader(GeneralResultType.waterlevelLabel));
- header.add(exportContextCSV.formatCsvHeader(GeneralResultType.gaugeLabel));
- 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, "bezugswst_header", BunduResultType.bezugswst);
- exportContextPDF.addJRMetadata(source, "discharge_header", GeneralResultType.dischargeQwithUnit);
- exportContextPDF.addJRMetadata(source, "waterlevel_name_header", GeneralResultType.waterlevelLabel);
- exportContextPDF.addJRMetadata(source, "gauge_header", GeneralResultType.gaugeLabel);
- exportContextPDF.addJRMetadata(source, "location_header", GeneralResultType.location);
-
- }
-}
\ No newline at end of file
diff -r 6a7758923762 -r 0a0937f33bb5 artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstCalculationResults.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstCalculationResults.java Fri Jul 27 16:19:09 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstCalculationResults.java Fri Jul 27 17:19:27 2018 +0200
@@ -10,6 +10,7 @@
package org.dive4elements.river.artifacts.bundu.bezugswst;
import org.apache.commons.lang.math.DoubleRange;
+import org.dive4elements.river.artifacts.common.AbstractCalculationExportableResult;
import org.dive4elements.river.artifacts.common.AbstractCalculationResults;
import org.dive4elements.river.artifacts.sinfo.util.RiverInfo;
@@ -17,13 +18,12 @@
* @author Gernot Belger
*/
-final class BezugswstCalculationResults extends AbstractCalculationResults<BezugswstCalculationResult> {
+final class BezugswstCalculationResults extends AbstractCalculationResults<AbstractCalculationExportableResult> {
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 6a7758923762 -r 0a0937f33bb5 artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstMainCalculationResult.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstMainCalculationResult.java Fri Jul 27 17:19:27 2018 +0200
@@ -0,0 +1,148 @@
+/* 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.bundu.BunduResultType;
+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 BezugswstMainCalculationResult extends AbstractCalculationExportableResult {
+
+ private static final long serialVersionUID = 1L;
+
+ private static final String JASPER_FILE = "/jasper/templates/bundu.bezugswst.jrxml";
+
+ private final WstInfo wst;
+ private final BedHeightInfo sounding;
+ private final String function;
+ private final boolean preprocessing;
+ private final int startYear;
+ private final int endYear;
+ private final Double missingVolumeFrom;
+ private final Double missingVolumeTo;
+ private final Integer ud;
+ private final double[] qOfGauges;
+
+ public BezugswstMainCalculationResult(final String label, final Collection<ResultRow> rows, final BedHeightInfo sounding, final WstInfo wst,
+ final String function, final boolean preprocessing, final int startYear, final int endYear, final Integer ud, final double[] qOfGauges,
+ final Double missingVolumeFrom, final Double missingVolumeTo) {
+ super(label, rows);
+ this.wst = wst;
+ this.sounding = sounding;
+ this.function = function;
+ this.preprocessing = preprocessing;
+ this.startYear = startYear;
+ this.endYear = endYear;
+ this.missingVolumeTo = missingVolumeTo;
+ this.missingVolumeFrom = missingVolumeFrom;
+ this.ud = ud;
+ this.qOfGauges = qOfGauges;
+ }
+
+ @Override
+ protected void writeCSVResultMetadata(final ExportContextCSV exportContextCSV) {
+
+ // TODO: wenn wst und peilung vorhanden sind, sollte dieser Teil wieder einkommentiert werden
+ // exportContextCSV.writeCSVWaterlevelMetadata(wst);
+ // exportContextCSV.writeBlankLine();
+ // exportContextCSV.writeCSVSoundingMetadata(this.sounding, " ");
+
+ // Reihenfolge in der LV anders; ich finde sie aber so sinnvoller
+ exportContextCSV.writeCSVMetaEntry("bundu.export.bezugswst.csv.meta.function", this.function);
+ exportContextCSV.writeCSVMetaEntry("bundu.export.bezugswst.csv.meta.preprocessing", exportContextCSV.msg(String.valueOf(this.preprocessing)));
+ exportContextCSV.writeCSVMetaEntry("bundu.export.bezugswst.csv.meta.q_period", String.valueOf(this.startYear), String.valueOf(this.endYear));
+ if (this.ud != null)
+ exportContextCSV.writeCSVMetaEntry("bundu.export.bezugswst.csv.meta.ud", this.ud);
+ else if (this.qOfGauges != null)
+ exportContextCSV.writeCSVMetaEntry("common.export.waterlevel.csv.meta.q", this.qOfGauges); // was auch immer dieser String beinhalten mag
+
+ exportContextCSV.writeCSVMetaEntry("bundu.export.bezugswst.csv.meta.function", this.function);
+ exportContextCSV.writeCSVMetaEntry("bundu.export.bezugswst.csv.meta.missing_volume_range", this.missingVolumeFrom, this.missingVolumeTo);
+
+ exportContextCSV.writeBlankLine();
+ }
+
+ @Override
+ protected String getJasperFile() {
+ return JASPER_FILE;
+ }
+
+ protected String[] formatRow(final IExportContext exportContext, final ResultRow row) {
+
+ final Collection<String> lines = new ArrayList<>(10);
+
+ lines.add(exportContext.formatRowValue(row, GeneralResultType.station));
+ lines.add(exportContext.formatRowValue(row, BunduResultType.bezugswst));
+ lines.add(exportContext.formatRowValue(row, GeneralResultType.dischargeQwithUnit));
+
+ lines.add(exportContext.formatRowValue(row, GeneralResultType.waterlevelLabel));
+ lines.add(exportContext.formatRowValue(row, GeneralResultType.gaugeLabel));
+ 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 int colSize = 6;
+ exportContextCSV.writeTitleForTabs("bundu.export.csv.title.bezugswst.overview", colSize); // Voraussetzung für Tabs ist, dass der Titel vor den Headern
+ final Collection<String> header = new ArrayList<>(colSize);
+
+ header.add(exportContextCSV.formatCsvHeader(GeneralResultType.station));
+ header.add(exportContextCSV.formatCsvHeader(BunduResultType.bezugswst) + " [" + river.getWstUnit() + "]");
+ header.add(exportContextCSV.formatCsvHeader(GeneralResultType.dischargeQwithUnit));
+ header.add(exportContextCSV.formatCsvHeader(GeneralResultType.waterlevelLabel));
+ header.add(exportContextCSV.formatCsvHeader(GeneralResultType.gaugeLabel));
+ 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, "bezugswst_header", BunduResultType.bezugswst);
+ exportContextPDF.addJRMetadata(source, "discharge_header", GeneralResultType.dischargeQwithUnit);
+ exportContextPDF.addJRMetadata(source, "waterlevel_name_header", GeneralResultType.waterlevelLabel);
+ exportContextPDF.addJRMetadata(source, "gauge_header", GeneralResultType.gaugeLabel);
+ exportContextPDF.addJRMetadata(source, "location_header", GeneralResultType.location);
+
+ }
+}
\ No newline at end of file
diff -r 6a7758923762 -r 0a0937f33bb5 artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstMissVolCalculationResult1.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstMissVolCalculationResult1.java Fri Jul 27 17:19:27 2018 +0200
@@ -0,0 +1,140 @@
+/* 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.bundu.BunduResultType;
+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.RiverInfo;
+
+/**
+ * Contains the results of a //TODO LINK{@link BezugswstCalculation}.
+ *
+ * @author Gernot Belger
+ */
+final class BezugswstMissVolCalculationResult1 extends AbstractCalculationExportableResult {
+
+ private static final long serialVersionUID = 1L;
+
+ private static final String JASPER_FILE = "/jasper/templates/bundu.bezugswst.result1.jrxml";
+
+ public BezugswstMissVolCalculationResult1(final String label, final Collection<ResultRow> rows) {
+ super(label, rows);
+
+ }
+
+ @Override
+ protected void writeCSVResultMetadata(final ExportContextCSV exportContextCSV) {
+ // no metadata
+ }
+
+ @Override
+ protected String getJasperFile() {
+ return JASPER_FILE;
+ }
+
+ protected String[] formatRow(final IExportContext exportContext, final ResultRow row) {
+
+ final Collection<String> lines = new ArrayList<>(10);
+
+ lines.add(exportContext.formatRowValue(row, BunduResultType.bezugswst));
+ lines.add(exportContext.formatRowValue(row, GeneralResultType.dischargeQwithUnit));
+ lines.add(exportContext.formatRowValue(row, GeneralResultType.waterlevelLabel));
+ lines.add(exportContext.formatRowValue(row, GeneralResultType.gaugeLabel));
+
+ lines.add(exportContext.formatRowValue(row, BunduResultType.sounding));
+ lines.add(exportContext.formatRowValue(row, BunduResultType.channelLowerEdge));
+ lines.add(exportContext.formatRowValue(row, BunduResultType.channelMinDepth));
+ lines.add(exportContext.formatRowValue(row, BunduResultType.hasMissingDepth));
+ lines.add(exportContext.formatRowValue(row, BunduResultType.missVolume));
+ lines.add(exportContext.formatRowValue(row, BunduResultType.missMass));
+ lines.add(exportContext.formatRowValue(row, BunduResultType.excavationVolume));
+ lines.add(exportContext.formatRowValue(row, BunduResultType.excavationCosts));
+ lines.add(exportContext.formatRowValue(row, BunduResultType.channelWidth));
+ lines.add(exportContext.formatRowValue(row, BunduResultType.density));
+
+ 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 int colSize = 15;
+ exportContextCSV.writeTitleForTabs("bundu.export.csv.title.bezugswst.result1", colSize); // Voraussetzung für Tabs ist, dass der Titel vor den Headern
+ final Collection<String> header = new ArrayList<>(colSize);
+
+ header.add(exportContextCSV.formatCsvHeader(BunduResultType.bezugswst) + " [" + river.getWstUnit() + "]");
+ header.add(exportContextCSV.formatCsvHeader(GeneralResultType.dischargeQwithUnit));
+ header.add(exportContextCSV.formatCsvHeader(GeneralResultType.waterlevelLabel));
+ header.add(exportContextCSV.formatCsvHeader(GeneralResultType.gaugeLabel));
+
+ header.add(exportContextCSV.formatCsvHeader(BunduResultType.sounding));
+ header.add(exportContextCSV.formatCsvHeader(BunduResultType.channelLowerEdge));
+ header.add(exportContextCSV.formatCsvHeader(BunduResultType.channelMinDepth));
+ header.add(exportContextCSV.formatCsvHeader(BunduResultType.hasMissingDepth));
+ header.add(exportContextCSV.formatCsvHeader(BunduResultType.missVolume));
+ header.add(exportContextCSV.formatCsvHeader(BunduResultType.missMass));
+ header.add(exportContextCSV.formatCsvHeader(BunduResultType.excavationVolume));
+ header.add(exportContextCSV.formatCsvHeader(BunduResultType.excavationCosts));
+ header.add(exportContextCSV.formatCsvHeader(BunduResultType.channelWidth));
+ header.add(exportContextCSV.formatCsvHeader(BunduResultType.density));
+
+ 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, "bezugswst_header", BunduResultType.bezugswst);
+ exportContextPDF.addJRMetadata(source, "discharge_header", GeneralResultType.dischargeQwithUnit);
+ exportContextPDF.addJRMetadata(source, "waterlevel_name_header", GeneralResultType.waterlevelLabel);
+ exportContextPDF.addJRMetadata(source, "gauge_header", GeneralResultType.gaugeLabel);
+
+ exportContextPDF.addJRMetadata(source, "sounding_header", BunduResultType.sounding);
+ exportContextPDF.addJRMetadata(source, "channel_lower_edge_header", BunduResultType.channelLowerEdge);
+ exportContextPDF.addJRMetadata(source, "channel_min_depth_header", BunduResultType.channelMinDepth);
+ exportContextPDF.addJRMetadata(source, "channel_miss_depth_header", BunduResultType.hasMissingDepth);
+ exportContextPDF.addJRMetadata(source, "channel_miss_volume_header", BunduResultType.missVolume);
+ exportContextPDF.addJRMetadata(source, "channel_miss_mass_header", BunduResultType.missMass);
+ exportContextPDF.addJRMetadata(source, "excavation_volume_header", BunduResultType.excavationVolume);
+ exportContextPDF.addJRMetadata(source, "excavation_costs_header", BunduResultType.excavationCosts);
+ exportContextPDF.addJRMetadata(source, "channel_width_header", BunduResultType.channelWidth);
+ exportContextPDF.addJRMetadata(source, "density_header", BunduResultType.density);
+
+ exportContextPDF.addJRMetadata(source, "location_header", GeneralResultType.location);
+
+ }
+}
\ No newline at end of file
diff -r 6a7758923762 -r 0a0937f33bb5 artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BunduWstExporter.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BunduWstExporter.java Fri Jul 27 16:19:09 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BunduWstExporter.java Fri Jul 27 17:19:27 2018 +0200
@@ -9,9 +9,11 @@
package org.dive4elements.river.artifacts.bundu.bezugswst;
import org.apache.log4j.Logger;
+import org.dive4elements.river.artifacts.common.AbstractCalculationExportableResult;
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.JasperDesigner;
import org.dive4elements.river.artifacts.common.MetaAndTableJRDataSource;
/**
@@ -20,7 +22,7 @@
*
* @author <a href="mailto:ingo.weinzierl at intevation.de">Ingo Weinzierl</a>
*/
-public class BunduWstExporter extends AbstractCommonExporter<BezugswstCalculationResult, BezugswstCalculationResults> {
+public class BunduWstExporter extends AbstractCommonExporter<AbstractCalculationExportableResult, BezugswstCalculationResults> {
/** The log used in this exporter. */
private static Logger log = Logger.getLogger(BunduWstExporter.class);
@@ -33,9 +35,15 @@
@Override
protected void writePDFGlobalMetadata(final ExportContextPDF exportContext, final MetaAndTableJRDataSource source) {
exportContext.addJRMetaDataForModules(source);
- // TODO: add custom stuff here
- // source.addMetaData("flowdepthdevelopment_header_label",
- // SInfoResultType.flowdepthDevelopment.getCsvHeader(this.context.getMeta()));// (this.context.getMeta()));
}
+
+ @Override
+ protected void configureDesign(final AbstractCalculationExportableResult result, final JasperDesigner design) {
+ if (result instanceof BezugswstMissVolCalculationResult1 // || result intanceof BezugswstMiss...2,3 TODO
+
+ ) {
+ design.getSource().addMetaData("bezugswst_result_header", result.getLabel()); // globalMeta? wrong place. only one result expected, so it works
+ }
+ }
}
\ No newline at end of file
diff -r 6a7758923762 -r 0a0937f33bb5 artifacts/src/main/java/org/dive4elements/river/artifacts/common/I18NStrings.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/common/I18NStrings.java Fri Jul 27 16:19:09 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/common/I18NStrings.java Fri Jul 27 17:19:27 2018 +0200
@@ -64,4 +64,8 @@
String UNIT_CM_A = "cm/a";
String UNIT_CUBIC_M = "m³/s";
+
+ String UNIT_TON = "t";
+
+ String UNIT_EURO = "€";
}
diff -r 6a7758923762 -r 0a0937f33bb5 artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthdev/FlowDepthDevelopmentState.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthdev/FlowDepthDevelopmentState.java Fri Jul 27 16:19:09 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthdev/FlowDepthDevelopmentState.java Fri Jul 27 17:19:27 2018 +0200
@@ -78,7 +78,7 @@
final FlowDepthDevelopmentCalculationResults results = (FlowDepthDevelopmentCalculationResults) res.getData();
final FlowDepthDevelopmentCalculationResult result = results.getResult();
if (result != null) {
- // final BezugswstCalculationResult result = (BezugswstCalculationResult) resultList.get(0);
+ // final BezugswstMainCalculationResult result = (BezugswstMainCalculationResult) resultList.get(0);
/* add themes for chart, for each result */
final int index = 0;
diff -r 6a7758923762 -r 0a0937f33bb5 artifacts/src/main/resources/messages.properties
--- a/artifacts/src/main/resources/messages.properties Fri Jul 27 16:19:09 2018 +0200
+++ b/artifacts/src/main/resources/messages.properties Fri Jul 27 17:19:27 2018 +0200
@@ -905,6 +905,31 @@
bundu.export.bezugswst.csv.meta.ud = # UD (d/a): {0}
bundu.export.bezugswst.csv.meta.missing_volume_range = # Bereich der Fehltiefenermittlung: {0} - {1}
+bundu.export.csv.title.bezugswst.overview = \u00dcbersicht
+bundu.export.csv.title.bezugswst.result1 = Fehlvolumenermittlung 1
+bundu.export.csv.title.bezugswst.result2 = Fehlvolumenermittlung 2
+bundu.export.csv.title.bezugswst.result3 = Summe der Fehlvolumen
+
+bundu.export.bezugswst.csv.meta.miss.density = Lagerungsdichte [t/m\u00b3]
+bundu.export.bezugswst.pdf.meta.miss.density = Lagerungs-dichte [t/m\u00b3]
+bundu.export.bezugswst.csv.meta.miss.channel.width = Breite Fahrrinnenkasten [m]
+bundu.export.bezugswst.pdf.meta.miss.channel.width = Breite Fahr-rinnen-kasten [m]
+bundu.export.bezugswst.csv.meta.miss.costs = Baggerkosten [\u20ac]
+bundu.export.bezugswst.pdf.meta.miss.costs = Bagger-kosten [\u20ac]
+bundu.export.bezugswst.csv.meta.miss.excavation = Baggervolumina [m\u00b3]
+bundu.export.bezugswst.pdf.meta.miss.excavation = Bagger-volumina [m\u00b3]
+bundu.export.bezugswst.csv.meta.miss.mass = Masse Fehltiefe ges. [t]
+bundu.export.bezugswst.csv.meta.miss.volume = Volumen Fehltiefe ges. [m\u00b3]
+bundu.export.bezugswst.csv.meta.miss.exists = Fehltiefe vorhanden?
+bundu.export.bezugswst.pdf.meta.miss.exists = Fehl-tiefe vor-handen?
+bundu.export.bezugswst.csv.meta.miss.channel.min_depth = Zu gew\u00e4hrleistende Fahrrinnentiefe [m]
+bundu.export.bezugswst.pdf.meta.miss.channel.min_depth = Zu gew\u00e4hr-leistende Fahrrinnen-tiefe [m]
+bundu.export.bezugswst.csv.meta.miss.channel.lower_edge = Unterkante Fahrrinnenkasten [{0}]
+bundu.export.bezugswst.pdf.meta.miss.channel.lower_edge = Unterkante Fahrrinnen-kasten [{0}]
+bundu.export.bezugswst.csv.meta.miss.sounding = Peilung
+bundu.export.bezugswst.csv.meta.miss.field = Feld {0} Fehlvolumen/-masse
+bundu.export.bezugswst.csv.meta.miss.mean_bedheight = Mittlere Sohlh\u00f6he Fehlvolumen/-masse
+
export.flow_depth.csv.header.km = Fluss-km
sinfo.export.flow_depth.csv.header.flowdepth = Flie\u00dftiefe
sinfo.export.flow_depth.csv.header.flowdepthTkh = Flie\u00dftiefe mit TKH
@@ -1225,6 +1250,7 @@
state.bundu.wst.function = Auswahl der Ausgleichsfunktion
bundu.wst.export.csv.meta.header.bezugswst = Bezugswasserstand
+bundu.wst.export.pdf.meta.header.bezugswst = Bezugs-wasserstand
common.client.ui.selection = Selection
common.client.ui.from = from
diff -r 6a7758923762 -r 0a0937f33bb5 artifacts/src/main/resources/messages_de.properties
--- a/artifacts/src/main/resources/messages_de.properties Fri Jul 27 16:19:09 2018 +0200
+++ b/artifacts/src/main/resources/messages_de.properties Fri Jul 27 17:19:27 2018 +0200
@@ -905,6 +905,31 @@
bundu.export.bezugswst.csv.meta.ud = # UD (d/a): {0}
bundu.export.bezugswst.csv.meta.missing_volume_range = # Bereich der Fehltiefenermittlung: {0} - {1}
+bundu.export.csv.title.bezugswst.overview = \u00dcbersicht
+bundu.export.csv.title.bezugswst.result1 = Fehlvolumenermittlung 1
+bundu.export.csv.title.bezugswst.result2 = Fehlvolumenermittlung 2
+bundu.export.csv.title.bezugswst.result3 = Summe der Fehlvolumen
+
+bundu.export.bezugswst.csv.meta.miss.density = Lagerungsdichte [t/m\u00b3]
+bundu.export.bezugswst.pdf.meta.miss.density = Lagerungs-dichte [t/m\u00b3]
+bundu.export.bezugswst.csv.meta.miss.channel.width = Breite Fahrrinnenkasten [m]
+bundu.export.bezugswst.pdf.meta.miss.channel.width = Breite Fahr-rinnen-kasten [m]
+bundu.export.bezugswst.csv.meta.miss.costs = Baggerkosten [\u20ac]
+bundu.export.bezugswst.pdf.meta.miss.costs = Bagger-kosten [\u20ac]
+bundu.export.bezugswst.csv.meta.miss.excavation = Baggervolumina [m\u00b3]
+bundu.export.bezugswst.pdf.meta.miss.excavation = Bagger-volumina [m\u00b3]
+bundu.export.bezugswst.csv.meta.miss.mass = Masse Fehltiefe ges. [t]
+bundu.export.bezugswst.csv.meta.miss.volume = Volumen Fehltiefe ges. [m\u00b3]
+bundu.export.bezugswst.csv.meta.miss.exists = Fehltiefe vorhanden?
+bundu.export.bezugswst.pdf.meta.miss.exists = Fehl-tiefe vor-handen?
+bundu.export.bezugswst.csv.meta.miss.channel.min_depth = Zu gew\u00e4hrleistende Fahrrinnentiefe [m]
+bundu.export.bezugswst.pdf.meta.miss.channel.min_depth = Zu gew\u00e4hr-leistende Fahrrinnen-tiefe [m]
+bundu.export.bezugswst.csv.meta.miss.channel.lower_edge = Unterkante Fahrrinnenkasten [{0}]
+bundu.export.bezugswst.pdf.meta.miss.channel.lower_edge = Unterkante Fahrrinnen-kasten [{0}]
+bundu.export.bezugswst.csv.meta.miss.sounding = Peilung
+bundu.export.bezugswst.csv.meta.miss.field = Feld {0} Fehlvolumen/-masse
+bundu.export.bezugswst.csv.meta.miss.mean_bedheight = Mittlere Sohlh\u00f6he Fehlvolumen/-masse
+
export.flow_depth.csv.header.km = Fluss-km
sinfo.export.flow_depth.csv.header.flowdepth = Flie\u00dftiefe
sinfo.export.flow_depth.csv.header.flowdepthTkh = Flie\u00dftiefe mit TKH
@@ -1225,6 +1250,7 @@
state.bundu.wst.function = Auswahl der Ausgleichsfunktion
bundu.wst.export.csv.meta.header.bezugswst = Bezugswasserstand
+bundu.wst.export.pdf.meta.header.bezugswst = Bezugs-wasserstand
common.client.ui.selection = Auswahl
common.client.ui.from = von
More information about the Dive4Elements-commits
mailing list