Mercurial > dive4elements > river
changeset 9058:d3bef221b7d9
sinfo.collision states
author | gernotbelger |
---|---|
date | Fri, 04 May 2018 16:13:10 +0200 |
parents | 2be202a8cb89 (current diff) ddebd4c2fe93 (diff) |
children | c49b95820d60 |
files | artifacts/doc/conf/artifacts/sinfo.xml artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/collision/CollisionLoadYearEpochAccess.java artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/collision/LoadYearSelect.java |
diffstat | 8 files changed, 391 insertions(+), 273 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/doc/conf/artifacts/sinfo.xml Fri May 04 14:50:13 2018 +0200 +++ b/artifacts/doc/conf/artifacts/sinfo.xml Fri May 04 16:13:10 2018 +0200 @@ -3,84 +3,85 @@ <states> <state id="state.sinfo.river" description="state.sinfo.river" state="org.dive4elements.river.artifacts.states.RiverSelect" helpText="help.state.sinfo.river"> - <data name="river" type="String"/> + <data name="river" type="String" /> </state> <transition transition="org.dive4elements.river.artifacts.transitions.DefaultTransition"> - <from state="state.sinfo.river"/> - <to state="state.sinfo.calculation_mode"/> + <from state="state.sinfo.river" /> + <to state="state.sinfo.calculation_mode" /> </transition> <state id="state.sinfo.calculation_mode" description="state.sinfo.calculation_mode" state="org.dive4elements.river.artifacts.sinfo.CalculationSelectSinfo" helpText="help.state.sinfo.calculation_mode"> - <data name="calculation_mode" type="String"/> + <data name="calculation_mode" type="String" /> </state> <!-- Calculation Mode: Fließtiefen (Flow Depth) --> <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.sinfo.calculation_mode"/> - <to state="state.sinfo.distance_only"/> - <condition data="calculation_mode" value="sinfo_calc_flow_depth" operator="equal"/> + <from state="state.sinfo.calculation_mode" /> + <to state="state.sinfo.distance_only" /> + <condition data="calculation_mode" value="sinfo_calc_flow_depth" operator="equal" /> </transition> <state id="state.sinfo.distance_only" description="state.sinfo.distance_only" state="org.dive4elements.river.artifacts.states.DistanceOnlySelect" helpText="help.state.sinfo.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> <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.sinfo.distance_only"/> - <to state="state.sinfo.waterlevel_soundings_select"/> - <condition data="calculation_mode" value="sinfo_calc_flow_depth" operator="equal"/> + <from state="state.sinfo.distance_only" /> + <to state="state.sinfo.waterlevel_soundings_select" /> + <condition data="calculation_mode" value="sinfo_calc_flow_depth" operator="equal" /> </transition> <state id="state.sinfo.waterlevel_soundings_select" description="state.sinfo.waterlevel_soundings_select" state="org.dive4elements.river.artifacts.sinfo.flowdepth.FlowDepthPairSelectState" helpText="help.state.sinfo.waterlevel_soundings_select"> - <data name="diffids" type="String"/> + <data name="diffids" type="String" /> </state> <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.sinfo.waterlevel_soundings_select"/> - <to state="state.sinfo.use_transport_bodies"/> - <condition data="calculation_mode" value="sinfo_calc_flow_depth" operator="equal"/> + <from state="state.sinfo.waterlevel_soundings_select" /> + <to state="state.sinfo.use_transport_bodies" /> + <condition data="calculation_mode" value="sinfo_calc_flow_depth" operator="equal" /> </transition> <!-- FIXME: Nur Anzeigen, wenn Transportkörperhöhen vorliegen! --> <state id="state.sinfo.use_transport_bodies" description="state.sinfo.use_transport_bodies" state="org.dive4elements.river.artifacts.sinfo.flowdepth.UseTransportBodiesChoice" helpText="help.state.sinfo.use_transport_bodies"> - <data name="use_transport_bodies" type="Boolean"/> + <data name="use_transport_bodies" type="Boolean" /> </state> <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.sinfo.use_transport_bodies"/> - <to state="state.sinfo.flow_depth"/> - <condition data="calculation_mode" value="sinfo_calc_flow_depth" operator="equal"/> + <from state="state.sinfo.use_transport_bodies" /> + <to state="state.sinfo.flow_depth" /> + <condition data="calculation_mode" value="sinfo_calc_flow_depth" operator="equal" /> </transition> <state id="state.sinfo.flow_depth" description="state.sinfo.flow_depth" state="org.dive4elements.river.artifacts.sinfo.flowdepth.FlowDepthState" helpText="help.state.sinfo.flow_depth"> <outputmodes> <outputmode name="sinfo_flow_depth" description="output.flow_depth" mime-type="image/png" type="chart"> <facets> - <!-- REMARK: id's that ends with 'filtered' are handled differently ' --> - <facet name="sinfo_facet_flow_depth.filtered" description="flow depth, filtered by current zoom state"/> - <facet name="sinfo_facet_flow_depth" description="flow depth"/> + <!-- REMARK: id's that ends with 'filtered' are handled differently + ' --> + <facet name="sinfo_facet_flow_depth.filtered" description="flow depth, filtered by current zoom state" /> + <facet name="sinfo_facet_flow_depth" description="flow depth" /> - <facet name="sinfo_facet_flow_depth_with_tkh.filtered" description="flow depth including tkh, filtered by current zoom state"/> - <facet name="sinfo_facet_flow_depth_with_tkh" description="flow depth including tkh"/> + <facet name="sinfo_facet_flow_depth_with_tkh.filtered" description="flow depth including tkh, filtered by current zoom state" /> + <facet name="sinfo_facet_flow_depth_with_tkh" description="flow depth including tkh" /> - <facet name="sinfo_facet_tkh" description="Facet for tkh"/> + <facet name="sinfo_facet_tkh" description="Facet for tkh" /> - <facet name="longitudinal_section.annotations" description="facet.longitudinal_section.annotations"/> + <facet name="longitudinal_section.annotations" description="facet.longitudinal_section.annotations" /> </facets> </outputmode> <outputmode name="sinfo_flowdepth_export" description="output.sinfo_flowdepth_export" mime-type="text/plain" type="export"> <facets> - <facet name="csv" description="facet.sinfo_flowdepth_export.csv"/> - <facet name="pdf" description="facet.sinfo_flowdepth_export.pdf"/> + <facet name="csv" description="facet.sinfo_flowdepth_export.csv" /> + <facet name="pdf" description="facet.sinfo_flowdepth_export.pdf" /> </facets> </outputmode> <outputmode name="sinfo_flowdepth_report" description="output.sinfo_flowdepth_report" mime-type="text/xml" type="report"> <facets> - <facet name="report" description="facet.sinfo_flowdepth_report"/> + <facet name="report" description="facet.sinfo_flowdepth_report" /> </facets> </outputmode> </outputmodes> @@ -88,50 +89,50 @@ <!-- Calculation Mode: Minimale/maximale Fließtiefe --> <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.sinfo.calculation_mode"/> - <to state="state.sinfo.distance_only"/> - <condition data="calculation_mode" value="sinfo_calc_flow_depth_minmax" operator="equal"/> + <from state="state.sinfo.calculation_mode" /> + <to state="state.sinfo.distance_only" /> + <condition data="calculation_mode" value="sinfo_calc_flow_depth_minmax" operator="equal" /> </transition> <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.sinfo.distance_only"/> - <to state="state.sinfo.waterlevel_soundings_minmax_select"/> - <condition data="calculation_mode" value="sinfo_calc_flow_depth_minmax" operator="equal"/> + <from state="state.sinfo.distance_only" /> + <to state="state.sinfo.waterlevel_soundings_minmax_select" /> + <condition data="calculation_mode" value="sinfo_calc_flow_depth_minmax" operator="equal" /> </transition> <state id="state.sinfo.waterlevel_soundings_minmax_select" description="state.sinfo.waterlevel_soundings_minmax_select" state="org.dive4elements.river.artifacts.sinfo.flowdepthminmax.FlowDepthMinMaxPairSelectState" helpText="help.state.sinfo.waterlevel_soundings_minmax_select"> - <data name="diffids" type="String"/> + <data name="diffids" type="String" /> </state> <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.sinfo.waterlevel_soundings_minmax_select"/> - <to state="state.sinfo.flow_depth_minmax"/> - <condition data="calculation_mode" value="sinfo_calc_flow_depth_minmax" operator="equal"/> + <from state="state.sinfo.waterlevel_soundings_minmax_select" /> + <to state="state.sinfo.flow_depth_minmax" /> + <condition data="calculation_mode" value="sinfo_calc_flow_depth_minmax" operator="equal" /> </transition> <state id="state.sinfo.flow_depth_minmax" description="state.sinfo.flow_depth_minmax" state="org.dive4elements.river.artifacts.sinfo.flowdepthminmax.FlowDepthMinMaxState" helpText="help.state.sinfo.flow_depth_minmax"> <outputmodes> <outputmode name="sinfo_flow_depth_minmax" description="output.flow_depth" mime-type="image/png" type="chart"> <facets> - <facet name="sinfo_facet_flow_depth_min.filtered" description="min flow depth"/> - <facet name="sinfo_facet_flow_depth_min" description="min flow depth"/> - <facet name="sinfo_facet_flow_depth_max.filtered" description="max flow depth"/> - <facet name="sinfo_facet_flow_depth_max" description="max flow depth"/> + <facet name="sinfo_facet_flow_depth_min.filtered" description="min flow depth" /> + <facet name="sinfo_facet_flow_depth_min" description="min flow depth" /> + <facet name="sinfo_facet_flow_depth_max.filtered" description="max flow depth" /> + <facet name="sinfo_facet_flow_depth_max" description="max flow depth" /> - <facet name="longitudinal_section.annotations" description="facet.longitudinal_section.annotations"/> + <facet name="longitudinal_section.annotations" description="facet.longitudinal_section.annotations" /> </facets> </outputmode> <outputmode name="sinfo_flowdepthminmax_export" description="output.sinfo_flowdepthminmax_export" mime-type="text/plain" type="export"> <facets> - <facet name="csv" description="facet.sinfo_flowdepthminmax_export.csv"/> - <facet name="pdf" description="facet.sinfo_flowdepthminmax_export.pdf"/> + <facet name="csv" description="facet.sinfo_flowdepthminmax_export.csv" /> + <facet name="pdf" description="facet.sinfo_flowdepthminmax_export.pdf" /> </facets> </outputmode> <outputmode name="sinfo_flowdepth_report" description="output.sinfo_flowdepth_report" mime-type="text/xml" type="report"> <facets> - <facet name="report" description="facet.sinfo_flowdepth_report"/> + <facet name="report" description="facet.sinfo_flowdepth_report" /> </facets> </outputmode> </outputmodes> @@ -139,75 +140,75 @@ <!-- Calculation Mode: Fließtiefenentwicklung --> <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.sinfo.calculation_mode"/> - <to state="state.sinfo.distance_only"/> - <condition data="calculation_mode" value="sinfo_calc_flow_depth_development" operator="equal"/> + <from state="state.sinfo.calculation_mode" /> + <to state="state.sinfo.distance_only" /> + <condition data="calculation_mode" value="sinfo_calc_flow_depth_development" operator="equal" /> </transition> <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.sinfo.distance_only"/> - <to state="state.sinfo.flowdepthdevlopment_current_select"/> - <condition data="calculation_mode" value="sinfo_calc_flow_depth_development" operator="equal"/> + <from state="state.sinfo.distance_only" /> + <to state="state.sinfo.flowdepthdevlopment_current_select" /> + <condition data="calculation_mode" value="sinfo_calc_flow_depth_development" operator="equal" /> </transition> <state id="state.sinfo.flowdepthdevlopment_current_select" description="state.sinfo.flowdepthdevlopment_current_select" state="org.dive4elements.river.artifacts.sinfo.flowdepthdev.WaterlevelSoundingCurrentPairSelectState" helpText="help.state.sinfo.flowdepthdevlopment_current_select"> - <data name="diffid_current" type="String"/> + <data name="diffid_current" type="String" /> </state> <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.sinfo.flowdepthdevlopment_current_select"/> - <to state="state.sinfo.flowdepthdevlopment_historical_select"/> - <condition data="calculation_mode" value="sinfo_calc_flow_depth_development" operator="equal"/> + <from state="state.sinfo.flowdepthdevlopment_current_select" /> + <to state="state.sinfo.flowdepthdevlopment_historical_select" /> + <condition data="calculation_mode" value="sinfo_calc_flow_depth_development" operator="equal" /> </transition> <state id="state.sinfo.flowdepthdevlopment_historical_select" description="state.sinfo.flowdepthdevlopment_historical_select" state="org.dive4elements.river.artifacts.sinfo.flowdepthdev.WaterlevelSoundingHistoricalPairSelectState" helpText="help.state.sinfo.flowdepthdevlopment_historical_select"> - <data name="diffid_historical" type="String"/> + <data name="diffid_historical" type="String" /> </state> <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.sinfo.flowdepthdevlopment_historical_select"/> - <to state="state.sinfo.flow_depth_development"/> - <condition data="calculation_mode" value="sinfo_calc_flow_depth_development" operator="equal"/> + <from state="state.sinfo.flowdepthdevlopment_historical_select" /> + <to state="state.sinfo.flow_depth_development" /> + <condition data="calculation_mode" value="sinfo_calc_flow_depth_development" operator="equal" /> </transition> <state id="state.sinfo.flow_depth_development" description="state.sinfo.flow_depth_development" state="org.dive4elements.river.artifacts.sinfo.flowdepthdev.FlowDepthDevelopmentState" helpText="help.state.sinfo.flow_depth_development"> <outputmodes> <outputmode name="sinfo_flow_depth_development" description="output.flow_depth_development" mime-type="image/png" type="chart"> <facets> - <facet name="sinfo_facet_flow_depth_development.filtered" description="flow depth development"/> - <facet name="sinfo_facet_flow_depth_development" description="flow depth development"/> - - <facet name="sinfo_facet_waterlevel_difference.filtered" description="waterlevel difference"/> - <facet name="sinfo_facet_bedheight_difference.filtered" description="bed Height difference"/> + <facet name="sinfo_facet_flow_depth_development.filtered" description="flow depth development" /> + <facet name="sinfo_facet_flow_depth_development" description="flow depth development" /> - <facet name="sinfo_facet_flow_depth_current.filtered" description="flow depth current"/> - <facet name="sinfo_facet_flow_depth_current" description="flow depth current"/> - <facet name="sinfo_facet_flow_depth_historical.filtered" description="flow depth historical"/> - <facet name="sinfo_facet_flow_depth_historical" description="flow depth historical"/> + <facet name="sinfo_facet_waterlevel_difference.filtered" description="waterlevel difference" /> + <facet name="sinfo_facet_bedheight_difference.filtered" description="bed Height difference" /> - <facet name="longitudinal_section.annotations" description="facet.longitudinal_section.annotations"/> + <facet name="sinfo_facet_flow_depth_current.filtered" description="flow depth current" /> + <facet name="sinfo_facet_flow_depth_current" description="flow depth current" /> + <facet name="sinfo_facet_flow_depth_historical.filtered" description="flow depth historical" /> + <facet name="sinfo_facet_flow_depth_historical" description="flow depth historical" /> + + <facet name="longitudinal_section.annotations" description="facet.longitudinal_section.annotations" /> </facets> </outputmode> <outputmode name="sinfo_flow_depth_development_peryear" description="output.flow_depth_development_peryear" mime-type="image/png" type="chart"> <facets> - <facet name="sinfo_facet_flow_depth_development_per_year.filtered" description="flow depth development per year"/> - <facet name="sinfo_facet_flow_depth_development_per_year" description="flow depth development per year"/> + <facet name="sinfo_facet_flow_depth_development_per_year.filtered" description="flow depth development per year" /> + <facet name="sinfo_facet_flow_depth_development_per_year" description="flow depth development per year" /> - <facet name="longitudinal_section.annotations" description="facet.longitudinal_section.annotations"/> + <facet name="longitudinal_section.annotations" description="facet.longitudinal_section.annotations" /> </facets> </outputmode> <outputmode name="sinfo_flowdepthdevelopment_export" description="output.sinfo_flowdepthdevelopment_export" mime-type="text/plain" type="export"> <facets> - <facet name="csv" description="facet.sinfo_flowdepthdevelopment_export.csv"/> - <facet name="pdf" description="facet.sinfo_flowdepthdevelopment_export.pdf"/> + <facet name="csv" description="facet.sinfo_flowdepthdevelopment_export.csv" /> + <facet name="pdf" description="facet.sinfo_flowdepthdevelopment_export.pdf" /> </facets> </outputmode> <outputmode name="sinfo_flowdepthdevelopment_report" description="output.sinfo_flowdepthdevelopment_report" mime-type="text/xml" type="report"> <facets> - <facet name="report" description="facet.sinfo_flowdepthdevelopment_report"/> + <facet name="report" description="facet.sinfo_flowdepthdevelopment_report" /> </facets> </outputmode> </outputmodes> @@ -217,260 +218,256 @@ <!-- Calculation Mode: Grundberührungen --> - - <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.sinfo.calculation_mode"/> - <to state="state.sinfo.distance_only"/> - <condition data="calculation_mode" value="sinfo_calc_collision" operator="equal"/> - </transition> - - <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.sinfo.distance_only"/> - <to state="state.sinfo.year_epoch"/> - <condition data="calculation_mode" value="sinfo_calc_collision" operator="equal"/> - </transition> - - <state id="state.sinfo.year_epoch" description="state.sinfo.year_epoch" state="org.dive4elements.river.artifacts.sinfo.collision.YearChoice" helpText="help.state.sinfo.year"> - <data name="ye_select" type="String"/> - </state> - - - <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.sinfo.year_epoch"/> - <to state="state.sinfo.year_select"/> - <condition data="ye_select" value="state.sinfo.year" operator="equal"/> - </transition> - <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.sinfo.year_epoch"/> - <to state="state.sinfo.epoch_select"/> - <condition data="ye_select" value="state.sinfo.epoch" operator="equal"/> - </transition> - - - <state id="state.sinfo.year_select" description="state.minfo.sediment.load.sq_interval" - state="org.dive4elements.river.artifacts.states.minfo.SedimentLoadSQTiSelect" - helpText="help.state.minfo.sediment.load.sq_interval"> - <data name="sq_ti_id" type="Integer" /> - <data name="sq_ti_date" type="String" /> - </state> - - - <state id="state.sinfo.epoch_select" description="state.sinfo.year_epoch" state="org.dive4elements.river.artifacts.sinfo.collision.YearChoice" helpText="help.state.sinfo.year"> - <data name="ye_select" type="String"/> + <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> + <from state="state.sinfo.calculation_mode" /> + <to state="state.sinfo.distance_only" /> + <condition data="calculation_mode" value="sinfo_calc_collision" operator="equal" /> + </transition> + + <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> + <from state="state.sinfo.distance_only" /> + <to state="state.sinfo.year_epoch" /> + <condition data="calculation_mode" value="sinfo_calc_collision" operator="equal" /> + </transition> + + <state id="state.sinfo.year_epoch" description="state.sinfo.year_epoch" state="org.dive4elements.river.artifacts.sinfo.collision.YearChoice" helpText="help.state.sinfo.year"> + <data name="ye_select" type="String" /> </state> - - - - <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.sinfo.year_select"/> - <to state="state.sinfo.collision"/> - <condition data="calculation_mode" value="sinfo_calc_collision" operator="equal"/> + + + <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> + <from state="state.sinfo.year_epoch" /> + <to state="state.sinfo.load.year" /> + <condition data="ye_select" value="state.sinfo.year" operator="equal" /> </transition> - - <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.sinfo.epoch_select"/> - <to state="state.sinfo.collision"/> - <condition data="calculation_mode" value="sinfo_calc_collision" operator="equal"/> + + <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> + <from state="state.sinfo.year_epoch" /> + <to state="state.sinfo.load.epoch" /> + <condition data="ye_select" value="state.sinfo.epoch" operator="equal" /> </transition> - - - - - + + + + <state id="state.sinfo.load.year" description="state.sinfo.load.year" state="org.dive4elements.river.artifacts.sinfo.collision.LoadYearSelect" helpText="help.state.sinfo.load.year"> + <data name="years" type="String" /> + </state> + + <state id="state.sinfo.load.epoch" description="state.sinfo.load.epoch" state="org.dive4elements.river.artifacts.states.minfo.SedimentLoadEpochSelect" helpText="help.state.sinfo.load.epoch"> + <data name="epochs" type="String" /> + </state> + + + <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> + <from state="state.sinfo.load.year" /> + <to state="state.sinfo.collision" /> + <condition data="calculation_mode" value="sinfo_calc_collision" operator="equal" /> + </transition> + + <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> + <from state="state.sinfo.load.epoch" /> + <to state="state.sinfo.collision" /> + <condition data="calculation_mode" value="sinfo_calc_collision" operator="equal" /> + </transition> + + <state id="state.sinfo.collision" description="state.sinfo.collision" state="org.dive4elements.river.artifacts.sinfo.collision.CollisionState" helpText="help.state.sinfo.collision"> <outputmodes> <outputmode name="collision" description="output.collision" mime-type="image/png" type="chart"> <facets> - <!-- REMARK: id's that ends with 'filtered' are handled differently ' --> - <facet name="sinfo_facet_flow_depth.filtered" description="flow depth, filtered by current zoom state"/> - <facet name="sinfo_facet_flow_depth" description="flow depth"/> + <!-- REMARK: id's that ends with 'filtered' are handled differently + ' --> + <facet name="sinfo_facet_flow_depth.filtered" description="flow depth, filtered by current zoom state" /> + <facet name="sinfo_facet_flow_depth" description="flow depth" /> - <facet name="sinfo_facet_flow_depth_with_tkh.filtered" description="flow depth including tkh, filtered by current zoom state"/> - <facet name="sinfo_facet_flow_depth_with_tkh" description="flow depth including tkh"/> + <facet name="sinfo_facet_flow_depth_with_tkh.filtered" description="flow depth including tkh, filtered by current zoom state" /> + <facet name="sinfo_facet_flow_depth_with_tkh" description="flow depth including tkh" /> - <facet name="sinfo_facet_tkh" description="Facet for tkh"/> + <facet name="sinfo_facet_tkh" description="Facet for tkh" /> - <facet name="longitudinal_section.annotations" description="facet.longitudinal_section.annotations"/> + <facet name="longitudinal_section.annotations" description="facet.longitudinal_section.annotations" /> </facets> </outputmode> <outputmode name="sinfo_flowdepth_export" description="output.sinfo_flowdepth_export" mime-type="text/plain" type="export"> <facets> - <facet name="csv" description="facet.sinfo_flowdepth_export.csv"/> - <facet name="pdf" description="facet.sinfo_flowdepth_export.pdf"/> + <facet name="csv" description="facet.sinfo_flowdepth_export.csv" /> + <facet name="pdf" description="facet.sinfo_flowdepth_export.pdf" /> </facets> </outputmode> <outputmode name="sinfo_flowdepth_report" description="output.sinfo_flowdepth_report" mime-type="text/xml" type="report"> <facets> - <facet name="report" description="facet.sinfo_flowdepth_report"/> + <facet name="report" description="facet.sinfo_flowdepth_report" /> </facets> </outputmode> </outputmodes> </state> - - <!-- Calculation Mode: Überflutungsdauern Infrastrukturen BWaStr --> - <!-- Schrittweite benötigt für wq-state --> - <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.sinfo.calculation_mode"/> - <to state="state.sinfo.distance"/> - <condition data="calculation_mode" value="sinfo_calc_flood_duration" operator="equal"/> + + <!-- Calculation Mode: Überflutungsdauern Infrastrukturen BWaStr --> + <!-- Schrittweite benötigt für wq-state --> + <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> + <from state="state.sinfo.calculation_mode" /> + <to state="state.sinfo.distance" /> + <condition data="calculation_mode" value="sinfo_calc_flood_duration" operator="equal" /> </transition> - - <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.sinfo.distance"/> - <to state="state.sinfo.riverside"/> - <condition data="calculation_mode" value="sinfo_calc_flood_duration" operator="equal"/> + + <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> + <from state="state.sinfo.distance" /> + <to state="state.sinfo.riverside" /> + <condition data="calculation_mode" value="sinfo_calc_flood_duration" operator="equal" /> </transition> - + <state id="state.sinfo.riverside" description="state.sinfo.riverside" state="org.dive4elements.river.artifacts.sinfo.flood_duration.RiversideRadioChoice" helpText="help.state.sinfo.riverside"> - <data name="riverside" type="String"/> - </state> - - <state id="state.sinfo.wspl" description="state.sinfo.wspl" state="org.dive4elements.river.artifacts.sinfo.flood_duration.WsplChoice" helpText="help.state.sinfo.wspl"> - <data name="wspl" type="Boolean"/> + <data name="riverside" type="String" /> </state> - - <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.sinfo.riverside"/> - <to state="state.sinfo.wspl"/> - <condition data="calculation_mode" value="sinfo_calc_flood_duration" operator="equal"/> - </transition> - - - <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.sinfo.wspl"/> - <to state="state.sinfo.wq"/> - <condition data="wspl" value="true" operator="equal"/> + + <state id="state.sinfo.wspl" description="state.sinfo.wspl" state="org.dive4elements.river.artifacts.sinfo.flood_duration.WsplChoice" helpText="help.state.sinfo.wspl"> + <data name="wspl" type="Boolean" /> + </state> + + <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> + <from state="state.sinfo.riverside" /> + <to state="state.sinfo.wspl" /> + <condition data="calculation_mode" value="sinfo_calc_flood_duration" operator="equal" /> </transition> - + + <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.sinfo.wspl"/> - <to state="state.sinfo.flood_duration"/> - <condition data="wspl" value="false" operator="equal"/> + <from state="state.sinfo.wspl" /> + <to state="state.sinfo.wq" /> + <condition data="wspl" value="true" operator="equal" /> </transition> - + <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.sinfo.wq"/> - <to state="state.sinfo.flood_duration"/> - <condition data="calculation_mode" value="sinfo_calc_flood_duration" operator="equal"/> + <from state="state.sinfo.wspl" /> + <to state="state.sinfo.flood_duration" /> + <condition data="wspl" value="false" operator="equal" /> </transition> - - - + + <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> + <from state="state.sinfo.wq" /> + <to state="state.sinfo.flood_duration" /> + <condition data="calculation_mode" value="sinfo_calc_flood_duration" operator="equal" /> + </transition> + + + <state id="state.sinfo.flood_duration" description="state.sinfo.flood_duration" state="org.dive4elements.river.artifacts.sinfo.flood_duration.FloodDurationState" helpText="help.state.sinfo.flood_duration"> <outputmodes> <outputmode name="flood" description="output.flood" mime-type="image/png" type="chart"> <facets> - <!-- REMARK: id's that ends with 'filtered' are handled differently ' --> - <facet name="sinfo_facet_flow_depth.filtered" description="flow depth, filtered by current zoom state"/> - <facet name="sinfo_facet_flow_depth" description="flow depth"/> + <!-- REMARK: id's that ends with 'filtered' are handled differently + ' --> + <facet name="sinfo_facet_flow_depth.filtered" description="flow depth, filtered by current zoom state" /> + <facet name="sinfo_facet_flow_depth" description="flow depth" /> - <facet name="sinfo_facet_flow_depth_with_tkh.filtered" description="flow depth including tkh, filtered by current zoom state"/> - <facet name="sinfo_facet_flow_depth_with_tkh" description="flow depth including tkh"/> + <facet name="sinfo_facet_flow_depth_with_tkh.filtered" description="flow depth including tkh, filtered by current zoom state" /> + <facet name="sinfo_facet_flow_depth_with_tkh" description="flow depth including tkh" /> - <facet name="sinfo_facet_tkh" description="Facet for tkh"/> + <facet name="sinfo_facet_tkh" description="Facet for tkh" /> - <facet name="longitudinal_section.annotations" description="facet.longitudinal_section.annotations"/> + <facet name="longitudinal_section.annotations" description="facet.longitudinal_section.annotations" /> </facets> </outputmode> <outputmode name="sinfo_flowdepth_export" description="output.sinfo_flowdepth_export" mime-type="text/plain" type="export"> <facets> - <facet name="csv" description="facet.sinfo_flowdepth_export.csv"/> - <facet name="pdf" description="facet.sinfo_flowdepth_export.pdf"/> + <facet name="csv" description="facet.sinfo_flowdepth_export.csv" /> + <facet name="pdf" description="facet.sinfo_flowdepth_export.pdf" /> </facets> </outputmode> <outputmode name="sinfo_flowdepth_report" description="output.sinfo_flowdepth_report" mime-type="text/xml" type="report"> <facets> - <facet name="report" description="facet.sinfo_flowdepth_report"/> + <facet name="report" description="facet.sinfo_flowdepth_report" /> </facets> </outputmode> </outputmodes> </state> - - - - - - - - - - <!-- Calculation Mode: Transportkörperhöhen --> - <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.sinfo.calculation_mode"/> - <to state="state.sinfo.distance"/> - <condition data="calculation_mode" value="sinfo_calc_transport_bodies_heights" operator="equal"/> - </transition> - - <state id="state.sinfo.distance" description="state.sinfo.distance" state="org.dive4elements.river.artifacts.states.DistanceSelect" helpText="help.state.sinfo.distance"> - <data name="ld_from" type="Double"/> - <data name="ld_to" type="Double"/> - <data name="ld_step" type="Double"/> - </state> - + + + + + + + <!-- Calculation Mode: Transportkörperhöhen --> <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.sinfo.distance"/> - <to state="state.sinfo.wq"/> - <condition data="calculation_mode" value="sinfo_calc_transport_bodies_heights" operator="equal"/> + <from state="state.sinfo.calculation_mode" /> + <to state="state.sinfo.distance" /> + <condition data="calculation_mode" value="sinfo_calc_transport_bodies_heights" operator="equal" /> + </transition> + + <state id="state.sinfo.distance" description="state.sinfo.distance" state="org.dive4elements.river.artifacts.states.DistanceSelect" helpText="help.state.sinfo.distance"> + <data name="ld_from" type="Double" /> + <data name="ld_to" type="Double" /> + <data name="ld_step" type="Double" /> + </state> + + + + + <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> + <from state="state.sinfo.distance" /> + <to state="state.sinfo.wq" /> + <condition data="calculation_mode" value="sinfo_calc_transport_bodies_heights" operator="equal" /> </transition> <state id="state.sinfo.wq" description="state.sinfo.wq" state="org.dive4elements.river.artifacts.states.WQSelect" helpText="help.state.sinfo.wq"> - <data name="wq_isq" type="Boolean"/> - <data name="wq_isfree" type="Boolean"/> - <data name="wq_isrange" type="Boolean"/> - <data name="wq_from" type="Double"/> - <data name="wq_to" type="Double"/> - <data name="wq_step" type="Double"/> - <data name="wq_single" type="Double[]"/> + <data name="wq_isq" type="Boolean" /> + <data name="wq_isfree" type="Boolean" /> + <data name="wq_isrange" type="Boolean" /> + <data name="wq_from" type="Double" /> + <data name="wq_to" type="Double" /> + <data name="wq_step" type="Double" /> + <data name="wq_single" type="Double[]" /> </state> - + <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> - <from state="state.sinfo.wq"/> - <to state="state.sinfo.transport_bodies_heights"/> - <condition data="calculation_mode" value="sinfo_calc_transport_bodies_heights" operator="equal"/> + <from state="state.sinfo.wq" /> + <to state="state.sinfo.transport_bodies_heights" /> + <condition data="calculation_mode" value="sinfo_calc_transport_bodies_heights" operator="equal" /> </transition> - + <state id="state.sinfo.transport_bodies_heights" description="state.sinfo.transport_bodies_heights" state="org.dive4elements.river.artifacts.sinfo.tkhstate.TkhState" helpText="help.state.sinfo.transport_bodies_heights"> <outputmodes> <outputmode name="sinfo_tkk" description="output.tkk" mime-type="image/png" type="chart"> <facets> - <!-- REMARK: id's that ends with 'filtered' are handled differently ' --> + <!-- REMARK: id's that ends with 'filtered' are handled differently + ' --> <!-- FIXME: should be filtered according to spec --> - <facet name="sinfo_facet_tkh" description="Facet for tkh"/> - - <facet name="longitudinal_section.annotations" description="facet.longitudinal_section.annotations"/> + <facet name="sinfo_facet_tkh" description="Facet for tkh" /> - <facet name="sinfo_facet_flow_depth.filtered" description="mean flow depth"/> - <facet name="sinfo_facet_flow_depth" description="mean flow depth"/> - - <facet name="sinfo_facet_velocity" description="Velocity"/> - <facet name="sinfo_facet_d50" description="D50"/> - <facet name="sinfo_facet_tau" description="Tau"/> + <facet name="longitudinal_section.annotations" description="facet.longitudinal_section.annotations" /> + + <facet name="sinfo_facet_flow_depth.filtered" description="mean flow depth" /> + <facet name="sinfo_facet_flow_depth" description="mean flow depth" /> + + <facet name="sinfo_facet_velocity" description="Velocity" /> + <facet name="sinfo_facet_d50" description="D50" /> + <facet name="sinfo_facet_tau" description="Tau" /> </facets> </outputmode> - + <outputmode name="sinfo_tkh_export" description="output.sinfo_tkh_export" mime-type="text/plain" type="export"> <facets> - <facet name="csv" description="facet.sinfo_tkh_export.csv"/> - <facet name="pdf" description="facet.sinfo_tkh_export.pdf"/> + <facet name="csv" description="facet.sinfo_tkh_export.csv" /> + <facet name="pdf" description="facet.sinfo_tkh_export.pdf" /> </facets> </outputmode> <outputmode name="sinfo_tkh_report" description="output.sinfo_flowdepth_report" mime-type="text/xml" type="report"> <facets> - <facet name="report" description="facet.sinfo_tkh_report"/> + <facet name="report" description="facet.sinfo_tkh_report" /> </facets> - </outputmode> + </outputmode> </outputmodes> </state> </states>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/collision/CollisionLoadYearEpochAccess.java Fri May 04 16:13:10 2018 +0200 @@ -0,0 +1,34 @@ +/** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde + * Software engineering by + * Björnsen Beratende Ingenieure GmbH + * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt + * + * This file is Free Software under the GNU AGPL (>=v3) + * and comes with ABSOLUTELY NO WARRANTY! Check out the + * documentation coming with Dive4Elements River for details. + */ +package org.dive4elements.river.artifacts.sinfo.collision; + +import org.dive4elements.river.artifacts.D4EArtifact; +import org.dive4elements.river.artifacts.access.RangeAccess; + +/** + * @author Domenico Nardi Tironi + * + */ +public class CollisionLoadYearEpochAccess extends RangeAccess { + + private int[][] epochs; + + private int[] years; + + public CollisionLoadYearEpochAccess(final D4EArtifact artifact) { + // TODO Auto-generated constructor stub + } + + public int[] getYears() { + // TODO Auto-generated method stub + return null; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/collision/LoadYearSelect.java Fri May 04 16:13:10 2018 +0200 @@ -0,0 +1,46 @@ +/* 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.sinfo.collision; + +import org.apache.log4j.Logger; +import org.dive4elements.artifacts.Artifact; +import org.dive4elements.river.artifacts.D4EArtifact; +import org.dive4elements.river.artifacts.states.DefaultState; + +/** State in which to fetch years for sedminent load calculation. */ +public class LoadYearSelect extends DefaultState { + private static final long serialVersionUID = 1L; + /** The log used in this class. */ + private static Logger log = Logger.getLogger(LoadYearSelect.class); + + /** + * The default constructor that initializes an empty State object. + */ + public LoadYearSelect() { + } + + /** Year Select Widget. */ + @Override + protected String getUIProvider() { + return "minfo.sedimentload_year_select"; + } + + @Override + public boolean validate(final Artifact artifact) throws IllegalArgumentException { + final CollisionLoadYearEpochAccess access = new CollisionLoadYearEpochAccess((D4EArtifact) artifact); + + // Second year should be later than first. + if (access.getYears() == null || access.getYears().length == 0) + return true; // TODO: richtig in CollisionLoadYear... implementieren + // throw new IllegalArgumentException("error_years_wrong"); + + return true; + } +} +// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :
--- a/backend/src/main/java/org/dive4elements/river/backend/utils/DateGuesser.java Fri May 04 14:50:13 2018 +0200 +++ b/backend/src/main/java/org/dive4elements/river/backend/utils/DateGuesser.java Fri May 04 16:13:10 2018 +0200 @@ -13,6 +13,8 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; +import org.dive4elements.river.model.TimeInterval; + public final class DateGuesser { public static final String [] MONTH = { "jan", "feb", "mrz", "apr", "mai", "jun", @@ -250,11 +252,12 @@ final Calendar cal = Calendar.getInstance(); final String year = m.group(1); cal.clear(); - cal.set( - Integer.parseInt(year) + (year.length() == 2 ? 1900 : 0), - 5, // month - 15, // day - 12, 0, 0); + cal.set(Integer.parseInt(year) + (year.length() == 2 ? 1900 : 0), + TimeInterval.YEAR_ONLY_DATE.get(Calendar.MONTH), + TimeInterval.YEAR_ONLY_DATE.get(Calendar.DAY_OF_MONTH), + TimeInterval.YEAR_ONLY_DATE.get(Calendar.HOUR_OF_DAY), + TimeInterval.YEAR_ONLY_DATE.get(Calendar.MINUTE), + TimeInterval.YEAR_ONLY_DATE.get(Calendar.SECOND)); return cal.getTime(); }
--- a/backend/src/main/java/org/dive4elements/river/importer/common/AbstractKmLineImport.java Fri May 04 14:50:13 2018 +0200 +++ b/backend/src/main/java/org/dive4elements/river/importer/common/AbstractKmLineImport.java Fri May 04 16:13:10 2018 +0200 @@ -48,6 +48,9 @@ return this.storeMode; } + public double getStation() { + return this.station; + } /** * Gets the station value record from the database if existing, or creates a database record from this object and adds
--- a/backend/src/main/java/org/dive4elements/river/importer/common/AbstractParser.java Fri May 04 14:50:13 2018 +0200 +++ b/backend/src/main/java/org/dive4elements/river/importer/common/AbstractParser.java Fri May 04 16:13:10 2018 +0200 @@ -304,6 +304,27 @@ } /** + * Logs an info message, appending the relative file path + */ + protected void logInfo(final String message) { + getLog().info(message + ";" + this.rootRelativePath); + } + + /** + * Logs a debug message, appending the relative file path + */ + protected void logDebug(final String message) { + getLog().debug(message + ";" + this.rootRelativePath); + } + + /** + * Logs a trace message, appending the relative file path + */ + protected void logTrace(final String message) { + getLog().trace(message + ";" + this.rootRelativePath); + } + + /** * Creates a new series import object */ protected abstract HEADER createSeriesImport(final String filename);
--- a/backend/src/main/java/org/dive4elements/river/importer/sinfo/parsers/InfrastructureParser.java Fri May 04 14:50:13 2018 +0200 +++ b/backend/src/main/java/org/dive4elements/river/importer/sinfo/parsers/InfrastructureParser.java Fri May 04 16:13:10 2018 +0200 @@ -111,7 +111,7 @@ @Override protected KmMode kmMode() { - return KmMode.NONE; + return KmMode.DUPLICATES; } @Override @@ -205,9 +205,12 @@ logError("Invalid height value in line " + this.in.getLineNumber()); return null; } - if ((this.bankColIndex >= 0) && this.bankAttributes.containsKey(values[this.bankColIndex].trim().toLowerCase())) - return new InfrastructureKmLineImport(km, parseDoubleWithNull(values[this.heightColIndex]).doubleValue(), + if ((this.bankColIndex >= 0) && this.bankAttributes.containsKey(values[this.bankColIndex].trim().toLowerCase())) { + final InfrastructureKmLineImport kmLine = new InfrastructureKmLineImport(km, parseDoubleWithNull(values[this.heightColIndex]).doubleValue(), this.bankAttributes.get(values[this.bankColIndex].trim().toLowerCase())); + logTrace("createKmLineImport(" + km.toString() + ") => " + kmLine.getStation()); + return kmLine; + } else { logError("Invalid bank value in line " + this.in.getLineNumber()); return null;
--- a/backend/src/main/java/org/dive4elements/river/model/TimeInterval.java Fri May 04 14:50:13 2018 +0200 +++ b/backend/src/main/java/org/dive4elements/river/model/TimeInterval.java Fri May 04 16:13:10 2018 +0200 @@ -9,22 +9,33 @@ package org.dive4elements.river.model; import java.io.Serializable; - +import java.util.Calendar; import java.util.Date; +import javax.persistence.Column; import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; import javax.persistence.Id; +import javax.persistence.SequenceGenerator; import javax.persistence.Table; -import javax.persistence.GeneratedValue; -import javax.persistence.Column; -import javax.persistence.SequenceGenerator; -import javax.persistence.GenerationType; @Entity @Table(name = "time_intervals") public class TimeInterval implements Serializable { + /** + * Pseudo-date for Date values where only the year field is significant + * (in Flys 3.2.1 June-15 12:00 had been used) + */ + public final static Calendar YEAR_ONLY_DATE; + static { + YEAR_ONLY_DATE = Calendar.getInstance(); + YEAR_ONLY_DATE.clear(); + YEAR_ONLY_DATE.set(0, Calendar.DECEMBER, 31, 3, 5, 6); + } + private Integer id; private Date startTime; private Date stopTime; @@ -32,43 +43,43 @@ public TimeInterval() { } - public TimeInterval(Date startTime, Date stopTime) { + public TimeInterval(final Date startTime, final Date stopTime) { this.startTime = startTime; this.stopTime = stopTime; } @Id @SequenceGenerator( - name = "SEQUENCE_TIME_INTERVALS_ID_SEQ", - sequenceName = "TIME_INTERVALS_ID_SEQ", - allocationSize = 1) + name = "SEQUENCE_TIME_INTERVALS_ID_SEQ", + sequenceName = "TIME_INTERVALS_ID_SEQ", + allocationSize = 1) @GeneratedValue( - strategy = GenerationType.SEQUENCE, - generator = "SEQUENCE_TIME_INTERVALS_ID_SEQ") + strategy = GenerationType.SEQUENCE, + generator = "SEQUENCE_TIME_INTERVALS_ID_SEQ") @Column(name = "id") public Integer getId() { - return id; + return this.id; } - public void setId(Integer id) { + public void setId(final Integer id) { this.id = id; } @Column(name = "start_time") // FIXME: type mapping needed? public Date getStartTime() { - return startTime; + return this.startTime; } - public void setStartTime(Date startTime) { + public void setStartTime(final Date startTime) { this.startTime = startTime; } @Column(name = "stop_time") // FIXME: type mapping needed? public Date getStopTime() { - return stopTime; + return this.stopTime; } - public void setStopTime(Date stopTime) { + public void setStopTime(final Date stopTime) { this.stopTime = stopTime; } }