Mercurial > dive4elements > river
changeset 7981:45cced06490c facet-metadata
merged with default.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Mon, 30 Jun 2014 11:29:45 +0200 (2014-06-30) |
parents | 42076d94977e (current diff) cacff0246a81 (diff) |
children | 62befca02480 |
files | artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffEpochFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffEpochFilterFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffEpochResult.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightEpochData.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/PorosityFacet.java artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDiffEpochInfoGenerator.java artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDifferenceEpochGenerator.java artifacts/src/main/java/org/dive4elements/river/exports/process/BedWidthProcessor.java artifacts/src/main/java/org/dive4elements/river/exports/process/FlowVelocityProcessor.java backend/doc/documentation/de/importer-hydr-morph.tex backend/src/main/java/org/dive4elements/river/importer/ImportBedHeightEpoch.java backend/src/main/java/org/dive4elements/river/importer/ImportBedHeightEpochValue.java backend/src/main/java/org/dive4elements/river/importer/parsers/BedHeightEpochParser.java backend/src/main/java/org/dive4elements/river/model/BedHeightEpoch.java backend/src/main/java/org/dive4elements/river/model/BedHeightEpochValue.java |
diffstat | 114 files changed, 1311 insertions(+), 2399 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgtags Wed May 21 11:43:10 2014 +0200 +++ b/.hgtags Mon Jun 30 11:29:45 2014 +0200 @@ -87,3 +87,12 @@ 0000000000000000000000000000000000000000 3.1.1 837b620b58b436f1eeb1a18fbe871a9de650dad5 3.1.1 242e790fb4eeb44ffec94fad9ef19fb6ca59d79f 3.1.2 +952b57b43e2fab1af900cc4019366df1378f47f9 3.1.3 +9d5385ccad0778e4867901b4e18a06a5cb90b0f6 3.1.13 +9d5385ccad0778e4867901b4e18a06a5cb90b0f6 3.1.13 +0000000000000000000000000000000000000000 3.1.13 +952b57b43e2fab1af900cc4019366df1378f47f9 3.1.3 +e0d06f4edaa6d0f3a15b8eecfe7696e825ff5062 3.1.3 +e0d06f4edaa6d0f3a15b8eecfe7696e825ff5062 3.1.3 +8333b9b06c981a231e0c92283de3bfa65b6cc0d9 3.1.3 +6fef38a526c705158f17fa16839ad216d5ec8afc 3.1.4
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/artifacts/contrib/find-obsolete-i18n-strings.py Mon Jun 30 11:29:45 2014 +0200 @@ -0,0 +1,32 @@ +#!/usr/bin/env python + +import os +import re +import sys + +KEY_RE = re.compile(r"^\s*([^\s=]+)\s*=.*$") + +def main(): + content = [] + for root, dirs, files in os.walk('.'): + for f in files: + if not (f.endswith(".java") or f.endswith(".xml")): + continue + p = os.path.join(root, f) + with open(p, "rb") as jf: + content.append(jf.read()) + + content = ''.join(content) + + for arg in sys.argv[1:]: + with open(arg, "rb") as prop: + for line in prop: + m = KEY_RE.match(line) + if not m: + continue + key = m.group(1) + if content.find(key) == -1: + print key + +if __name__ == "__main__": + main()
--- a/artifacts/doc/conf/artifacts/minfo.xml Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/doc/conf/artifacts/minfo.xml Mon Jun 30 11:29:45 2014 +0200 @@ -35,7 +35,7 @@ <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> <from state="state.minfo.calculation_mode"/> - <to state="state.minfo.bed.year_epoch"/> + <to state="state.minfo.bed.difference_select"/> <condition data="calculation_mode" value="calc.bed.diff" operator="equal"/> </transition> @@ -51,10 +51,6 @@ <data name="ld_to" type="Double" /> </state> - <state id="state.minfo.bed.year_epoch" description="state.minfo.bed.year_epoch" state="org.dive4elements.river.artifacts.states.minfo.YearEpochSelect" helpText="help.state.minfo.bed.year_epoch"> - <data name="ye_select" type="String" /> - </state> - <state id="state.minfo.sq.location" description="state.minfo.sq.location" state="org.dive4elements.river.artifacts.states.LocationSelect" helpText="help.state.minfo.sq.location"> <data name="ld_locations" type="double"/> </state> @@ -82,11 +78,6 @@ </transition> <transition transition="org.dive4elements.river.artifacts.transitions.DefaultTransition"> - <from state="state.minfo.bed.year_epoch"/> - <to state="state.minfo.bed.difference_select"/> - </transition> - - <transition transition="org.dive4elements.river.artifacts.transitions.DefaultTransition"> <from state="state.minfo.bed.location"/> <to state="state.minfo.bed.periods"/> </transition>
--- a/artifacts/doc/conf/generators.xml Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/doc/conf/generators.xml Mon Jun 30 11:29:45 2014 +0200 @@ -147,8 +147,6 @@ <output-generator names="flow_velocity_export" class="org.dive4elements.river.exports.FlowVelocityExporter"/> <output-generator names="bedheight_middle_export" class="org.dive4elements.river.exports.MiddleBedHeightExporter"/> <output-generator names="bed_quality_export" class="org.dive4elements.river.exports.minfo.BedQualityExporter"/> - <output-generator names="bed_difference_epoch" class="org.dive4elements.river.exports.minfo.BedDifferenceEpochGenerator"/> - <output-generator names="bed_difference_epoch_chartinfo" class="org.dive4elements.river.exports.minfo.BedDiffEpochInfoGenerator"/> <output-generator names="bedheight_difference_export" class="org.dive4elements.river.exports.minfo.BedDifferenceExporter"/> <output-generator names="sq_relation_export" class="org.dive4elements.river.exports.sq.SQRelationExporter"/> <output-generator names="sq_overview" class="org.dive4elements.river.exports.sq.SQOverviewGenerator"/>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/artifacts/doc/conf/jasper/beddifference.jrxml Mon Jun 30 11:29:45 2014 +0200 @@ -0,0 +1,156 @@ +<?xml version="1.0" encoding="UTF-8"?> +<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"/> + <property name="ireport.y" value="0"/> + <field name="river" class="java.lang.String"/> + <field name="diff" class="java.lang.String"/> + <field name="date" class="java.lang.String"/> + <field name="calculation" class="java.lang.String"/> + <field name="differences" class="java.lang.String"/> + <field name="km" class="java.lang.String"/> + <field name="diffheader" class="java.lang.String"/> + <field name="diffpairheader" class="java.lang.String"/> + <field name="diffpair" class="java.lang.String"/> + <field name="morph1header" class="java.lang.String"/> + <field name="morph1" class="java.lang.String"/> + <field name="morph2header" class="java.lang.String"/> + <field name="morph2" class="java.lang.String"/> + <field name="kmheader" class="java.lang.String"/> + <background> + <band splitType="Stretch"/> + </background> + <title> + <band height="161" splitType="Stretch"> + <staticText> + <reportElement x="0" y="1" width="177" height="30"/> + <textElement> + <font size="18"/> + </textElement> + <text><![CDATA[Ergebnisausgabe]]></text> + </staticText> + <textField> + <reportElement x="177" y="0" width="338" height="31"/> + <textElement> + <font size="18"/> + </textElement> + <textFieldExpression><![CDATA[$F{river}]]></textFieldExpression> + </textField> + <textField> + <reportElement x="0" y="31" width="515" height="26"/> + <textElement> + <font size="14"/> + </textElement> + <textFieldExpression><![CDATA[$F{calculation}]]></textFieldExpression> + </textField> + <staticText> + <reportElement x="0" y="70" width="123" height="20"/> + <textElement/> + <text><![CDATA[Gewässer:]]></text> + </staticText> + <textField> + <reportElement x="123" y="70" width="392" height="20"/> + <textElement/> + <textFieldExpression><![CDATA[$F{river}]]></textFieldExpression> + </textField> + <staticText> + <reportElement x="0" y="90" width="123" height="20"/> + <textElement/> + <text><![CDATA[Datum der Erstellung:]]></text> + </staticText> + <textField> + <reportElement x="123" y="90" width="392" height="20"/> + <textElement/> + <textFieldExpression><![CDATA[$F{date}]]></textFieldExpression> + </textField> + <staticText> + <reportElement x="0" y="109" width="123" height="20"/> + <textElement/> + <text><![CDATA[Differenzen:]]></text> + </staticText> + <textField isStretchWithOverflow="true"> + <reportElement stretchType="RelativeToTallestObject" x="123" y="109" width="392" height="20"/> + <textElement/> + <textFieldExpression><![CDATA[$F{differences}]]></textFieldExpression> + </textField> + </band> + </title> + <columnHeader> + <band height="24" splitType="Stretch"> + <line> + <reportElement x="0" y="19" width="515" height="1"/> + </line> + <textField> + <reportElement x="0" y="0" width="54" height="20"/> + <textElement markup="none"/> + <textFieldExpression><![CDATA[$F{kmheader}]]></textFieldExpression> + </textField> + <textField> + <reportElement x="167" y="0" width="96" height="20"/> + <textElement markup="none"/> + <textFieldExpression><![CDATA[$F{diffheader}]]></textFieldExpression> + </textField> + <textField> + <reportElement x="54" y="0" width="113" height="19"/> + <textElement/> + <textFieldExpression><![CDATA[$F{diffpairheader}]]></textFieldExpression> + </textField> + <textField> + <reportElement x="263" y="0" width="123" height="20"/> + <textElement/> + <textFieldExpression><![CDATA[$F{morph1header}]]></textFieldExpression> + </textField> + <textField> + <reportElement x="386" y="0" width="128" height="19"/> + <textElement/> + <textFieldExpression><![CDATA[$F{morph2header}]]></textFieldExpression> + </textField> + </band> + </columnHeader> + <detail> + <band height="18" splitType="Stretch"> + <textField isBlankWhenNull="true"> + <reportElement x="0" y="0" width="54" height="14"/> + <textElement/> + <textFieldExpression><![CDATA[$F{km}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="167" y="0" width="96" height="14"/> + <textElement/> + <textFieldExpression><![CDATA[$F{diff}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="54" y="0" width="113" height="14"/> + <textElement/> + <textFieldExpression><![CDATA[$F{diffpair}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="263" y="0" width="123" height="14"/> + <textElement/> + <textFieldExpression><![CDATA[$F{morph1}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="386" y="0" width="128" height="14"/> + <textElement/> + <textFieldExpression><![CDATA[$F{morph2}]]></textFieldExpression> + </textField> + </band> + </detail> + <pageFooter> + <band height="29" splitType="Stretch"> + <textField evaluationTime="Report"> + <reportElement x="457" y="9" width="57" height="20"/> + <textElement/> + <textFieldExpression><![CDATA[" / " + $V{PAGE_NUMBER}]]></textFieldExpression> + </textField> + <textField> + <reportElement x="402" y="9" width="55" height="20"/> + <textElement textAlignment="Right"/> + <textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression> + </textField> + </band> + </pageFooter> + <summary> + <band height="42" splitType="Stretch"/> + </summary> +</jasperReport>
--- a/artifacts/doc/conf/jasper/sqrelation.jrxml Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/doc/conf/jasper/sqrelation.jrxml Mon Jun 30 11:29:45 2014 +0200 @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> -<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" uuid="b6d7de63-ee2d-42cc-ae0b-d518b3061f34"> +<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.5"/> - <property name="ireport.x" value="0"/> - <property name="ireport.y" value="197"/> - <subDataset name="dataset1" uuid="7f14a59c-4250-4060-90e5-c25f5c0be4de"/> + <property name="ireport.x" value="54"/> + <property name="ireport.y" value="670"/> + <subDataset name="dataset1"/> <field name="river" class="java.lang.String"/> <field name="periods" class="java.lang.String"/> <field name="outliertest" class="java.lang.String"/> @@ -30,357 +30,366 @@ <title> <band height="562" splitType="Stretch"> <staticText> - <reportElement x="0" y="1" width="177" height="30" uuid="ea2c7f24-bfb8-4827-b578-4bd2b217a296"/> + <reportElement x="0" y="1" width="177" height="30"/> <textElement> <font size="18"/> </textElement> <text><![CDATA[Ergebnisausgabe]]></text> </staticText> <textField> - <reportElement x="177" y="0" width="338" height="31" uuid="91b15a29-a4bf-4623-868c-4dea6797f696"/> + <reportElement x="177" y="0" width="338" height="31"/> <textElement> <font size="18"/> </textElement> <textFieldExpression><![CDATA[$F{river}]]></textFieldExpression> </textField> <textField> - <reportElement x="0" y="31" width="515" height="26" uuid="4a262597-f5d6-458e-af8b-afe554fc0102"/> + <reportElement x="0" y="31" width="515" height="26"/> <textElement> <font size="14"/> </textElement> <textFieldExpression><![CDATA[$F{calculation}]]></textFieldExpression> </textField> <staticText> - <reportElement x="0" y="211" width="123" height="20" uuid="5939c51d-e441-490b-813e-14ef73d4a566"/> + <reportElement x="0" y="211" width="123" height="20"/> <textElement verticalAlignment="Middle"/> <text><![CDATA[Gewässer:]]></text> </staticText> <textField isBlankWhenNull="false"> - <reportElement x="123" y="211" width="392" height="20" isRemoveLineWhenBlank="true" uuid="1dc3bbce-49bc-4f21-90d0-f04690fc8f9e"/> + <reportElement x="123" y="211" width="392" height="20" isRemoveLineWhenBlank="true"/> <textElement verticalAlignment="Middle"/> <textFieldExpression><![CDATA[$F{river}]]></textFieldExpression> </textField> <staticText> - <reportElement x="0" y="231" width="123" height="20" uuid="7e0d3425-968a-4000-876c-a3fbbeb0a36c"/> + <reportElement x="0" y="231" width="123" height="20"/> <textElement verticalAlignment="Middle"/> <text><![CDATA[Ort:]]></text> </staticText> <textField isBlankWhenNull="false"> - <reportElement x="123" y="231" width="392" height="20" isRemoveLineWhenBlank="true" uuid="f9b20927-f244-4ed9-ab9f-a88cc2fd643b"/> + <reportElement x="123" y="231" width="392" height="20" isRemoveLineWhenBlank="true"/> <textElement verticalAlignment="Middle"/> <textFieldExpression><![CDATA[$F{location}]]></textFieldExpression> </textField> <staticText> - <reportElement x="0" y="291" width="123" height="20" uuid="629b34e1-8131-4202-950f-2811cb33982f"/> + <reportElement x="0" y="291" width="123" height="20"/> <textElement verticalAlignment="Middle"/> <text><![CDATA[Datum der Erstellung:]]></text> </staticText> <textField isBlankWhenNull="false"> - <reportElement x="123" y="291" width="392" height="20" isRemoveLineWhenBlank="true" uuid="6c88d0c9-e695-49c4-a6ec-c0dd4ddbb343"/> + <reportElement x="123" y="291" width="392" height="20" isRemoveLineWhenBlank="true"/> <textElement verticalAlignment="Middle"/> <textFieldExpression><![CDATA[$F{date}]]></textFieldExpression> </textField> <staticText> - <reportElement x="0" y="311" width="123" height="20" uuid="47d924ca-f38c-490a-aa3b-18838124e6af"/> + <reportElement x="0" y="311" width="123" height="20"/> <textElement verticalAlignment="Middle"/> <text><![CDATA[Zeitraum:]]></text> </staticText> <textField isBlankWhenNull="false"> - <reportElement x="123" y="311" width="392" height="20" isRemoveLineWhenBlank="true" uuid="f3602df3-74fe-40c1-ace6-f41e8216e221"/> + <reportElement x="123" y="311" width="392" height="20" isRemoveLineWhenBlank="true"/> <textElement verticalAlignment="Middle"/> <textFieldExpression><![CDATA[$F{periods}]]></textFieldExpression> </textField> <staticText> - <reportElement x="0" y="331" width="123" height="20" uuid="bb031cd0-2b45-43f4-88c4-7d6865208637"/> + <reportElement x="0" y="331" width="123" height="20"/> <textElement verticalAlignment="Middle"/> <text><![CDATA[Ausreißertest:]]></text> </staticText> <textField isBlankWhenNull="false"> - <reportElement x="123" y="331" width="392" height="20" isRemoveLineWhenBlank="true" uuid="b2eac7df-2616-4f2e-839c-731aaf0093c7"/> + <reportElement x="123" y="331" width="392" height="20" isRemoveLineWhenBlank="true"/> <textElement verticalAlignment="Middle"/> <textFieldExpression><![CDATA[$F{outliertest}]]></textFieldExpression> </textField> <staticText> - <reportElement x="0" y="351" width="123" height="20" uuid="f71b4e2d-a071-4f45-a058-7f4fe30ad408"/> + <reportElement x="0" y="351" width="123" height="20"/> <textElement verticalAlignment="Middle"/> <text><![CDATA[Ausreißer:]]></text> </staticText> <textField isBlankWhenNull="false"> - <reportElement x="123" y="351" width="392" height="20" isRemoveLineWhenBlank="true" uuid="5f453092-4a9a-497f-afd7-bee7be1290f7"/> + <reportElement x="123" y="351" width="392" height="20" isRemoveLineWhenBlank="true"/> <textElement verticalAlignment="Middle"/> <textFieldExpression><![CDATA[$F{outliers}]]></textFieldExpression> </textField> <staticText> - <reportElement x="0" y="57" width="346" height="20" uuid="d87807aa-6f27-492a-993a-5a49b7fccb83"/> + <reportElement x="0" y="57" width="346" height="20"/> <textElement markup="styled"> <font size="12"/> </textElement> <text><![CDATA[in der Funktion S = aQ<sup>b</sup>]]></text> </staticText> <staticText> - <reportElement x="0" y="81" width="62" height="20" uuid="10110bb0-9bfa-42b8-802c-ca07d747234c"/> + <reportElement x="0" y="81" width="62" height="20"/> <textElement verticalAlignment="Middle"/> <text><![CDATA[PARAMETER]]></text> </staticText> <staticText> - <reportElement x="84" y="81" width="400" height="20" uuid="d8c8dca8-b318-40f9-92bb-f707d5b7f848"/> + <reportElement x="84" y="81" width="400" height="20"/> <textElement verticalAlignment="Middle"/> <text><![CDATA[FESTSTOFFFRAKTION]]></text> </staticText> <staticText> - <reportElement x="0" y="101" width="62" height="15" uuid="330bd2dc-04f0-4c74-9f34-330bc6915735"/> + <reportElement x="0" y="101" width="62" height="15"/> <textElement textAlignment="Center"/> <text><![CDATA[A]]></text> </staticText> <staticText> - <reportElement x="0" y="116" width="62" height="15" uuid="9069990a-ce8d-46e2-838a-f77f19b4f55c"/> + <reportElement x="0" y="116" width="62" height="15"/> <textElement textAlignment="Center"/> <text><![CDATA[B]]></text> </staticText> <staticText> - <reportElement x="0" y="146" width="62" height="15" uuid="c7a8c453-f31a-4231-a444-07a39df7af73"/> + <reportElement x="0" y="146" width="62" height="15"/> <textElement textAlignment="Center"/> <text><![CDATA[D]]></text> </staticText> <staticText> - <reportElement x="0" y="161" width="62" height="15" uuid="4d1c30d1-6ae2-48c2-ad70-ebab733aa1c7"/> + <reportElement x="0" y="161" width="62" height="15"/> <textElement textAlignment="Center"/> <text><![CDATA[E]]></text> </staticText> <staticText> - <reportElement x="0" y="176" width="62" height="15" uuid="dfab2652-3ae1-4e6e-b57b-6b0d66949e05"/> + <reportElement x="0" y="176" width="62" height="15"/> <textElement textAlignment="Center"/> <text><![CDATA[F]]></text> </staticText> <staticText> - <reportElement x="0" y="191" width="62" height="15" uuid="870fe372-d364-4431-948a-7fc4c271d6da"/> + <reportElement x="0" y="191" width="62" height="15"/> <textElement textAlignment="Center"/> <text><![CDATA[G]]></text> </staticText> <staticText> - <reportElement x="0" y="131" width="62" height="15" uuid="e5ad6c96-cbf0-4614-afbd-b72fece107b0"/> + <reportElement x="0" y="131" width="62" height="15"/> <textElement textAlignment="Center"/> <text><![CDATA[C]]></text> </staticText> <staticText> - <reportElement x="84" y="146" width="426" height="15" uuid="4d5c1309-c06f-457d-9fc5-363de9e26bef"/> + <reportElement x="84" y="146" width="426" height="15"/> + <textElement/> <text><![CDATA[Sedimenttransport von Fein- und Mittelkies (Geschiebetransport) (2-16 mm)]]></text> </staticText> <staticText> - <reportElement x="84" y="176" width="442" height="15" uuid="f790bd5a-39cc-411d-b5a4-545c925edfe4"/> + <reportElement x="84" y="176" width="442" height="15"/> + <textElement/> <text><![CDATA[Sedimenttransport von Geschiebe-gesamt (0,000-125 mm)]]></text> </staticText> <staticText> - <reportElement x="84" y="161" width="461" height="15" uuid="c25f74ed-cc4a-470a-a44a-cee0b6de3095"/> + <reportElement x="84" y="161" width="461" height="15"/> + <textElement/> <text><![CDATA[Sedimenttransport von Grobkornanteil (Geschiebetransport) (> Mittelkies 16-125 mm)]]></text> </staticText> <staticText> - <reportElement x="84" y="131" width="426" height="15" uuid="b03ec9c2-9ae9-41d7-98b7-17da2c1dda3f"/> + <reportElement x="84" y="131" width="426" height="15"/> + <textElement/> <text><![CDATA[Sedimenttransport von Sand (Geschiebetransport) (0,063-2 mm)]]></text> </staticText> <staticText> - <reportElement x="84" y="101" width="431" height="15" uuid="62c83306-ddfc-42ca-88fa-142adf68b11c"/> + <reportElement x="84" y="101" width="431" height="15"/> + <textElement/> <text><![CDATA[Sedimenttransport von Feinkornanteil (Suspensionstransport) (< 0,063 mm)]]></text> </staticText> <staticText> - <reportElement x="84" y="191" width="426" height="15" uuid="98d7b609-084b-404e-9cb6-d387953e13e1"/> + <reportElement x="84" y="191" width="426" height="15"/> + <textElement/> <text><![CDATA[Sedimenttransport von Geschiebe-gesamt-Sohlhöhenrelevant (0,063-125 mm)]]></text> </staticText> <staticText> - <reportElement x="84" y="116" width="426" height="15" uuid="c7f56c71-6ab0-4fa3-8921-050dde3c744d"/> + <reportElement x="84" y="116" width="426" height="15"/> + <textElement/> <text><![CDATA[Sedimenttransport von Sand (Suspensionstransort) (0,063-2 mm)]]></text> </staticText> <line> - <reportElement x="0" y="210" width="515" height="1" uuid="c93e6486-0e68-41b4-8e37-1feb20c3ff1d"/> + <reportElement x="0" y="210" width="515" height="1"/> </line> <textField isBlankWhenNull="false"> - <reportElement x="123" y="251" width="392" height="20" isRemoveLineWhenBlank="true" uuid="00b164e3-ac40-4e38-8cb1-6e9fd27391c1"/> + <reportElement x="123" y="251" width="392" height="20" isRemoveLineWhenBlank="true"/> <textElement verticalAlignment="Middle"/> <textFieldExpression><![CDATA[$F{msName}]]></textFieldExpression> </textField> <staticText> - <reportElement x="0" y="251" width="123" height="20" uuid="a1052a1f-2e8b-4280-b99e-982aebfeaea8"/> + <reportElement x="0" y="251" width="123" height="20"/> <textElement verticalAlignment="Middle"/> <text><![CDATA[Messstellenname:]]></text> </staticText> <textField isBlankWhenNull="false"> - <reportElement x="123" y="271" width="392" height="20" isRemoveLineWhenBlank="true" uuid="e368adda-b9b8-4f6c-963c-af10b4555bd3"/> + <reportElement x="123" y="271" width="392" height="20" isRemoveLineWhenBlank="true"/> <textElement verticalAlignment="Middle"/> <textFieldExpression><![CDATA[$F{msGauge}]]></textFieldExpression> </textField> <staticText> - <reportElement x="0" y="271" width="123" height="20" uuid="400c6d08-b7ca-4e81-b301-d101c8f0237c"/> + <reportElement x="0" y="271" width="123" height="20"/> <textElement verticalAlignment="Middle"/> <text><![CDATA[hdyr. Bezugspegel:]]></text> </staticText> <line> - <reportElement x="0" y="371" width="515" height="1" uuid="cd7640a7-b7de-4e19-b7be-08a39e0b75d3"/> + <reportElement x="0" y="371" width="515" height="1"/> </line> - <elementGroup> - <staticText> - <reportElement mode="Transparent" x="18" y="512" width="76" height="20" forecolor="#000000" backcolor="#FFFFFF" uuid="bdfd6837-f8a6-4d83-9c67-63185810022b"/> - <textElement textAlignment="Left" verticalAlignment="Middle" rotation="None" markup="styled"> - <font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> - <paragraph lineSpacing="Single"/> - </textElement> - <text><![CDATA[C<sub>Duan</sub>]]></text> - </staticText> - <staticText> - <reportElement x="18" y="458" width="76" height="20" uuid="daf38337-b8d7-4272-8ba4-05a2189b2db1"/> - <textElement markup="none"/> - <text><![CDATA[r²]]></text> - </staticText> - <staticText> - <reportElement mode="Transparent" x="18" y="478" width="76" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="4865df94-3788-443b-b86b-1b44731fac34"/> - <textElement textAlignment="Left" verticalAlignment="Middle" rotation="None" markup="styled"> - <font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> - <paragraph lineSpacing="Single"/> - </textElement> - <text><![CDATA[n<sub>tot</sub>]]></text> - </staticText> - <staticText> - <reportElement x="109" y="492" width="100" height="20" uuid="acf7c8e0-a6ac-43ef-b598-c2315029e9d4"/> - <text><![CDATA[Anzahl Ausreißer]]></text> - </staticText> - <staticText> - <reportElement mode="Transparent" x="18" y="441" width="76" height="17" forecolor="#000000" backcolor="#FFFFFF" uuid="15f4318b-28bc-413a-b23e-f6b286317d86"/> - <textElement textAlignment="Left" verticalAlignment="Middle" rotation="None" markup="styled"> - <font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> - <paragraph lineSpacing="Single"/> - </textElement> - <text><![CDATA[Q<sub>max,gemessen</sub>]]></text> - </staticText> - <staticText> - <reportElement x="18" y="417" width="76" height="24" uuid="32e2af68-cec0-415c-b948-ad7073fc2471"/> - <textElement markup="none"/> - <text><![CDATA[Standardfehler]]></text> - </staticText> - <staticText> - <reportElement x="109" y="532" width="181" height="20" uuid="34ad1c35-e0dd-4391-a500-ff87ff80e776"/> - <text><![CDATA[Bias Korrektur nach Ferguson 1986]]></text> - </staticText> - <staticText> - <reportElement x="109" y="383" width="176" height="20" uuid="e0266375-b88c-4305-bd8a-855a062b940f"/> - <textElement markup="none"/> - <text><![CDATA[Transportkurvenkoeffizient]]></text> - </staticText> - <staticText> - <reportElement x="18" y="403" width="76" height="15" uuid="9c524667-e4e8-40e4-ae48-613c4135caa1"/> - <textElement markup="none"/> - <text><![CDATA[b]]></text> - </staticText> - <staticText> - <reportElement x="18" y="383" width="76" height="20" uuid="ac7f46ac-57d9-424e-a7a7-9f85dda492f6"/> - <textElement markup="none"/> - <text><![CDATA[a]]></text> - </staticText> - <staticText> - <reportElement x="109" y="512" width="181" height="20" uuid="836b4943-193f-4cf2-a866-13c35818dc7c"/> - <text><![CDATA[Bias Korrektur nach Duan 1983]]></text> - </staticText> - <staticText> - <reportElement mode="Transparent" x="109" y="441" width="285" height="17" forecolor="#000000" backcolor="#FFFFFF" uuid="6f74a211-c286-4025-88fe-b92a6de305b9"/> - <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> - <font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> - <paragraph lineSpacing="Single"/> - </textElement> - <text><![CDATA[maximal gemessener Abfluss [m³/s]]]></text> - </staticText> - <staticText> - <reportElement x="109" y="403" width="143" height="19" uuid="3ac94bf9-2dff-4ea9-8258-799cbbf7717d"/> - <textElement markup="none"/> - <text><![CDATA[Transportkurvenexponent]]></text> - </staticText> - <staticText> - <reportElement mode="Transparent" x="18" y="492" width="76" height="20" forecolor="#000000" backcolor="#FFFFFF" uuid="79e5c3d5-c55b-416d-b8bd-2b3ec87ce047"/> - <textElement textAlignment="Left" verticalAlignment="Middle" rotation="None" markup="styled"> - <font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> - <paragraph lineSpacing="Single"/> - </textElement> - <text><![CDATA[n<sub>Ausreißer</sub>]]></text> - </staticText> - <staticText> - <reportElement x="109" y="422" width="265" height="19" uuid="336f35ad-f64c-410a-b6b7-c6d3d6a4b90c"/> - <textElement markup="none"/> - <text><![CDATA[natürlicher Logarithmus der Standardabweichung]]></text> - </staticText> - <staticText> - <reportElement x="109" y="458" width="100" height="20" uuid="51d33fdd-6ed9-4400-8faf-a037ce8b0c90"/> - <textElement markup="none"/> - <text><![CDATA[Bestimmtheitsmaß]]></text> - </staticText> - <staticText> - <reportElement mode="Transparent" x="18" y="532" width="76" height="20" forecolor="#000000" backcolor="#FFFFFF" uuid="7959337f-da23-416e-b7d6-c0d260ec6665"/> - <textElement textAlignment="Left" verticalAlignment="Middle" rotation="None" markup="styled"> - <font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> - <paragraph lineSpacing="Single"/> - </textElement> - <text><![CDATA[C <sub>Ferguson</sub>]]></text> - </staticText> - <staticText> - <reportElement x="109" y="477" width="100" height="14" uuid="b499f108-5cca-4f1e-8022-a9baf1210917"/> - <text><![CDATA[Anzahl Messwerte]]></text> - </staticText> - </elementGroup> + <staticText> + <reportElement x="18" y="383" width="76" height="20"/> + <textElement markup="none"/> + <text><![CDATA[a]]></text> + </staticText> + <staticText> + <reportElement x="109" y="383" width="176" height="20"/> + <textElement markup="none"/> + <text><![CDATA[Transportkurvenkoeffizient]]></text> + </staticText> + <staticText> + <reportElement x="18" y="403" width="76" height="15"/> + <textElement markup="none"/> + <text><![CDATA[b]]></text> + </staticText> + <staticText> + <reportElement x="109" y="403" width="143" height="19"/> + <textElement markup="none"/> + <text><![CDATA[Transportkurvenexponent]]></text> + </staticText> + <staticText> + <reportElement x="18" y="417" width="76" height="24"/> + <textElement markup="none"/> + <text><![CDATA[Standardfehler]]></text> + </staticText> + <staticText> + <reportElement mode="Transparent" x="18" y="441" width="76" height="17" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Middle" rotation="None" markup="styled"> + <font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <text><![CDATA[Q<sub>max</sub>]]></text> + </staticText> + <staticText> + <reportElement x="109" y="422" width="265" height="19"/> + <textElement markup="none"/> + <text><![CDATA[natürlicher Logarithmus der Standardabweichung]]></text> + </staticText> + <staticText> + <reportElement mode="Transparent" x="109" y="441" width="285" height="17" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <text><![CDATA[maximal gemessener Abfluss [m³/s]]]></text> + </staticText> + <staticText> + <reportElement x="18" y="458" width="76" height="20"/> + <textElement markup="none"/> + <text><![CDATA[r²]]></text> + </staticText> + <staticText> + <reportElement x="109" y="458" width="100" height="20"/> + <textElement markup="none"/> + <text><![CDATA[Bestimmtheitsmaß]]></text> + </staticText> + <staticText> + <reportElement mode="Transparent" x="18" y="478" width="76" height="14" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Middle" rotation="None" markup="styled"> + <font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <text><![CDATA[n<sub>tot</sub>]]></text> + </staticText> + <staticText> + <reportElement mode="Transparent" x="18" y="492" width="76" height="20" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Middle" rotation="None" markup="styled"> + <font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <text><![CDATA[n<sub>Ausreißer</sub>]]></text> + </staticText> + <staticText> + <reportElement x="109" y="477" width="100" height="14"/> + <textElement/> + <text><![CDATA[Anzahl Messwerte]]></text> + </staticText> + <staticText> + <reportElement x="109" y="492" width="100" height="20"/> + <textElement/> + <text><![CDATA[Anzahl Ausreißer]]></text> + </staticText> + <staticText> + <reportElement mode="Transparent" x="18" y="512" width="76" height="20" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Middle" rotation="None" markup="styled"> + <font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <text><![CDATA[C<sub>Duan</sub>]]></text> + </staticText> + <staticText> + <reportElement x="109" y="512" width="181" height="20"/> + <textElement/> + <text><![CDATA[Bias Korrektur nach Duan 1983]]></text> + </staticText> + <staticText> + <reportElement mode="Transparent" x="18" y="532" width="76" height="20" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Middle" rotation="None" markup="styled"> + <font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <text><![CDATA[C <sub>Ferguson</sub>]]></text> + </staticText> + <staticText> + <reportElement x="109" y="532" width="181" height="20"/> + <textElement/> + <text><![CDATA[Bias Korrektur nach Ferguson 1986]]></text> + </staticText> </band> </title> <columnHeader> <band height="20" splitType="Stretch"> <line> - <reportElement x="0" y="19" width="515" height="1" uuid="2a54c77e-73b7-4944-bcdd-be396d1e01bd"/> + <reportElement x="0" y="19" width="515" height="1"/> </line> <staticText> - <reportElement x="0" y="0" width="39" height="20" uuid="ac45c7e6-d865-47ed-90aa-602777d0a3c3"/> + <reportElement x="0" y="0" width="39" height="20"/> <textElement verticalAlignment="Middle"/> <text><![CDATA[Fl-km ]]></text> </staticText> <staticText> - <reportElement x="39" y="0" width="55" height="20" uuid="56343a37-b55c-440c-9f26-986eb6799946"/> + <reportElement x="39" y="0" width="55" height="20"/> <textElement verticalAlignment="Middle"/> <text><![CDATA[Parameter]]></text> </staticText> <staticText> - <reportElement x="94" y="0" width="60" height="20" uuid="cf06ea41-bad4-4c3f-a33a-ab8a3d5872d1"/> + <reportElement x="94" y="0" width="60" height="20"/> <textElement verticalAlignment="Middle"/> <text><![CDATA[a]]></text> </staticText> <staticText> - <reportElement x="189" y="0" width="76" height="20" uuid="0ed39fb7-f5e9-4497-887d-50fa9288cbec"/> + <reportElement x="189" y="0" width="76" height="20"/> <textElement verticalAlignment="Middle" markup="styled"/> <text><![CDATA[Standardfehler]]></text> </staticText> <staticText> - <reportElement x="154" y="0" width="35" height="20" uuid="491aa9fa-d761-4df8-bbad-8ec892fec52a"/> + <reportElement x="154" y="0" width="35" height="20"/> <textElement verticalAlignment="Middle"/> <text><![CDATA[b]]></text> </staticText> <staticText> - <reportElement x="265" y="0" width="60" height="20" uuid="a499ce7a-59ac-4a03-90d3-9a3bbc1712f3"/> + <reportElement x="265" y="0" width="60" height="20"/> <textElement verticalAlignment="Middle" markup="styled"/> - <text><![CDATA[Q<sub>max,gemessen</sub>]]></text> + <text><![CDATA[Q<sub>max</sub> [m³/s]]]></text> </staticText> <staticText> - <reportElement x="391" y="0" width="44" height="20" uuid="e26c82e1-014b-48ad-bd4e-5f770e3cc519"/> + <reportElement x="391" y="0" width="44" height="20"/> <textElement verticalAlignment="Middle" markup="styled"/> <text><![CDATA[n <sub>Ausreißer</sub>]]></text> </staticText> <staticText> - <reportElement x="435" y="0" width="35" height="20" uuid="bbd6cfb0-660d-43d9-a7b0-5e31f4706553"/> + <reportElement x="435" y="0" width="35" height="20"/> <textElement verticalAlignment="Middle" markup="styled"/> <text><![CDATA[C<sub>Duan</sub>]]></text> </staticText> <staticText> - <reportElement x="470" y="0" width="45" height="20" uuid="48737bce-a759-4d53-b36a-96e8835e1f99"/> + <reportElement x="470" y="0" width="45" height="20"/> <textElement verticalAlignment="Middle" markup="styled"/> <text><![CDATA[C <sub>Ferguson</sub>]]></text> </staticText> <staticText> - <reportElement x="325" y="0" width="26" height="20" uuid="6e925143-ee09-4f4b-b455-95c67bb72442"/> + <reportElement x="325" y="0" width="26" height="20"/> <textElement verticalAlignment="Middle" markup="styled"/> <text><![CDATA[r²]]></text> </staticText> <staticText> - <reportElement x="351" y="0" width="40" height="20" uuid="8d5a7cdb-6312-40a9-8431-38a87d388dbd"/> + <reportElement x="351" y="0" width="40" height="20"/> <textElement verticalAlignment="Middle" markup="styled"/> <text><![CDATA[n<sub>gesamt</sub>]]></text> </staticText> @@ -389,57 +398,57 @@ <detail> <band height="14" splitType="Stretch"> <textField isBlankWhenNull="true"> - <reportElement x="0" y="0" width="39" height="14" uuid="160039f4-9963-4f02-8f7b-ab05a5813a3c"/> + <reportElement x="0" y="0" width="39" height="14"/> <textElement verticalAlignment="Middle"/> <textFieldExpression><![CDATA[$F{km}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> - <reportElement stretchType="RelativeToBandHeight" x="154" y="0" width="35" height="14" uuid="228414fa-6e08-40c0-81c6-2fa89842eb31"/> + <reportElement stretchType="RelativeToBandHeight" x="154" y="0" width="35" height="14"/> <textElement verticalAlignment="Middle"/> <textFieldExpression><![CDATA[$F{b}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> - <reportElement stretchType="RelativeToBandHeight" x="351" y="0" width="40" height="14" isPrintWhenDetailOverflows="true" uuid="a65c0f76-65dd-4003-8bde-60a8cfdbe03d"/> + <reportElement stretchType="RelativeToBandHeight" x="351" y="0" width="40" height="14" isPrintWhenDetailOverflows="true"/> <textElement verticalAlignment="Middle"/> <textFieldExpression><![CDATA[$F{total}]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> - <reportElement x="39" y="0" width="55" height="14" uuid="438cff27-6f30-42e1-9865-5a2aaf983f26"/> + <reportElement x="39" y="0" width="55" height="14"/> <textElement verticalAlignment="Middle"/> <textFieldExpression><![CDATA[$F{param}]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> - <reportElement x="94" y="0" width="60" height="14" uuid="8a34ebd4-be25-4e3b-ac21-0906254fe67c"/> + <reportElement x="94" y="0" width="60" height="14"/> <textElement verticalAlignment="Middle"/> <textFieldExpression><![CDATA[$F{a}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> - <reportElement stretchType="RelativeToBandHeight" x="391" y="0" width="44" height="14" uuid="19a46282-3781-4b8f-9ea1-2b5e201d8143"/> + <reportElement stretchType="RelativeToBandHeight" x="391" y="0" width="44" height="14"/> <textElement verticalAlignment="Middle"/> <textFieldExpression><![CDATA[$F{out}]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> - <reportElement x="189" y="0" width="76" height="14" uuid="fba053b1-adf2-4ccd-a0d4-60c3f57f51d1"/> + <reportElement x="189" y="0" width="76" height="14"/> <textElement verticalAlignment="Middle"/> <textFieldExpression><![CDATA[$F{sd}]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> - <reportElement x="325" y="0" width="26" height="14" uuid="88626b31-52af-4748-9e02-d74639b9c813"/> + <reportElement x="325" y="0" width="26" height="14"/> <textElement verticalAlignment="Middle"/> <textFieldExpression><![CDATA[$F{r2}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> - <reportElement stretchType="RelativeToBandHeight" x="265" y="0" width="60" height="14" uuid="01c3500c-c3b2-4c8d-8df2-c1a238d4f79c"/> + <reportElement stretchType="RelativeToBandHeight" x="265" y="0" width="60" height="14"/> <textElement verticalAlignment="Middle"/> <textFieldExpression><![CDATA[$F{qmax}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> - <reportElement stretchType="RelativeToBandHeight" x="435" y="0" width="35" height="14" uuid="86ee4471-d2ed-43ea-8b35-ca759574077e"/> + <reportElement stretchType="RelativeToBandHeight" x="435" y="0" width="35" height="14"/> <textElement verticalAlignment="Middle"/> <textFieldExpression><![CDATA[$F{cduan}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> - <reportElement stretchType="RelativeToBandHeight" x="470" y="0" width="45" height="14" uuid="5d46cadc-2e8a-42e1-a284-e4319154090d"/> + <reportElement stretchType="RelativeToBandHeight" x="470" y="0" width="45" height="14"/> <textElement verticalAlignment="Middle"/> <textFieldExpression><![CDATA[$F{cferg}]]></textFieldExpression> </textField> @@ -448,11 +457,12 @@ <pageFooter> <band height="29" splitType="Stretch"> <textField evaluationTime="Report"> - <reportElement x="458" y="9" width="57" height="20" uuid="f198ce24-2d3e-4021-a481-61667820831c"/> + <reportElement x="458" y="9" width="57" height="20"/> + <textElement/> <textFieldExpression><![CDATA[" / " + $V{PAGE_NUMBER}]]></textFieldExpression> </textField> <textField> - <reportElement x="403" y="9" width="55" height="20" uuid="d513f77e-0880-4b4f-9846-f938b6959503"/> + <reportElement x="403" y="9" width="55" height="20"/> <textElement textAlignment="Right"/> <textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression> </textField>
--- a/artifacts/doc/conf/meta-data.xml Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/doc/conf/meta-data.xml Mon Jun 30 11:29:45 2014 +0200 @@ -91,10 +91,6 @@ <dc:when test="$out = 'bedheight_middle'"> <dc:call-macro name="annotations"/> </dc:when> - <dc:when test="$out = 'bed_difference_epoch'"> - <dc:call-macro name="annotations"/> - <dc:call-macro name="basedata_6_delta_w"/> - </dc:when> <dc:when test="$out = 'bed_difference_year'"> <dc:call-macro name="annotations"/> <dc:call-macro name="basedata_6_delta_w"/> @@ -136,6 +132,9 @@ <dc:iterate var="out" container="artifact-outs"> <dc:message>Non Rec out iteration for: {$out}</dc:message> <dc:choose> + <dc:when test="$out = 'minfo-heights-diff'"> + <dc:call-macro name="minfo-heights-diff"/> + </dc:when> <dc:when test="$out = 'cross_section'"> <dc:call-macro name="basedata_0"/> <dc:call-macro name="basedata_1_additionals"/> @@ -218,9 +217,6 @@ <dc:when test="$out = 'bed_difference_year'"> <dc:call-macro name="longitudinal-section-prototype"/> </dc:when> - <dc:when test="$out = 'bed_difference_epoch'"> - <dc:call-macro name="longitudinal-section-prototype"/> - </dc:when> <dc:when test="$out = 'floodmap'"> <dc:choose> <dc:when test="dc:contains($parameters, 'dem')"> @@ -399,9 +395,6 @@ <dc:when test="$out = 'bed_difference_height_year'"> <dc:call-macro name="longitudinal-section-user-prototype"/> </dc:when> - <dc:when test="$out = 'bed_difference_epoch'"> - <dc:call-macro name="longitudinal-section-user-prototype"/> - </dc:when> <dc:when test="$out = 'historical_discharge'"> <dc:call-macro name="historical-discharge-user"/> </dc:when> @@ -1038,8 +1031,8 @@ </dc:macro> <dc:macro name="bedheight_differences"> - <dc:filter expr="($out_name = 'bed_difference_year' or ($out_name = 'bed_difference_epoch' or $out_name = 'bed_difference_height_year')) and - (starts-with($facet_name, 'bedheight_difference.year') or (starts-with($facet_name, 'bedheight_difference.epoch') or starts-with($facet_name, 'bedheight_difference.height')))"> + <dc:filter expr="($out_name = 'bed_difference_year' or $out_name = 'bed_difference_height_year') and + (starts-with($facet_name, 'bedheight_difference.year') or starts-with($facet_name, 'bedheight_difference.height'))"> <dc:if test="dc:has-result()"> <bedheight_differences> <dc:call-macro name="collection-group"> @@ -1334,12 +1327,16 @@ p.id AS pid, p.description AS description, d.lower AS depth_lower, - d.upper AS depth_upper + d.upper AS depth_upper, + p.description || '<BR>' || + 'Tiefe: ' || d.lower || ' - ' || d.upper + || ' cm <BR>' || + 'Zeitraum: ' || t.start_time || ' - ' || t.stop_time + AS info FROM porosity p JOIN depths d ON p.depth_id = d.id - JOIN porosity_values pv on pv.porosity_id = p.id + JOIN time_intervals t ON p.time_interval_id=t.id WHERE p.river_id = ${river_id} - GROUP BY p.id, p.description, d.upper, d.lower ORDER BY depth_lower, depth_upper </dc:statement> <dc:if test="dc:has-result()"> @@ -1347,8 +1344,8 @@ <porosity description="{$depth_lower}-{$depth_upper} cm" factory="porosity" target_out="{$out}" - info="{$description}" - ids="{$pid}" /> + info="{$info}" + ids="{$pid};{$description}" /> </dc:for-each> </dc:if> </dc:context> @@ -1560,7 +1557,7 @@ SELECT id AS anno_id, name AS anno_description FROM annotation_types - WHERE name IN ('Quelle', 'Senke') + WHERE name LIKE 'Quelle %' OR name LIKE 'Senke %' </dc:statement> <dc:for-each> <annotation name="{$anno_description}" @@ -1724,7 +1721,101 @@ </rastermap> </dc:macro> + <dc:macro name="minfo-heights-diff"> + <dc:call-macro name="minfo-heights-years"> + <dc:context> + <dc:statement> + WITH sta + AS (SELECT bhs.id, + bhs.description, + bhsv.station, + bhs.year + FROM bed_height_single bhs + JOIN bed_height_single_values bhsv + ON bhsv.bed_height_single_id = bhs.id + WHERE bhs.river_id = ${river_id}), + csta + AS (SELECT b1.id AS b1id, + b1.description AS b1desc, + b1.year AS b1year, + b2.id AS b2id, + b2.description AS b2desc, + b2.year AS b2year + FROM sta b1 + JOIN sta b2 + ON b1.station = b2.station + AND b1.id <> b2.id) + SELECT DISTINCT b1id, b1desc, b1year, + b2id, b2desc, b2year + FROM csta + ORDER BY b1desc, b2desc + </dc:statement> + <dc:if test="dc:has-result()"> + <bedheights> + <dc:call-macro name="bed-heights-single-diff"/> + <dc:call-macro name="bed-heights-epoch-diff"/> + </bedheights> + </dc:if> + </dc:context> + </dc:call-macro> + </dc:macro> + + <dc:macro name="bed-heights-single-diff"> + <dc:filter expr="not(contains(dc:lowercase($b1desc), 'epoche') or contains(dc:lowercase($b2desc), 'epoche'))"> + <years> + <dc:call-macro name="minfo-heights-diff-tree"/> + </years> + </dc:filter> + </dc:macro> + + <dc:macro name="bed-heights-epoch-diff"> + <dc:filter expr="contains(dc:lowercase($b1desc), 'epoche') and contains(dc:lowercase($b2desc), 'epoche')"> + <epochs> + <dc:call-macro name="minfo-heights-diff-tree"/> + </epochs> + </dc:filter> + </dc:macro> + + <dc:macro name="minfo-heights-diff-tree"> + <dc:group expr="dc:coalesce($b1year, 'sonstige')"> + <minfo-diff name="{dc:group-key()}"> + <dc:for-each> + <dc:choose> + <dc:when test="dc:group-key() = $b1year"> + <height factory="bedheight" + target_out="{$out}" + ids="bedheight-single-{$b1id}-{$b1year}#bedheight-single-{$b2id}-{$b2year}" + info="{$b1desc}#{$b2desc}" + description="{$b1desc} - {$b2desc}"/> + </dc:when> + <dc:when test="dc:group-key() = 'sonstige'"> + <height factory="bedheight" + target_out="{$out}" + ids="bedheight-single-{$b1id}-{$b1year}#bedheight-single-{$b2id}-{$b2year}" + info="{$b1desc}#{$b2desc}" + description="{$b1desc} - {$b2desc}"/> + <height factory="bedheight" + target_out="{$out}" + ids="bedheight-single-{$b2id}-{$b2year}#bedheight-single-{$b1id}-{$b1year}" + info="{$b2desc}#{$b1desc}" + description="{$b2desc} - {$b1desc}"/> + </dc:when> + </dc:choose> + </dc:for-each> + </minfo-diff> + </dc:group> + </dc:macro> + <dc:macro name="minfo-heights"> + <dc:call-macro name="minfo-heights-years"> + <bedheights> + <dc:call-macro name="bed-heights-single"/> + <dc:call-macro name="bed-heights-epoch"/> + </bedheights> + </dc:call-macro> + </dc:macro> + + <dc:macro name="minfo-heights-years"> <dc:comment> The input here is a list differenc ids noted in the form: @@ -1771,10 +1862,7 @@ <dc:variable name="year_from" expr="0" type="number"/> </dc:otherwise> </dc:choose> - <bedheights> - <dc:call-macro name="bed-heights-single"/> - <dc:call-macro name="bed-heights-epoch"/> - </bedheights> + <dc:macro-body/> </dc:macro> <dc:macro name="bed-heights-single">
--- a/artifacts/doc/conf/themes/default.xml Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/doc/conf/themes/default.xml Mon Jun 30 11:29:45 2014 +0200 @@ -51,7 +51,6 @@ <theme name="Annotations"> <inherits> <inherit from="Lines" /> - <inherit from="Points" /> <inherit from="Text" /> </inherits> <fields>
--- a/artifacts/doc/conf/themes/second.xml Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/doc/conf/themes/second.xml Mon Jun 30 11:29:45 2014 +0200 @@ -51,7 +51,6 @@ <theme name="Annotations"> <inherits> <inherit from="Lines" /> - <inherit from="Points" /> <inherit from="Text" /> </inherits> <fields>
--- a/artifacts/doc/datacage_ref_de.rst Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/doc/datacage_ref_de.rst Mon Jun 30 11:29:45 2014 +0200 @@ -407,6 +407,16 @@ </marke> </marken> +Der Expr-Ausdruck kann mittels der Zeichenfolge '#!#' innerhalb des Ausdrucks +in mehrere Ausdrücke zerlegt werden. Damit ist es möglich, einen Wert +in mehrere Kategorien einzusortieren. Wird z.B. ein Film über den Zeitraum +von zwei Jahren gedreht und man möchte eine Liste von Filmen nach ihren +Produktionsjahren gruppieren, sollte der Film im Resulat in beiden Jahren auftauchen. + +.. code:: xml + + <dc:group expr="$start_jahr #!# $end_jahr"> + Datensätze auffalten ~~~~~~~~~~~~~~~~~~~~ @@ -695,7 +705,7 @@ ``dc:date-format`` Formatierte Ausgabe eines Datums ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -``dc:date-format(Format, Datum)`` leifert für ein Datum Datum einen String, der +``dc:date-format(Format, Datum)`` liefert für ein Datum einen String, der nach den Formatierungsregeln aus Format formatiert wird. Für die Formatierungen gelten die in SimpleFormat_ beschriebenen Regeln.
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/D4EArtifact.java Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/D4EArtifact.java Mon Jun 30 11:29:45 2014 +0200 @@ -210,7 +210,9 @@ handleInitModel(data, context, callMeta); - buildStaticFacets(data, facets, callMeta); + if (!facets.isEmpty()) { + buildStaticFacets(data, facets, callMeta); + } filterFacets = buildFilterFacets(data);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/GaugeDischargeArtifact.java Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/GaugeDischargeArtifact.java Mon Jun 30 11:29:45 2014 +0200 @@ -25,6 +25,7 @@ import org.dive4elements.artifacts.CallMeta; import org.dive4elements.river.artifacts.model.FacetTypes; +import org.dive4elements.river.artifacts.model.W; import org.dive4elements.river.artifacts.model.WQKms; import org.dive4elements.river.artifacts.states.DefaultState; @@ -221,7 +222,7 @@ } double [] kms = new double[values[0].length]; Arrays.fill(kms, gauge.getStation().doubleValue()); - res.add(new WQKms(kms, values[0], values[1], name, WQKms.CENTIMETER_AT_GAUGE)); + res.add(new WQKms(kms, values[0], values[1], name, W.CENTIMETER_AT_GAUGE)); return new CalculationResult( res.toArray(new WQKms[res.size()]),
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/BedHeightAccess.java Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/BedHeightAccess.java Mon Jun 30 11:29:45 2014 +0200 @@ -95,46 +95,6 @@ return type; } - public String getYearEpoch() { - if (yearEpoch == null) { - yearEpoch = getString("ye_select"); - } - return yearEpoch; - } - - - public int[] getBedHeightEpochIDs() { - if (epochIDs == null) { - String data = getString("soundings"); - - if (data == null) { - logger.warn("No 'soundings' parameter specified!"); - return null; - } - - String[] parts = data.split(";"); - - TIntArrayList ids = new TIntArrayList(); - - for (String part: parts) { - if (part.indexOf(SoundingsSelect.PREFIX_EPOCH) >= 0) { - String tmp = part.replace(SoundingsSelect.PREFIX_EPOCH, ""); - - try { - ids.add(Integer.parseInt(tmp)); - } - catch (NumberFormatException nfe) { - logger.warn("Cannot parse int from string: '" + tmp + "'"); - } - } - } - - epochIDs = ids.toNativeArray(); - } - - return epochIDs; - } - public Integer getHeightId() { if (heightId == null) { heightId = getInteger("height_id");
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/Builder.java Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/Builder.java Mon Jun 30 11:29:45 2014 +0200 @@ -54,6 +54,9 @@ { private static Logger log = Logger.getLogger(Builder.class); + public static final Pattern MAGIC_EXPR_SEPARATOR = + Pattern.compile("#!#"); + public static final Pattern STRIP_LINE_INDENT = Pattern.compile("\\s*\\r?\\n\\s*"); @@ -506,9 +509,14 @@ List<Object []> rows = rd.getRows(); String [] columns = rd.getColumnLabels(); - XPathExpression x; + String [] exprs = MAGIC_EXPR_SEPARATOR.split(expr); + + XPathExpression [] xs = new XPathExpression[exprs.length]; + try { - x = getXPathExpression(expr); + for (int i = 0; i < exprs.length; ++i) { + xs[i] = getXPathExpression(exprs[i]); + } } catch (XPathExpressionException xee) { log.warn("Invalid expression '" + expr + "'."); @@ -524,16 +532,16 @@ try { frames.put(columns, row); - Object key = x.evaluate(EVAL_DOCUMENT, returnType); - - ResultData group = groups.get(key); + for (XPathExpression x: xs) { + Object key = x.evaluate(EVAL_DOCUMENT, returnType); + ResultData group = groups.get(key); - if (group == null) { - group = new ResultData(rd.getColumnLabels()); - groups.put(key, group); + if (group == null) { + group = new ResultData(rd.getColumnLabels()); + groups.put(key, group); + } + group.add(row); } - - group.add(row); } catch (XPathExpressionException xxe) { log.warn("unable to apply expression '" +
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/FunctionResolver.java Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/FunctionResolver.java Mon Jun 30 11:29:45 2014 +0200 @@ -86,6 +86,27 @@ functions = new HashMap<String, Entry>(); + addFunction("coalesce", 2, new XPathFunction() { + @Override + public Object evaluate(List args) throws XPathFunctionException { + return coalesce(args); + } + }); + + addFunction("lowercase", 1, new XPathFunction() { + @Override + public Object evaluate(List args) throws XPathFunctionException { + return args.get(0).toString().toLowerCase(); + } + }); + + addFunction("uppercase", 1, new XPathFunction() { + @Override + public Object evaluate(List args) throws XPathFunctionException { + return args.get(0).toString().toUpperCase(); + } + }); + addFunction("contains", 2, new XPathFunction() { @Override public Object evaluate(List args) throws XPathFunctionException { @@ -234,7 +255,7 @@ } /** Implementation of case-ignoring dc:contains. */ - public Object contains(List args) throws XPathFunctionException { + public static Object contains(List args) throws XPathFunctionException { Object haystack = args.get(0); Object needle = args.get(1); @@ -278,7 +299,7 @@ /** Implementation for getting the minimum value of location or distance * dc:fromValue. */ - public Object fromValue(List args) throws XPathFunctionException { + public static Object fromValue(List args) throws XPathFunctionException { Object mode = args.get(0); Object locations = args.get(1); Object from = args.get(2); @@ -324,7 +345,7 @@ /** Implementation for getting the maximum value of location or distance * dc:toValue. */ - public Object toValue(List args) throws XPathFunctionException { + public static Object toValue(List args) throws XPathFunctionException { Object mode = args.get(0); Object locations = args.get(1); Object to = args.get(2); @@ -372,7 +393,7 @@ /** Implementation for doing a string replace * dc:replace . */ - public Object replace(List args) throws XPathFunctionException { + public static Object replace(List args) throws XPathFunctionException { Object haystack = args.get(0); Object needle = args.get(1); Object replacement = args.get(2); @@ -389,7 +410,7 @@ /** Implementation for doing a string replace * dc:replace-all */ - public Object replaceAll(List args) throws XPathFunctionException { + public static Object replaceAll(List args) throws XPathFunctionException { Object haystack = args.get(0); Object needle = args.get(1); Object replacement = args.get(2); @@ -403,7 +424,7 @@ return haystack; } - public Object dateFormat(List args) throws XPathFunctionException { + public static Object dateFormat(List args) throws XPathFunctionException { Object pattern = args.get(0); Object date = args.get(1); @@ -428,7 +449,7 @@ return ""; } - public Set<String> allStateSuccessors(String artifactName, String stateId) { + public static Set<String> allStateSuccessors(String artifactName, String stateId) { GlobalContext gc = RiverContextFactory.getGlobalContext(); if (gc == null) { return Collections.<String>emptySet(); @@ -441,7 +462,7 @@ return Collections.<String>emptySet(); } - public Collection<String> findAll(String needle, String haystack) { + public static Collection<String> findAll(String needle, String haystack) { ArrayList<String> result = new ArrayList<String>(); @@ -453,7 +474,7 @@ return result; } - public Number maxNumber(Object list) { + public static Number maxNumber(Object list) { if (list instanceof Collection) { Collection collection = (Collection)list; double max = -Double.MAX_VALUE; @@ -493,7 +514,7 @@ : Double.valueOf(Double.MAX_VALUE); } - public Number minNumber(Object list) { + public static Number minNumber(Object list) { if (list instanceof Collection) { Collection collection = (Collection)list; double min = Double.MAX_VALUE; @@ -532,5 +553,17 @@ ? (Number)list : Double.valueOf(-Double.MAX_VALUE); } + + public static Object coalesce(List list) { + for (Object x: list) { + if (x instanceof String && ((String)x).length() != 0) { + return x; + } + if (x instanceof Number && ((Number)x).doubleValue() != 0.0) { + return x; + } + } + return StackFrames.NULL; + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/FacetTypes.java Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/FacetTypes.java Mon Jun 30 11:29:45 2014 +0200 @@ -174,7 +174,6 @@ WD("wdifferences"), BHDY("bedheight_difference_height_year"), BDY("bed_difference_year"), - BDE("bed_difference_epoch"), FWQC("fix_wq_curve"), FDWC("fix_deltawt_curve"), FLSC("fix_longitudinal_section_curve"), @@ -338,8 +337,6 @@ String BED_DIFFERENCE_YEAR_FILTERED = "bedheight_difference.year.filtered"; String BED_DIFFERENCE_HEIGHT_YEAR = "bedheight_difference.height_year"; String BED_DIFFERENCE_HEIGHT_YEAR_FILTERED = "bedheight_difference.height_year.filtered"; - String BED_DIFFERENCE_EPOCH = "bedheight_difference.epoch"; - String BED_DIFFERENCE_EPOCH_FILTERED = "bedheight_difference.epoch.filtered"; String BED_DIFFERENCE_MORPH_WIDTH1 = "bedheight_difference.morph_width1"; String BED_DIFFERENCE_MORPH_WIDTH2 = "bedheight_difference.morph_width2"; String BED_DIFFERENCE_SOUNDING_WIDTH = "bedheight_difference.sounding_width"; @@ -347,10 +344,6 @@ String BED_DIFFERENCE_YEAR_HEIGHT2 = "bedheight_difference.year.height2"; String BED_DIFFERENCE_YEAR_HEIGHT1_FILTERED = "bedheight_difference.year.height1.filtered"; String BED_DIFFERENCE_YEAR_HEIGHT2_FILTERED = "bedheight_difference.year.height2.filtered"; - String BED_DIFFERENCE_EPOCH_HEIGHT1 = "bedheight_difference.epoch.height1"; - String BED_DIFFERENCE_EPOCH_HEIGHT2 = "bedheight_difference.epoch.height2"; - String BED_DIFFERENCE_EPOCH_HEIGHT1_FILTERED = "bedheight_difference.epoch.height1.filtered"; - String BED_DIFFERENCE_EPOCH_HEIGHT2_FILTERED = "bedheight_difference.epoch.height2.filtered"; String MORPHOLOGIC_WIDTH = "morph-width";
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/MiddleBedHeightCalculation.java Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/MiddleBedHeightCalculation.java Mon Jun 30 11:29:45 2014 +0200 @@ -16,8 +16,6 @@ import org.dive4elements.artifacts.Artifact; import org.dive4elements.artifacts.common.utils.DateUtils; -import org.dive4elements.river.model.BedHeightEpoch; -import org.dive4elements.river.model.BedHeightEpochValue; import org.dive4elements.river.model.BedHeightSingle; import org.dive4elements.river.model.BedHeightSingleValue; import org.dive4elements.river.model.TimeInterval; @@ -35,7 +33,6 @@ logger.info("MiddleBedHeightCalculation.calculate"); int[] singleIds = access.getBedHeightSingleIDs(); - int[] epochIds = access.getBedHeightEpochIDs(); if (logger.isDebugEnabled()) { @@ -45,16 +42,11 @@ if (singleIds != null) { logger.debug(" " + singleIds.length + " single bedheight ids"); } - - if (epochIds != null) { - logger.debug(" " + epochIds.length + " epoch bedheight ids"); - } } List<BedHeightSingle> singles = getSingles(access, singleIds); - List<BedHeightEpoch> epochs = getEpochs(access, epochIds); - return buildCalculationResult(access, singles, epochs); + return buildCalculationResult(access, singles); } @@ -80,32 +72,9 @@ } - protected List<BedHeightEpoch> getEpochs( - BedHeightAccess access, - int[] ids - ) { - List<BedHeightEpoch> epochs = new ArrayList<BedHeightEpoch>(); - - for (int id: ids) { - BedHeightEpoch e = BedHeightEpoch.getBedHeightEpochById(id); - - if (e != null) { - epochs.add(e); - } - else { - logger.warn("Cannot find Epoch by id: " + id); - // TODO ADD WARNING - } - } - - return epochs; - } - - protected CalculationResult buildCalculationResult( BedHeightAccess access, - List<BedHeightSingle> singles, - List<BedHeightEpoch> epochs + List<BedHeightSingle> singles ) { logger.info("MiddleBedHeightCalculation.buildCalculationResult"); @@ -122,14 +91,6 @@ } } - for (BedHeightEpoch epoch: epochs) { - MiddleBedHeightData d = prepareEpochData(epoch, kmLo, kmHi); - - if (d != null) { - data.add(d); - } - } - logger.debug("Calculation results in " + data.size() + " data objects."); return new CalculationResult((MiddleBedHeightData[]) @@ -186,43 +147,5 @@ return data; } - - - /** Create MiddleBedHeightData to return. */ - protected MiddleBedHeightData prepareEpochData( - BedHeightEpoch epoch, - double kmLo, - double kmHi - ) { - logger.debug("Prepare data for epoch: " + epoch.getDescription()); - - TimeInterval ti = epoch.getTimeInterval(); - - List<BedHeightEpochValue> values = - BedHeightEpochValue.getBedHeightEpochValues(epoch, kmLo, kmHi); - - MiddleBedHeightData data = new MiddleBedHeightData( - DateUtils.getYearFromDate(ti.getStartTime()), - DateUtils.getYearFromDate(ti.getStopTime()), - epoch.getEvaluationBy(), - epoch.getDescription() - ); - - for (BedHeightEpochValue value: values) { - data.addKM(value.getStation().doubleValue()); - if (value.getHeight() != null) { - data.addMiddleHeight(value.getHeight().doubleValue()); - data.addIsEmpty(false); - } - else { - data.addMiddleHeight(Double.NaN); - data.addIsEmpty(true); - } - } - - logger.debug("Epoch contains " + values.size() + " values"); - - return data; - } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WKmsFactory.java Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WKmsFactory.java Mon Jun 30 11:29:45 2014 +0200 @@ -60,7 +60,7 @@ JOIN wst_q_ranges wqr ON wcqr.wst_q_range_id = wqr.id JOIN wst_columns wc ON wcqr.wst_column_id = wc.id JOIN wsts ON wc.wst_id = wsts.id - WHERE wc.wst_id = 1817 AND wc.position = 29; + WHERE wc.wst_id = 1817 AND wc.position = 29; */
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WQ.java Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WQ.java Mon Jun 30 11:29:45 2014 +0200 @@ -121,13 +121,13 @@ * If a conversion takes place converted is set to true */ public static WQ getFixedWQforExportAtGauge(WQ wq, BigDecimal datum) { - if (wq.getReferenceSystem() == wq.CENTIMETER_AT_GAUGE) { + if (wq.getReferenceSystem() == W.CENTIMETER_AT_GAUGE) { // Do nothing return wq; } // If we convert we work on a copy to avoid side effects. WQ ret = new WQ(wq.size(), wq.getName()); - ret.setReferenceSystem(wq.CENTIMETER_AT_GAUGE); + ret.setReferenceSystem(W.CENTIMETER_AT_GAUGE); // When we convert and have a datum we have a calculated // result at a gauge so we must subtract the datum.
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffCalculation.java Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffCalculation.java Mon Jun 30 11:29:45 2014 +0200 @@ -29,7 +29,6 @@ Logger.getLogger(BedDiffCalculation.class); protected String river; - protected String yearEpoch; protected int [][] heightIds; public BedDiffCalculation() { @@ -39,7 +38,6 @@ logger.info("BedDiffCalculation.calculate"); String river = access.getRiverName(); - String yearEpoch = access.getYearEpoch(); int [][] heightIds = access.extractHeightIds(context); if (river == null) { @@ -47,13 +45,8 @@ addProblem("minfo.missing.river"); } - if (yearEpoch == null) { - addProblem("minfo.missing.year_epoch"); - } - if (!hasProblems()) { this.river = river; - this.yearEpoch = yearEpoch; this.heightIds = heightIds; return internalCalculate(); } @@ -62,7 +55,6 @@ } private CalculationResult internalCalculate() { - BedDiffYearResult [] results = new BedDiffYearResult[heightIds.length]; for (int i = 0; i < heightIds.length; i++) { @@ -70,21 +62,6 @@ results[i] = calculateYearDifference(pair); } return new CalculationResult(results, this); - // Currently epochs are handled like single years. To handle epochs - // uncomment the follwing code and use an if-clause in the code above. -/* - if (yearEpoch.equals("epoch")) { - BedDiffEpochResult [] results = new BedDiffEpochResult[heightIds.length]; - - for (int i = 0; i < heightIds.length; i++) { - BedHeight[] pair = getHeightPair(heightIds[i], "epoch"); - results[i] = calculateEpochDifference(pair); - } - return new CalculationResult(results, this); - } - - return new CalculationResult(); - */ } /** Get two BedHeights from factory. */ @@ -95,36 +72,6 @@ }; } - private BedDiffEpochResult calculateEpochDifference(BedHeightData[] pair) { - - BedHeightData bh1 = pair[0]; - BedHeightData bh2 = pair[1]; - - TDoubleArrayList stations = bh1.getStations(); - int size = stations.size(); - - TDoubleArrayList diffRes = new TDoubleArrayList(size); - TDoubleArrayList kms = new TDoubleArrayList(size); - TDoubleArrayList heights1 = new TDoubleArrayList(size); - TDoubleArrayList heights2 = new TDoubleArrayList(size); - - for (int i = 0; i < size; i++) { - double station = stations.getQuick(i); - double h1 = bh1.getHeight(station); - double h2 = bh2.getHeight(station); - double hDiff = h1 - h2; - if (!Double.isNaN(hDiff)) { - diffRes.add(hDiff); - kms.add(station); - heights1.add(h1); - heights2.add(h2); - } - } - Date start = ((BedHeightEpochData)bh1).getStart(); - Date end = ((BedHeightEpochData)bh2).getEnd(); - return new BedDiffEpochResult(kms, diffRes, heights1, heights2, start, end); - } - private BedDiffYearResult calculateYearDifference(BedHeightData[] pair) { logger.debug("BedDiffCalculation.calculateYearDifference"); BedHeightSingleData s1 = (BedHeightSingleData) pair[0];
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffEpochFacet.java Wed May 21 11:43:10 2014 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -/* 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.model.minfo; - -import org.apache.log4j.Logger; - -import org.dive4elements.artifactdatabase.state.Facet; -import org.dive4elements.artifacts.Artifact; -import org.dive4elements.artifacts.CallContext; -import org.dive4elements.river.artifacts.D4EArtifact; -import org.dive4elements.river.artifacts.model.CalculationResult; -import org.dive4elements.river.artifacts.model.DataFacet; -import org.dive4elements.river.artifacts.states.DefaultState.ComputeType; - - -public class BedDiffEpochFacet -extends DataFacet -{ - private static Logger logger = Logger.getLogger(BedDiffEpochFacet.class); - - public BedDiffEpochFacet() { - } - - public BedDiffEpochFacet(int idx, String name, String description, - ComputeType type, String stateId, String hash) { - super(idx, name, description, type, hash, stateId); - this.metaData.put("X", "chart.longitudinal.section.xaxis.label"); - this.metaData.put("Y", "chart.beddifference.height.yaxis.label"); - } - - public Object getData(Artifact artifact, CallContext context) { - logger.debug("Get data for bed density at index: " + index); - - D4EArtifact flys = (D4EArtifact) artifact; - - CalculationResult res = (CalculationResult) flys.compute(context, hash, - stateId, type, false); - - BedDiffEpochResult[] data = - (BedDiffEpochResult[]) res.getData(); - - return data != null && data.length > index ? data[index] : null; - } - - /** Copy deeply. */ - @Override - public Facet deepCopy() { - BedDiffEpochFacet copy = new BedDiffEpochFacet(); - copy.set(this); - copy.type = type; - copy.hash = hash; - copy.stateId = stateId; - return copy; - } -} -// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffEpochFilterFacet.java Wed May 21 11:43:10 2014 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,90 +0,0 @@ -/* 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.model.minfo; - -import org.apache.log4j.Logger; - -import org.dive4elements.artifactdatabase.state.Facet; -import org.dive4elements.artifacts.Artifact; -import org.dive4elements.artifacts.CallContext; -import org.dive4elements.river.artifacts.D4EArtifact; -import org.dive4elements.river.artifacts.access.RiverAccess; -import org.dive4elements.river.artifacts.context.RiverContext; -import org.dive4elements.river.artifacts.model.CalculationResult; -import org.dive4elements.river.artifacts.model.DataFacet; -import org.dive4elements.river.artifacts.math.MovingAverage; -import org.dive4elements.river.artifacts.model.ZoomScale; -import org.dive4elements.river.artifacts.states.DefaultState.ComputeType; - - -public class BedDiffEpochFilterFacet -extends DataFacet -{ - private static Logger logger = Logger.getLogger(BedDiffEpochFilterFacet.class); - - public BedDiffEpochFilterFacet() { - } - - public BedDiffEpochFilterFacet(int idx, String name, String description, - ComputeType type, String stateId, String hash) { - super(idx, name, description, type, hash, stateId); - this.metaData.put("X", "chart.longitudinal.section.xaxis.label"); - this.metaData.put("Y", "chart.beddifference.height.yaxis.label"); - } - - public Object getData(Artifact artifact, CallContext context) { - logger.debug("Get data for bed density at index: " + index); - - D4EArtifact flys = (D4EArtifact) artifact; - - CalculationResult res = (CalculationResult) flys.compute(context, hash, - stateId, type, false); - - BedDiffEpochResult[] data = - (BedDiffEpochResult[]) res.getData(); // TODO CAST TO SPECIFIC CLASS - Double start = (Double)context.getContextValue("startkm"); - Double end = (Double)context.getContextValue("endkm"); - - if(start != null && end != null) { - RiverContext fc = (RiverContext)context.globalContext(); - ZoomScale scales = (ZoomScale)fc.get("zoomscale"); - RiverAccess access = new RiverAccess((D4EArtifact)artifact); - String river = access.getRiverName(); - - double radius = scales.getRadius(river, start, end); - BedDiffEpochResult oldData = data[index]; - BedDiffEpochResult newData = new BedDiffEpochResult(); - newData.setStart(oldData.getStart()); - newData.setEnd(oldData.getEnd()); - double[][] diffs = MovingAverage.weighted(oldData.getDifferencesData(), radius); - double[][] heights1 = MovingAverage.weighted(oldData.getHeights1Data(), radius); - double[][] heights2 = MovingAverage.weighted(oldData.getHeights2Data(), radius); - for(int j = 0; j < diffs[0].length; j++) { - newData.addKm(diffs[0][j]); - newData.addDifference(diffs[1][j]); - newData.addHeight1(heights1[1][j]); - newData.addHeight2(heights2[1][j]); - } - return newData; - } - return data != null && data.length > index ? data[index] : null; - } - - /** Copy deeply. */ - @Override - public Facet deepCopy() { - BedDiffEpochFilterFacet copy = new BedDiffEpochFilterFacet(); - copy.set(this); - copy.type = type; - copy.hash = hash; - copy.stateId = stateId; - return copy; - } -} -// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffEpochResult.java Wed May 21 11:43:10 2014 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -/* 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.model.minfo; - -import java.util.Date; - -import gnu.trove.TDoubleArrayList; - - -public class BedDiffEpochResult -extends BedDifferencesResult -{ - - protected Date start; - protected Date end; - - public BedDiffEpochResult () { - super(); - } - - public BedDiffEpochResult ( - TDoubleArrayList kms, - TDoubleArrayList differences, - TDoubleArrayList heights1, - TDoubleArrayList heights2, - Date start, - Date end - ) { - super(kms, differences, heights1, heights2); - this.start = start; - this.end = end; - } - - public Date getStart() { - return this.start; - } - - public void setStart(Date value) { - this.start = value; - } - - public void setEnd(Date value) { - this.end = value; - } - - public Date getEnd() { - return this.end; - } -}
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffYearResult.java Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffYearResult.java Mon Jun 30 11:29:45 2014 +0200 @@ -159,5 +159,10 @@ bedHeights.toNativeArray() }; } + + @Override + public String getDiffDescription() { + return nameFirst + " - " + nameSecond; + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDifferenceJRDataSource.java Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDifferenceJRDataSource.java Mon Jun 30 11:29:45 2014 +0200 @@ -11,8 +11,6 @@ import java.util.ArrayList; import java.util.HashMap; -import org.apache.log4j.Logger; - import net.sf.jasperreports.engine.JRDataSource; import net.sf.jasperreports.engine.JRException; import net.sf.jasperreports.engine.JRField; @@ -23,9 +21,6 @@ */ public class BedDifferenceJRDataSource implements JRDataSource { - /** The logger used in this exporter.*/ - private static Logger logger = Logger.getLogger(BedDifferenceJRDataSource.class); - private ArrayList<String[]> data; private HashMap<String, String> metaData; @@ -58,21 +53,42 @@ else if ("calculation".equals(fieldName)) { value = metaData.get("calculation"); } - else if ("ye_mode".equals(fieldName)) { - value = metaData.get("ye_mode"); - } else if ("date".equals(fieldName)) { value = metaData.get("date"); } else if ("differences".equals(fieldName)) { value = metaData.get("differences"); } + else if ("kmheader".equals(fieldName)) { + value = metaData.get("kmheader"); + } + else if ("diffpairheader".equals(fieldName)) { + value = metaData.get("diffpairheader"); + } + else if ("diffheader".equals(fieldName)) { + value = metaData.get("diffheader"); + } + else if ("morph1header".equals(fieldName)) { + value = metaData.get("morph1header"); + } + else if ("morph2header".equals(fieldName)) { + value = metaData.get("morph2header"); + } else if ("km".equals(fieldName)) { value = data.get(index)[0]; } - else if ("meter".equals(fieldName)) { + else if ("diffpair".equals(fieldName)) { value = data.get(index)[1]; } + else if ("diff".equals(fieldName)) { + value = data.get(index)[2]; + } + else if ("morph1".equals(fieldName)) { + value = data.get(index)[3]; + } + else if ("morph2".equals(fieldName)) { + value = data.get(index)[4]; + } return value; } }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDifferencesResult.java Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDifferencesResult.java Mon Jun 30 11:29:45 2014 +0200 @@ -13,8 +13,8 @@ import java.io.Serializable; -public class BedDifferencesResult -implements Serializable +public abstract class BedDifferencesResult +implements Serializable { protected TDoubleArrayList kms; @@ -93,4 +93,6 @@ height2.toNativeArray() }; } + + public abstract String getDiffDescription(); }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightEpochData.java Wed May 21 11:43:10 2014 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* 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.model.minfo; - -import java.util.Date; - - -public class BedHeightEpochData -extends BedHeightData -{ - - protected Date start; - protected Date end; - - public BedHeightEpochData() { - this.start = new Date(); - this.end = new Date(); - } - - public BedHeightEpochData(String name) { - super(name); - this.start = new Date(); - this.end = new Date(); - } - - public void add( - double value, - double station, - Date start, - Date end - ) { - super.add(value, station); - this.start = start; - this.end = end; - } - - public Date getStart() { - return start; - } - - public Date getEnd() { - return end; - } -}
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightFactory.java Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightFactory.java Mon Jun 30 11:29:45 2014 +0200 @@ -40,26 +40,11 @@ " ORDER BY bhsv.station"; - /** Query to get name for wst_id and column_pos. */ - public static final String SQL_SELECT_EPOCH = - "SELECT bv.height, bv.station, ti.start_time, ti.stop_time" + - " FROM bed_height_epoch b" + - " JOIN bed_height_epoch_values bv ON b.id = bv.bed_height_epoch_id" + - " JOIN time_intervals ti ON b.time_interval_id = ti.id" + - " WHERE b.id = :height_id" + - " ORDER BY bhsv.station"; - /** Query to get name (description) for wst_id. */ public static final String SQL_SELECT_DESCR_SINGLE = "SELECT description FROM bed_height_single "+ "WHERE id = :height_id"; - /** Query to get name (description) for wst_id. */ - public static final String SQL_SELECT_DESCR_EPOCH = - "SELECT description from bed_height_epoch "+ - "WHERE id = :height_id"; - - private BedHeightFactory() { } @@ -108,11 +93,6 @@ .addScalar("description", StandardBasicTypes.STRING); nameQuery.setInteger("height_id", height_id); } - else if (type.equals("epoch")) { - nameQuery = session.createSQLQuery(SQL_SELECT_DESCR_EPOCH) - .addScalar("description", StandardBasicTypes.STRING); - nameQuery.setInteger("height_id", height_id); - } else { return "none"; } @@ -165,26 +145,6 @@ } return height; } - else if (type.equals("epoch")) { - BedHeightEpochData height = - new BedHeightEpochData(getHeightName(type, height_id)); - sqlQuery = session.createSQLQuery(SQL_SELECT_EPOCH) - .addScalar("height", StandardBasicTypes.DOUBLE) - .addScalar("station", StandardBasicTypes.DOUBLE) - .addScalar("start_time", StandardBasicTypes.DATE) - .addScalar("stop_time", StandardBasicTypes.DATE); - sqlQuery.setInteger("height_id", height_id); - List<Object []> results = sqlQuery.list(); - - for (Object [] row: results) { - height.add( - (Double) row[0], - (Double) row[1], - (Date) row[2], - (Date) row[3]); - } - return height; - } return new BedHeightData(); } }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/PorosityFacet.java Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/PorosityFacet.java Mon Jun 30 11:29:45 2014 +0200 @@ -78,14 +78,22 @@ String code = D4EArtifact.getDatacageIDValue(data); + String[] split = code.split(";"); + String id = split[0]; + String desc = ""; + if (split.length >= 2) { + desc = split[1]; + } + if (code != null) { this.name = NAME; this.description = Resources.getMsg( callMeta, "facet.porosity", - "Porosity"); + "Porosity", + new Object[] { desc }); D4EArtifact d4e = (D4EArtifact) artifact; - d4e.addStringData("porosity_id", code); + d4e.addStringData("porosity_id", id); } } }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadCalculation.java Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadCalculation.java Mon Jun 30 11:29:45 2014 +0200 @@ -220,7 +220,7 @@ */ private SedimentLoadResult calculateEpoch(int i) { List<SedimentLoad> epochLoads = new ArrayList<SedimentLoad>(); - for (int j = epoch[i][0]; j < epoch[i][1]; j++) { + for (int j = epoch[i][0]; j <= epoch[i][1]; j++) { epochLoads.add(SedimentLoadFactory.getLoadWithData( this.river, this.yearEpoch,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/SoundingsSelect.java Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/SoundingsSelect.java Mon Jun 30 11:29:45 2014 +0200 @@ -21,7 +21,6 @@ import org.dive4elements.artifacts.common.utils.XMLUtils; import org.dive4elements.artifacts.common.utils.XMLUtils.ElementCreator; -import org.dive4elements.river.model.BedHeightEpoch; import org.dive4elements.river.model.BedHeightSingle; import org.dive4elements.river.model.River; @@ -38,8 +37,6 @@ public static final String PREFIX_SINGLE = "single-"; - public static final String PREFIX_EPOCH = "epoch-"; - /** Private logger. */ private static final Logger logger = Logger.getLogger(SoundingsSelect.class); @@ -93,7 +90,6 @@ List<KVP<String, String>> kvp = new ArrayList<KVP<String, String>>(); appendSingles(river, kmLo, kmHi, creator, select, context); - appendEpochs(river, kmLo, kmHi, creator, select, context); return kvp.toArray(new KVP[kvp.size()]); } @@ -126,13 +122,13 @@ Element item = creator.create("item"); creator.addAttr(item, "label", value, true); creator.addAttr(item, "value", id, true); - creator.addAttr(item, "year", - year != null ? s.getYear().toString() : ""); - creator.addAttr(item, "type", s.getType().getName()); - creator.addAttr(item, "range", + creator.addAttr(item, "analyzed_range", nf.format(s.getRange().getA()) + " - " + nf.format(s.getRange().getB())); + creator.addAttr(item, "year", + year != null ? s.getYear().toString() : ""); + creator.addAttr(item, "minfo_type", s.getType().getName()); select.appendChild(item); } } @@ -140,44 +136,6 @@ logger.debug(XMLUtils.toString(select)); } - - protected void appendEpochs( - River river, - double kmLo, - double kmHi, - ElementCreator creator, - Element select, - CallContext context - ) { - List<BedHeightEpoch> epochs = - BedHeightEpoch.getBedHeightEpochs(river, kmLo, kmHi); - - if (epochs != null) { - int size = epochs.size(); - - logger.debug("Found " + size + " epochs."); - - NumberFormat nf = Formatter.getCalculationKm(context.getMeta()); - for (int i = 0; i < size; i++) { - BedHeightEpoch e = epochs.get(i); - - String id = PREFIX_EPOCH + e.getId(); - String value = e.getDescription(); - - Element item = creator.create("item"); - creator.addAttr(item, "label", value, true); - creator.addAttr(item, "value", id, true); - creator.addAttr(item, "year", e.getTimeInterval().getStartTime().toString()); - creator.addAttr(item, "range", - nf.format(e.getRange().getA()) + - " - " + - nf.format(e.getRange().getB())); - select.appendChild(item); - } - } - logger.debug("appended epochs"); - } - @Override protected Element createStaticData( D4EArtifact flys, @@ -220,10 +178,6 @@ if (value.indexOf(PREFIX_SINGLE) >= 0) { return getLabelForSingle(cc, value); } - else if (value.indexOf(PREFIX_EPOCH) >= 0) { - return getLabelForEpoch(cc, value); - } - return value; } @@ -249,27 +203,6 @@ } - protected String getLabelForEpoch(CallContext cc, String value) { - String id = value.replace(PREFIX_EPOCH, ""); - try { - BedHeightEpoch e = BedHeightEpoch.getBedHeightEpochById( - Integer.parseInt(id)); - - if (e != null) { - return e.getDescription(); - } - else { - return "no value for '" + id + "'"; - } - } - catch (NumberFormatException nfe) { - logger.warn("Could not parse id from string '" + id + "'", nfe); - } - - return "n.A."; - } - - /** * This method might be used to test, if a parameter name is handled by this * state.
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/DifferenceSelect.java Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/DifferenceSelect.java Mon Jun 30 11:29:45 2014 +0200 @@ -55,23 +55,6 @@ return ""; } - @Override - protected Element[] createItems( - XMLUtils.ElementCreator ec, - Artifact artifact, - String name, - CallContext context) - { - Element[] elements = new Element[1]; - BedHeightAccess bha = new BedHeightAccess((D4EArtifact)artifact); - String time = bha.getYearEpoch(); - elements[0] = createItem( - ec, - new String[] {"year-epoch", time}); - - return elements; - } - /** * Creates the data element used for the static part of DESCRIBE document. */
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/DifferencesState.java Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/DifferencesState.java Mon Jun 30 11:29:45 2014 +0200 @@ -25,9 +25,6 @@ import org.dive4elements.river.artifacts.model.DataFacet; import org.dive4elements.river.artifacts.model.FacetTypes; import org.dive4elements.river.artifacts.model.minfo.BedDiffCalculation; -import org.dive4elements.river.artifacts.model.minfo.BedDiffEpochFacet; -import org.dive4elements.river.artifacts.model.minfo.BedDiffEpochFilterFacet; -import org.dive4elements.river.artifacts.model.minfo.BedDiffEpochResult; import org.dive4elements.river.artifacts.model.minfo.BedDiffYearFacet; import org.dive4elements.river.artifacts.model.minfo.BedDiffYearFilterFacet; import org.dive4elements.river.artifacts.model.minfo.BedDiffYearResult; @@ -47,7 +44,6 @@ /** The logger used in this class. */ private static Logger logger = Logger.getLogger(DifferencesState.class); public static final String I18N_DIFF_YEAR = "beddifference.year"; - public static final String I18N_DIFF_EPOCH = "beddifference.epoch"; public static final String I18N_FACET_BED_DIFF_YEAR = "facet.bedheight.diff.year"; public static final String I18N_FACET_BED_DIFF_YEAR_RAW = "facet.bedheight.diff.year.raw"; @@ -56,8 +52,6 @@ public static final String I18N_FACET_BED_DIFF_SOUNDING = "facet.bedheight.diff.sounding"; public static final String I18N_FACET_BED_DIFF_MORPH1 = "facet.bedheight.diff.morph1"; public static final String I18N_FACET_BED_DIFF_MORPH2 = "facet.bedheight.diff.morph2"; - public static final String I18N_FACET_BED_DIFF_EPOCH = "facet.bedheight.diff.epoch"; - public static final String I18N_FACET_BED_DIFF_EPOCH_RAW = "facet.bedheight.diff.epoch.raw"; public static final String I18N_FACET_BED_DIFF_HEIGHT1 = "facet.bedheight.diff.height1"; public static final String I18N_FACET_BED_DIFF_HEIGHT1_RAW = "facet.bedheight.diff.height1.raw"; public static final String I18N_FACET_BED_DIFF_HEIGHT2 = "facet.bedheight.diff.height2"; @@ -224,72 +218,6 @@ stateId, hash)); } - if (results[idx] instanceof BedDiffEpochResult) { - newFacets.add(new BedDiffEpochFacet( - idx, - BED_DIFFERENCE_EPOCH, - createBedDiffEpochDescription( - meta, - (BedDiffEpochResult)results[idx], - true), - ComputeType.ADVANCE, - stateId, - hash)); - newFacets.add(new BedDiffEpochFacet( - idx, - BED_DIFFERENCE_EPOCH_HEIGHT1, - createBedDiffHeightEpochDescription( - meta, - (BedDiffEpochResult)results[idx], - 0, - true), - ComputeType.ADVANCE, - stateId, - hash)); - newFacets.add(new BedDiffEpochFacet( - idx, - BED_DIFFERENCE_EPOCH_HEIGHT2, - createBedDiffHeightEpochDescription( - meta, - (BedDiffEpochResult)results[idx], - 1, - true), - ComputeType.ADVANCE, - stateId, - hash)); - newFacets.add(new BedDiffEpochFilterFacet( - idx, - BED_DIFFERENCE_EPOCH_FILTERED, - createBedDiffEpochDescription( - meta, - (BedDiffEpochResult)results[idx], - false), - ComputeType.ADVANCE, - stateId, - hash)); - newFacets.add(new BedDiffEpochFilterFacet( - idx, - BED_DIFFERENCE_EPOCH_HEIGHT1_FILTERED, - createBedDiffHeightEpochDescription( - meta, - (BedDiffEpochResult)results[idx], - 0, - false), - ComputeType.ADVANCE, - stateId, - hash)); - newFacets.add(new BedDiffEpochFilterFacet( - idx, - BED_DIFFERENCE_EPOCH_HEIGHT2_FILTERED, - createBedDiffHeightEpochDescription( - meta, - (BedDiffEpochResult)results[idx], - 1, - false), - ComputeType.ADVANCE, - stateId, - hash)); - } } } @@ -315,34 +243,6 @@ } } - private String createBedDiffHeightEpochDescription( - CallMeta meta, - BedDiffEpochResult result, - int ndx, - boolean raw - ) { - DateFormat df = Formatter.getDateFormatter(meta, "yyyy"); - String range = - df.format(result.getStart()) - + " - " + - df.format(result.getEnd()); - - String i18nHeight1 = I18N_FACET_BED_DIFF_HEIGHT1; - String i18nHeight2 = I18N_FACET_BED_DIFF_HEIGHT2; - if (raw) { - i18nHeight1 = I18N_FACET_BED_DIFF_HEIGHT1_RAW; - i18nHeight2 = I18N_FACET_BED_DIFF_HEIGHT2_RAW; - } - if (ndx == 0) { - return Resources.getMsg(meta, i18nHeight1, - i18nHeight1, new Object[] { range }); - } - else { - return Resources.getMsg(meta, i18nHeight2, - i18nHeight2, new Object[] {range}); - } - } - protected String createBedDiffYearDescription( CallMeta meta, BedDiffYearResult result, @@ -389,23 +289,6 @@ return Resources.getMsg(meta, i18n, i18n, new Object[] { range }); } - protected String createBedDiffEpochDescription( - CallMeta meta, - BedDiffEpochResult result, - boolean raw) { - DateFormat df = Formatter.getDateFormatter(meta, "yyyy"); - String range = - df.format(result.getStart()) - + " - " + - df.format(result.getEnd()); - - String i18n = I18N_FACET_BED_DIFF_EPOCH; - if (raw) { - i18n = I18N_FACET_BED_DIFF_EPOCH_RAW; - } - return Resources.getMsg(meta, i18n, i18n, new Object[] { range }); - } - static { // Active/deactivate facets. FacetActivity.Registry.getInstance().register( @@ -418,12 +301,7 @@ String output ) { String name = facet.getName(); - if (name.equals(BED_DIFFERENCE_EPOCH) || - name.equals(BED_DIFFERENCE_EPOCH_HEIGHT1) || - name.equals(BED_DIFFERENCE_EPOCH_HEIGHT2) || - name.equals(BED_DIFFERENCE_EPOCH_HEIGHT1_FILTERED) || - name.equals(BED_DIFFERENCE_EPOCH_HEIGHT2_FILTERED) || - name.equals(BED_DIFFERENCE_HEIGHT_YEAR) || + if (name.equals(BED_DIFFERENCE_HEIGHT_YEAR) || name.equals(BED_DIFFERENCE_YEAR) || name.equals(BED_DIFFERENCE_YEAR_HEIGHT1) || name.equals(BED_DIFFERENCE_YEAR_HEIGHT2) || @@ -432,7 +310,6 @@ return Boolean.FALSE; } else if (name.equals(BED_DIFFERENCE_SOUNDING_WIDTH) || - name.equals(BED_DIFFERENCE_EPOCH_FILTERED) || name.equals(BED_DIFFERENCE_HEIGHT_YEAR_FILTERED) || name.equals(BED_DIFFERENCE_YEAR_FILTERED)) { return Boolean.TRUE;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadCalculate.java Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadCalculate.java Mon Jun 30 11:29:45 2014 +0200 @@ -32,7 +32,7 @@ import org.dive4elements.river.artifacts.model.minfo.SedimentLoadUnknownFacet; import org.dive4elements.river.artifacts.resources.Resources; import org.dive4elements.river.artifacts.states.DefaultState; -import org.dive4elements.river.utils.DateGuesser; +import org.dive4elements.river.utils.DateUtil; /** State in which Sediment Load(s) are calculated/retrieved. */ public class SedimentLoadCalculate @@ -103,9 +103,9 @@ for (int[] date: dates) { try { Date s = - DateGuesser.guessDate(String.valueOf(date[0])); + DateUtil.getStartDateFromYear(date[0]); Date e = - DateGuesser.guessDate(String.valueOf(date[1])); + DateUtil.getEndDateFromYear(date[1]); if (!(s.after(load.getEnd()) || e.before(load.getStart()))) { return Boolean.TRUE;
--- a/artifacts/src/main/java/org/dive4elements/river/exports/AbstractExporter.java Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/AbstractExporter.java Mon Jun 30 11:29:45 2014 +0200 @@ -62,6 +62,8 @@ /** The default separator for the CSV export. */ public static final char DEFAULT_CSV_SEPARATOR = ';'; + public static final String START_META_CHAR = "#"; + /** XPath that points to the desired export facet. */ public static final String XPATH_FACET = "/art:action/@art:type"; @@ -103,6 +105,25 @@ /** + * Write lines of informative content to CSV file. + * Usually this will be done above the column headers from within + * the implementation of writeCSVData in concret subclasses. + * + * @param writer The CSVWriter + * @param infolines Array of Strings with informative content. + * Each will be written to a separate line prefixed with START_META_CHAR. + */ + protected void writeCSVInfo(CSVWriter writer, String[] infolines) { + String[] metaline = new String[1]; + + for (String infoline: infolines) { + metaline[0] = START_META_CHAR + " " + infoline; + writer.writeNext(metaline); + } + + } + + /** * Concrete subclasses need to use this method to write their special data * objects into the PDF document. */ @@ -263,6 +284,9 @@ request, XPATH_FACET, ArtifactNamespaceContext.INSTANCE); } + protected String msg(String key) { + return Resources.getMsg(context.getMeta(), key, key); + } protected String msg(String key, String def) { return Resources.getMsg(context.getMeta(), key, def);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ChartGenerator2.java Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/ChartGenerator2.java Mon Jun 30 11:29:45 2014 +0200 @@ -686,11 +686,8 @@ if (chartSettings != null) { String subTitle = getChartSubtitle(chartSettings); - String defSubTitle = getDefaultChartSubtitle(); - if (defSubTitle != null && - !defSubTitle.isEmpty() && - !subTitle.equals(defSubTitle)) { - return defSubTitle; + if (subTitle == null) { + return getDefaultChartSubtitle(); } else { return subTitle;
--- a/artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java Mon Jun 30 11:29:45 2014 +0200 @@ -1047,15 +1047,27 @@ @Override public String getDefaultChartSubtitle() { String parts = ""; + DiagramAttributes.Title dTitle = diagramAttributes.getSubtitle(); + if (dTitle == null && + (subTitleParts == null || subTitleParts.isEmpty())) { + /* Subtitle is optional */ + return null; + } if (subTitleParts != null && !subTitleParts.isEmpty()) { + boolean first = true; + if (dTitle != null) { + first = false; + } for (String p : subTitleParts) { - parts += ", " + p; + if (!first) { + parts += ", "; + } + parts += p; + first = false; } } - DiagramAttributes.Title dTitle = diagramAttributes.getSubtitle(); - if (dTitle == null) { - /* Subtitle is optional */ - return null; + if (dTitle == null && parts.length() > 0) { + return parts; } return dTitle.evaluate((D4EArtifact)getMaster(), context) + parts; }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/DischargeCurveGenerator.java Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/DischargeCurveGenerator.java Mon Jun 30 11:29:45 2014 +0200 @@ -374,7 +374,7 @@ * (in imported data they are set to -1 symbolically). * Return false if data is null or empty */ - private boolean hasNoDischarge(double[][] data) { + private static boolean hasNoDischarge(double[][] data) { if (data == null || data.length == 0) { return false; }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeCurveGenerator.java Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeCurveGenerator.java Mon Jun 30 11:29:45 2014 +0200 @@ -158,8 +158,14 @@ artifactFacet.getFacetDescription(), theme, visible); } else if (FacetTypes.IS.MANUALPOINTS(name)) { + HistoricalDischargeAccess.EvaluationMode mode = + new HistoricalDischargeAccess((D4EArtifact)getMaster()).getEvaluationMode(); + int axis = mode == HistoricalDischargeAccess.EvaluationMode.W + ? YAXIS.Q.idx + : YAXIS.W.idx; + doPoints(artifactFacet.getData(context), artifactFacet, theme, - visible, YAXIS.Q.idx); + visible, axis); } else { logger.warn("doOut(): unknown facet name: " + name);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator2.java Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator2.java Mon Jun 30 11:29:45 2014 +0200 @@ -63,22 +63,29 @@ * actually does the output and accesses the facet data. */ D4EArtifact artifact = (D4EArtifact)bundle.getArtifact(); - + if (context.getContextValue("bounds_defined") != null && + (Boolean)context.getContextValue("bounds_defined")) { + super.doOut(bundle, theme, visible); + return; + } if (getXBounds(0) != null && getDomainAxisRange() != null) { Bounds bounds = calculateZoom(getXBounds(0), getDomainAxisRange()); context.putContextValue("startkm", bounds.getLower()); context.putContextValue("endkm", bounds.getUpper()); + context.putContextValue("bounds_defined", true); } else if (getXBounds(0) != null && getDomainAxisRange() == null) { context.putContextValue("startkm", getXBounds(0).getLower()); context.putContextValue("endkm", getXBounds(0).getUpper()); + context.putContextValue("bounds_defined", true); } else if (getXBounds(0) == null && getDomainAxisRange() == null) { RangeAccess access = new RangeAccess(artifact); if (access.hasFrom() && access.hasTo()) { context.putContextValue("startkm", access.getFrom()); context.putContextValue("endkm", access.getTo()); + context.putContextValue("bounds_defined", true); } } else if (getXBounds(0) == null && getDomainAxisRange() != null){ @@ -89,6 +96,7 @@ calculateZoom(b, getDomainAxisRange()); context.putContextValue("startkm", bounds.getLower()); context.putContextValue("endkm", bounds.getUpper()); + context.putContextValue("bounds_defined", true); } } super.doOut(bundle, theme, visible);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/TimeseriesChartGenerator.java Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/TimeseriesChartGenerator.java Mon Jun 30 11:29:45 2014 +0200 @@ -46,7 +46,7 @@ import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; import org.jfree.data.Range; import org.jfree.data.general.Series; -import org.jfree.data.time.Day; +import org.jfree.data.time.FixedMillisecond; import org.jfree.data.time.TimeSeries; import org.jfree.data.time.TimeSeriesCollection; import org.jfree.data.xy.XYDataset; @@ -634,7 +634,7 @@ // Add text annotations for single points. List<XYTextAnnotation> xy = new ArrayList<XYTextAnnotation>(); - HashMap<Day, String> names = new HashMap<Day, String>(); + HashMap<FixedMillisecond, String> names = new HashMap<FixedMillisecond, String>(); try { JSONArray points = new JSONArray((String) o); @@ -649,8 +649,12 @@ } Date date = decodeXAxisValue(array); + long ms = date.getTime(); - Day day = new Day(date); + FixedMillisecond day = new FixedMillisecond(ms); + while (names.containsKey(day)) { + day = new FixedMillisecond(++ms); + } series.add(day, y, false); names.put(day, name); }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDiffEpochInfoGenerator.java Wed May 21 11:43:10 2014 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ -/* 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.exports.minfo; - -import org.dive4elements.river.exports.ChartInfoGenerator; - - -public class BedDiffEpochInfoGenerator -extends ChartInfoGenerator -{ - public BedDiffEpochInfoGenerator() { - super(new BedDifferenceEpochGenerator()); - } -}
--- a/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDifferenceEpochGenerator.java Wed May 21 11:43:10 2014 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,269 +0,0 @@ -/* 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.exports.minfo; - -import org.apache.log4j.Logger; -import org.jfree.data.xy.XYSeries; - -import org.dive4elements.artifactdatabase.state.ArtifactAndFacet; -import org.dive4elements.artifactdatabase.state.Facet; -import org.dive4elements.river.artifacts.D4EArtifact; -import org.dive4elements.river.artifacts.access.FlowVelocityAccess; -import org.dive4elements.river.artifacts.model.FacetTypes; -import org.dive4elements.river.artifacts.model.WKms; -import org.dive4elements.river.artifacts.model.minfo.BedDiffEpochResult; -import org.dive4elements.river.exports.StyledSeriesBuilder; -import org.dive4elements.river.exports.fixings.FixChartGenerator; -import org.dive4elements.river.exports.process.KMIndexProcessor; -import org.dive4elements.river.exports.process.Processor; -import org.dive4elements.river.exports.process.WOutProcessor; -import org.dive4elements.river.jfree.Bounds; -import org.dive4elements.river.jfree.DoubleBounds; -import org.dive4elements.river.jfree.RiverAnnotation; -import org.dive4elements.river.jfree.StyledXYSeries; -import org.dive4elements.river.themes.ThemeDocument; -import org.dive4elements.river.utils.RiverUtils; - - -public class BedDifferenceEpochGenerator -extends FixChartGenerator -implements FacetTypes -{ - public enum YAXIS { - D(0), H(1), dW(2), W(3); - - protected int idx; - - private YAXIS(int c) { - idx = c; - } - } - - /** The logger that is used in this generator. */ - private static Logger logger = Logger.getLogger(BedDifferenceEpochGenerator.class); - - public static final String I18N_CHART_TITLE = "chart.beddifference.epoch.title"; - public static final String I18N_XAXIS_LABEL = "chart.beddifference.xaxis.label"; - public static final String I18N_YAXIS_LABEL = "chart.beddifference.yaxis.label.diff"; - public static final String I18N_SECOND_YAXIS_LABEL = "chart.beddifference.yaxis.label.height"; - - public static final String I18N_CHART_TITLE_DEFAULT = "Sohlenhöhen Differenz"; - public static final String I18N_XAXIS_LABEL_DEFAULT = "Fluss-Km"; - public static final String I18N_YAXIS_LABEL_DEFAULT = "delta S [m]"; - public static final String I18N_SECOND_YAXIS_LABEL_DEFAULT = "Höhe [m]"; - public static final String I18N_DW_YAXIS_LABEL_DEFAULT = - "delta W [cm]"; - public static final String I18N_DW_YAXIS_LABEL = - "chart.fixings.longitudinalsection.yaxis.label"; - - private static final String I18N_W_YAXIS_LABEL = - "chart.longitudinal.section.yaxis.label"; - private static final String I18N_W_YAXIS_LABEL_DEFAULT = "W [NN + m]"; - - - @Override - protected YAxisWalker getYAxisWalker() { - return new YAxisWalker() { - - @Override - public int length() { - return YAXIS.values().length; - } - - @Override - public String getId(int idx) { - YAXIS[] yaxes = YAXIS.values(); - return yaxes[idx].toString(); - } - }; - } - - @Override - public void doOut(ArtifactAndFacet bundle, ThemeDocument attr, boolean visible) { - String name = bundle.getFacetName(); - - logger.debug("doOut: " + name); - - if (name == null) { - logger.error("No facet name for doOut(). No output generated!"); - return; - } - - Facet facet = bundle.getFacet(); - - if (facet == null) { - return; - } - - setContextBoundsEpoch(bundle); - - Processor processor = new KMIndexProcessor(); - Processor woutp = new WOutProcessor(); - if (name.equals(BED_DIFFERENCE_EPOCH)) { - doBedDifferenceEpochOut( - (BedDiffEpochResult) bundle.getData(context), - bundle, attr, visible); - } - else if (name.equals(BED_DIFFERENCE_EPOCH_HEIGHT1)) { - doBedDifferenceHeightsOut((BedDiffEpochResult)bundle.getData(context), - bundle, attr, visible, 0); - } - else if (name.equals(BED_DIFFERENCE_EPOCH_HEIGHT2)) { - doBedDifferenceHeightsOut((BedDiffEpochResult)bundle.getData(context), - bundle, attr, visible, 1); - } - else if (name.equals(BED_DIFFERENCE_EPOCH_FILTERED)) { - doBedDifferenceEpochOut( - (BedDiffEpochResult) bundle.getData(context), - bundle, attr, visible); - } - else if (name.equals(BED_DIFFERENCE_EPOCH_HEIGHT1_FILTERED)) { - doBedDifferenceHeightsOut((BedDiffEpochResult)bundle.getData(context), - bundle, attr, visible, 0); - } - else if (name.equals(BED_DIFFERENCE_EPOCH_HEIGHT2_FILTERED)) { - doBedDifferenceHeightsOut((BedDiffEpochResult)bundle.getData(context), - bundle, attr, visible, 1); - } - else if (processor.canHandle(name)) { - processor.doOut(this, bundle, attr, visible, YAXIS.dW.idx); - } - else if (woutp.canHandle(name)) { - woutp.doOut(this, bundle, attr, visible, YAXIS.W.idx); - } - else if (name.equals(W_DIFFERENCES)) { - doWDifferencesOut( - (WKms) bundle.getData(context), - bundle, - attr, - visible); - } - else if (name.equals(LONGITUDINAL_ANNOTATION)) { - doAnnotations( - (RiverAnnotation) bundle.getData(context), - bundle, - attr, - visible); - } - else { - logger.warn("Unknown facet name " + name); - } - } - - protected void setContextBoundsEpoch(ArtifactAndFacet bundle) { - if (getXBounds(0) != null && getDomainAxisRange() != null) { - Bounds bounds = - calculateZoom(getXBounds(0), getDomainAxisRange()); - context.putContextValue("startkm", bounds.getLower()); - context.putContextValue("endkm", bounds.getUpper()); - } - else if (getXBounds(0) != null && getDomainAxisRange() == null) { - context.putContextValue("startkm", getXBounds(0).getLower()); - context.putContextValue("endkm", getXBounds(0).getUpper()); - } - else if (getXBounds(0) == null && getDomainAxisRange() == null) { - D4EArtifact artifact = (D4EArtifact)bundle.getArtifact(); - FlowVelocityAccess access = new FlowVelocityAccess(artifact); - context.putContextValue("startkm", access.getLowerKM()); - context.putContextValue("endkm", access.getUpperKM()); - } - else if (getXBounds(0) == null && getDomainAxisRange() != null){ - D4EArtifact artifact = (D4EArtifact)bundle.getArtifact(); - FlowVelocityAccess access = new FlowVelocityAccess(artifact); - Bounds b = new DoubleBounds(access.getLowerKM(), access.getUpperKM()); - Bounds bounds = - calculateZoom(b, getDomainAxisRange()); - context.putContextValue("startkm", bounds.getLower()); - context.putContextValue("endkm", bounds.getUpper()); - } - } - - @Override - protected String getDefaultChartTitle() { - return msg(I18N_CHART_TITLE, I18N_CHART_TITLE_DEFAULT); - } - - @Override - protected String getDefaultXAxisLabel() { - return msg(I18N_XAXIS_LABEL, - I18N_XAXIS_LABEL_DEFAULT, - new Object[] {getRiverName()}); - } - - @Override - protected String getDefaultYAxisLabel(int pos) { - String label = "default"; - if (pos == YAXIS.D.idx) { - label = msg(I18N_YAXIS_LABEL, I18N_YAXIS_LABEL_DEFAULT); - } - else if (pos == YAXIS.H.idx) { - D4EArtifact flys = (D4EArtifact) master; - label = msg(I18N_SECOND_YAXIS_LABEL, - I18N_SECOND_YAXIS_LABEL_DEFAULT, - new Object[] - { RiverUtils.getRiver(flys).getWstUnit().getName() }); - } - else if (pos == YAXIS.dW.idx) { - return msg(I18N_DW_YAXIS_LABEL, I18N_DW_YAXIS_LABEL_DEFAULT); - } - else if (pos == YAXIS.W.idx) { - return msg(I18N_W_YAXIS_LABEL, I18N_W_YAXIS_LABEL_DEFAULT); - } - return label; - } - - protected void doBedDifferenceEpochOut(BedDiffEpochResult data, - ArtifactAndFacet aandf, ThemeDocument theme, boolean visible) { - - XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme); - StyledSeriesBuilder.addPoints(series, data.getDifferencesData(), true); - - addAxisSeries(series, YAXIS.D.idx, visible); - } - - private void doBedDifferenceHeightsOut( - BedDiffEpochResult data, - ArtifactAndFacet bundle, - ThemeDocument attr, - boolean visible, - int idx) { - logger.debug("doBedDifferenceHeightOut()"); - - XYSeries series = new StyledXYSeries(bundle.getFacetDescription(), attr); - if (idx == 0) { - StyledSeriesBuilder.addPoints(series, data.getHeights1Data(), true); - } - else { - StyledSeriesBuilder.addPoints(series, data.getHeights2Data(), true); - } - - addAxisSeries(series, YAXIS.H.idx, visible); - } - - protected void doWDifferencesOut( - WKms wkms, - ArtifactAndFacet aandf, - ThemeDocument theme, - boolean visible - ) { - if (wkms == null) { - logger.warn("No data to add to WDifferencesChart."); - return; - } - - XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme); - StyledSeriesBuilder.addPoints(series, wkms); - - addAxisSeries(series, YAXIS.D.idx, visible); - if (wkms.guessWaterIncreasing()) { - setInverted(true); - } - } -} -// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDifferenceExporter.java Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDifferenceExporter.java Mon Jun 30 11:29:45 2014 +0200 @@ -11,7 +11,7 @@ import java.io.IOException; import java.io.OutputStream; import java.text.NumberFormat; -import java.util.LinkedList; +import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.HashMap; @@ -30,6 +30,7 @@ import org.dive4elements.artifacts.CallMeta; import org.dive4elements.river.artifacts.D4EArtifact; import org.dive4elements.river.artifacts.access.BedDifferencesAccess; +import org.dive4elements.river.artifacts.access.RiverAccess; import org.dive4elements.artifacts.common.utils.Config; import org.dive4elements.river.artifacts.resources.Resources; import org.dive4elements.river.artifacts.model.CalculationResult; @@ -38,7 +39,6 @@ import org.dive4elements.river.artifacts.model.minfo.BedDifferenceJRDataSource; import org.dive4elements.river.exports.AbstractExporter; import org.dive4elements.river.utils.Formatter; -import org.dive4elements.river.utils.RiverUtils; import au.com.bytecode.opencsv.CSVWriter; @@ -56,6 +56,9 @@ private static final String CSV_HEADER_DIFF = "export.minfo.beddifference.diff"; + private static final String CSV_HEADER_DIFF_PAIR = + "export.minfo.beddifference.diff.pair"; + private static final String CSV_HEADER_MORPH1 = "export.minfo.beddifference.morph1"; @@ -86,23 +89,29 @@ for (BedDifferencesResult result : results) { if (result instanceof BedDiffYearResult) { BedDiffYearResult yResult = (BedDiffYearResult) result; + String desc = result.getDiffDescription(); double[][] kms = yResult.getDifferencesData(); double[][] morph1 = yResult.getMorphWidth1Data(); double[][] morph2 = yResult.getMorphWidth2Data(); for (int j = 0; j < kms[0].length; j++) { writer.writeNext(new String[] { kmf.format(kms[0][j]), + desc, mf.format(kms[1][j]), mf.format(morph1[1][j]), - mf.format(morph2[1][j])}); + mf.format(morph2[1][j]), + }); } } else { double[][] kms = result.getDifferencesData(); + String desc = result.getDiffDescription(); for (int j = 0; j < kms[0].length; j++) { writer.writeNext(new String[] { kmf.format(kms[0][j]), - mf.format(kms[1][j])}); + desc, + mf.format(kms[1][j]), + }); } } } @@ -128,7 +137,8 @@ D4EArtifact arti = (D4EArtifact) master; - source.addMetaData ("river", RiverUtils.getRivername(arti)); + //source.addMetaData ("river", RiverUtils.getRivername(arti)); + source.addMetaData ("river", new RiverAccess(arti).getRiverName()); Locale locale = Resources.getLocale(meta); DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, locale); @@ -143,22 +153,30 @@ // Now the dynamic parts BedDifferencesAccess access = new BedDifferencesAccess(arti); - source.addMetaData("ye_mode", Resources.getMsg(locale, - "state.minfo." + access.getYearEpoch(), - access.getYearEpoch())); source.addMetaData("differences", StringUtils.join( access.getDifferenceArtifactNamePairs(), "\n")); + + source.addMetaData("kmheader", + msg(CSV_HEADER_KM, "km")); + source.addMetaData("diffpairheader", + msg(CSV_HEADER_DIFF_PAIR, "Difference pair")); + source.addMetaData("diffheader", msg(CSV_HEADER_DIFF, "cm")); + source.addMetaData("morph1header", + msg(CSV_HEADER_MORPH1, "Morph. active width minuend")); + source.addMetaData("morph2header", + msg(CSV_HEADER_MORPH2, "Morph. active width subtrahend")); } protected void writeCSVHeader(CSVWriter writer) { logger.debug("writeCSVHeader()"); - List<String> header = new LinkedList<String>(); + List<String> header = new ArrayList<String>(); if (results != null) { header.add(msg(CSV_HEADER_KM, "km")); - header.add(msg(CSV_HEADER_DIFF, "m")); + header.add(msg(CSV_HEADER_DIFF_PAIR, "difference pair")); + header.add(msg(CSV_HEADER_DIFF, "cm")); if (results.length > 0 && results[0] instanceof BedDiffYearResult) { header.add(msg(CSV_HEADER_MORPH1, "morph width minuend [m]")); @@ -175,10 +193,19 @@ NumberFormat kmf = Formatter.getCalculationKm(context.getMeta()); NumberFormat mf = Formatter.getMeterFormat(context); for (BedDifferencesResult result: results) { + BedDiffYearResult yResult = (BedDiffYearResult) result; double[][] kms = result.getDifferencesData(); + String desc = result.getDiffDescription(); + double[][] morph1 = yResult.getMorphWidth1Data(); + double[][] morph2 = yResult.getMorphWidth2Data(); for (int j = 0; j < kms[0].length; j++) { source.addData(new String[] { - kmf.format(kms[0][j]), mf.format(kms[1][j])}); + kmf.format(kms[0][j]), + desc, + mf.format(kms[1][j]), + mf.format(morph1[1][j]), + mf.format(morph2[1][j]) + }); } } return source; @@ -196,7 +223,7 @@ String confPath = Config.getConfigDirectory().toString(); - Map parameters = new HashMap(); + Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("ReportTitle", Resources.getMsg( context.getMeta(), PDF_TITLE, "Exported Data")); try {
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/BedWidthProcessor.java Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/BedWidthProcessor.java Mon Jun 30 11:29:45 2014 +0200 @@ -19,6 +19,7 @@ import org.dive4elements.river.artifacts.model.FacetTypes; import org.dive4elements.river.exports.DiagramGenerator; import org.dive4elements.river.exports.StyledSeriesBuilder; +import org.dive4elements.river.jfree.GapInserter; import org.dive4elements.river.jfree.StyledXYSeries; import org.dive4elements.river.themes.ThemeDocument; @@ -39,6 +40,9 @@ "chart.beddifference.yaxis.label.morph"; protected String yAxisLabel; + + public static final double GAP_WIDTH = 100.0; + @Override public void doOut( DiagramGenerator generator, @@ -78,8 +82,10 @@ double[] width = bData.getSoundingWidths(); double[] stations = bData.getStations().toNativeArray(); + GapInserter gi = new GapInserter(series, GAP_WIDTH); + for (int i = 0; i < width.length; i++) { - series.add(stations[i], width[i], false); + gi.add(stations[i], width[i]); } } else if (data instanceof List<?>) { List<BedHeightSingleValue> bData = (List<BedHeightSingleValue>)data;
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/FlowVelocityProcessor.java Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/FlowVelocityProcessor.java Mon Jun 30 11:29:45 2014 +0200 @@ -15,7 +15,11 @@ import org.dive4elements.artifactdatabase.state.ArtifactAndFacet; import org.dive4elements.artifacts.CallContext; +import org.dive4elements.river.artifacts.D4EArtifact; +import org.dive4elements.river.artifacts.access.RiverAccess; +import org.dive4elements.river.artifacts.context.RiverContext; import org.dive4elements.river.artifacts.model.FacetTypes; +import org.dive4elements.river.artifacts.model.ZoomScale; import org.dive4elements.river.exports.DiagramGenerator; import org.dive4elements.river.exports.StyledSeriesBuilder; import org.dive4elements.river.jfree.StyledXYSeries; @@ -23,6 +27,7 @@ import org.dive4elements.river.model.FlowVelocityMeasurementValue.FastFlowVelocityMeasurementValue; import org.dive4elements.river.artifacts.model.FlowVelocityData; +import org.dive4elements.river.artifacts.resources.Resources; public class FlowVelocityProcessor extends DefaultProcessor { @@ -33,6 +38,8 @@ "chart.flow_velocity.section.yaxis.label"; public static final String I18N_AXIS_LABEL_DEFAULT = "Geschwindigkeit v [m/s]"; + public static final String I18N_SUBTITLE_RADIUS = + "chart.subtitle.radius"; protected String yAxisLabel; @@ -76,7 +83,24 @@ return; } StyledSeriesBuilder.addPoints(series, points, true); + Double start = (Double)context.getContextValue("startkm"); + Double end = (Double)context.getContextValue("endkm"); + if (start != null && end != null) { + logger.debug("start: " + start + " end: " + end); + D4EArtifact artifact = (D4EArtifact)bundle.getArtifact(); + RiverContext fc = (RiverContext)context.globalContext(); + // Adaptive smoothing, based on zoom factor/diagram extents. + ZoomScale scales = (ZoomScale)fc.get("zoomscale"); + RiverAccess access = new RiverAccess((D4EArtifact)artifact); + String river = access.getRiverName(); + double radius = scales.getRadius(river, start, end); + logger.debug("add a subtitle"); + generator.addSubtitle(Resources.getMsg( + context.getMeta(), + I18N_SUBTITLE_RADIUS, + new Object[] { radius })); + } generator.addAxisSeries(series, axisName, visible); }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/sq/SQRelationExporter.java Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/sq/SQRelationExporter.java Mon Jun 30 11:29:45 2014 +0200 @@ -57,6 +57,50 @@ private static final Logger logger = Logger.getLogger(SQRelationExporter.class); + public static final String INFO_COEFF_A = + "export.sqrelation.csv.info.coeff.a"; + + public static final String INFO_COEFF_B = + "export.sqrelation.csv.info.coeff.b"; + + public static final String INFO_QMAX = + "export.sqrelation.csv.info.qmax"; + + public static final String INFO_STDERR = + "export.sqrelation.csv.info.stderr"; + + public static final String INFO_R2 = + "export.sqrelation.csv.info.r2"; + + public static final String INFO_NTOT = + "export.sqrelation.csv.info.ntot"; + + public static final String INFO_NOUTL = + "export.sqrelation.csv.info.noutl"; + + public static final String INFO_CFERGUSON = + "export.sqrelation.csv.info.cferguson"; + + public static final String INFO_CDUAN = + "export.sqrelation.csv.info.cduan"; + + public static final String INFO_PARAM_A = + "export.sqrelation.csv.info.param.a"; + + public static final String INFO_PARAM_B = + "export.sqrelation.csv.info.param.b"; + + public static final String INFO_PARAM_C = + "export.sqrelation.csv.info.param.c"; + + public static final String INFO_PARAM_D = + "export.sqrelation.csv.info.param.d"; + + public static final String INFO_PARAM_E = + "export.sqrelation.csv.info.param.e"; + + public static final String INFO_PARAM_F = + "export.sqrelation.csv.info.param.f"; public static final String CSV_PARAMETER = "export.sqrelation.csv.header.parameter"; @@ -130,17 +174,17 @@ protected void writeCSVHeader(CSVWriter writer) { writer.writeNext(new String[] { - msg(CSV_KM , CSV_KM), - msg(CSV_PARAMETER, CSV_PARAMETER), - msg(CSV_COEFF_A , CSV_COEFF_A), - msg(CSV_COEFF_B , CSV_COEFF_B), - msg(CSV_SD, CSV_SD), - msg(CSV_QMAX, CSV_QMAX), - msg(CSV_COEFF_R, CSV_COEFF_R), - msg(CSV_N_TOTAL , CSV_N_TOTAL), - msg(CSV_N_OUTLIERS, CSV_N_OUTLIERS), - msg(CSV_C_DUAN, CSV_C_DUAN), - msg(CSV_C_FERGUSON, CSV_C_FERGUSON) + msg(CSV_KM), + msg(CSV_PARAMETER), + msg(CSV_COEFF_A), + msg(CSV_COEFF_B), + msg(CSV_SD), + msg(CSV_QMAX), + msg(CSV_COEFF_R), + msg(CSV_N_TOTAL), + msg(CSV_N_OUTLIERS), + msg(CSV_C_DUAN), + msg(CSV_C_FERGUSON) }); } @@ -148,6 +192,24 @@ protected void writeCSVData(CSVWriter writer) { logger.debug("writeCSVData"); + writeCSVInfo(writer, new String[] { + msg(INFO_COEFF_A), + msg(INFO_COEFF_B), + msg(INFO_QMAX), + msg(INFO_STDERR), + msg(INFO_R2), + msg(INFO_NTOT), + msg(INFO_NOUTL), + msg(INFO_CFERGUSON), + msg(INFO_CDUAN), + msg(INFO_PARAM_A), + msg(INFO_PARAM_B), + msg(INFO_PARAM_C), + msg(INFO_PARAM_D), + msg(INFO_PARAM_E), + msg(INFO_PARAM_F) + }); + writeCSVHeader(writer); for (SQResult [] results: data) {
--- a/artifacts/src/main/java/org/dive4elements/river/jfree/AnnotationHelper.java Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/jfree/AnnotationHelper.java Mon Jun 30 11:29:45 2014 +0200 @@ -83,6 +83,11 @@ color = Color.BLACK; } + Color textColor = theme.parseTextColor(); + if (textColor == null) { + textColor = Color.BLACK; + } + LegendItem newItem = new LegendItem(fa.getLabel(), color); LegendSection ls = (settings != null ? settings.getLegendSection() : null); @@ -92,6 +97,8 @@ ls != null ? ls.getFontSize() : null) ); + newItem.setLabelPaint(textColor); + lic.add(newItem); // (Re-)Add prior legend entries. if (old != null) {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/artifacts/src/main/java/org/dive4elements/river/jfree/GapInserter.java Mon Jun 30 11:29:45 2014 +0200 @@ -0,0 +1,27 @@ +package org.dive4elements.river.jfree; + +import org.jfree.data.xy.XYSeries; + +public class GapInserter { + + private XYSeries series; + private double gap; + private double lastX; + + public GapInserter() { + } + + public GapInserter(XYSeries series, double gap) { + lastX = Double.NaN; + this.series = series; + this.gap = Math.abs(gap); + } + + public void add(double x, double y) { + if (!Double.isNaN(lastX) && !Double.isNaN(x) && Math.abs(x - lastX) > gap) { + series.add((x + lastX)/2.0, Double.NaN, false); + } + series.add(x, y, false); + lastX = x; + } +}
--- a/artifacts/src/main/java/org/dive4elements/river/jfree/StableXYDifferenceRenderer.java Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/jfree/StableXYDifferenceRenderer.java Mon Jun 30 11:29:45 2014 +0200 @@ -157,7 +157,7 @@ /** For serialization. */ private static final long serialVersionUID = -8447915602375584857L; - /** The paint used to highlight positive differences (y(0) > y(1)). */ + /** The paint used to highlight positive differences (y(0) > y(1)). */ private transient Paint positivePaint; /** The paint used to highlight negative differences (y(0) < y(1)). */
--- a/artifacts/src/main/java/org/dive4elements/river/utils/RiverMapfileGenerator.java Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/utils/RiverMapfileGenerator.java Mon Jun 30 11:29:45 2014 +0200 @@ -32,9 +32,6 @@ public class RiverMapfileGenerator extends MapfileGenerator { - public static final String XPATH_RIVERMAP_RIVER_PROJECTION = - "/artifact-database/rivermap/river[@name=$name]/srid/@value"; - public static final String XPATH_RIVERMAP_SHAPEFILE_DIR = "/artifact-database/rivermap/shapefile-path/@value";
--- a/artifacts/src/main/resources/messages.properties Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/resources/messages.properties Mon Jun 30 11:29:45 2014 +0200 @@ -333,6 +333,8 @@ facet.gauge_discharge_curve.gauge_location = Location of the gauge facet.morphologic.width = morphologic Width +facet.porosity = {0} + chart.beddifference.height.title = Bedheight Difference chart.beddifference.height.xaxis.label = {0}-km chart.beddifference.height.yaxis.label = Difference [cm/year] @@ -343,8 +345,7 @@ chart.beddifference.year.title = Bedheight Difference chart.beddifference.yaxis.label.morph = Width [m] chart.beddifference.yaxis.label.heights = Absolute Height [{0}] -chart.beddifference.subtitle.radius = Fensterbreite für gewichtete Mittel: {0}km -chart.subtitle.radius = Radius for weighted Average: {0}km +chart.subtitle.radius = Width of sample window for moving average: {0} km export.waterlevel.csv.header.km = River-Km export.waterlevel.csv.header.w = W [{0}] @@ -423,6 +424,21 @@ export.sedimentload_ls.csv.header.suspsediment = susp. sediment export.sedimentload_ls.csv.header.suspsandbb = susp. sand (BB) export.sedimentload_ls.csv.header.total = total +export.sqrelation.csv.info.coeff.a = a: coefficient of transport curve +export.sqrelation.csv.info.coeff.b = b: exponent of transport curve +export.sqrelation.csv.info.qmax = Q max, measured: maximum measured discharge [m\u00b3/s] +export.sqrelation.csv.info.stderr = standard error: natural logarithm of standard deviation +export.sqrelation.csv.info.r2 = r^2: coefficient of determination +export.sqrelation.csv.info.ntot = n total: number of measurements +export.sqrelation.csv.info.noutl = n outliers: number of outliers +export.sqrelation.csv.info.cferguson = CFERGUSON: bias correction (Ferguson, 1986) +export.sqrelation.csv.info.cduan = CDUAN: bias correction (Duan, 1983) +export.sqrelation.csv.info.param.a = Parameter A: transport of fine material (< 0.063 mm) +export.sqrelation.csv.info.param.b = Parameter B: transport of suspended sand (0.063-2 mm) +export.sqrelation.csv.info.param.c = Parameter C: transport of sand (0.063-2 mm) +export.sqrelation.csv.info.param.d = Parameter D: transport of fine and medium gravel (2-16 mm) +export.sqrelation.csv.info.param.e = Parameter E: transport of coarse gravel (> Mittelkies)(16-125 mm) +export.sqrelation.csv.info.param.f = Parameter F: transport of bed load (0.063-125 mm) export.sqrelation.csv.header.parameter = Parameter export.sqrelation.csv.header.station = Station export.sqrelation.csv.header.km = River-Km @@ -437,7 +453,7 @@ export.sqrelation.csv.header.c.duan = C (Duan) export.sqrelation.csv.header.c.ferguson = C (Ferguson) export.sqrelation.csv.header.sd = Standard error -export.sqrelation.csv.header.qmax = Q max,measured +export.sqrelation.csv.header.qmax = Q max, measured [m\u00b3/s] export.sqrelation.pdf.file = /jasper/sqrelation_en.jasper export.sqrelation.pdf.mode = Load Discharge Relation export.minfo.bedquality.km = km @@ -449,7 +465,8 @@ export.minfo.bedquality.bed_cap = Bed Diameter Toplayer export.minfo.bedquality.bed_sub = Bed Diameter Sublayer export.minfo.beddifference.km = km -export.minfo.beddifference.diff = m +export.minfo.beddifference.diff = Bedheight Difference [cm] +export.minfo.beddifference.diff.pair = Difference pair export.minfo.beddifference.pdf.file = /jasper/beddifference_en.jasper export.minfo.beddifference.pdf.title = Bedheight Difference export.minfo.beddifference.pdf.mode = Bedheight Difference @@ -572,6 +589,7 @@ help.state.minfo.dischargestate=${help.url}/OnlineHilfe/MINFO#help.state.minfo.dischargestate help.state.minfo.soundings=${help.url}/OnlineHilfe/MINFO#help.state.minfo.soundings help.state.minfo.bed.difference_select=${help.url}/OnlineHilfe/MINFO#help.state.minfo.bed.difference_select +help.state.minfo.sq.outliermethod=${help.url}/OnlineHilfe/MINFO#help.state.minfo.sq.outliermethod help.state.minfo.sq.outliers=${help.url}/OnlineHilfe/MINFO#help.state.minfo.sq.outliers help.state.minfo.sediment.load.year_epoch=${help.url}/OnlineHilfe/MINFO#help.state.minfo.sediment.load.year_epoch help.state.minfo.sediment.load.location=${help.url}/OnlineHilfe/MINFO#help.state.minfo.sediment.load.location
--- a/artifacts/src/main/resources/messages_de.properties Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/resources/messages_de.properties Mon Jun 30 11:29:45 2014 +0200 @@ -315,7 +315,6 @@ facet.bedheight.sounding_width = gepeilte Breite ({0}) facet.bedheight.diff.morph1 = Morph. aktive Breite Minuend facet.bedheight.diff.morph2 = Morph. aktive Breite Subtrahend -facet.bedheight.sounding_width = gepeilte Breite ({0}) facet.bedheight.diff.sounding = gepeilte Breite facet.bedheight.diff.height1 = H\u00f6he Minuend {0} facet.bedheight.diff.height2 = H\u00f6he Subtrahend {0} @@ -334,6 +333,8 @@ facet.gauge_discharge_curve.gauge_location = Pegelort facet.morphologic.width = Morphologische Breite +facet.porosity = {0} + chart.beddifference.height.title = Sohlh\u00f6hendifferenz chart.beddifference.height.xaxis.label = {0}-km chart.beddifference.height.yaxis.label = Differenz [cm/Jahr] @@ -344,7 +345,7 @@ chart.beddifference.year.title = Sohlh\u00f6hendifferenz chart.beddifference.yaxis.label.morph = Breite [m] chart.beddifference.yaxis.label.heights = Absolute H\u00f6he [m] -chart.subtitle.radius = Fensterbreite f\u00fcr gewichtete Mittel: {0}km +chart.subtitle.radius = Fensterbreite f\u00fcr gleitenden Mittelwert: {0} km export.waterlevel.csv.header.km = Fluss-Km export.waterlevel.csv.header.w = W [{0}] @@ -424,6 +425,21 @@ export.sedimentload_ls.csv.header.suspsandbb = susp.Sand(BB) export.sedimentload_ls.csv.header.suspsediment = Schwebst. export.sedimentload_ls.csv.header.total = Gesamt +export.sqrelation.csv.info.coeff.a = a: Transportkurvenkoeffizient +export.sqrelation.csv.info.coeff.b = b: Transportkurvenexponent +export.sqrelation.csv.info.qmax = Q max, gemessen: maximal gemessener Abfluss [m\u00b3/s] +export.sqrelation.csv.info.stderr = Standardfehler: nat\u00fcrlicher Logarithmus der Standardabweichung +export.sqrelation.csv.info.r2 = r^2: Bestimmtheitsma\u00df +export.sqrelation.csv.info.ntot = n Gesamt: Anzahl Messwerte +export.sqrelation.csv.info.noutl = n Ausrei\u00dfer: Anzahl Ausrei\u00dfer +export.sqrelation.csv.info.cferguson = CFERGUSON: Bias Korrektur nach Ferguson 1986 +export.sqrelation.csv.info.cduan = CDUAN: Bias Korrektur nach Duan 1983 +export.sqrelation.csv.info.param.a = Parameter A: Sedimenttransport von Feinkornanteil (< 0.063 mm) +export.sqrelation.csv.info.param.b = Parameter B: Sedimenttransport von Sand (Suspensionstransort)(0.063-2 mm) +export.sqrelation.csv.info.param.c = Parameter C: Sedimenttransport von Sand (Geschiebetransport) (0.063-2 mm) +export.sqrelation.csv.info.param.d = Parameter D: Sedimenttransport von Fein- und Mittelkies (2-16 mm) +export.sqrelation.csv.info.param.e = Parameter E: Sedimenttransport von Grobkornanteil (> Mittelkies)(16-125 mm) +export.sqrelation.csv.info.param.f = Parameter F: Sedimenttransport von Geschiebtransportgesamt (0.063-125 mm) export.sqrelation.csv.header.parameter = Parameter export.sqrelation.csv.header.station = Station export.sqrelation.csv.header.km = Fluss-Km @@ -438,7 +454,7 @@ export.sqrelation.csv.header.c.duan = C (Duan) export.sqrelation.csv.header.c.ferguson = C (Ferguson) export.sqrelation.csv.header.sd = Standardfehler -export.sqrelation.csv.header.qmax = Q max,gemessen +export.sqrelation.csv.header.qmax = Q max, gemessen [m\u00b3/s] export.sqrelation.pdf.file = /jasper/sqrelation.jasper export.sqrelation.pdf.mode = Transport-Abfluss Beziehung export.minfo.bedquality.km = km @@ -450,7 +466,8 @@ export.minfo.bedquality.bed_cap = Sohldurchmesser Deckschicht [mm] export.minfo.bedquality.bed_sub = Sohldurchmesser Unterschicht [mm] export.minfo.beddifference.km = Fluss-km -export.minfo.beddifference.diff = m +export.minfo.beddifference.diff = Sohlh\u00f6hendifferenz [cm] +export.minfo.beddifference.diff.pair = Differenzenpaar export.minfo.beddifference.pdf.file = /jasper/beddifference.jasper export.minfo.beddifference.pdf.title = Sohlh\u00f6hendifferenz export.minfo.beddifference.pdf.mode = Sohlh\u00f6hendifferenz @@ -575,6 +592,7 @@ help.state.minfo.dischargestate=${help.url}/OnlineHilfe/MINFO#help.state.minfo.dischargestate help.state.minfo.soundings=${help.url}/OnlineHilfe/MINFO#help.state.minfo.soundings help.state.minfo.bed.difference_select=${help.url}/OnlineHilfe/MINFO#help.state.minfo.bed.difference_select +help.state.minfo.sq.outliermethod=${help.url}/OnlineHilfe/MINFO#help.state.minfo.sq.outliermethod help.state.minfo.sq.outliers=${help.url}/OnlineHilfe/MINFO#help.state.minfo.sq.outliers help.state.minfo.sediment.load.year_epoch=${help.url}/OnlineHilfe/MINFO#help.state.minfo.sediment.load.year_epoch help.state.minfo.sediment.load.location=${help.url}/OnlineHilfe/MINFO#help.state.minfo.sediment.load.location @@ -647,7 +665,7 @@ fix.cannot.load.data=Daten konnten nicht aus der Datenbank geladen werden fix.realize.missing.is.q=Kein Q-Wert verf\u00fcgbar -fix.realize.missing.segments=Werte für Pegelstrecken nicht angegeben +fix.realize.missing.segments=Werte f\u00fcr Pegelstrecken nicht angegeben fix.no.such.river=Gew\u00e4sser nicht gefunden fix.cannot.find.segment=Au\u00dferhalb der Pegelg\u00fcltigkeit fix.cannot.calculate.function=Funktionsauswerung fehlgeschlagen
--- a/artifacts/src/main/resources/messages_de_DE.properties Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/resources/messages_de_DE.properties Mon Jun 30 11:29:45 2014 +0200 @@ -331,6 +331,8 @@ facet.gauge_discharge_curve.gauge_location = Pegelort facet.morphologic.width = Morphologische Breite +facet.porosity = {0} + chart.beddifference.height.title = Sohlh\u00f6hendifferenz chart.beddifference.height.xaxis.label = {0}-km chart.beddifference.height.yaxis.label = Differenz [cm/Jahr] @@ -341,7 +343,7 @@ chart.beddifference.year.title = Sohlh\u00f6hendifferenz chart.beddifference.yaxis.label.morph = Breite [m] chart.beddifference.yaxis.label.heights = Absolute H\u00f6he [{0}] -chart.subtitle.radius = Fensterbreite f\u00fcr gewichtete Mittel: {0}km +chart.subtitle.radius = Fensterbreite f\u00fcr gleitenden Mittelwert: {0} km export.waterlevel.csv.header.km = Fluss-Km export.waterlevel.csv.header.w = W [{0}] @@ -420,6 +422,21 @@ export.sedimentload_ls.csv.header.suspsandbb = susp.Sand(BB) export.sedimentload_ls.csv.header.suspsediment = Schwebst. export.sedimentload_ls.csv.header.total = Gesamt +export.sqrelation.csv.info.coeff.a = a: Transportkurvenkoeffizient +export.sqrelation.csv.info.coeff.b = b: Transportkurvenexponent +export.sqrelation.csv.info.qmax = Q max, gemessen: maximal gemessener Abfluss [m\u00b3/s] +export.sqrelation.csv.info.stderr = Standardfehler: nat\u00fcrlicher Logarithmus der Standardabweichung +export.sqrelation.csv.info.r2 = r^2: Bestimmtheitsma\u00df +export.sqrelation.csv.info.ntot = n Gesamt: Anzahl Messwerte +export.sqrelation.csv.info.noutl = n Ausrei\u00dfer: Anzahl Ausrei\u00dfer +export.sqrelation.csv.info.cferguson = CFERGUSON: Bias Korrektur nach Ferguson 1986 +export.sqrelation.csv.info.cduan = CDUAN: Bias Korrektur nach Duan 1983 +export.sqrelation.csv.info.param.a = Parameter A: Sedimenttransport von Feinkornanteil (< 0.063 mm) +export.sqrelation.csv.info.param.b = Parameter B: Sedimenttransport von Sand (Suspensionstransort)(0.063-2 mm) +export.sqrelation.csv.info.param.c = Parameter C: Sedimenttransport von Sand (Geschiebetransport) (0.063-2 mm) +export.sqrelation.csv.info.param.d = Parameter D: Sedimenttransport von Fein- und Mittelkies (2-16 mm) +export.sqrelation.csv.info.param.e = Parameter E: Sedimenttransport von Grobkornanteil (> Mittelkies)(16-125 mm) +export.sqrelation.csv.info.param.f = Parameter F: Sedimenttransport von Geschiebtransportgesamt (0.063-125 mm) export.sqrelation.csv.header.parameter = Parameter export.sqrelation.csv.header.station = Station export.sqrelation.csv.header.km = Fluss-Km @@ -434,7 +451,7 @@ export.sqrelation.csv.header.c.duan = C (Duan) export.sqrelation.csv.header.c.ferguson = C (Ferguson) export.sqrelation.csv.header.sd = Standardfehler -export.sqrelation.csv.header.qmax = Q max,gemessen +export.sqrelation.csv.header.qmax = Q max, gemessen [m\u00b3/s] export.sqrelation.pdf.file = /jasper/sqrelation.jasper export.sqrelation.pdf.mode = Transport-Abfluss Beziehung export.minfo.bedquality.km = km @@ -446,7 +463,8 @@ export.minfo.bedquality.bed_cap = Sohldurchmesser Deckschicht [mm] export.minfo.bedquality.bed_sub = Sohldurchmesser Unterschicht [mm] export.minfo.beddifference.km = Fluss-km -export.minfo.beddifference.diff = m +export.minfo.beddifference.diff = Sohlh\u00f6hendifferenz [cm] +export.minfo.beddifference.diff.pair = Differenzenpaar export.minfo.beddifference.pdf.file = /jasper/beddifference.jasper export.minfo.beddifference.pdf.title = Sohlh\u00f6hendifferenz export.minfo.beddifference.pdf.mode = Sohlh\u00f6hendifferenz @@ -645,7 +663,7 @@ fix.cannot.load.data=Daten konnten nicht aus der Datenbank geladen werden fix.realize.missing.is.q=Kein Q-Wert verf\u00fcgbar -fix.realize.missing.segments=Werte für Pegelstrecken nicht angegeben +fix.realize.missing.segments=Werte f\u00fcr Pegelstrecken nicht angegeben fix.no.such.river=Gew\u00e4sser nicht gefunden fix.cannot.find.segment=Au\u00dferhalb der Pegelg\u00fcltigkeit fix.cannot.calculate.function=Funktionsauswerung fehlgeschlagen
--- a/artifacts/src/main/resources/messages_en.properties Wed May 21 11:43:10 2014 +0200 +++ b/artifacts/src/main/resources/messages_en.properties Mon Jun 30 11:29:45 2014 +0200 @@ -165,7 +165,6 @@ chart.longitudinal.section.yaxis.label = W [{0}] chart.longitudinal.section.yaxis.second.label = Q [m\u00b3/s] chart.longitudinal.annotations.label = {0}.km -chart.computed.discharge.curve.gauge = Discharge curve at gauge {0} (km {1}) chart.discharge.curve.title = Discharge Curve chart.discharge.curve.xaxis.label = Q [m\u00b3/s] chart.discharge.curve.yaxis.label = W [cm] @@ -337,6 +336,8 @@ facet.gauge_discharge_curve.gauge_location = Location of the gauge facet.morphologic.width = morphologic Width +facet.porosity = {0} + chart.beddifference.height.title = Bedheight Difference chart.beddifference.height.xaxis.label = {0}-km chart.beddifference.height.yaxis.label = Difference [cm/year] @@ -347,7 +348,7 @@ chart.beddifference.year.title = Bedheight Difference chart.beddifference.yaxis.label.morph = Width [m] chart.beddifference.yaxis.label.heights = Absolute Height [m] -chart.subtitle.radius = Radius for weighted Average: {0}km +chart.subtitle.radius = Radius for weighted Average: {0} km export.waterlevel.csv.header.km = River-Km export.waterlevel.csv.header.w = W [{0}] @@ -426,6 +427,21 @@ export.sedimentload_ls.csv.header.suspsand = susp. sand export.sedimentload_ls.csv.header.suspsediment = susp. sediment export.sedimentload_ls.csv.header.total = total +export.sqrelation.csv.info.coeff.a = a: coefficient of transport curve +export.sqrelation.csv.info.coeff.b = b: exponent of transport curve +export.sqrelation.csv.info.qmax = Q max, measured: maximum measured discharge [m\u00b3/s] +export.sqrelation.csv.info.stderr = standard error: natural logarithm of standard deviation +export.sqrelation.csv.info.r2 = r^2: coefficient of determination +export.sqrelation.csv.info.ntot = n total: number of measurements +export.sqrelation.csv.info.noutl = n outliers: number of outliers +export.sqrelation.csv.info.cferguson = CFERGUSON: bias correction (Ferguson, 1986) +export.sqrelation.csv.info.cduan = CDUAN: bias correction (Duan, 1983) +export.sqrelation.csv.info.param.a = Parameter A: transport of fine material (< 0.063 mm) +export.sqrelation.csv.info.param.b = Parameter B: transport of suspended sand (0.063-2 mm) +export.sqrelation.csv.info.param.c = Parameter C: transport of sand (0.063-2 mm) +export.sqrelation.csv.info.param.d = Parameter D: transport of fine and medium gravel (2-16 mm) +export.sqrelation.csv.info.param.e = Parameter E: transport of coarse gravel (> Mittelkies)(16-125 mm) +export.sqrelation.csv.info.param.f = Parameter F: transport of bed load (0.063-125 mm) export.sqrelation.csv.header.parameter = Parameter export.sqrelation.csv.header.station = Station export.sqrelation.csv.header.km = River-Km @@ -440,7 +456,7 @@ export.sqrelation.csv.header.c.duan = C (Duan) export.sqrelation.csv.header.c.ferguson = C (Ferguson) export.sqrelation.csv.header.sd = Standard error -export.sqrelation.csv.header.qmax = Q max,measured +export.sqrelation.csv.header.qmax = Q max, measured [m\u00b3/s] export.sqrelation.pdf.file = /jasper/sqrelation_en.jasper export.sqrelation.pdf.mode = Load Discharge Relation export.minfo.bedquality.km = km @@ -452,7 +468,8 @@ export.minfo.bedquality.bed_cap = Bed Diameter Toplayer [mm] export.minfo.bedquality.bed_sub = Bed Diameter Sublayer [mm] export.minfo.beddifference.km = km -export.minfo.beddifference.diff = m +export.minfo.beddifference.diff = Bedheight Difference [cm] +export.minfo.beddifference.diff.pair = Difference pair export.minfo.beddifference.pdf.file = /jasper/beddifference_en.jasper export.minfo.beddifference.pdf.title = Bedheight Difference export.minfo.beddifference.pdf.mode = Bedheight Difference @@ -576,6 +593,7 @@ help.state.minfo.dischargestate=${help.url}/OnlineHilfe/MINFO#help.state.minfo.dischargestate help.state.minfo.soundings=${help.url}/OnlineHilfe/MINFO#help.state.minfo.soundings help.state.minfo.bed.difference_select=${help.url}/OnlineHilfe/MINFO#help.state.minfo.bed.difference_select +help.state.minfo.sq.outliermethod=${help.url}/OnlineHilfe/MINFO#help.state.minfo.sq.outliermethod help.state.minfo.sq.outliers=${help.url}/OnlineHilfe/MINFO#help.state.minfo.sq.outliers help.state.minfo.sediment.load.year_epoch=${help.url}/OnlineHilfe/MINFO#help.state.minfo.sediment.load.year_epoch help.state.minfo.sediment.load.location=${help.url}/OnlineHilfe/MINFO#help.state.minfo.sediment.load.location
--- a/backend/contrib/import_river.sh Wed May 21 11:43:10 2014 +0200 +++ b/backend/contrib/import_river.sh Mon Jun 30 11:29:45 2014 +0200 @@ -239,7 +239,6 @@ -Dflys.backend.importer.skip.morphological.width=true \ -Dflys.backend.importer.skip.flow.velocity=true \ -Dflys.backend.importer.skip.bed.height.single=true \ - -Dflys.backend.importer.skip.bed.height.epoch=true \ $JAR } @@ -287,7 +286,6 @@ -Dflys.backend.importer.skip.morphological.width=false \ -Dflys.backend.importer.skip.flow.velocity=false \ -Dflys.backend.importer.skip.bed.height.single=false \ - -Dflys.backend.importer.skip.bed.height.epoch=false \ $JAR } @@ -335,7 +333,6 @@ -Dflys.backend.importer.skip.morphological.width=true \ -Dflys.backend.importer.skip.flow.velocity=true \ -Dflys.backend.importer.skip.bed.height.single=true \ - -Dflys.backend.importer.skip.bed.height.epoch=true \ $JAR }
--- a/backend/contrib/run_hydr_morph.sh Wed May 21 11:43:10 2014 +0200 +++ b/backend/contrib/run_hydr_morph.sh Mon Jun 30 11:29:45 2014 +0200 @@ -43,9 +43,9 @@ IMPORTER_SKIP_MEASUREMENT_STATIONS=false IMPORTER_SKIP_BED_HEIGHT_SINGLE=false -IMPORTER_SKIP_BED_HEIGHT_EPOCH=false IMPORTER_SKIP_FLOW_VELOCITY=false IMPORTER_SKIP_MORPHOLOGICAL_WIDTH=false +IMPORTER_SKIP_POROSITY=false IMPORTER_SKIP_SEDIMENT_DENSITY=false IMPORTER_SKIP_SEDIMENT_YIELD=false IMPORTER_SKIP_SQ_RELATION=false @@ -78,7 +78,6 @@ -Dflys.backend.importer.dry.run=$IMPORTER_DRY_RUN \ -Dflys.backend.importer.skip.annotations=$IMPORTER_SKIP_ANNOTATIONS \ -Dflys.backend.importer.skip.bed.height.single=$IMPORTER_SKIP_BED_HEIGHT_SINGLE \ - -Dflys.backend.importer.skip.bed.height.epoch=$IMPORTER_SKIP_BED_HEIGHT_EPOCH \ -Dflys.backend.importer.skip.bwastr=$IMPORTER_SKIP_BWASTR \ -Dflys.backend.importer.skip.da50s=$IMPORTER_SKIP_DA50S \ -Dflys.backend.importer.skip.da66s=$IMPORTER_SKIP_DA66S \ @@ -92,6 +91,7 @@ -Dflys.backend.importer.skip.historical.discharge.tables=$IMPORTER_SKIP_HISTORICAL_DISCHARGE_GAUGES \ -Dflys.backend.importer.skip.hyks=$IMPORTER_SKIP_HYKS \ -Dflys.backend.importer.skip.morphological.width=$IMPORTER_SKIP_MORPHOLOGICAL_WIDTH \ + -Dflys.backend.importer.skip.porosity=$IMPORTER_SKIP_POROSITY \ -Dflys.backend.importer.skip.official.lines=$IMPORTER_SKIP_OFFICIAL_LINES \ -Dflys.backend.importer.skip.prfs=$IMPORTER_SKIP_PRFS \ -Dflys.backend.importer.skip.sediment.density=$IMPORTER_SKIP_SEDIMENT_DENSITY \
--- a/backend/doc/documentation/de/importer-hydr-morph.tex Wed May 21 11:43:10 2014 +0200 +++ b/backend/doc/documentation/de/importer-hydr-morph.tex Mon Jun 30 11:29:45 2014 +0200 @@ -186,17 +186,18 @@ Es werden die CSV-Dateien aus dem Verzeichnis \textit{Morphologie/Sohlhoehen/Einzeljahre} geladen. -\subsubsection{Sohlh�hen (Epochen)} -Der Import Sohlh�hen-Epochen kann mit \textbf{-Dflys.backend.importer.skip.bed.height.epoch=true} -unterdr�ckt werden. Es werden die CSV-Dateien aus dem Verzeichnis -\textit{Morphologie/Sohlhoehen/Epochen} geladen. - \subsubsection{Sedimentdichte} Der Import der Sedimentdichte kann mit \textbf{-Dflys.backend.importer.skip.sediment.density=true} unterdr�ckt werden. Es werden die CSV-Dateien aus dem Verzeichnis \textit{Morphologie/Sedimentdichte} geladen. +\subsubsection{Porosit�t} +Der Import der Porosit�tsdaten kann mit +\textbf{-Dflys.backend.importer.skip.porosity=true} +unterdr�ckt werden. Es werden die CSV-Dateien aus dem Verzeichnis +\textit{Morphologie/Porositaet} geladen. + \subsubsection{Morphologische Breite} Mit \textbf{-Dflys.backend.importer.skip.morphological.width=true} kann der Import der morphologischen Breite unterdr�ckt werden. @@ -882,7 +883,7 @@ \subsection{Starten des Fachdaten Importers} \label{start-hydr} Der Fachdaten Importer wird mit Hilfe eines Shellskripts von einer Konsole -gestartet. Dazu f�hren folgenden Befehl aus:\\ +gestartet. Dazu folgenden Befehl ausf�hren:\\ \begin{lstlisting} ./run_hydr_morph.sh pfad/zur/beispiel.gew @@ -896,6 +897,13 @@ Ebenfalls wichtig ist die Zeile beginnend mit \textit{Gew�sser:} in der der Name des Gew�ssers festgelegt wird. +Zus�tzlich kann die Datei eine Zeile beginnend mit \textit{uuid:} +enthalten. Dahinter kann eine +UUID\footnote{\url{http://de.wikipedia.org/wiki/UUID}} stehen, +die als eindeutiger Bezeichner des Datensatzes verwendet wird +(derzeit f�r die Zuordnung der Darstellung von Gew�ssern in der +interaktiven Einstiegskarte zu Datens�tzen in der Datenbank). + Nachdem der Prompt der Konsole zur�ckkehrt, ist der Import abgeschlossen oder es ist ein Fehler aufgetreten. Weitere Informationen entnehmen Sie der Log-Datei.
--- a/backend/doc/schema/oracle-minfo.sql Wed May 21 11:43:10 2014 +0200 +++ b/backend/doc/schema/oracle-minfo.sql Mon Jun 30 11:29:45 2014 +0200 @@ -59,27 +59,6 @@ ); -CREATE SEQUENCE BED_HEIGHT_EPOCH_ID_SEQ; - -CREATE TABLE bed_height_epoch ( - id NUMBER(38,0) NOT NULL, - river_id NUMBER(38,0) NOT NULL, - time_interval_id NUMBER(38,0) NOT NULL, - -- sounding_with NUMBER(38,0) NOT NULL, - -- type_id NUMBER(38,0) NOT NULL, - cur_elevation_model_id NUMBER(38,0) NOT NULL, - old_elevation_model_id NUMBER(38,0), - range_id NUMBER(38,0), - evaluation_by VARCHAR(255), - description VARCHAR(255), - PRIMARY KEY(id), - CONSTRAINT fk_time_interval FOREIGN KEY (time_interval_id) REFERENCES time_intervals(id), - CONSTRAINT fk_epoch_cur_elevation_model FOREIGN KEY (cur_elevation_model_id) REFERENCES elevation_model(id), - CONSTRAINT fk_epoch_old_elevation_model FOREIGN KEY (old_elevation_model_id) REFERENCES elevation_model(id), - CONSTRAINT fk_epoch_range FOREIGN KEY (range_id) REFERENCES ranges(id) ON DELETE CASCADE -); - - CREATE SEQUENCE BED_SINGLE_VALUES_ID_SEQ; CREATE TABLE bed_height_single_values ( @@ -97,18 +76,6 @@ ); -CREATE SEQUENCE BED_EPOCH_VALUES_ID_SEQ; - -CREATE TABLE bed_height_epoch_values ( - id NUMBER(38,0) NOT NULL, - bed_height_epoch_id NUMBER(38,0) NOT NULL, - station NUMBER(38,2) NOT NULL, - height NUMBER(38,2), - PRIMARY KEY(id), - CONSTRAINT fk_bed_epoch_values_parent FOREIGN KEY (bed_height_epoch_id) REFERENCES bed_height_epoch(id) ON DELETE CASCADE -); - - CREATE SEQUENCE DEPTHS_ID_SEQ; CREATE TABLE depths (
--- a/backend/doc/schema/postgresql-minfo.sql Wed May 21 11:43:10 2014 +0200 +++ b/backend/doc/schema/postgresql-minfo.sql Mon Jun 30 11:29:45 2014 +0200 @@ -59,27 +59,6 @@ ); -CREATE SEQUENCE BED_HEIGHT_EPOCH_ID_SEQ; - -CREATE TABLE bed_height_epoch ( - id int NOT NULL, - river_id int NOT NULL, - time_interval_id int NOT NULL, - -- sounding_width int, - -- type_id int NOT NULL, - cur_elevation_model_id int NOT NULL, - old_elevation_model_id int, - range_id int, - evaluation_by VARCHAR(255), - description VARCHAR(255), - PRIMARY KEY(id), - CONSTRAINT fk_time_interval FOREIGN KEY (time_interval_id) REFERENCES time_intervals(id), - CONSTRAINT fk_epoch_cur_elevation_model FOREIGN KEY (cur_elevation_model_id) REFERENCES elevation_model(id), - CONSTRAINT fk_epoch_old_elevation_model FOREIGN KEY (old_elevation_model_id) REFERENCES elevation_model(id), - CONSTRAINT fk_epoch_range FOREIGN KEY (range_id) REFERENCES ranges(id) ON DELETE CASCADE -); - - CREATE SEQUENCE BED_SINGLE_VALUES_ID_SEQ; CREATE TABLE bed_height_single_values ( @@ -97,18 +76,6 @@ ); -CREATE SEQUENCE BED_EPOCH_VALUES_ID_SEQ; - -CREATE TABLE bed_height_epoch_values ( - id int NOT NULL, - bed_height_epoch_id int NOT NULL, - station NUMERIC NOT NULL, - height NUMERIC, - PRIMARY KEY(id), - CONSTRAINT fk_bed_epoch_values_parent FOREIGN KEY (bed_height_epoch_id) REFERENCES bed_height_epoch(id) ON DELETE CASCADE -); - - CREATE SEQUENCE DEPTHS_ID_SEQ; CREATE TABLE depths (
--- a/backend/src/main/java/org/dive4elements/river/backend/FLYSCredentials.java Wed May 21 11:43:10 2014 +0200 +++ b/backend/src/main/java/org/dive4elements/river/backend/FLYSCredentials.java Mon Jun 30 11:29:45 2014 +0200 @@ -14,8 +14,6 @@ import org.dive4elements.river.model.AnnotationType; import org.dive4elements.river.model.Attribute; import org.dive4elements.river.model.AxisKind; -import org.dive4elements.river.model.BedHeightEpoch; -import org.dive4elements.river.model.BedHeightEpochValue; import org.dive4elements.river.model.BedHeightSingle; import org.dive4elements.river.model.BedHeightSingleValue; import org.dive4elements.river.model.BedHeightType; @@ -139,8 +137,6 @@ AnnotationType.class, Attribute.class, AxisKind.class, - BedHeightEpoch.class, - BedHeightEpochValue.class, BedHeightSingle.class, BedHeightSingleValue.class, BedHeightType.class,
--- a/backend/src/main/java/org/dive4elements/river/importer/Config.java Wed May 21 11:43:10 2014 +0200 +++ b/backend/src/main/java/org/dive4elements/river/importer/Config.java Mon Jun 30 11:29:45 2014 +0200 @@ -73,9 +73,6 @@ public static final String SKIP_DA66S = "flys.backend.importer.skip.da66s"; - public static final String SKIP_BED_HEIGHT_EPOCH = - "flys.backend.importer.skip.bed.height.epoch"; - public static final String SKIP_SEDIMENT_DENSITY = "flys.backend.importer.skip.sediment.density"; @@ -214,10 +211,6 @@ return getFlag(SKIP_BED_HEIGHT_SINGLE); } - public boolean skipBedHeightEpoch() { - return getFlag(SKIP_BED_HEIGHT_EPOCH); - } - public boolean skipSedimentDensity() { return getFlag(SKIP_SEDIMENT_DENSITY); }
--- a/backend/src/main/java/org/dive4elements/river/importer/ImportBedHeightEpoch.java Wed May 21 11:43:10 2014 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,206 +0,0 @@ -/* 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.importer; - -import java.util.ArrayList; -import java.util.List; - -import org.apache.log4j.Logger; -import org.hibernate.Query; -import org.hibernate.Session; - -import org.dive4elements.river.model.BedHeightEpoch; -import org.dive4elements.river.model.ElevationModel; -import org.dive4elements.river.model.Range; -import org.dive4elements.river.model.River; -import org.dive4elements.river.model.TimeInterval; - - -/** Import Bed Height Data, 'epoch' type from csv file. */ -public class ImportBedHeightEpoch implements ImportBedHeight { - - /** Private logger. */ - private static Logger log = Logger.getLogger(ImportBedHeightEpoch.class); - - protected String evaluationBy; - - /** De facto the file name. */ - protected String description; - - protected ImportTimeInterval timeInterval; - protected ImportRange range; - protected ImportElevationModel curElevationModel; - protected ImportElevationModel oldElevationModel; - - protected List<ImportBedHeightEpochValue> values; - - protected BedHeightEpoch peer; - - public ImportBedHeightEpoch(String description) { - this.description = description; - this.values = new ArrayList<ImportBedHeightEpochValue>(); - } - - public String getDescription() { - return description; - } - - public int getValueCount() { - return values.size(); - } - - public void setTimeInterval(ImportTimeInterval timeInterval) { - this.timeInterval = timeInterval; - } - - public void setEvaluationBy(String evaluationBy) { - this.evaluationBy = evaluationBy; - } - - public void setDescription(String description) { - this.description = description; - } - - public void setRange(ImportRange range) { - this.range = range; - } - - public void setCurElevationModel(ImportElevationModel curElevationModel) { - this.curElevationModel = curElevationModel; - } - - public void setOldElevationModel(ImportElevationModel oldElevationModel) { - this.oldElevationModel = oldElevationModel; - } - - /** Does nothing. */ - public void setYear(int year) { - // do nothing - } - - /** Does nothing. */ - public void setSoundingWidth(int soundingWidth) { - // do nothing - } - - - /** Does nothing. */ - public void setLocationSystem(ImportLocationSystem locationSystem) { - // do nothing - } - - - /** Does nothing. */ - public void setType(ImportBedHeightType type) { - // do nothing - } - - @Override - public void addValue(ImportBedHeightValue value) { - values.add((ImportBedHeightEpochValue) value); - } - - @Override - public void storeDependencies(River river) { - log.info("Store dependencies for epoch: '" + getDescription() + "'"); - - BedHeightEpoch peer = getPeer(river); - - if (curElevationModel != null) { - curElevationModel.storeDependencies(); - } - - if (oldElevationModel != null) { - oldElevationModel.storeDependencies(); - } - - if (peer != null) { - log.debug("store values now..."); - - for (ImportBedHeightEpochValue value : values) { - value.storeDependencies(peer); - } - } - - Session session = ImporterSession.getInstance().getDatabaseSession(); - session.flush(); - } - - /** - * Asserts all dependent entities (ElevationModel, TimeInterval, Range, - * BedHeighEpoch) are in db and returns bound (either newly created or - * freshly fetched) BedHeightEpoch. - */ - @Override - public BedHeightEpoch getPeer(River river) { - if (peer == null) { - ElevationModel theCurModel = null; - if (curElevationModel != null) { - curElevationModel.storeDependencies(); - theCurModel = curElevationModel.getPeer(); - } - - if (theCurModel == null) { - log.warn("BHE: Skip file - invalid current elevation model."); - return null; - } - - TimeInterval theTime = null; - if (timeInterval != null) { - theTime = timeInterval.getPeer(); - } - - if (theTime == null) { - log.warn("BHE: Skip file - invalid time range."); - return null; - } - - Range theRange = range != null ? range.getPeer(river) : null; - - if (theRange == null) { - log.warn("BHE: invalid km range."); - } - - Session session = ImporterSession.getInstance() - .getDatabaseSession(); - - Query query = session.createQuery("from BedHeightEpoch where " - + " river=:river and " + " timeInterval=:timeInterval and " - + " curElevationModel=:curElevationModel and " - + " range=:range and " + " evaluationBy=:evaluationBy and " - + " description=:description"); - - query.setParameter("river", river); - query.setParameter("timeInterval", theTime); - query.setParameter("curElevationModel", theCurModel); - query.setParameter("range", theRange); - query.setParameter("evaluationBy", evaluationBy); - query.setParameter("description", description); - - List<BedHeightEpoch> bedHeights = query.list(); - - if (bedHeights.isEmpty()) { - log.info("Create new BedHeightEpoch DB instance."); - - peer = new BedHeightEpoch(river, theTime, theRange, - theCurModel, - oldElevationModel != null ? oldElevationModel.getPeer() - : null, evaluationBy, description); - - session.save(peer); - } - else { - peer = bedHeights.get(0); - } - } - - return peer; - } -} -// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/backend/src/main/java/org/dive4elements/river/importer/ImportBedHeightEpochValue.java Wed May 21 11:43:10 2014 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,83 +0,0 @@ -/* 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.importer; - -import java.util.List; - -import java.math.BigDecimal; - -import org.apache.log4j.Logger; - -import org.hibernate.Session; -import org.hibernate.Query; - -import org.dive4elements.river.model.BedHeightEpoch; -import org.dive4elements.river.model.BedHeightEpochValue; - - -public class ImportBedHeightEpochValue implements ImportBedHeightValue { - - private static final Logger log = - Logger.getLogger(ImportBedHeightEpochValue.class); - - - private BigDecimal station; - private BigDecimal height; - - private BedHeightEpochValue peer; - - - public ImportBedHeightEpochValue() { - } - - - public ImportBedHeightEpochValue(BigDecimal station, BigDecimal height) { - this.station = station; - this.height = height; - } - - - public void storeDependencies(BedHeightEpoch bedHeight) { - getPeer(bedHeight); - } - - - public BedHeightEpochValue getPeer(BedHeightEpoch bedHeight) { - if (peer == null) { - Session session = ImporterSession.getInstance().getDatabaseSession(); - - Query query = session.createQuery( - "from BedHeightEpochValue where " + - " bedHeight=:bedHeight and " + - " station=:station and " + - " height=:height"); - - query.setParameter("bedHeight", bedHeight); - query.setParameter("station", station); - query.setParameter("height", height); - - List<BedHeightEpochValue> values = query.list(); - - if (values.isEmpty()) { - peer = new BedHeightEpochValue( - bedHeight, - station, - height - ); - session.save(peer); - } - else { - peer = values.get(0); - } - } - - return peer; - } -} -// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/backend/src/main/java/org/dive4elements/river/importer/ImportRiver.java Wed May 21 11:43:10 2014 +0200 +++ b/backend/src/main/java/org/dive4elements/river/importer/ImportRiver.java Mon Jun 30 11:29:45 2014 +0200 @@ -14,7 +14,6 @@ import org.dive4elements.river.importer.parsers.AnnotationClassifier; import org.dive4elements.river.importer.parsers.AnnotationsParser; -import org.dive4elements.river.importer.parsers.BedHeightEpochParser; import org.dive4elements.river.importer.parsers.BedHeightSingleParser; import org.dive4elements.river.importer.parsers.CrossSectionParser; import org.dive4elements.river.importer.parsers.DA50Parser; @@ -93,8 +92,6 @@ public static final String BED_HEIGHT_SINGLE_DIR = "Einzeljahre"; - public static final String BED_HEIGHT_EPOCH_DIR = "Epochen"; - public static final String SEDIMENT_DENSITY_DIR = "Sedimentdichte"; public static final String POROSITY_DIR = "Porositaet"; @@ -450,7 +447,6 @@ File minfoDir = getMinfoDir(); File bedHeightDir = new File(minfoDir, BED_HEIGHT_DIR); File singlesDir = new File(bedHeightDir, BED_HEIGHT_SINGLE_DIR); - File epochDir = new File(bedHeightDir, BED_HEIGHT_EPOCH_DIR); if (Config.INSTANCE.skipBedHeightSingle()) { log.info("skip parsing bed height single."); @@ -459,14 +455,6 @@ log.info("Parse bed height single."); parseBedHeightSingles(singlesDir); } - - if (Config.INSTANCE.skipBedHeightEpoch()) { - log.info("skip parsing bed height epochs."); - } - else { - log.info("Parse bed height epochs."); - parseBedHeightEpochs(epochDir); - } } @@ -815,27 +803,6 @@ bedHeightSingles = parser.getBedHeights(); } - - protected void parseBedHeightEpochs(File dir) throws IOException { - log.debug("Parse bed height epochs"); - - File[] files = dir.listFiles(); - - if (files == null) { - log.warn("Cannot read directory '" + dir + "'"); - return; - } - - BedHeightEpochParser parser = new BedHeightEpochParser(); - - for (File file: files) { - parser.parse(file); - } - - bedHeightEpochs = parser.getBedHeights(); - } - - public void parseFloodWater() throws IOException { if (Config.INSTANCE.skipFloodWater()) { log.info("skip parsing flod water"); @@ -1444,11 +1411,6 @@ log.info("store bed heights single"); storeBedHeightSingle(); } - - if (!Config.INSTANCE.skipBedHeightEpoch()) { - log.info("store bed height epoch."); - storeBedHeightEpoch(); - } } @@ -1472,25 +1434,6 @@ } - private void storeBedHeightEpoch() { - River river = getPeer(); - - if (bedHeightEpochs != null) { - for (ImportBedHeight tmp: bedHeightEpochs) { - ImportBedHeightEpoch epoch = (ImportBedHeightEpoch) tmp; - - String desc = epoch.getDescription(); - - log.debug("name: " + desc); - - epoch.storeDependencies(river); - } - } - else { - log.info("No epoch bed heights to store."); - } - } - public void storeSedimentDensity() { if (!Config.INSTANCE.skipSedimentDensity()) { log.info("store sediment density");
--- a/backend/src/main/java/org/dive4elements/river/importer/parsers/BedHeightEpochParser.java Wed May 21 11:43:10 2014 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,85 +0,0 @@ -/* 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.importer.parsers; - -import java.math.BigDecimal; - -import java.text.ParseException; - -import org.apache.log4j.Logger; - -import org.dive4elements.river.importer.ImportBedHeight; -import org.dive4elements.river.importer.ImportBedHeightEpoch; -import org.dive4elements.river.importer.ImportBedHeightEpochValue; - - -/** Parses BedHeightEpochs from csv file. */ -public class BedHeightEpochParser extends BedHeightParser { - - /** Our own logger. */ - private static final Logger log = - Logger.getLogger(BedHeightEpochParser.class); - - - @Override - protected ImportBedHeight newImportBedHeight(String description) { - return new ImportBedHeightEpoch(description); - } - - - /** - * Handle a non-comment, none-Metadata line of csv file, adding - * ImportBedHeightEpochValues to the given ImportBedHeight object. - */ - @Override - protected void handleDataLine(ImportBedHeight obj, String line) { - String[] values = line.split(SEPERATOR_CHAR); - - if (values == null || values.length == 0 || values[0].length() == 0) { - // There might be quite some ";" found. - //log.warn("Skip invalid data line: " + line); - return; - } - - BigDecimal km; - - try { - km = new BigDecimal(nf.parse(values[0]).doubleValue()); - } - catch (ParseException e) { - log.warn("Unparseable number in data row: " + line); - return; - } - - - // Handle "gap" lines like '255,0;' - if (values.length < 2) { - ImportBedHeightEpochValue value = new ImportBedHeightEpochValue( - km, - null - ); - - obj.addValue(value); - return; - } - - try { - ImportBedHeightEpochValue value = new ImportBedHeightEpochValue( - km, - new BigDecimal(nf.parse(values[1]).doubleValue()) - ); - - obj.addValue(value); - } - catch (ParseException e) { - log.warn("Unparseable number in data row: " + line); - } - } -} -// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/backend/src/main/java/org/dive4elements/river/importer/parsers/BedHeightParser.java Wed May 21 11:43:10 2014 +0200 +++ b/backend/src/main/java/org/dive4elements/river/importer/parsers/BedHeightParser.java Mon Jun 30 11:29:45 2014 +0200 @@ -41,6 +41,7 @@ import org.dive4elements.river.model.BedHeightType; import org.dive4elements.river.importer.ImporterSession; import org.dive4elements.river.utils.EpsilonComparator; +import org.dive4elements.river.utils.DateUtil; public abstract class BedHeightParser { @@ -233,8 +234,8 @@ int lower = Integer.valueOf(lo); int upper = Integer.valueOf(up); - Date fromYear = LineParser.getStartDateFromYear(lower); - Date toYear = LineParser.getEndDateFromYear(upper); + Date fromYear = DateUtil.getStartDateFromYear(lower); + Date toYear = DateUtil.getEndDateFromYear(upper); obj.setTimeInterval(new ImportTimeInterval(fromYear, toYear)); }
--- a/backend/src/main/java/org/dive4elements/river/importer/parsers/LineParser.java Wed May 21 11:43:10 2014 +0200 +++ b/backend/src/main/java/org/dive4elements/river/importer/parsers/LineParser.java Mon Jun 30 11:29:45 2014 +0200 @@ -14,7 +14,6 @@ import java.text.NumberFormat; import java.text.ParseException; import java.text.SimpleDateFormat; -import java.util.Calendar; import java.util.Date; import java.util.Locale; @@ -135,25 +134,5 @@ return df.parse(dateString); } - - - /** Create Date on first moment (1st jan) of given year. */ - public static Date getStartDateFromYear(int year) { - Calendar cal = Calendar.getInstance(); - cal.clear(); - cal.set(year, 0, 1, 0, 0, 0); - - return cal.getTime(); - } - - - /** Create Date on last moment (31st dec) of given year. */ - public static Date getEndDateFromYear(int year) { - Calendar cal = Calendar.getInstance(); - cal.clear(); - cal.set(year, 11, 31, 23, 59, 59); - - return cal.getTime(); - } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/backend/src/main/java/org/dive4elements/river/importer/parsers/PorosityParser.java Wed May 21 11:43:10 2014 +0200 +++ b/backend/src/main/java/org/dive4elements/river/importer/parsers/PorosityParser.java Mon Jun 30 11:29:45 2014 +0200 @@ -12,6 +12,7 @@ import org.dive4elements.river.importer.ImportPorosity; import org.dive4elements.river.importer.ImportPorosityValue; import org.dive4elements.river.importer.ImportTimeInterval; +import org.dive4elements.river.utils.DateUtil; import java.io.File; import java.io.IOException; @@ -38,7 +39,7 @@ NumberFormat.getInstance(DEFAULT_LOCALE); public static final Pattern META_DEPTH = - Pattern.compile("^Tiefe: (\\w++)-(\\w++)( (\\w++))?.*"); + Pattern.compile("^Tiefe: (\\d++)-(\\d++).*"); public static final Pattern META_TIMEINTERVAL = Pattern.compile("^Zeitraum: (\\d{4})-(\\d{4}).*"); @@ -56,7 +57,7 @@ @Override public void parse(File file) throws IOException { - currentDescription = file.getName(); + currentDescription = file.getName().replaceAll("\\.csv", ""); super.parse(file); } @@ -110,8 +111,8 @@ int lower = Integer.valueOf(lo); int upper = Integer.valueOf(up); - Date fromYear = LineParser.getStartDateFromYear(lower); - Date toYear = LineParser.getEndDateFromYear(upper); + Date fromYear = DateUtil.getStartDateFromYear(lower); + Date toYear = DateUtil.getEndDateFromYear(upper); current.setTimeInterval(new ImportTimeInterval(fromYear, toYear)); }
--- a/backend/src/main/java/org/dive4elements/river/importer/parsers/SQRelationParser.java Wed May 21 11:43:10 2014 +0200 +++ b/backend/src/main/java/org/dive4elements/river/importer/parsers/SQRelationParser.java Mon Jun 30 11:29:45 2014 +0200 @@ -22,6 +22,7 @@ import org.dive4elements.river.importer.ImportSQRelation; import org.dive4elements.river.importer.ImportSQRelationValue; import org.dive4elements.river.importer.ImportTimeInterval; +import org.dive4elements.river.utils.DateUtil; public class SQRelationParser extends LineParser { @@ -99,8 +100,8 @@ int high = nf.parse(hi).intValue(); current.setTimeInterval(new ImportTimeInterval( - getStartDateFromYear(low), - getEndDateFromYear(high) + DateUtil.getStartDateFromYear(low), + DateUtil.getEndDateFromYear(high) )); } catch (ParseException nfe) {
--- a/backend/src/main/java/org/dive4elements/river/importer/parsers/SedimentDensityParser.java Wed May 21 11:43:10 2014 +0200 +++ b/backend/src/main/java/org/dive4elements/river/importer/parsers/SedimentDensityParser.java Mon Jun 30 11:29:45 2014 +0200 @@ -37,7 +37,7 @@ NumberFormat.getInstance(DEFAULT_LOCALE); public static final Pattern META_DEPTH = - Pattern.compile("^Tiefe: (\\w++)-(\\w++)( (\\w++))?.*"); + Pattern.compile("^Tiefe: (\\d++)-(\\d++).*"); public static final Pattern META_YEAR = Pattern.compile("^Jahr: (\\d{4}).*");
--- a/backend/src/main/java/org/dive4elements/river/importer/parsers/SedimentYieldParser.java Wed May 21 11:43:10 2014 +0200 +++ b/backend/src/main/java/org/dive4elements/river/importer/parsers/SedimentYieldParser.java Mon Jun 30 11:29:45 2014 +0200 @@ -27,6 +27,7 @@ import org.dive4elements.river.importer.ImportTimeInterval; import org.dive4elements.river.importer.ImportUnit; import org.dive4elements.river.model.GrainFraction; +import org.dive4elements.river.utils.DateUtil; /** Parses Sediment Yield files. */ @@ -190,7 +191,7 @@ String newLine = line.replace(FRAKTION_START, "").trim(); if (newLine.length() == 0) { log.debug("Found total grain fraction."); - this.grainFraction = new ImportGrainFraction(GrainFraction.TOTAL); + this.grainFraction = new ImportGrainFraction(GrainFraction.UNKNOWN); return true; } @@ -275,8 +276,8 @@ int yearB = nf.parse(a.group(2)).intValue(); return new ImportTimeInterval( - getStartDateFromYear(yearA), - getEndDateFromYear(yearB) + DateUtil.getStartDateFromYear(yearA), + DateUtil.getEndDateFromYear(yearB) ); } @@ -284,7 +285,7 @@ if (b.matches()) { int year = nf.parse(b.group(1)).intValue(); - return new ImportTimeInterval(getStartDateFromYear(year)); + return new ImportTimeInterval(DateUtil.getStartDateFromYear(year)); } log.warn("SYP: Unknown time interval string: '" + column + "'"); @@ -372,8 +373,7 @@ } log.warn("SYP: Unknown grain fraction: '" + gfStr + "'"); - - return null; + return new ImportGrainFraction(GrainFraction.UNKNOWN); } @@ -402,7 +402,7 @@ } else { log.warn("SYP: Unknown grain fraction '" + filename + "'"); - return "unknown"; + return GrainFraction.UNKNOWN; } }
--- a/backend/src/main/java/org/dive4elements/river/importer/parsers/WaterlevelDifferencesParser.java Wed May 21 11:43:10 2014 +0200 +++ b/backend/src/main/java/org/dive4elements/river/importer/parsers/WaterlevelDifferencesParser.java Mon Jun 30 11:29:45 2014 +0200 @@ -27,6 +27,7 @@ import org.dive4elements.river.importer.ImportWstQRange; import org.dive4elements.river.importer.ImportWstColumn; import org.dive4elements.river.importer.ImportWstColumnValue; +import org.dive4elements.river.utils.DateUtil; /** @@ -102,8 +103,8 @@ // For all differences columns, add a single Q-Range with // -1. // Expand range to minimal length in case it would be 0 - // TODO: should otherwise be extended to - // (first station of next range - INTERVAL_GAP), + // TODO: should otherwise be extended to + // (first station of next range - INTERVAL_GAP), // assuming always ascending stations for (ImportWstColumn column: columns) { List<ImportWstColumnValue> cValues = column.getColumnValues(); @@ -199,8 +200,8 @@ int startYear = Integer.parseInt(m.group(1)); int endYear = Integer.parseInt(m.group(2)); ImportTimeInterval time = new ImportTimeInterval( - getStartDateFromYear(startYear), - getEndDateFromYear(endYear) + DateUtil.getStartDateFromYear(startYear), + DateUtil.getEndDateFromYear(endYear) ); column.setTimeInterval(time); } else {
--- a/backend/src/main/java/org/dive4elements/river/importer/parsers/WaterlevelParser.java Wed May 21 11:43:10 2014 +0200 +++ b/backend/src/main/java/org/dive4elements/river/importer/parsers/WaterlevelParser.java Mon Jun 30 11:29:45 2014 +0200 @@ -28,6 +28,7 @@ import org.dive4elements.river.importer.ImportWstColumn; import org.dive4elements.river.importer.ImportWstColumnValue; import org.dive4elements.river.importer.ImportWstQRange; +import org.dive4elements.river.utils.DateUtil; /** @@ -102,8 +103,8 @@ int startYear = Integer.parseInt(m.group(1)); int endYear = Integer.parseInt(m.group(2)); ImportTimeInterval time = new ImportTimeInterval( - getStartDateFromYear(startYear), - getEndDateFromYear(endYear) + DateUtil.getStartDateFromYear(startYear), + DateUtil.getEndDateFromYear(endYear) ); column.setTimeInterval(time); } else { @@ -121,12 +122,12 @@ List<ImportWstColumnValue> cValues = column.getColumnValues(); // Set end of range to last station // or expand range to minimal length in case it would be 0 - // TODO: should otherwise be extended to - // (first station of next range - INTERVAL_GAP), + // TODO: should otherwise be extended to + // (first station of next range - INTERVAL_GAP), // assuming always ascending stations BigDecimal lastStation = cValues.get(cValues.size() -1).getPosition(); if (lastStation.compareTo(currentRange.getA()) == 0) { - currentRange.setB(new BigDecimal(lastStation.doubleValue() + currentRange.setB(new BigDecimal(lastStation.doubleValue() + INTERVAL_GAP)); } else {
--- a/backend/src/main/java/org/dive4elements/river/importer/parsers/WstParser.java Wed May 21 11:43:10 2014 +0200 +++ b/backend/src/main/java/org/dive4elements/river/importer/parsers/WstParser.java Mon Jun 30 11:29:45 2014 +0200 @@ -152,7 +152,7 @@ boolean columnHeaderChecked = false; - /* Default string for altitude reference + /* Default string for altitude reference * if none is found in WST-file. * Use in case no unit comment is found in file */ String einheit = "m ü. unbekannte Referenz"; @@ -343,10 +343,10 @@ } // check consistence of station ordering in file - if (kmHist2 != null && + if (kmHist2 != null && kmHist2.compareTo(kmHist1) != kmHist1.compareTo(kaem)) { - throw new ParseException("WST: Stations in " + file + - " near line " + in.getLineNumber() + + throw new ParseException("WST: Stations in " + file + + " near line " + in.getLineNumber() + " not ordered. File rejected."); } @@ -381,7 +381,7 @@ i, i+colNaWidths[j]).trim(); } } - else { // fetch column names from non-comment header line + else { // fetch column names from non-comment header line // (above first Qs) // first column begins at position 8 in line for (int i = 8, col = 0; i < input.length(); i += 9) { @@ -389,7 +389,7 @@ // but the last one may be shorter if (col < lsBezeichner.length) { lsBezeichner[col++] = - input.substring(i, + input.substring(i, Math.min(i + 9, input.length())).trim(); } if (col == lsBezeichner.length) { @@ -406,7 +406,7 @@ } wst.setUnit(new ImportUnit(einheit)); - // add Q-ranges obtained from previous lines + // add Q-ranges obtained from previous lines // in case there was no further Q-line // but only if there were values following the last Q-line if (minKm != MAX_RANGE && maxKm != MIN_RANGE) { @@ -535,7 +535,7 @@ if (pos >= line.length()) { break; } - strings.add(line.substring(pos, + strings.add(line.substring(pos, Math.min(pos + 8, line.length()))); }
--- a/backend/src/main/java/org/dive4elements/river/model/BedHeightEpoch.java Wed May 21 11:43:10 2014 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,219 +0,0 @@ -/* 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.model; - -import java.io.Serializable; - -import java.util.ArrayList; -import java.util.List; - -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; -import javax.persistence.GeneratedValue; -import javax.persistence.Column; -import javax.persistence.SequenceGenerator; -import javax.persistence.GenerationType; -import javax.persistence.JoinColumn; -import javax.persistence.OneToOne; -import javax.persistence.OneToMany; - -import org.hibernate.Session; -import org.hibernate.Query; - -import org.dive4elements.river.backend.SessionHolder; - - -@Entity -@Table(name = "bed_height_epoch") -public class BedHeightEpoch implements Serializable { - - private Integer id; - - private River river; - - private TimeInterval timeInterval; - - private ElevationModel curElevationModel; - private ElevationModel oldElevationModel; - - private Range range; - - private String evaluationBy; - private String description; - - private List<BedHeightEpochValue> values; - - - public BedHeightEpoch() { - } - - - public BedHeightEpoch( - River river, - TimeInterval timeInterval, - Range range, - ElevationModel curElevationModel, - ElevationModel oldElevationModel, - String evaluationBy, - String description - ) { - this.river = river; - this.timeInterval = timeInterval; - this.range = range; - this.curElevationModel = curElevationModel; - this.oldElevationModel = oldElevationModel; - this.evaluationBy = evaluationBy; - this.description = description; - this.values = new ArrayList<BedHeightEpochValue>(); - } - - - @Id - @SequenceGenerator( - name = "SEQUENCE_BED_HEIGHT_EPOCH_ID_SEQ", - sequenceName = "BED_HEIGHT_EPOCH_ID_SEQ", - allocationSize = 1) - @GeneratedValue( - strategy = GenerationType.SEQUENCE, - generator = "SEQUENCE_BED_HEIGHT_EPOCH_ID_SEQ") - @Column(name = "id") - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - @OneToOne - @JoinColumn(name = "river_id" ) - public River getRiver() { - return river; - } - - public void setRiver(River river) { - this.river = river; - } - - @OneToOne - @JoinColumn(name = "time_interval_id") - public TimeInterval getTimeInterval() { - return timeInterval; - } - - public void setTimeInterval(TimeInterval timeInterval) { - this.timeInterval = timeInterval; - } - - @OneToOne - @JoinColumn(name = "cur_elevation_model_id") - public ElevationModel getCurElevationModel() { - return curElevationModel; - } - - public void setCurElevationModel(ElevationModel curElevationModel) { - this.curElevationModel = curElevationModel; - } - - @OneToOne - @JoinColumn(name = "old_elevation_model_id") - public ElevationModel getOldElevationModel() { - return oldElevationModel; - } - - public void setOldElevationModel(ElevationModel oldElevationModel) { - this.oldElevationModel = oldElevationModel; - } - - @OneToOne - @JoinColumn(name = "range_id") - public Range getRange() { - return range; - } - - public void setRange(Range range) { - this.range = range; - } - - @Column(name = "evaluation_by") - public String getEvaluationBy() { - return evaluationBy; - } - - public void setEvaluationBy(String evaluationBy) { - this.evaluationBy = evaluationBy; - } - - @Column(name = "description") - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - @OneToMany - @JoinColumn(name = "bed_height_epoch_id") - public List<BedHeightEpochValue> getValues() { - return values; - } - - public void setValues(List<BedHeightEpochValue> values) { - this.values = values; - } - - - public static List<BedHeightEpoch> getBedHeightEpochs( - River river, - double kmLo, - double kmHi - ) { - Session session = SessionHolder.HOLDER.get(); - - Query query = session.createQuery( - "from BedHeightEpoch where river=:river"); - - query.setParameter("river", river); - - // TODO Do km range filtering in SQL statement - - List<BedHeightEpoch> epochs = query.list(); - List<BedHeightEpoch> good = new ArrayList<BedHeightEpoch>(); - - OUTER: for (BedHeightEpoch e: epochs) { - for (BedHeightEpochValue value: e.getValues()) { - double station = value.getStation().doubleValue(); - - if (station >= kmLo && station <= kmHi) { - good.add(e); - continue OUTER; - } - } - } - - return good; - } - - - public static BedHeightEpoch getBedHeightEpochById(int id) { - Session session = SessionHolder.HOLDER.get(); - - Query query = session.createQuery( - "from BedHeightEpoch where id=:id"); - - query.setParameter("id", id); - - List<BedHeightEpoch> singles = query.list(); - - return singles != null ? singles.get(0) : null; - } -} -// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/backend/src/main/java/org/dive4elements/river/model/BedHeightEpochValue.java Wed May 21 11:43:10 2014 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,127 +0,0 @@ -/* 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.model; - -import java.util.List; - -import java.io.Serializable; -import java.math.BigDecimal; - -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; -import javax.persistence.GeneratedValue; -import javax.persistence.Column; -import javax.persistence.SequenceGenerator; -import javax.persistence.GenerationType; -import javax.persistence.JoinColumn; -import javax.persistence.OneToOne; - -import org.apache.log4j.Logger; - -import org.hibernate.Session; -import org.hibernate.Query; - -import org.dive4elements.river.backend.SessionHolder; - - -@Entity -@Table(name = "bed_height_epoch_values") -public class BedHeightEpochValue -implements Serializable -{ - private static Logger logger = - Logger.getLogger(BedHeightEpochValue.class); - - private Integer id; - - private BedHeightEpoch bedHeight; - - private BigDecimal station; - private BigDecimal height; - - - public BedHeightEpochValue() { - } - - public BedHeightEpochValue( - BedHeightEpoch bedHeight, - BigDecimal station, - BigDecimal height - ) { - this.bedHeight = bedHeight; - this.station = station; - this.height = height; - } - - @Id - @SequenceGenerator( - name = "SEQUENCE_BED_EPOCH_VALUE_ID_SEQ", - sequenceName = "BED_EPOCH_VALUES_ID_SEQ", - allocationSize = 1) - @GeneratedValue( - strategy = GenerationType.SEQUENCE, - generator = "SEQUENCE_BED_EPOCH_VALUE_ID_SEQ") - @Column(name = "id") - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - @OneToOne - @JoinColumn(name = "bed_height_epoch_id" ) - public BedHeightEpoch getBedHeight() { - return bedHeight; - } - - public void setBedHeight(BedHeightEpoch bedHeight) { - this.bedHeight = bedHeight; - } - - @Column(name = "station") - public BigDecimal getStation() { - return station; - } - - public void setStation(BigDecimal station) { - this.station = station; - } - - @Column(name = "height") - public BigDecimal getHeight() { - return height; - } - - public void setHeight(BigDecimal height) { - this.height = height; - } - - - public static List<BedHeightEpochValue> getBedHeightEpochValues( - BedHeightEpoch epoch, - double kmLo, - double kmHi - ) { - Session session = SessionHolder.HOLDER.get(); - - Query query = session.createQuery( - "from BedHeightEpochValue where bedHeight=:epoch " + - " and station >= :kmLo and station <= :kmHi"); - - query.setParameter("epoch", epoch); - query.setParameter("kmLo", new BigDecimal(kmLo)); - query.setParameter("kmHi", new BigDecimal(kmHi)); - - return query.list(); - } -} -// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/backend/src/main/java/org/dive4elements/river/model/GrainFraction.java Wed May 21 11:43:10 2014 +0200 +++ b/backend/src/main/java/org/dive4elements/river/model/GrainFraction.java Mon Jun 30 11:29:45 2014 +0200 @@ -33,6 +33,7 @@ public static final String SUSP_SAND = "susp_sand"; public static final String SUSP_SAND_BED = "susp_sand_bed"; public static final String SUSPENDED_SEDIMENT = "suspended_sediment"; + public static final String UNKNOWN = "unknown"; private static Logger logger = Logger.getLogger(GrainFraction.class);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/backend/src/main/java/org/dive4elements/river/utils/DateUtil.java Mon Jun 30 11:29:45 2014 +0200 @@ -0,0 +1,37 @@ +/* Copyright (C) 2014 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.utils; + +import java.util.Date; +import java.util.Calendar; + +public final class DateUtil { + + private DateUtil() { + } + + /** Create Date on first moment (1st jan) of given year. */ + public static Date getStartDateFromYear(int year) { + Calendar cal = Calendar.getInstance(); + cal.clear(); + cal.set(year, 0, 1, 0, 0, 0); + + return cal.getTime(); + } + + + /** Create Date on last moment (31st dec) of given year. */ + public static Date getEndDateFromYear(int year) { + Calendar cal = Calendar.getInstance(); + cal.clear(); + cal.set(year, 11, 31, 23, 59, 59); + + return cal.getTime(); + } +}
--- a/contrib/make_flys_release/make_release.sh Wed May 21 11:43:10 2014 +0200 +++ b/contrib/make_flys_release/make_release.sh Mon Jun 30 11:29:45 2014 +0200 @@ -65,7 +65,7 @@ # --seddb-pass Sediment db password. Default: $SEDDBPASS # --seddb-back Sediment db backend. Default: $SEDDBBACK TOMCAT_PORT=${TOMCAT_PORT:-8282} -MAPSERVER_URL=${MAPSERVER_URL:-http://flys-devel.intevation.de} +MAPSERVER_URL=${MAPSERVER_URL:-http://flys-devel.intevation.de/cgi-bin/flys} WIKI_URL=${WIKI_URL:-https://flys3-devel.bafg.de/wiki} # Prefix to FreeSans.ttf FONT_PATH=${FONT_PATH:-/opt/flys} @@ -264,6 +264,9 @@ fi cp -r $FLYS_SOURCE_DIR/OpenLayers-2.11 $FLYS_SOURCE_DIR/river/gwt-client/src/main/webapp/ +echo "INFO: Downloading smartGWT" +mvn com.isomorphic:isc-maven-plugin:install -Dproduct=SMARTGWT -Dlicense=LGPL -DbuildNumber=4.1p -DbuildDate=2014-06-17 -Dworkdir=$WORK_DIR + echo "INFO: compile and build sources" mvn -f $FLYS_SOURCE_DIR/framework/pom.xml clean compile package install mvn -f $FLYS_SOURCE_DIR/river/backend/pom.xml clean compile package install @@ -271,6 +274,9 @@ mvn -f $FLYS_SOURCE_DIR/http-client/pom.xml clean compile package install mvn -f $FLYS_SOURCE_DIR/river/gwt-client/pom.xml clean compile package +# remove unused Version of JFreeChart (it's a dependency of JasperReports +# that prevents diagram generation in D4E river) +rm $FLYS_SOURCE_DIR/river/artifacts/target/dependency/jfreechart-1.0.12.jar echo "INFO: copy dependencies and libs" cp $FLYS_SOURCE_DIR/framework/artifact-database/target/artifact-database-1.0-SNAPSHOT.jar $WORK_DIR/server/bin/lib/own/ @@ -321,10 +327,10 @@ sed -i "s/8181/$ARTIFACT_PORT/g" \ $WORK_DIR/server/conf/rest-server.xml -sed -i -e "s@http://yourhost:8081/@${MAPSERVER_URL}/@g" \ +sed -i -e "s@http://yourhost:8081/cgi-bin@${MAPSERVER_URL}-${VERSION}@g" \ $WORK_DIR/server/conf/floodmap.xml -sed -i -e "s@http://yourhost:8081/@${MAPSERVER_URL}/@g" \ +sed -i -e "s@http://yourhost:8081/cgi-bin@${MAPSERVER_URL}-${VERSION}@g" \ $WORK_DIR/server/conf/rivermap.xml sed -i -e "s@/usr/share/fonts/truetype/freefont@${FONT_PATH}@g" \ @@ -422,7 +428,7 @@ mv $WORK_DIR/server $WORK_DIR/client $WORK_DIR/flys-$VERSION cd $WORK_DIR tar cfz flys-$VERSION.tar.gz flys-$VERSION -echo "INFO: cleanup" +#echo "INFO: cleanup" #rm -r $WORK_DIR/flys-$VERSION echo "DONE: $WORK_DIR/flys-$VERSION.tar.gz"
--- a/doc/INSTALL_DE Wed May 21 11:43:10 2014 +0200 +++ b/doc/INSTALL_DE Mon Jun 30 11:29:45 2014 +0200 @@ -56,10 +56,22 @@ Installation von D4E-river aus Binärpaket ========================================= -Entpacken des Dive4Elements-river Installer-Pakets --------------------------------------------------- - $ tar -xzf d4e-river.tar.gz - @TODO: eventuell anpassen + Herunterladen von + - d4e-river-3.1.2.tar.bz2 + - d4river-3.1.2.war + + Als root-User: + # cd /opt/ + # tar xvjf d4e-river-3.1.2.tar.bz2 + # chown -R d4e d4e-river + + In das Verzeichnis /opt/d4e-river/dgm/ müssen noch die DGMs der + Demo-Daten kopiert werden. (s.u.) + + # mv d4river-3.1.2.war /var/lib/tomcat6/webapps/d4e-river.war + + Der Tomcat muss wie unten dokumentiert konfiguriert werden. + Gleiches gilt für die MapServer-Installation. Erfolgt die Installation von D4E-river aus den Binärpaketen, können die folgenden Schritte übersprungen werden.
--- a/gwt-client/pom.xml Wed May 21 11:43:10 2014 +0200 +++ b/gwt-client/pom.xml Mon Jun 30 11:29:45 2014 +0200 @@ -38,9 +38,9 @@ <version>2.5</version> </dependency--> <dependency> - <groupId>com.smartgwt</groupId> - <artifactId>smartgwt</artifactId> - <version>3.0</version> + <groupId>com.isomorphic.smartgwt.lgpl</groupId> + <artifactId>smartgwt-lgpl</artifactId> + <version>[4.1,5.0)</version> </dependency> <dependency> <groupId>org.dive4elements</groupId>
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java Wed May 21 11:43:10 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java Mon Jun 30 11:29:45 2014 +0200 @@ -108,6 +108,8 @@ String legend(); + String wms_legend(); + String chart_title(); String chart_subtitle(); @@ -610,6 +612,8 @@ String soundings_width(); + String porosities(); + String bed_difference_year(); String bed_difference_epoch(); @@ -1371,5 +1375,9 @@ String suggested_label(); String negative_values_not_allowed_for_to(); + + String analyzed_range(); + + String minfo_type(); } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties Wed May 21 11:43:10 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties Mon Jun 30 11:29:45 2014 +0200 @@ -39,6 +39,7 @@ diagram = Chart axes = Axes legend = Legend +wms_legend= WMS Legend chart_title = Title chart_subtitle = Subtitle grid = Grid @@ -165,6 +166,8 @@ wq_value_q = Q [m\u00b3/s] river_km = River-Km uesk_profile_distance = Distance [m] +minfo_type = Type +analyzed_range = Analyzed Range wqTitle = Input for W/Q Data wqadaptedTitle = Input for W/Q Data @@ -260,6 +263,7 @@ bed_diameter = Bed Diameter soundings = Soundings soundings_width = Soundings Width +porosities = Porosity bed_difference_year = Bedheight Differences bed_difference_epoch = Epoch Bedheight Differences bed_difference_height_year = Bedheight Differences per year @@ -667,7 +671,7 @@ gauge_info_link = Gaugeinfo gauge_url = /PegelInfo/ gauge_river_url = /GewaesserInfo/ -gauge_curve_link = Dischargecurve/-table +gauge_curve_link = model dischargecurve/-table discharge_timeranges = DC-Timeranges discharge_chart = W/Q-Preview
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties Wed May 21 11:43:10 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties Mon Jun 30 11:29:45 2014 +0200 @@ -39,6 +39,7 @@ diagram = Diagramm axes = Achsen legend = Legende +wms_legend= WMS Legende chart_title = Titel chart_subtitle = Untertitel grid = Gitternetz @@ -81,6 +82,7 @@ cancelCalculationLabel = Aktuelle Berechnung abbrechen. calculationCanceled = Die Berechnung wurde abgebrochen. range = Bereich +analyzed_range = ausgewertete Strecke resultCount = Treffer bfg_id = BfG-ID start_year = Start @@ -142,6 +144,7 @@ riverside = Flussseite name = Name type = Typ +minfo_type = Aufnahmeart starttime = Reihe von stoptime = Reihe bis wq_waterlevel_label = Kennzeichnender Wassterstand @@ -261,6 +264,7 @@ bed_diameter = Sohldurchmesser soundings = Peilungen soundings_width = Gepeilte Breite +porosities = Porosit\u00e4t bed_difference_year = Sohlh\u00f6hendifferenz bed_difference_epoch = Sohlh\u00f6hendifferenz (Epoche) bed_difference_height_year = Sohlh\u00f6hendifferenz pro Jahr @@ -666,7 +670,7 @@ gauge_info_link = Pegelinfo gauge_url = /PegelInfo/ gauge_river_url = /GewaesserInfo/ -gauge_curve_link = Abflusskurve/-tafel +gauge_curve_link = Modell-Abflusskurve/-tafel discharge_timeranges = AK-Zeitr\u00e4ume discharge_chart = W/Q-Vorschau
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_en.properties Wed May 21 11:43:10 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_en.properties Mon Jun 30 11:29:45 2014 +0200 @@ -39,6 +39,7 @@ diagram = Chart axes = Axes legend = Legend +wms_legend= WMS Legend chart_title = Title chart_subtitle = Subtitle grid = Grid @@ -166,6 +167,9 @@ river_km = River-Km uesk_profile_distance = Distance [m] +minfo_type = Type +analyzed_range = Analyzed Range + wqTitle = Input for W/Q Data wqadaptedTitle = Input for W/Q Data noMainValueAtGauge = Selected main value not present at all gauges @@ -259,6 +263,7 @@ bed_diameter = Bed Diameter soundings = Soundings soundings_width = Soundings Width +porosities = Porosity bed_difference_year = Bedheight Differences bed_difference_epoch = Epoch Bedheight Differences bed_difference_height_year = Bedheight Difference per year @@ -641,7 +646,7 @@ gauge_info_link = Gaugeinfo gauge_url = /PegelInfo/ gauge_river_url = /GewaesserInfo/ -gauge_curve_link = Dischargecurve/-table +gauge_curve_link = model dischargecurve/-table discharge_timeranges = DC-Timeranges discharge_chart = W/Q-Preview
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/CollectionView.java Wed May 21 11:43:10 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/CollectionView.java Mon Jun 30 11:29:45 2014 +0200 @@ -513,7 +513,6 @@ if (export.getFacet("csv") != null) { hasCSV = true; - parameterList.contractInfoPanel(); } } }
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/DatacageWidget.java Wed May 21 11:43:10 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/DatacageWidget.java Mon Jun 30 11:29:45 2014 +0200 @@ -292,6 +292,20 @@ } + public List<TreeNode> getPlainSelection() { + ListGridRecord [] selection = treeGrid.getSelectedRecords(); + List<TreeNode> nodes = new ArrayList<TreeNode>(); + if (selection != null) { + for (ListGridRecord record: selection) { + if (record instanceof TreeNode) { + nodes.add((TreeNode)record); + } + } + } + return nodes; + } + + /** * Returns the titles of selected items (if any). */
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/GaugeTimeRangePanel.java Wed May 21 11:43:10 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/GaugeTimeRangePanel.java Mon Jun 30 11:29:45 2014 +0200 @@ -295,9 +295,9 @@ }; - ListGridField addstart = new ListGridField ("", MESSAGES.from()); + ListGridField addstart = new ListGridField ("addstart", MESSAGES.from()); addstart.setType (ListGridFieldType.ICON); - addstart.setWidth (20); + addstart.setWidth (30); addstart.setCellIcon(baseUrl + MESSAGES.markerGreen()); addstart.addRecordClickHandler(new RecordClickHandler() { @Override @@ -312,9 +312,9 @@ } }); - ListGridField addend = new ListGridField ("", MESSAGES.to()); + ListGridField addend = new ListGridField ("addend", MESSAGES.to()); addend.setType (ListGridFieldType.ICON); - addend.setWidth (20); + addend.setWidth (30); addend.setCellIcon(baseUrl + MESSAGES.markerRed()); addend.addRecordClickHandler(new RecordClickHandler() { @Override
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/LinkSelection.java Wed May 21 11:43:10 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/LinkSelection.java Mon Jun 30 11:29:45 2014 +0200 @@ -186,6 +186,7 @@ int counter = 0; for (DataItem item: d.getItems()) { HLayout row = new HLayout(); + row.setTitle(item.getLabel()); LinkItem link = new LinkItem("river"); link.setHoverDelay(0); link.setLinkTitle(item.getLabel()); @@ -312,7 +313,8 @@ private static void selectCallback(String name) { if (availableRiver(name)) { - trigger.trigger(name); + String river = riverList.get(name).getTitle(); + trigger.trigger(river); } }
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/LocationDistancePanel.java Wed May 21 11:43:10 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/LocationDistancePanel.java Mon Jun 30 11:29:45 2014 +0200 @@ -250,7 +250,7 @@ ListGridField addDistance = new ListGridField ("", ""); addDistance.setType (ListGridFieldType.ICON); - addDistance.setWidth (20); + addDistance.setWidth (30); addDistance.addRecordClickHandler (new RecordClickHandler () { @Override public void onRecordClick (RecordClickEvent e) { @@ -463,12 +463,12 @@ } }; - ListGridField addfrom = new ListGridField ("from", MESSAGES.from()); + ListGridField addfrom = new ListGridField ("fromIcon", MESSAGES.from()); addfrom.setType (ListGridFieldType.ICON); addfrom.setWidth (30); addfrom.setCellIcon(baseUrl + MESSAGES.markerGreen()); - ListGridField addto2 = new ListGridField ("to", MESSAGES.to()); + ListGridField addto2 = new ListGridField ("toIcon", MESSAGES.to()); addto2.setType (ListGridFieldType.ICON); addto2.setWidth (30); addto2.setCellIcon(baseUrl + MESSAGES.markerRed());
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/LocationPicker.java Wed May 21 11:43:10 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/LocationPicker.java Mon Jun 30 11:29:45 2014 +0200 @@ -156,13 +156,13 @@ locationTable.setEmptyMessage(MSG.empty_filter()); locationTable.setCanReorderFields(false); - ListGridField addLocation = new ListGridField ("", ""); + ListGridField addLocation = new ListGridField ("addlocation", ""); addLocation.setType (ListGridFieldType.ICON); - addLocation.setWidth (20); + addLocation.setWidth (30); addLocation.setCellIcon (baseUrl + MSG.markerGreen()); - ListGridField addTo = new ListGridField ("", ""); + ListGridField addTo = new ListGridField ("addto", ""); addTo.setType (ListGridFieldType.ICON); - addTo.setWidth (20); + addTo.setWidth (30); addTo.setCellIcon (baseUrl + MSG.markerRed()); ListGridField ldescr = new ListGridField("description",
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/MultiPeriodPanel.java Wed May 21 11:43:10 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/MultiPeriodPanel.java Mon Jun 30 11:29:45 2014 +0200 @@ -11,6 +11,7 @@ import com.google.gwt.core.client.GWT; import com.google.gwt.i18n.client.DateTimeFormat; +import com.smartgwt.client.data.DateRange; import com.smartgwt.client.types.ListGridFieldType; import com.smartgwt.client.widgets.Button; import com.smartgwt.client.widgets.Canvas; @@ -70,8 +71,9 @@ add.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent ce) { - Date f = inputPanel.getFromDate(); - Date t = inputPanel.getToDate(); + DateRange range = inputPanel.getValue(); + Date f = range.getStartDate(); + Date t = range.getEndDate(); if (f == null || t == null) { return; }
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/ParameterList.java Wed May 21 11:43:10 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/ParameterList.java Mon Jun 30 11:29:45 2014 +0200 @@ -11,6 +11,7 @@ import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.rpc.AsyncCallback; +import com.smartgwt.client.types.Overflow; import com.smartgwt.client.types.VerticalAlignment; import com.smartgwt.client.types.VisibilityMode; import com.smartgwt.client.util.SC; @@ -225,6 +226,7 @@ stack.setHeight100(); stack.setCanResizeSections(true); stack.setVisibilityMode(VisibilityMode.MULTIPLE); + stack.setOverflow(Overflow.SCROLL); // This canvas is used to render helper widgets. final SectionStackSection helperSection = new SectionStackSection(); @@ -256,6 +258,7 @@ public void addMember(Canvas component) { super.addMember(component); tableSection.setExpanded(true); + stack.getSection(InfoPanel.SECTION_ID).setExpanded(false); } @Override @@ -979,12 +982,17 @@ GWT.log("ParameterList - showInfoPanel"); /* Don't add InfoPanel twice */ - SectionStackSection exists = stack.getSection(InfoPanel.SECTION_ID); - if (exists == null) { - stack.addSection(infoPanel.getSection(), 0); + SectionStackSection info = stack.getSection(InfoPanel.SECTION_ID); + if (info == null) { + info = new SectionStackSection(); + info.setTitle(infoPanel.getSectionTitle()); + info.setID(InfoPanel.SECTION_ID); + info.setName(InfoPanel.SECTION_ID); + info.setItems(infoPanel); + stack.addSection(info, 0); } - infoPanel.show(); + info.setExpanded(true); } private void hideInfoPanel() { @@ -1017,16 +1025,5 @@ hideInfoPanel(); } } - - /** - * Allow to close all folds of the info panel. - * This is necessary e.g. if a csv result should be shown. - */ - public void contractInfoPanel() { - if (infoPanel != null) { - infoPanel.contract(); - } - } - } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/PeriodPanel.java Wed May 21 11:43:10 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/PeriodPanel.java Mon Jun 30 11:29:45 2014 +0200 @@ -11,6 +11,7 @@ import com.google.gwt.core.client.GWT; import com.google.gwt.i18n.client.DateTimeFormat; +import com.smartgwt.client.data.DateRange; import com.smartgwt.client.util.SC; import com.smartgwt.client.widgets.Canvas; import com.smartgwt.client.widgets.Label; @@ -182,8 +183,9 @@ protected boolean saveDateValues() { - Date st = inputPanel.getFromDate(); - Date en = inputPanel.getToDate(); + DateRange range = inputPanel.getValue(); + Date st = range.getStartDate(); + Date en = range.getEndDate(); if (st == null || en == null) { SC.warn(MSG.error_wrong_date()); return false;
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/ProjectList.java Wed May 21 11:43:10 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/ProjectList.java Mon Jun 30 11:29:45 2014 +0200 @@ -494,7 +494,7 @@ SC.warn(msg); ListGridRecord[] rs = grid.getRecords(); - rs[row] = (ListGridRecord) event.getOldRecord(); + rs[row] = (ListGridRecord) event.getOldValues(); grid.setRecords(rs); return;
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/RiverInfoPanel.java Wed May 21 11:43:10 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/RiverInfoPanel.java Mon Jun 30 11:29:45 2014 +0200 @@ -10,12 +10,11 @@ import com.google.gwt.core.client.GWT; import com.google.gwt.i18n.client.NumberFormat; -import com.google.gwt.user.client.ui.HorizontalPanel; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.Widget; +import com.smartgwt.client.types.Alignment; +import com.smartgwt.client.types.VerticalAlignment; +import com.smartgwt.client.widgets.Label; import com.smartgwt.client.widgets.form.DynamicForm; - -import java.util.Iterator; +import com.smartgwt.client.widgets.layout.HLayout; import org.dive4elements.river.client.client.Config; import org.dive4elements.river.client.client.FLYS; @@ -26,7 +25,7 @@ * Panel to display information about a river. * @author <a href="mailto:bjoern.ricks@intevation.de">Björn Ricks</a> */ -public class RiverInfoPanel extends HorizontalPanel { +public class RiverInfoPanel extends HLayout { /** The flys instance */ protected FLYS flys; @@ -43,9 +42,9 @@ this.flys = flys; setStyleName("riverinfopanel"); - setHeight("" + HEIGHT + "px"); - setVerticalAlignment(ALIGN_MIDDLE); - + setHeight(HEIGHT + "px"); + setAlign(VerticalAlignment.CENTER); + setAlign(Alignment.LEFT); setRiverInfo(riverinfo); } @@ -54,7 +53,7 @@ NumberFormat nf = NumberFormat.getDecimalFormat(); - removeAllLabels(); + //removeAllLabels(); addLabel(riverinfo.getName(), false); @@ -101,7 +100,8 @@ DynamicForm infoLink = WikiLinks.linkDynamicForm(this.flys, wikiBaseUrl + url, MSG.gauge_river_info_link()); infoLink.setTop(5); - add(infoLink); + infoLink.setMargin(5); + addMember(infoLink); } public static int getStaticHeight() { @@ -112,21 +112,9 @@ } private void addLabel(String text, boolean wordwrap) { - Label label = new Label(text, wordwrap); - add(label); - setCellHeight(label, "" + HEIGHT + "px"); - } - - private void removeAllLabels() { - GWT.log("RiverInfoPanel - removeAllLabels"); - - Iterator<Widget> it = this.iterator(); - while(it.hasNext()) { - it.next(); - it.remove(); - } - /* for (Widget wid: this) { */ - /* this.remove(wid); */ - /* } */ + Label label = new Label("<span style='font-size:1.3em'>" + text + "</span>"); + label.setWrap(wordwrap); + label.setMargin(5); + addMember(label); } }
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/WikiLinks.java Wed May 21 11:43:10 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/WikiLinks.java Mon Jun 30 11:29:45 2014 +0200 @@ -74,7 +74,9 @@ DynamicForm form = new DynamicForm(); LinkItem item = new LinkItem(quotedText); item.setShowTitle(false); + item.setLinkTitle(quotedText); item.setTarget(quotedUrl); + form.setItems(item); return form; }
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/WspDatacagePanel.java Wed May 21 11:43:10 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/WspDatacagePanel.java Mon Jun 30 11:29:45 2014 +0200 @@ -161,7 +161,7 @@ protected String createDataString(String artifact, Recommendation recommendation) { Facet f = null; - + // The filter will only be available or previous calculation artifacts. Filter filter = recommendation.getFilter();
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/map/ElevationWindow.java Wed May 21 11:43:10 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/map/ElevationWindow.java Mon Jun 30 11:29:45 2014 +0200 @@ -219,7 +219,7 @@ catch (NumberFormatException nfe) { SC.warn(MSG.ele_window_format_error() + " " + z); - PointRecord old = (PointRecord) evt.getOldRecord(); + PointRecord old = (PointRecord) evt.getOldValues(); ListGridRecord[] records = grid.getRecords(); records[evt.getRowNum()] = old;
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/map/LegendWindow.java Wed May 21 11:43:10 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/map/LegendWindow.java Mon Jun 30 11:29:45 2014 +0200 @@ -10,6 +10,8 @@ import java.util.List; +import com.google.gwt.core.client.GWT; + import com.smartgwt.client.types.ImageStyle; import com.smartgwt.client.types.VerticalAlignment; import com.smartgwt.client.widgets.Canvas; @@ -19,6 +21,8 @@ import com.smartgwt.client.widgets.layout.HLayout; import com.smartgwt.client.widgets.layout.VLayout; +import org.dive4elements.river.client.client.FLYSConstants; + import org.dive4elements.river.client.shared.MapUtils; import org.dive4elements.river.client.shared.model.AttributedTheme; import org.dive4elements.river.client.shared.model.Theme; @@ -27,10 +31,13 @@ public class LegendWindow extends Window { + protected FLYSConstants MSG = GWT.create(FLYSConstants.class); + private ThemeList themeList; private VLayout legendContainer; + public LegendWindow(ThemeList themeList) { this.themeList = themeList; this.legendContainer = new VLayout(); @@ -92,7 +99,7 @@ legendContainer.setLayoutAlign(VerticalAlignment.TOP); legendContainer.setAlign(VerticalAlignment.CENTER); - setTitle("WMS Legend"); + setTitle(MSG.wms_legend()); setAutoSize(true); setCanDragResize(true); setIsModal(false);
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/minfo/BedHeightsDatacagePanel.java Wed May 21 11:43:10 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/minfo/BedHeightsDatacagePanel.java Mon Jun 30 11:29:45 2014 +0200 @@ -14,14 +14,17 @@ import com.smartgwt.client.data.Record; +import com.smartgwt.client.util.SC; +import com.smartgwt.client.widgets.Button; import com.smartgwt.client.widgets.Canvas; import com.smartgwt.client.widgets.events.ClickEvent; - +import com.smartgwt.client.widgets.events.ClickHandler; import com.smartgwt.client.widgets.grid.ListGridRecord; import com.smartgwt.client.widgets.layout.HLayout; import com.smartgwt.client.widgets.layout.VLayout; +import com.smartgwt.client.widgets.tree.TreeNode; import org.dive4elements.river.client.client.Config; import org.dive4elements.river.client.client.FLYSConstants; @@ -35,6 +38,7 @@ import org.dive4elements.river.client.client.ui.DatacagePairWidget; import org.dive4elements.river.client.client.ui.DatacageTwinPanel; +import org.dive4elements.river.client.client.ui.DatacageWidget; import org.dive4elements.river.client.client.ui.RecommendationPairRecord; import org.dive4elements.river.client.shared.model.Artifact; @@ -42,6 +46,7 @@ import org.dive4elements.river.client.shared.model.Data; import org.dive4elements.river.client.shared.model.DataItem; import org.dive4elements.river.client.shared.model.DataList; +import org.dive4elements.river.client.shared.model.ToLoad; import org.dive4elements.river.client.shared.model.Recommendation.Facet; import org.dive4elements.river.client.shared.model.Recommendation.Filter; @@ -80,6 +85,7 @@ RemoveArtifactServiceAsync removeArtifactService = GWT.create( org.dive4elements.river.client.client.services.RemoveArtifactService.class); + protected DatacageWidget datacage; public BedHeightsDatacagePanel(User user) { super(user); @@ -120,22 +126,25 @@ public Canvas create(DataList dataList) { GWT.log("createData()"); - Data data = dataList.get(0); - DataItem[] items = data.getItems(); - - String value = items[0].getStringValue(); - - String filter = "minfo-heights"; - if (value.equals("epoch")) { - filter = "minfo-heights-epoch"; - } + String filter = "minfo-heights-diff"; Canvas widget = createWidget(); Canvas submit = getNextButton(); + datacage = new DatacageWidget( + this.artifact, user, filter, "load-system:true", false); + + Button plusBtn = new Button(MSG.datacage_add_pair()); + plusBtn.setAutoFit(true); + plusBtn.addClickHandler(new ClickHandler() { + @Override + public void onClick(ClickEvent event) { + plusClicked(); + } + }); VLayout layout = new VLayout(); - HLayout helperLayout = new HLayout(); - helperLayout.addMember(new DatacagePairWidget(this.artifact, - user, filter, differencesList)); + VLayout helperLayout = new VLayout(); + helperLayout.addMember(datacage); + helperLayout.addMember(plusBtn); layout.addMember(widget); layout.addMember(submit); @@ -314,5 +323,53 @@ + recommendation.getDisplayName() + "]"; } } + + /** + * Callback for add-button. + * Fires to load for every selected element and handler. + */ + public void plusClicked() { + List<TreeNode> selection = datacage.getPlainSelection(); + + if (selection == null || selection.isEmpty()) { + SC.say(MSG.warning()); + return; + } + + for (TreeNode node : selection) { + ToLoad toLoad1 = new ToLoad(); + ToLoad toLoad2 = new ToLoad(); + + String factory = node.getAttribute("factory"); + if (factory != null) { // we need at least a factory + String artifact = node.getAttribute("artifact-id"); + String out = node.getAttribute("out"); + String name = node.getAttribute("facet"); + String ids = node.getAttribute("ids"); + String info = node.getAttribute("info"); + String targetOut = node.getAttribute("target_out"); + + String[] splitIds = ids.split("#"); + String[] splitInfo = info.split("#"); + toLoad1.add(artifact, + factory, + out, + name, + splitIds[0], + splitInfo[0], + targetOut); + toLoad2.add(artifact, + factory, + out, + name, + splitIds[1], + splitInfo[1], + targetOut); + } + differencesList.addData(new RecommendationPairRecord( + toLoad1.toRecommendations().get(0), + toLoad2.toRecommendations().get(0))); + } + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/minfo/SedLoadEpochPanel.java Wed May 21 11:43:10 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/minfo/SedLoadEpochPanel.java Mon Jun 30 11:29:45 2014 +0200 @@ -93,7 +93,7 @@ catch(NumberFormatException nfe) { return; } - Record r = new Record(); + ListGridRecord r = new ListGridRecord(); r.setAttribute("from", v1); r.setAttribute("to", v2); elements.addData(r);
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/range/LocationsTable.java Wed May 21 11:43:10 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/range/LocationsTable.java Mon Jun 30 11:29:45 2014 +0200 @@ -44,12 +44,12 @@ setEmptyMessage(MSG.empty_filter()); setCanReorderFields(false); - ListGridField addfrom = new ListGridField ("from", MSG.from()); + ListGridField addfrom = new ListGridField ("fromIcon", MSG.from()); addfrom.setType(ListGridFieldType.ICON); addfrom.setWidth(30); addfrom.setCellIcon(baseUrl + MSG.markerGreen()); - ListGridField addto = new ListGridField("to", MSG.to()); + ListGridField addto = new ListGridField("toIcon", MSG.to()); addto.setType(ListGridFieldType.ICON); addto.setWidth(30); addto.setCellIcon(baseUrl + MSG.markerRed());
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/GaugeInfoPanel.java Wed May 21 11:43:10 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/GaugeInfoPanel.java Mon Jun 30 11:29:45 2014 +0200 @@ -9,10 +9,11 @@ package org.dive4elements.river.client.client.ui.stationinfo; import com.google.gwt.core.client.GWT; -import com.google.gwt.event.dom.client.ClickEvent; -import com.google.gwt.event.dom.client.ClickHandler; +import com.smartgwt.client.widgets.form.DynamicForm; +import com.smartgwt.client.widgets.form.fields.events.ClickEvent; +import com.smartgwt.client.widgets.form.fields.events.ClickHandler; +import com.smartgwt.client.widgets.form.fields.LinkItem; import com.google.gwt.i18n.client.NumberFormat; -import com.google.gwt.user.client.ui.Anchor; import com.smartgwt.client.widgets.layout.HLayout; import com.smartgwt.client.widgets.layout.VLayout; import com.smartgwt.client.widgets.Label; @@ -83,7 +84,9 @@ } HLayout line5 = new HLayout(); - line5.addMember(new GaugeMainValueAnchor(flys, gauge)); + DynamicForm line5Form = new DynamicForm(); + line5Form.setItems(new GaugeMainValueAnchor(flys, gauge)); + line5.addMember(line5Form); if (minw != null && maxw != null) { grid.addMember(line1); @@ -105,16 +108,17 @@ * Clickable anchor that asks application to show window with * main values for gauge. */ - class GaugeMainValueAnchor extends Anchor implements ClickHandler { + class GaugeMainValueAnchor extends LinkItem implements ClickHandler { private FLYS flys; private GaugeInfo gauge; public GaugeMainValueAnchor(FLYS flys, GaugeInfo gauge) { - super(MSG.show_mainvalues()); + super(); + this.setLinkTitle(MSG.show_mainvalues()); + this.setShowTitle(false); this.flys = flys; this.gauge = gauge; - this.setHeight("5"); addClickHandler(this); }
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/GaugeListGrid.java Wed May 21 11:43:10 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/GaugeListGrid.java Mon Jun 30 11:29:45 2014 +0200 @@ -304,7 +304,7 @@ @Override protected Canvas getExpandPanel(ListGridRecord record) { GaugeRecord item = (GaugeRecord)record; - return new WidgetCanvas(new GaugeInfoPanel(item, flys)); + return new GaugeInfoPanel(item, flys); } /**
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/GaugePanel.java Wed May 21 11:43:10 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/GaugePanel.java Mon Jun 30 11:29:45 2014 +0200 @@ -42,7 +42,6 @@ * Loads the river info and renders it afterwards. */ public void refresh() { - contract(); riverInfoService.getGauges(this.river, new AsyncCallback<RiverInfo>() { @Override @@ -54,7 +53,6 @@ public void onSuccess(RiverInfo riverinfo) { GWT.log("Loaded river info"); render(riverinfo); - expand(); } }); }
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/InfoListGrid.java Wed May 21 11:43:10 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/InfoListGrid.java Mon Jun 30 11:29:45 2014 +0200 @@ -79,10 +79,7 @@ @Override protected Canvas getExpansionComponent(ListGridRecord record) { - VLayout layout = new VLayout(); - layout.setPadding(5); - layout.addMember(this.getExpandPanel(record)); - return layout; + return this.getExpandPanel(record); } public abstract void open();
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/InfoPanel.java Wed May 21 11:43:10 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/InfoPanel.java Mon Jun 30 11:29:45 2014 +0200 @@ -11,8 +11,6 @@ import com.google.gwt.core.client.GWT; import com.smartgwt.client.types.Overflow; -import com.smartgwt.client.widgets.Canvas; -import com.smartgwt.client.widgets.layout.SectionStackSection; import com.smartgwt.client.widgets.layout.VLayout; import org.dive4elements.river.client.client.FLYS; import org.dive4elements.river.client.client.FLYSConstants; @@ -30,9 +28,6 @@ /** The instance of FLYS */ protected FLYS flys; - /** SectionStackSection where this InfoPanel belongs in*/ - protected SectionStackSection section; - /** Name of the river */ protected String river; @@ -49,20 +44,11 @@ public final static String SECTION_ID = "InfoPanelSection"; public InfoPanel(FLYS flys, InfoListGrid listgrid) { - SectionStackSection section = new SectionStackSection(); - section.setExpanded(false); - section.setTitle(getSectionTitle()); - section.setName(SECTION_ID); - section.setID(SECTION_ID); - setOverflow(Overflow.HIDDEN); setStyleName("infopanel"); this.flys = flys; - section.setHidden(true); - section.setItems(this); - this.section = section; this.listgrid = listgrid; this.addMember(listgrid); } @@ -96,59 +82,11 @@ this.listgrid.setRiverInfo(riverinfo); } - /** - * Hide the section stack section. - */ - @Override - public void hide() { - GWT.log("InfoPanel - hide"); - this.section.setHidden(true); - } - - /** - * Show the section stack section. - */ - @Override - public void show() { - GWT.log("InfoPanel - show"); - this.section.setHidden(false); - } - - @Override - public void addMember(Canvas component) { - super.addMember(component); - expand(); - } - - @Override - public void removeMembers(Canvas[] components) { - super.removeMembers(components); - contract(); - } - - public SectionStackSection getSection() { - return this.section; - } - protected void removeAllMembers() { removeMembers(getMembers()); } - /** - * Expands the gauge section. - */ - public void expand() { - section.setExpanded(true); - } - - /** - * Contracts/shrinks the expanded gauge section. - */ - public void contract() { - section.setExpanded(false); - } - protected abstract void refresh(); - protected abstract String getSectionTitle(); + public abstract String getSectionTitle(); }
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/MeasurementStationInfoPanel.java Wed May 21 11:43:10 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/MeasurementStationInfoPanel.java Mon Jun 30 11:29:45 2014 +0200 @@ -13,7 +13,8 @@ import com.google.gwt.core.client.GWT; import com.google.gwt.i18n.client.DateTimeFormat; import com.google.gwt.i18n.client.DateTimeFormat.PredefinedFormat; -import com.google.gwt.user.client.ui.Grid; +import com.smartgwt.client.widgets.Label; +import com.smartgwt.client.widgets.layout.HLayout; import com.smartgwt.client.widgets.layout.VLayout; import org.dive4elements.river.client.client.FLYSConstants; @@ -28,39 +29,64 @@ setStyleName("infopanel"); setWidth100(); - Grid grid = new Grid(5, 2); + VLayout grid = new VLayout(); + HLayout line1 = new HLayout(); String type = station.getMeasurementType(); if (type != null) { - grid.setText(0, 0, MSG.measurement_station_type()); - grid.setText(0, 1, type); + Label key = new Label(MSG.measurement_station_type()); + Label value = new Label(type); + key.setWidth(150); + line1.addMember(key); + line1.addMember(value); + grid.addMember(line1); } + HLayout line2 = new HLayout(); String riverside = station.getRiverSide(); if (riverside != null) { - grid.setText(1, 0, MSG.riverside()); - grid.setText(1, 1, riverside); + Label key = new Label(MSG.riverside()); + Label value = new Label(riverside); + key.setWidth(150); + line2.addMember(key); + line2.addMember(value); + grid.addMember(line2); } + HLayout line3 = new HLayout(); String gaugename = station.getGaugeName(); if (gaugename != null) { - grid.setText(2, 0, MSG.measurement_station_gauge_name()); - grid.setText(2, 1, gaugename); + Label key = new Label(MSG.measurement_station_gauge_name()); + Label value = new Label(gaugename); + key.setWidth(150); + line3.addMember(key); + line3.addMember(value); + grid.addMember(line3); } + HLayout line4 = new HLayout(); DateTimeFormat df = DateTimeFormat.getFormat( - PredefinedFormat.DATE_MEDIUM); + PredefinedFormat.DATE_MEDIUM); Date starttime = station.getStartTime(); if (starttime != null) { - grid.setText(3, 0, MSG.measurement_station_start_time()); - grid.setText(3, 1, df.format(starttime)); + Label key = new Label(MSG.measurement_station_start_time()); + Label value = new Label(df.format(starttime)); + key.setWidth(150); + line4.addMember(key); + line4.addMember(value); + grid.addMember(line4); } + HLayout line5 = new HLayout(); String moperator = station.getOperator(); if (moperator != null) { - grid.setText(4, 0, MSG.measurement_station_operator()); - grid.setText(4, 1, moperator); + Label key = new Label(MSG.measurement_station_operator()); + Label value = new Label(moperator); + key.setWidth(150); + line5.addMember(key); + line5.addMember(value); + grid.addMember(line5); } addMember(grid);
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/MeasurementStationListGrid.java Wed May 21 11:43:10 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/MeasurementStationListGrid.java Mon Jun 30 11:29:45 2014 +0200 @@ -11,7 +11,6 @@ import com.google.gwt.core.client.GWT; import com.smartgwt.client.widgets.Canvas; -import com.smartgwt.client.widgets.WidgetCanvas; import com.smartgwt.client.widgets.grid.ListGridField; import com.smartgwt.client.widgets.grid.ListGridRecord; import com.smartgwt.client.widgets.grid.events.RecordClickEvent; @@ -38,8 +37,8 @@ ListGridField sfield = new ListGridField("kmstart", "Start [km]", 60); ListGridField efield = new ListGridField("kmend", "Ende [km]", 60); ListGridField stfield = new ListGridField("station", "Station [km]"); - ListGridField lfield = new ListGridField("infolink", "Link"); - ListGridField cfield = new ListGridField("curvelink", "SQ"); + ListGridField lfield = new ListGridField("infolink", "Info"); + ListGridField cfield = new ListGridField("curvelink", "Feststofftransport-Abfluss-Beziehung"); cfield.addRecordClickHandler(this); this.setShowRecordComponents(true); @@ -102,7 +101,7 @@ @Override protected Canvas getExpandPanel(ListGridRecord record) { MeasurementStationRecord station = (MeasurementStationRecord)record; - return new WidgetCanvas(new MeasurementStationInfoPanel(station)); + return new MeasurementStationInfoPanel(station); } @Override
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/MeasurementStationPanel.java Wed May 21 11:43:10 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/MeasurementStationPanel.java Mon Jun 30 11:29:45 2014 +0200 @@ -44,7 +44,6 @@ @Override public void refresh() { GWT.log("MeasurementStationPanel - refresh"); - contract(); riverInfoService.getMeasurementStations(this.river, new AsyncCallback<RiverInfo>() { @@ -57,7 +56,6 @@ public void onSuccess(RiverInfo riverinfo) { GWT.log("MeasurementStationPanel - Loaded river info"); render(riverinfo); - expand(); } }); }