Mercurial > dive4elements > river
changeset 9426:b6e595f1696f
Activated cross section output mode for salix line and implemented some themes preliminary.
author | gernotbelger |
---|---|
date | Fri, 17 Aug 2018 15:31:16 +0200 |
parents | 3f49835a00c3 |
children | 3b188c34d422 |
files | artifacts/doc/conf/artifacts/uinfo.xml artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/UINFOArtifact.java artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixLineCalculationResult.java artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixLineCalculationResults.java artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixLineCrossSectionIndexData.java artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixLineState.java |
diffstat | 6 files changed, 344 insertions(+), 246 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/doc/conf/artifacts/uinfo.xml Fri Aug 17 15:31:02 2018 +0200 +++ b/artifacts/doc/conf/artifacts/uinfo.xml Fri Aug 17 15:31:16 2018 +0200 @@ -3,119 +3,114 @@ <states> <state id="state.uinfo.river" description="state.uinfo.river" state="org.dive4elements.river.artifacts.states.RiverSelect" helpText="help.state.uinfo.river"> - <data name="river" type="String" /> + <data name="river" type="String"/> </state> <transition transition="org.dive4elements.river.artifacts.transitions.DefaultTransition"> - <from state="state.uinfo.river" /> - <to state="state.uinfo.calculation_mode" /> + <from state="state.uinfo.river"/> + <to state="state.uinfo.calculation_mode"/> </transition> <state id="state.uinfo.calculation_mode" description="state.uinfo.calculation_mode" state="org.dive4elements.river.artifacts.uinfo.CalculationSelectUinfo" helpText="help.state.uinfo.calculation_mode"> - <data name="calculation_mode" type="String" /> + <data name="calculation_mode" type="String"/> </state> <state id="state.uinfo.distance_only" description="state.uinfo.distance_only" state="org.dive4elements.river.artifacts.states.DistanceOnlySelect" helpText="help.state.uinfo.vegetationzone.distance_only"> - <data name="ld_from" type="Double" /> - <data name="ld_to" type="Double" /> + <data name="ld_from" type="Double"/> + <data name="ld_to" type="Double"/> </state> <state id="state.uinfo.salix.distance_only" description="state.uinfo.salix.distance_only" state="org.dive4elements.river.artifacts.states.DistanceOnlySelect" helpText="help.state.uinfo.salix.distance_only"> - <data name="ld_from" type="Double" /> - <data name="ld_to" type="Double" /> + <data name="ld_from" type="Double"/> + <data name="ld_to" type="Double"/> </state> <state id="state.uinfo.inundationduration.distance_only" description="state.uinfo.inundationduration.distance_only" state="org.dive4elements.river.artifacts.states.DistanceOnlyInundationDurSelect" helpText="help.state.uinfo.inundation_duration.location"> - <data name="ld_from" type="Double" /> - <data name="ld_to" type="Double" /> + <data name="ld_from" type="Double"/> + <data name="ld_to" type="Double"/> </state> - - <!-- Calculation Mode: Salix Linie --> - - <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.uinfo.calculation_mode" /> - <to state="state.uinfo.salix.distance_only" /> - <condition data="calculation_mode" value="uinfo_salix_line" operator="equal" /> - </transition> - - <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.uinfo.salix.distance_only" /> - <to state="state.uinfo.salix.use_scenario" /> - <condition data="calculation_mode" value="uinfo_salix_line" operator="equal" /> - </transition> - - - <state id="state.uinfo.salix.use_scenario" description="state.uinfo.salix.use_scenario" state="org.dive4elements.river.artifacts.uinfo.salix.UseScenarioChoice" helpText="help.state.uinfo.salix.use_scenario"> - <data name="use_scenario" type="Boolean" /> - </state> - - <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.uinfo.salix.use_scenario" /> - <to state="state.uinfo.salix.scenario_type" /> - <condition data="use_scenario" value="true" operator="equal" /> + <from state="state.uinfo.calculation_mode"/> + <to state="state.uinfo.salix.distance_only"/> + <condition data="calculation_mode" value="uinfo_salix_line" operator="equal"/> </transition> <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.uinfo.salix.use_scenario" /> - <to state="state.uinfo.salix_line" /> - <condition data="use_scenario" value="false" operator="equal" /> + <from state="state.uinfo.salix.distance_only"/> + <to state="state.uinfo.salix.use_scenario"/> + <condition data="calculation_mode" value="uinfo_salix_line" operator="equal"/> </transition> - <state id="state.uinfo.salix.scenario_type" description="state.uinfo.salix.scenario_type" state="org.dive4elements.river.artifacts.uinfo.salix.ScenarioTypeState" helpText="help.state.uinfo.salix.scenario_type"> - <data name="scenario_selection" type="String" /> + <state id="state.uinfo.salix.use_scenario" description="state.uinfo.salix.use_scenario" state="org.dive4elements.river.artifacts.uinfo.salix.UseScenarioChoice" helpText="help.state.uinfo.salix.use_scenario"> + <data name="use_scenario" type="Boolean"/> </state> <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.uinfo.salix.scenario_type" /> - <to state="state.uinfo.distance_only_part.from_regional" /> - <condition data="scenario_selection" value="scenarioType.option1" operator="equal" /> - </transition> - - <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.uinfo.salix.scenario_type" /> - <to state="state.uinfo.salix.supraregional" /> - <condition data="scenario_selection" value="scenarioType.option2" operator="equal" /> - </transition> - - <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.uinfo.salix.supraregional" /> - <to state="state.uinfo.salix_line" /> - <condition data="calculation_mode" value="uinfo_salix_line" operator="equal" /> + <from state="state.uinfo.salix.use_scenario"/> + <to state="state.uinfo.salix.scenario_type"/> + <condition data="use_scenario" value="true" operator="equal"/> </transition> <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.uinfo.salix.scenario_type" /> - <to state="state.uinfo.salix.historical.soundings" /> - <condition data="scenario_selection" value="scenarioType.option3" operator="equal" /> + <from state="state.uinfo.salix.use_scenario"/> + <to state="state.uinfo.salix_line"/> + <condition data="use_scenario" value="false" operator="equal"/> </transition> - - <state id="state.uinfo.salix.historical.soundings" description="state.uinfo.salix.historical.soundings" state="org.dive4elements.river.artifacts.states.SoundingsSelectSingle" helpText="help.state.uinfo.salix.historical.soundings"> - <data name="soundings" type="multiattribute" /> - </state> - <state id="state.uinfo.salix.supraregional" description="state.uinfo.salix.supraregional" state="org.dive4elements.river.artifacts.uinfo.salix.SupraRegionalTableState" helpText="help.state.uinfo.salix.supraregional"> - <data name="supraregional_table" type="String" /> + <state id="state.uinfo.salix.scenario_type" description="state.uinfo.salix.scenario_type" state="org.dive4elements.river.artifacts.uinfo.salix.ScenarioTypeState" helpText="help.state.uinfo.salix.scenario_type"> + <data name="scenario_selection" type="String"/> </state> <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.uinfo.salix.historical.soundings" /> - <to state="state.uinfo.distance_only_part.historical" /> - <condition data="calculation_mode" value="uinfo_salix_line" operator="equal" /> + <from state="state.uinfo.salix.scenario_type"/> + <to state="state.uinfo.distance_only_part.from_regional"/> + <condition data="scenario_selection" value="scenarioType.option1" operator="equal"/> + </transition> + + <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> + <from state="state.uinfo.salix.scenario_type"/> + <to state="state.uinfo.salix.supraregional"/> + <condition data="scenario_selection" value="scenarioType.option2" operator="equal"/> + </transition> + + <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> + <from state="state.uinfo.salix.supraregional"/> + <to state="state.uinfo.salix_line"/> + <condition data="calculation_mode" value="uinfo_salix_line" operator="equal"/> + </transition> + + <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> + <from state="state.uinfo.salix.scenario_type"/> + <to state="state.uinfo.salix.historical.soundings"/> + <condition data="scenario_selection" value="scenarioType.option3" operator="equal"/> + </transition> + + <state id="state.uinfo.salix.historical.soundings" description="state.uinfo.salix.historical.soundings" state="org.dive4elements.river.artifacts.states.SoundingsSelectSingle" helpText="help.state.uinfo.salix.historical.soundings"> + <data name="soundings" type="multiattribute"/> + </state> + + <state id="state.uinfo.salix.supraregional" description="state.uinfo.salix.supraregional" state="org.dive4elements.river.artifacts.uinfo.salix.SupraRegionalTableState" helpText="help.state.uinfo.salix.supraregional"> + <data name="supraregional_table" type="String"/> + </state> + + <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> + <from state="state.uinfo.salix.historical.soundings"/> + <to state="state.uinfo.distance_only_part.historical"/> + <condition data="calculation_mode" value="uinfo_salix_line" operator="equal"/> </transition> <state id="state.uinfo.distance_only_part.historical" description="state.uinfo.distance_only_part.historical" state="org.dive4elements.river.artifacts.uinfo.salix.DistanceOnlyPartHistoricalSelect" helpText="help.state.uinfo.salix.historical.distance_only_part"> - <data name="ld_from_part" type="Double" /> - <data name="ld_to_part" type="Double" /> - <data name="bedheights_for_part" type="Double" /> + <data name="ld_from_part" type="Double"/> + <data name="ld_to_part" type="Double"/> + <data name="bedheights_for_part" type="Double"/> </state> <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.uinfo.distance_only_part.historical" /> - <to state="state.uinfo.salix_line" /> - <condition data="calculation_mode" value="uinfo_salix_line" operator="equal" /> + <from state="state.uinfo.distance_only_part.historical"/> + <to state="state.uinfo.salix_line"/> + <condition data="calculation_mode" value="uinfo_salix_line" operator="equal"/> </transition> <state id="state.uinfo.salix.load.scenario.regional" description="state.uinfo.salix.load.scenario.regional" state="org.dive4elements.river.artifacts.uinfo.salix.LoadScenarioSelectLimit5" helpText="help.state.uinfo.salix.regional"> @@ -123,8 +118,8 @@ </state> <state id="state.uinfo.distance_only_part.from_regional" description="state.uinfo.distance_only_part.from_regional" state="org.dive4elements.river.artifacts.states.DistanceOnlyPartSelect" helpText="help.state.uinfo.salix.regional"> - <data name="ld_from_part" type="Double" /> - <data name="ld_to_part" type="Double" /> + <data name="ld_from_part" type="Double"/> + <data name="ld_to_part" type="Double"/> </state> <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> @@ -133,131 +128,133 @@ <condition data="calculation_mode" value="uinfo_salix_line" operator="equal" /> </transition> - <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> <from state="state.uinfo.salix.load.scenario.regional" /> <to state="state.uinfo.salix_line" /> <condition data="calculation_mode" value="uinfo_salix_line" operator="equal" /> </transition> - <state id="state.uinfo.salix_line" description="state.uinfo.salix_line" state="org.dive4elements.river.artifacts.uinfo.salix.SalixLineState" helpText="help.state.uinfo.river"> <outputmodes> <outputmode name="uinfo_salix_line" description="output.uinfo_salix_line" mime-type="image/png" type="chart"> <facets> - <facet name="uinfo_facet_salix_line.filtered" description="salix line, filtered by current zoom state" /> - <facet name="uinfo_facet_salix_line" description="salix line" /> - <facet name="uinfo_facet_salix_mnwmw.filtered" description="nmw-mw differences, filtered by current zoom state" /> - <facet name="uinfo_facet_salix_mnwmw" description="mnw-mw differences" /> - <facet name="uinfo_facet_salix_scenario.filtered" description="scenario salix line, filtered by current zoom state" /> - <facet name="uinfo_facet_salix_scenario" description="scenario salix line" /> - <facet name="uinfo_facet_salix_rank" description="salix ranks" /> + <facet name="uinfo_facet_salix_line.filtered" description="salix line, filtered by current zoom state"/> + <facet name="uinfo_facet_salix_line" description="salix line"/> + <facet name="uinfo_facet_salix_mnwmw.filtered" description="nmw-mw differences, filtered by current zoom state"/> + <facet name="uinfo_facet_salix_mnwmw" description="mnw-mw differences"/> + <facet name="uinfo_facet_salix_scenario.filtered" description="scenario salix line, filtered by current zoom state"/> + <facet name="uinfo_facet_salix_scenario" description="scenario salix line"/> + <facet name="uinfo_facet_salix_rank" description="salix ranks"/> </facets> </outputmode> - <!-- FIXME: i01n name in FLYSConstants --> - <outputmode name="uinfo_salix_line_export" description="output.uinfo_salix_line_export" mime-type="text/plain" type="export"> + <outputmode name="cross_section" description="output.cross_section" mime-type="image/png" type="chart"> <facets> - <facet name="csv" description="facet.uinfo_salix_line_export.csv" /> - <facet name="pdf" description="facet.uinfo_salix_line_export.pdf" /> + <facet name="cross_section_water_line" description="facet.cross_section_water_line"/> + <facet name="cross_section" description="facet.cross_section"/> + <facet name="area" description="an area"/> + <facet name="cross_section.area" description="an area"/> + <facet name="cross_section.manualpoints" description="points"/> + <facet name="cross_section.manualline" description="line"/> + + <!-- + This would automatically import some existing hyks, but we do not want this here + <facet name="hyk" description="hyks"/> + --> </facets> </outputmode> - <!-- FIXME: i01n name in FLYSConstants --> + <outputmode name="uinfo_salix_line_export" description="output.uinfo_salix_line_export" mime-type="text/plain" type="export"> + <facets> + <facet name="csv" description="facet.uinfo_salix_line_export.csv"/> + <facet name="pdf" description="facet.uinfo_salix_line_export.pdf"/> + </facets> + </outputmode> + <outputmode name="uinfo_salix_line_report" description="output.uinfo_salix_line_report" mime-type="text/xml" type="report"> <facets> - <facet name="report" description="facet.uinfo_salix_line_report" /> + <facet name="report" description="facet.uinfo_salix_line_report"/> </facets> </outputmode> </outputmodes> </state> - - - <!-- Calculation Mode: Inundation Duration --> <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.uinfo.calculation_mode" /> - <to state="state.uinfo.inundationduration.distance_only" /> - <condition data="calculation_mode" value="uinfo_inundation_duration" operator="equal" /> + <from state="state.uinfo.calculation_mode"/> + <to state="state.uinfo.inundationduration.distance_only"/> + <condition data="calculation_mode" value="uinfo_inundation_duration" operator="equal"/> </transition> <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.uinfo.inundationduration.distance_only" /> - <to state="state.uinfo.inundation.year_totalepoch" /> - <condition data="calculation_mode" value="uinfo_inundation_duration" operator="equal" /> - </transition> - - - <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.uinfo.inundation.year_totalepoch" /> - <to state="state.uinfo.inundation.load.year" /> - <condition data="ye_select" value="state.uinfo.year" operator="equal" /> + <from state="state.uinfo.inundationduration.distance_only"/> + <to state="state.uinfo.inundation.year_totalepoch"/> + <condition data="calculation_mode" value="uinfo_inundation_duration" operator="equal"/> </transition> <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.uinfo.inundation.year_totalepoch" /> - <to state="state.uinfo.inundation.use_scenario" /> - <condition data="ye_select" value="state.uinfo.totalepoch" operator="equal" /> + <from state="state.uinfo.inundation.year_totalepoch"/> + <to state="state.uinfo.inundation.load.year"/> + <condition data="ye_select" value="state.uinfo.year" operator="equal"/> </transition> + <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> + <from state="state.uinfo.inundation.year_totalepoch"/> + <to state="state.uinfo.inundation.use_scenario"/> + <condition data="ye_select" value="state.uinfo.totalepoch" operator="equal"/> + </transition> <state id="state.uinfo.inundation.year_totalepoch" description="state.uinfo.inundation.year_totalepoch" state="org.dive4elements.river.artifacts.uinfo.inundationduration.YearChoice" helpText="help.state.uinfo.inundation.year_totalepoch"> - <data name="ye_select" type="String" /> + <data name="ye_select" type="String"/> </state> - <state id="state.uinfo.inundation.load.year" description="state.uinfo.inundation.load.year" state="org.dive4elements.river.artifacts.uinfo.inundationduration.LoadSingleYearSelectState" helpText="help.state.uinfo.inundation.load.year"> - <data name="singleyear" type="String" /> + <data name="singleyear" type="String"/> </state> - <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.uinfo.inundation.load.year" /> - <to state="state.uinfo.inundation.use_scenario" /> - <condition data="calculation_mode" value="uinfo_inundation_duration" operator="equal" /> + <from state="state.uinfo.inundation.load.year"/> + <to state="state.uinfo.inundation.use_scenario"/> + <condition data="calculation_mode" value="uinfo_inundation_duration" operator="equal"/> </transition> <!-- Doppelter State, andere ID, damit keine Mehrfach-Condition benötigt wird --> <state id="state.uinfo.inundation.use_scenario" description="state.uinfo.inundation.use_scenario" state="org.dive4elements.river.artifacts.uinfo.salix.UseScenarioChoice" helpText="help.state.uinfo.inundation.use_scenario"> - <data name="use_scenario" type="Boolean" /> + <data name="use_scenario" type="Boolean"/> </state> - <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.uinfo.inundation.use_scenario" /> - <to state="state.uinfo.inundation.scenario" /> - <condition data="use_scenario" value="true" operator="equal" /> + <from state="state.uinfo.inundation.use_scenario"/> + <to state="state.uinfo.inundation.scenario"/> + <condition data="use_scenario" value="true" operator="equal"/> </transition> <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.uinfo.inundation.use_scenario" /> - <to state="state.uinfo.inundation.vegetation" /> - <condition data="use_scenario" value="false" operator="equal" /> + <from state="state.uinfo.inundation.use_scenario"/> + <to state="state.uinfo.inundation.vegetation"/> + <condition data="use_scenario" value="false" operator="equal"/> </transition> - <state id="state.uinfo.inundation.scenario" description="state.uinfo.inundation.scenario" state="org.dive4elements.river.artifacts.uinfo.inundationduration.LoadScenarioSelect" helpText="help.state.uinfo.inundation.scenario"> - <data name="sedimentheight" type="String" /> <!-- mittelwasserlage in cm! --> + <data name="sedimentheight" type="String"/> <!-- mittelwasserlage in cm! --> </state> <state id="state.uinfo.inundation.vegetation" description="state.uinfo.inundation.vegetation" state="org.dive4elements.river.artifacts.uinfo.vegetationzones.VegetationZonesTableState" helpText="help.state.uinfo.inundation.vegetation"> - <data name="vegzones" type="String" /> + <data name="vegzones" type="String"/> </state> <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.uinfo.inundation.scenario" /> - <to state="state.uinfo.inundation.vegetation" /> - <condition data="calculation_mode" value="uinfo_inundation_duration" operator="equal" /> + <from state="state.uinfo.inundation.scenario"/> + <to state="state.uinfo.inundation.vegetation"/> + <condition data="calculation_mode" value="uinfo_inundation_duration" operator="equal"/> </transition> - <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.uinfo.inundation.vegetation" /> - <to state="state.uinfo.inundation_duration" /> - <condition data="calculation_mode" value="uinfo_inundation_duration" operator="equal" /> + <from state="state.uinfo.inundation.vegetation"/> + <to state="state.uinfo.inundation_duration"/> + <condition data="calculation_mode" value="uinfo_inundation_duration" operator="equal"/> </transition> <state id="state.uinfo.inundation_duration" description="state.uinfo.inundation_duration" state="org.dive4elements.river.artifacts.uinfo.inundationduration.InundationDurationState" helpText="help.state.uinfo.inundation_duration"> @@ -265,148 +262,92 @@ <outputmode name="map" description="output.uesk.map.description" type="map"> <facets> - <facet name="floodmap.wsplgen" /> - <facet name="floodmap.barriers" /> - <facet name="floodmap.riveraxis" /> - <facet name="floodmap.wmsbackground" /> - <facet name="floodmap.kms" /> - <facet name="floodmap.qps" /> - <facet name="floodmap.hws_lines" /> - <facet name="floodmap.hws_points" /> - <facet name="floodmap.hydr_boundaries" /> - <facet name="floodmap.hydr_boundaries_poly" /> - <facet name="floodmap.catchment" /> - <facet name="floodmap.floodplain" /> - <facet name="floodmap.floodmarks" /> - <facet name="floodmap.lines" /> - <facet name="floodmap.buildings" /> - <facet name="floodmap.fixpoints" /> - <facet name="floodmap.floodmaps" /> - <facet name="floodmap.gauge_location" /> - <facet name="floodmap.externalwms" /> - <facet name="floodmap.externalwms_1" /> - <facet name="floodmap.externalwms_2" /> - <facet name="floodmap.externalwms_3" /> - <facet name="floodmap.externalwms_4" /> - <facet name="floodmap.jetties" /> + <facet name="floodmap.wsplgen"/> + <facet name="floodmap.barriers"/> + <facet name="floodmap.riveraxis"/> + <facet name="floodmap.wmsbackground"/> + <facet name="floodmap.kms"/> + <facet name="floodmap.qps"/> + <facet name="floodmap.hws_lines"/> + <facet name="floodmap.hws_points"/> + <facet name="floodmap.hydr_boundaries"/> + <facet name="floodmap.hydr_boundaries_poly"/> + <facet name="floodmap.catchment"/> + <facet name="floodmap.floodplain"/> + <facet name="floodmap.floodmarks"/> + <facet name="floodmap.lines"/> + <facet name="floodmap.buildings"/> + <facet name="floodmap.fixpoints"/> + <facet name="floodmap.floodmaps"/> + <facet name="floodmap.gauge_location"/> + <facet name="floodmap.externalwms"/> + <facet name="floodmap.externalwms_1"/> + <facet name="floodmap.externalwms_2"/> + <facet name="floodmap.externalwms_3"/> + <facet name="floodmap.externalwms_4"/> + <facet name="floodmap.jetties"/> </facets> </outputmode> <!-- FIXME: i01n name in FLYSConstants --> <outputmode name="uinfo_inundation_duration_export" description="output.uinfo_inundation_duration_export" mime-type="text/plain" type="export"> <facets> - <facet name="wms_url" description="XXXXXXXXXX _ no entry in generators necessary either" /> + <facet name="wms_url" description="XXXXXXXXXX _ no entry in generators necessary either"/> </facets> </outputmode> <outputmode name="uinfo_inundation_duration_report" description="output.uinfo_inundation_duration_report" mime-type="text/xml" type="report"> <facets> - <facet name="report" description="facet.uinfo_inundation_duration_report" /> + <facet name="report" description="facet.uinfo_inundation_duration_report"/> </facets> </outputmode> </outputmodes> </state> - - - - - - - - - - - - - - - - - - - <!-- Calculation Mode: Vegetation Zones --> - - <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.uinfo.calculation_mode" /> - <to state="state.uinfo.distance_only" /> - <condition data="calculation_mode" value="uinfo_vegetation_zones" operator="equal" /> - </transition> - - - <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.uinfo.distance_only" /> - <to state="state.uinfo.vegetation_zones.table" /> - <condition data="calculation_mode" value="uinfo_vegetation_zones" operator="equal" /> + <from state="state.uinfo.calculation_mode"/> + <to state="state.uinfo.distance_only"/> + <condition data="calculation_mode" value="uinfo_vegetation_zones" operator="equal"/> </transition> - + <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> + <from state="state.uinfo.distance_only"/> + <to state="state.uinfo.vegetation_zones.table"/> + <condition data="calculation_mode" value="uinfo_vegetation_zones" operator="equal"/> + </transition> <state id="state.uinfo.vegetation_zones.table" description="state.uinfo.vegetation_zones.table" state="org.dive4elements.river.artifacts.uinfo.vegetationzones.VegetationZonesTableEditState" helpText="help.state.uinfo.vegetation_zones"> - <data name="vegzones" type="String" /> + <data name="vegzones" type="String"/> </state> - <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.uinfo.vegetation_zones.table" /> - <to state="state.uinfo.vegetation_zones" /> - <condition data="calculation_mode" value="uinfo_vegetation_zones" operator="equal" /> + <from state="state.uinfo.vegetation_zones.table"/> + <to state="state.uinfo.vegetation_zones"/> + <condition data="calculation_mode" value="uinfo_vegetation_zones" operator="equal"/> </transition> - <state id="state.uinfo.vegetation_zones" description="state.uinfo.vegetation_zones" state="org.dive4elements.river.artifacts.uinfo.vegetationzones.VegetationZonesState" helpText="help.state.uinfo.vegetation_zones"> <outputmodes> <!-- FIXME: i01n name in FLYSConstants --> <outputmode name="uinfo_vegetation_zones_export" description="output.uinfo_vegetation_zones_export" mime-type="text/plain" type="export"> <facets> - <facet name="csv" description="facet.uinfo_vegetation_zones_export.csv" /> - <facet name="pdf" description="facet.uinfo_vegetation_zones_export.pdf" /> + <facet name="csv" description="facet.uinfo_vegetation_zones_export.csv"/> + <facet name="pdf" description="facet.uinfo_vegetation_zones_export.pdf"/> </facets> </outputmode> <!-- FIXME: i01n name in FLYSConstants --> <outputmode name="uinfo_vegetation_zones_report" description="output.uinfo_vegetation_zones_report" mime-type="text/xml" type="report"> <facets> - <facet name="report" description="facet.uinfo_vegetation_zones_report" /> + <facet name="report" description="facet.uinfo_vegetation_zones_report"/> </facets> </outputmode> </outputmodes> </state> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - </states> </artifact> \ No newline at end of file
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/UINFOArtifact.java Fri Aug 17 15:31:02 2018 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/UINFOArtifact.java Fri Aug 17 15:31:16 2018 +0200 @@ -9,11 +9,18 @@ */ package org.dive4elements.river.artifacts.uinfo; +import java.io.Serializable; + import org.apache.commons.lang.StringUtils; import org.dive4elements.artifactdatabase.state.Facet; import org.dive4elements.artifactdatabase.state.FacetActivity; import org.dive4elements.artifacts.Artifact; +import org.dive4elements.artifacts.CallContext; import org.dive4elements.river.artifacts.D4EArtifact; +import org.dive4elements.river.artifacts.WaterLineArtifact; +import org.dive4elements.river.artifacts.model.CalculationResult; +import org.dive4elements.river.artifacts.states.DefaultState.ComputeType; +import org.dive4elements.river.artifacts.uinfo.salix.SalixLineCalculationResults; import org.dive4elements.river.artifacts.uinfo.salix.SalixLineProcessor; /** @@ -21,7 +28,7 @@ * * @author Gernot Belger */ -public class UINFOArtifact extends D4EArtifact { +public class UINFOArtifact extends D4EArtifact implements WaterLineArtifact { private static final long serialVersionUID = 1L; @@ -100,4 +107,18 @@ public String getRiver() { return getDataAsString(FIELD_RIVER); } + + @Override + public double getWaterLevel(final ComputeType type, final String hash, final String stateId, final double currentKm, final Serializable waterLineIndex, + final double nextKm, + final double prevKm, + final CallContext context) { + + final CalculationResult res = (CalculationResult) this.compute(context, hash, stateId, type, false); + final Object data = res.getData(); + if (data instanceof SalixLineCalculationResults) + return ((SalixLineCalculationResults) data).getCrossSectionLine(currentKm, waterLineIndex, nextKm, prevKm, context); + + throw new IllegalStateException("Cross section stuff should only happen for salix line"); + } } \ No newline at end of file
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixLineCalculationResult.java Fri Aug 17 15:31:02 2018 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixLineCalculationResult.java Fri Aug 17 15:31:16 2018 +0200 @@ -33,8 +33,11 @@ class SalixLineCalculationResult extends AbstractCalculationExportableResult { private static final long serialVersionUID = 1L; + private static final String JASPER_FILE = "/jasper/templates/uinfo.salixline.jrxml"; + private static final double STATION_TOLERANCE = 0.1d; + private final String[] scenarioLabels; private final String partialRangeString; @@ -176,4 +179,36 @@ return new double[][] { xPoints.toNativeArray(), yPoints.toNativeArray() }; } + + public final double getSalixValue(final double currentKm, final double nextKm, final double prevKm) { + + final ResultRow row = getRowForStation(currentKm, STATION_TOLERANCE); + if (row == null) + return Double.NaN; + + // FIXME: hier wird die geodätische Höhe der SalixLinie benötigt; ggf schon in die Ergebnistzeilen einbauen + return 84.0; + // return row.getDoubleValue(UInfoResultType.salixline); + } + + public final double getSalixScenarioValue(final double currentKm, final double nextKm, final double prevKm, final int scenarioIndex) { + final ResultRow row = getRowForStation(currentKm, STATION_TOLERANCE); + if (row == null) + return Double.NaN; + + final List<SalixScenario> scenarios = (List<SalixScenario>) row.getValue(UInfoResultType.customMultiRowColSalixScenarios); + final SalixScenario salixScenario = scenarios.get(scenarioIndex); + if (salixScenario == null) + return Double.NaN; + + // FIXME: hier wird die geodätische Höhe der SalixLinie benötigt; ggf schon als weiteres Feld an SalixScenario dranbauen + return 85; + // return salixScenario.getSalixValue(); + } + + public final double getWaterlevelValue(final double currentKm, final double nextKm, final double prevKm, final String waterlevelName) { + final ResultRow row = getRowForStation(currentKm, STATION_TOLERANCE); + // TODO implement + return Double.NaN; + } } \ No newline at end of file
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixLineCalculationResults.java Fri Aug 17 15:31:02 2018 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixLineCalculationResults.java Fri Aug 17 15:31:16 2018 +0200 @@ -9,19 +9,28 @@ */ package org.dive4elements.river.artifacts.uinfo.salix; +import java.io.Serializable; + import org.apache.commons.lang.math.DoubleRange; +import org.dive4elements.artifacts.CallContext; import org.dive4elements.river.artifacts.common.AbstractCalculationResults; import org.dive4elements.river.artifacts.sinfo.util.RiverInfo; /** * @author Domenico Nardi Tironi - * */ -final class SalixLineCalculationResults extends AbstractCalculationResults<SalixLineCalculationResult> { +public final class SalixLineCalculationResults extends AbstractCalculationResults<SalixLineCalculationResult> { private static final long serialVersionUID = 1L; public SalixLineCalculationResults(final String calcModeLabel, final String user, final RiverInfo river, final DoubleRange calcRange) { super(calcModeLabel, user, river, calcRange); } + + public double getCrossSectionLine(final double currentKm, final Serializable waterLineIndex, final double nextKm, final double prevKm, + final CallContext context) { + + final SalixLineCrossSectionIndexData indexData = (SalixLineCrossSectionIndexData) waterLineIndex; + return indexData.getCrossSectionLine(this, currentKm, nextKm, prevKm, context); + } } \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixLineCrossSectionIndexData.java Fri Aug 17 15:31:16 2018 +0200 @@ -0,0 +1,81 @@ +/** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde + * Software engineering by + * Björnsen Beratende Ingenieure GmbH + * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt + * + * This file is Free Software under the GNU AGPL (>=v3) + * and comes with ABSOLUTELY NO WARRANTY! Check out the + * documentation coming with Dive4Elements River for details. + */ +package org.dive4elements.river.artifacts.uinfo.salix; + +import java.io.Serializable; + +import org.dive4elements.artifacts.CallContext; + +/** + * The 'index' that tells the cross section facet which of my result are to be fetched as a cross section line. + * + * @author Gernot Belger + */ +public final class SalixLineCrossSectionIndexData implements Serializable { + private static final long serialVersionUID = 1L; + + private static final SalixLineCrossSectionIndexData SALIX_LINE = new SalixLineCrossSectionIndexData(null, null); + + // REMARK: we know at the moment there is exactly one result + private final int resultIndex = 0; + + private final Integer scenarioIndex; + + private final String waterlevelName; + + /** + * Creates an instance of this class that represants the salix line. + */ + public static final SalixLineCrossSectionIndexData salixLine() { + return SALIX_LINE; + } + + /** + * Creates an instance of this class that represants the salix line. + */ + public static final SalixLineCrossSectionIndexData scenario(final int scenarioIndex) { + return new SalixLineCrossSectionIndexData(scenarioIndex, null); + } + + /** + * Creates an instance of this class that represants the salix line. + */ + // FIXME: gemeint sind die einzublendenden 'MNW, MW, MHW, HW5' mir nicht klar wo diese Daten herkommen, ggf. aus der + // Rechnung? + // FIXME: statt 'name' vielleicht eine enum oder irgend etwas anderes was diese dinger eindeutig referenzieet? + public static final SalixLineCrossSectionIndexData waterlevel(final String name) { + assert name != null; + return new SalixLineCrossSectionIndexData(null, name); + } + + private SalixLineCrossSectionIndexData(final Integer scenarioIndex, final String waterlevelName) { + this.scenarioIndex = scenarioIndex; + this.waterlevelName = waterlevelName; + } + + public double getCrossSectionLine(final SalixLineCalculationResults results, final double currentKm, final double nextKm, + final double prevKm, final CallContext context) { + + final SalixLineCalculationResult result = results.getResults().get(this.resultIndex); + + if (this.scenarioIndex != null) { + // fetch scenario result data = salix line value at km + return result.getSalixScenarioValue(currentKm, nextKm, prevKm, this.scenarioIndex); + } + + if (this.waterlevelName != null) { + // fetch waterlevel result data = salix line value at km + return result.getWaterlevelValue(currentKm, nextKm, prevKm, this.waterlevelName); + } + + // fetch normal result data = salix line value at km + return result.getSalixValue(currentKm, nextKm, prevKm); + } +} \ No newline at end of file
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixLineState.java Fri Aug 17 15:31:02 2018 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixLineState.java Fri Aug 17 15:31:16 2018 +0200 @@ -17,6 +17,7 @@ import org.dive4elements.river.artifacts.D4EArtifact; import org.dive4elements.river.artifacts.model.Calculation; import org.dive4elements.river.artifacts.model.CalculationResult; +import org.dive4elements.river.artifacts.model.CrossSectionWaterLineFacet; import org.dive4elements.river.artifacts.model.DataFacet; import org.dive4elements.river.artifacts.model.EmptyFacet; import org.dive4elements.river.artifacts.model.FacetTypes; @@ -48,7 +49,7 @@ return null; } - return compute((UINFOArtifact) artifact, context, hash, facets, old); + return compute((UINFOArtifact) artifact, context, ComputeType.FEED, hash, facets, old); } @Override @@ -57,7 +58,7 @@ facets.add(new EmptyFacet()); return null; } - return compute((UINFOArtifact) artifact, context, hash, facets, old); + return compute((UINFOArtifact) artifact, context, ComputeType.ADVANCE, hash, facets, old); } /** @@ -66,7 +67,8 @@ * @param old * Object that was cached. */ - private Object compute(final UINFOArtifact uinfo, final CallContext context, final String hash, final List<Facet> facets, final Object old) { + private Object compute(final UINFOArtifact uinfo, final CallContext context, final ComputeType type, final String hash, final List<Facet> facets, + final Object old) { final CalculationResult res = doCompute(uinfo, context, old); @@ -77,14 +79,18 @@ final List<SalixLineCalculationResult> resultList = results.getResults(); + final String stateId = getID(); + int facetIndex = 0; if (!resultList.isEmpty()) { - facets.add(SalixLineProcessor.createSalixLineFilteredFacet(context, hash, this.id, facetIndex++, 0)); - facets.add(SalixLineProcessor.createSalixLineRawFacet(context, hash, this.id, facetIndex++, 0)); - facets.add(SalixLineProcessor.createSalixMnwMwFilteredFacet(context, hash, this.id, facetIndex++, 0)); - facets.add(SalixLineProcessor.createSalixMnwMwRawFacet(context, hash, this.id, facetIndex++, 0)); - facets.add(SalixLineProcessor.createSalixRankFacet(context, hash, this.id, facetIndex++, 0)); + facets.add(SalixLineProcessor.createSalixLineFilteredFacet(context, hash, stateId, facetIndex++, 0)); + facets.add(SalixLineProcessor.createSalixLineRawFacet(context, hash, stateId, facetIndex++, 0)); + facets.add(SalixLineProcessor.createSalixMnwMwFilteredFacet(context, hash, stateId, facetIndex++, 0)); + facets.add(SalixLineProcessor.createSalixMnwMwRawFacet(context, hash, stateId, facetIndex++, 0)); + facets.add(SalixLineProcessor.createSalixRankFacet(context, hash, stateId, facetIndex++, 0)); + + facets.add(new CrossSectionWaterLineFacet(facetIndex++, "Salix Linie (!I10N!)", type, hash, stateId, SalixLineCrossSectionIndexData.salixLine())); final SalixLineCalculationResult result = resultList.get(0); @@ -93,12 +99,17 @@ result.getScenarioLabel(i)); // REMARK: using data index as facetIndex, as we know there is only one result of this type. Else we should just // increment - facets.add(SalixLineProcessor.createSalixScenarioFilteredFacet(context, hash, this.id, i, 0, facetIndex++, sublabel)); - facets.add(SalixLineProcessor.createSalixScenarioRawFacet(context, hash, this.id, i, 0, facetIndex++, sublabel)); + facets.add(SalixLineProcessor.createSalixScenarioFilteredFacet(context, hash, stateId, i, 0, facetIndex++, sublabel)); + facets.add(SalixLineProcessor.createSalixScenarioRawFacet(context, hash, stateId, i, 0, facetIndex++, sublabel)); + + facets.add(new CrossSectionWaterLineFacet(facetIndex++, "Salix Linie Scenario (!I10N! )" + i, type, hash, stateId, + SalixLineCrossSectionIndexData.scenario(i))); } - final Facet csv = new DataFacet(FacetTypes.CSV, "CSV data", ComputeType.ADVANCE, hash, this.id); - final Facet pdf = new DataFacet(FacetTypes.PDF, "PDF data", ComputeType.ADVANCE, hash, this.id); + // FIXME: add cross section wst lines (MW, MMHW, ...) + + final Facet csv = new DataFacet(FacetTypes.CSV, "CSV data", ComputeType.ADVANCE, hash, stateId); + final Facet pdf = new DataFacet(FacetTypes.PDF, "PDF data", ComputeType.ADVANCE, hash, stateId); facets.add(csv); facets.add(pdf); @@ -107,7 +118,7 @@ final Calculation report = res.getReport(); if (report.hasProblems()) - facets.add(new ReportFacet(ComputeType.ADVANCE, hash, this.id)); + facets.add(new ReportFacet(ComputeType.ADVANCE, hash, stateId)); return res; }