Mercurial > dive4elements > river
changeset 8995:8c3e5682cb60
Introduced UNFO module
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/artifacts/doc/conf/artifacts/uinfo.xml Thu Apr 12 19:11:11 2018 +0200 @@ -0,0 +1,163 @@ +<?xml version="1.0" encoding="UTF-8"?> +<artifact name="uinfo"> + + <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" /> + </state> + + <transition + transition="org.dive4elements.river.artifacts.transitions.DefaultTransition"> + <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" /> + </state> + + + + + + <!-- Calculation Mode: Salix Linie --> + <transition + transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition"> + <from state="state.uinfo.calculation_mode" /> + <to state="state.uinfo.salix_line" /> + <condition data="calculation_mode" value="uinfo_salix_line" + operator="equal" /> + <to state="state.sinfo.distance_only" /> <!-- TODO: KLONEN und U-Info daraus machen --> + </transition> + + <state id="state.uinfo.salix_line" + description="state.uinfo.salix_line" + state="org.dive4elements.river.artifacts.uinfo.salix.SalixLineState" + helpText="help.state.uinfo.salix_line"> + <outputmodes> + + <!-- 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> + + <!-- FIXME: i01n name in FLYSConstants --> + <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" /> + </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.vegetation_zones" /> + <condition data="calculation_mode" + value="uinfo_vegetation_zones" operator="equal" /> + <to state="state.sinfo.distance_only" /> <!-- TODO: KLONEN und U-Info daraus machen --> + </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" /> + </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" /> + </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.inundation_duration" /> + <condition data="calculation_mode" + value="uinfo_inundation_duration" operator="equal" /> + <to state="state.sinfo.distance_only" /> <!-- TODO: KLONEN und U-Info daraus machen --> + </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"> + <outputmodes> + + <!-- 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="csv" + description="facet.uinfo_inundation_duration_export.csv" /> + <facet name="pdf" + description="facet.uinfo_inundation_duration_export.pdf" /> + </facets> + </outputmode> + + <!-- FIXME: i01n name in FLYSConstants --> + <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" /> + </facets> + </outputmode> + </outputmodes> + </state> + + </states> +</artifact> \ No newline at end of file
--- a/artifacts/doc/conf/conf.xml Wed Apr 11 14:20:01 2018 +0200 +++ b/artifacts/doc/conf/conf.xml Thu Apr 12 19:11:11 2018 +0200 @@ -24,6 +24,7 @@ <!ENTITY discharge-defaults SYSTEM "generators/discharge-diagram-defaults.xml"> <!ENTITY sinfo_artifact SYSTEM "artifacts/sinfo.xml"> + <!ENTITY uinfo_artifact SYSTEM "artifacts/uinfo.xml"> ]> <artifact-database> <export-secret>YOUR_SECRET</export-secret> @@ -175,6 +176,10 @@ <artifact-factory name="sinfo" description="Factory to create an artifact to be used in module sinfo." ttl="3600000" artifact="org.dive4elements.river.artifacts.sinfo.SINFOArtifact">org.dive4elements.artifactdatabase.DefaultArtifactFactory</artifact-factory> + <!-- UINFO specific Artifacts --> + <artifact-factory name="uinfo" description="Factory to create an artifact to be used in module uinfo." + ttl="3600000" + artifact="org.dive4elements.river.artifacts.uinfo.UINFOArtifact">org.dive4elements.artifactdatabase.DefaultArtifactFactory</artifact-factory> </artifact-factories> @@ -309,6 +314,7 @@ &sedimentload-ls-artifact; &sinfo_artifact; + &uinfo_artifact; </artifacts> &modules;
--- a/artifacts/doc/conf/modules.xml Wed Apr 11 14:20:01 2018 +0200 +++ b/artifacts/doc/conf/modules.xml Thu Apr 12 19:11:11 2018 +0200 @@ -9,6 +9,9 @@ <module name="minfo" group="module.group.ingwerds"> <river name="Beispielfluss"/> </module> + <module name="uinfo" group="module.group.ingwerds"> + <river name="Beispielfluss"/> + </module> <module name="new_map" group="module.group.bottom"> <river name="Beispielfluss"/> </module>
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java Wed Apr 11 14:20:01 2018 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java Thu Apr 12 19:11:11 2018 +0200 @@ -1485,4 +1485,12 @@ String sinfo_additional_ls_withQ(); String sinfo_additional_ls_withoutQ(); + + String uinfo(); + + String uinfo_salix_line_export(); + + String uinfo_vegetation_zones_export(); + + String uinfo_inundation_duration_export(); } \ No newline at end of file
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties Wed Apr 11 14:20:01 2018 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties Thu Apr 12 19:11:11 2018 +0200 @@ -790,4 +790,9 @@ sinfo_additional_ls = Selektierte zus. L\u00e4ngsschnitte sinfo_additional_ls_withQ = mit Abfluss -sinfo_additional_ls_withoutQ = ohne Abfluss \ No newline at end of file +sinfo_additional_ls_withoutQ = ohne Abfluss + +uinfo = U-INFO +uinfo_inundation_duration_export = \u00dcberflutungsdauern Export +uinfo_salix_line_export = Salix-Linie Export +uinfo_vegetation_zones_export = Vegetationszonen Export \ No newline at end of file
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties Wed Apr 11 14:20:01 2018 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties Thu Apr 12 19:11:11 2018 +0200 @@ -790,4 +790,9 @@ sinfo_additional_ls = Selektierte zus. L\u00e4ngsschnitte sinfo_additional_ls_withQ = mit Abfluss -sinfo_additional_ls_withoutQ = ohne Abfluss \ No newline at end of file +sinfo_additional_ls_withoutQ = ohne Abfluss + +uinfo = U-INFO +uinfo_inundation_duration_export = \u00dcberflutungsdauern Export +uinfo_salix_line_export = Salix-Linie Export +uinfo_vegetation_zones_export = Vegetationszonen Export \ No newline at end of file
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/ParameterList.java Wed Apr 11 14:20:01 2018 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/ParameterList.java Thu Apr 12 19:11:11 2018 +0200 @@ -66,6 +66,7 @@ import org.dive4elements.river.client.shared.model.ReportMode; import org.dive4elements.river.client.shared.model.River; import org.dive4elements.river.client.shared.model.SINFOArtifact; +import org.dive4elements.river.client.shared.model.UINFOArtifact; import org.dive4elements.river.client.shared.model.WINFOArtifact; import java.util.ArrayList; @@ -775,6 +776,7 @@ // FIXME: we got a whole artifact framework to separate ui and backend stuff, but in the end.... we have switches over specific datatypes here... if (art instanceof WINFOArtifact || art instanceof SINFOArtifact + || art instanceof UINFOArtifact || art instanceof FixAnalysisArtifact) { createGaugePanel(); renderInfo(desc.getRiver(), desc.getOldData());
--- a/gwt-client/src/main/java/org/dive4elements/river/client/server/FLYSArtifactCreator.java Wed Apr 11 14:20:01 2018 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/FLYSArtifactCreator.java Thu Apr 12 19:11:11 2018 +0200 @@ -34,6 +34,7 @@ import org.dive4elements.river.client.shared.model.SINFOArtifact; import org.dive4elements.river.client.shared.model.MINFOArtifact; import org.dive4elements.river.client.shared.model.StaticSQRelationArtifact; +import org.dive4elements.river.client.shared.model.UINFOArtifact; import org.dive4elements.river.client.shared.model.WINFOArtifact; @@ -176,6 +177,11 @@ return new SINFOArtifact(uuid, hash, background, msg); } + if (name.equals("uinfo")) { + log.debug("+++++ NEW UINFO ARTIFACT."); + return new UINFOArtifact(uuid, hash, background, msg); + } + return new DefaultArtifact(uuid, hash, background, msg); }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/shared/model/UINFOArtifact.java Thu Apr 12 19:11:11 2018 +0200 @@ -0,0 +1,42 @@ +/* Copyright (C) 2017 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.client.shared.model; + +import java.util.List; + + +/** + * The UINFO implementation of an Artifact. + * + * @author Gernot Belger + */ +public class UINFOArtifact extends DefaultArtifact { + + /** The name of this artifact: 'uinfo'.*/ + private static final String NAME = "uinfo"; + + /** Necessary for serialization */ + public UINFOArtifact() { + } + + public UINFOArtifact( + String uuid, + String hash, + boolean inBackground, + List<CalculationMessage> messages + ) { + super(uuid, hash, inBackground, messages); + } + + + public String getName() { + return NAME; + } +} +// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/gwt-client/src/main/webapp/WEB-INF/features.xml Wed Apr 11 14:20:01 2018 +0200 +++ b/gwt-client/src/main/webapp/WEB-INF/features.xml Thu Apr 12 19:11:11 2018 +0200 @@ -4,6 +4,7 @@ <ftr:feature>module:sinfo</ftr:feature> <ftr:feature>module:winfo</ftr:feature> <ftr:feature>module:minfo</ftr:feature> + <ftr:feature>module:uinfo</ftr:feature> <ftr:feature>module:new_map</ftr:feature> <ftr:feature>module:new_chart</ftr:feature> <ftr:feature>module:fixanalysis</ftr:feature>