# HG changeset patch # User gernotbelger # Date 1526555172 -7200 # Node ID cd650cacc926ff1141d5332a75146657fe6cd506 # Parent 02739b8c010da87bc054d47a94ef6606d6ec463a work on bundu.bezugswst states diff -r 02739b8c010d -r cd650cacc926 artifacts/doc/conf/artifacts/bundu.xml --- a/artifacts/doc/conf/artifacts/bundu.xml Wed May 16 17:43:47 2018 +0200 +++ b/artifacts/doc/conf/artifacts/bundu.xml Thu May 17 13:06:12 2018 +0200 @@ -324,8 +324,31 @@ - - + + + + + + + + + + + + + + + + + + + + diff -r 02739b8c010d -r cd650cacc926 artifacts/doc/conf/artifacts/sinfo.xml --- a/artifacts/doc/conf/artifacts/sinfo.xml Wed May 16 17:43:47 2018 +0200 +++ b/artifacts/doc/conf/artifacts/sinfo.xml Thu May 17 13:06:12 2018 +0200 @@ -250,11 +250,11 @@ - + - + diff -r 02739b8c010d -r cd650cacc926 artifacts/doc/conf/artifacts/uinfo.xml --- a/artifacts/doc/conf/artifacts/uinfo.xml Wed May 16 17:43:47 2018 +0200 +++ b/artifacts/doc/conf/artifacts/uinfo.xml Thu May 17 13:06:12 2018 +0200 @@ -142,7 +142,7 @@ - + diff -r 02739b8c010d -r cd650cacc926 artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/FixationChoice.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/FixationChoice.java Thu May 17 13:06:12 2018 +0200 @@ -0,0 +1,34 @@ +/* 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.bundu.bezugswst; + +import java.util.ArrayList; +import java.util.List; + +import org.dive4elements.river.artifacts.states.RadioSelect; + +/** + * @author Ingo Weinzierl + */ +public class FixationChoice extends RadioSelect { + private static final long serialVersionUID = 1L; + + public FixationChoice() { + super(); + } + + @Override + protected List makeEntries() { + final List entries = new ArrayList<>(); + entries.add("state.bundu.fix.auto"); + entries.add("state.bundu.fix.manual"); + return entries; + + } +} \ No newline at end of file diff -r 02739b8c010d -r cd650cacc926 artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/collision/LoadEpochSelect.java --- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/collision/LoadEpochSelect.java Wed May 16 17:43:47 2018 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU AGPL (>=v3) - * and comes with ABSOLUTELY NO WARRANTY! Check out the - * documentation coming with Dive4Elements River for details. - */ - -package org.dive4elements.river.artifacts.sinfo.collision; - -import org.apache.log4j.Logger; -import org.dive4elements.river.artifacts.states.DefaultState; - -public class LoadEpochSelect extends DefaultState { - /** The log used in this class. */ - private static Logger log = Logger.getLogger(LoadEpochSelect.class); - - /** - * The default constructor that initializes an empty State object. - */ - public LoadEpochSelect() { - } - - @Override - protected String getUIProvider() { - return "sinfo.collision.load_epoch_select"; - } -} diff -r 02739b8c010d -r cd650cacc926 artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/collision/LoadMultipleEpochSelectState.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/collision/LoadMultipleEpochSelectState.java Thu May 17 13:06:12 2018 +0200 @@ -0,0 +1,28 @@ +/* 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.river.artifacts.states.DefaultState; + +public class LoadMultipleEpochSelectState extends DefaultState { + /** The log used in this class. */ + private static Logger log = Logger.getLogger(LoadMultipleEpochSelectState.class); + + /** + * The default constructor that initializes an empty State object. + */ + public LoadMultipleEpochSelectState() { + } + + @Override + protected String getUIProvider() { + return "sinfo.collision.load_epoch_select"; + } +} diff -r 02739b8c010d -r cd650cacc926 artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/collision/LoadMultipleYearSelectState.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/collision/LoadMultipleYearSelectState.java Thu May 17 13:06:12 2018 +0200 @@ -0,0 +1,49 @@ +/* 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.sinfo.SINFOArtifact; +import org.dive4elements.river.artifacts.states.DefaultState; + +/** State in which to fetch years for sedminent load calculation. */ +public class LoadMultipleYearSelectState extends DefaultState { + private static final long serialVersionUID = 1L; + /** The log used in this class. */ + private static Logger log = Logger.getLogger(LoadMultipleYearSelectState.class); + + /** + * The default constructor that initializes an empty State object. + */ + public LoadMultipleYearSelectState() { + } + + /** Year Select Widget. */ + @Override + protected String getUIProvider() { + return "minfo.sedimentload_year_select"; // TODO: eigenes Panel oder allgemeineren Code + } + + @Override + public boolean validate(final Artifact artifact) throws IllegalArgumentException { + // TODO: check verstehen + + final CollisionAccess access = new CollisionAccess((SINFOArtifact) artifact); + + // Second year should be later than first. + + if (access.getYears() == null || access.getYears().length == 0) + return true; + // throw new IllegalArgumentException("error_years_wrong"); + + return true; + } +} +// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : diff -r 02739b8c010d -r cd650cacc926 artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/collision/LoadYearSelect.java --- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/collision/LoadYearSelect.java Wed May 16 17:43:47 2018 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU AGPL (>=v3) - * and comes with ABSOLUTELY NO WARRANTY! Check out the - * documentation coming with Dive4Elements River for details. - */ - -package org.dive4elements.river.artifacts.sinfo.collision; - -import org.apache.log4j.Logger; -import org.dive4elements.artifacts.Artifact; -import org.dive4elements.river.artifacts.sinfo.SINFOArtifact; -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"; // TODO: eigenes Panel oder allgemeineren Code - } - - @Override - public boolean validate(final Artifact artifact) throws IllegalArgumentException { - // TODO: check verstehen - - final CollisionAccess access = new CollisionAccess((SINFOArtifact) artifact); - - // Second year should be later than first. - - if (access.getYears() == null || access.getYears().length == 0) - return true; - // throw new IllegalArgumentException("error_years_wrong"); - - return true; - } -} -// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : diff -r 02739b8c010d -r cd650cacc926 artifacts/src/main/java/org/dive4elements/river/artifacts/states/LoadSingleYearSelectState.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/LoadSingleYearSelectState.java Thu May 17 13:06:12 2018 +0200 @@ -0,0 +1,45 @@ +/* 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.states; + +import org.apache.log4j.Logger; +import org.dive4elements.artifacts.Artifact; + +/** State in which to fetch years for sedminent load calculation. */ +public class LoadSingleYearSelectState extends DefaultState { + private static final long serialVersionUID = 1L; + /** The log used in this class. */ + private static Logger log = Logger.getLogger(LoadSingleYearSelectState.class); + + /** + * The default constructor that initializes an empty State object. + */ + public LoadSingleYearSelectState() { + } + + /** Year Select Widget. */ + @Override + protected String getUIProvider() { + return "common.state.load_single_year_select"; + } + + @Override + public boolean validate(final Artifact artifact) throws IllegalArgumentException { + return true; + // 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 : diff -r 02739b8c010d -r cd650cacc926 artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/inundationduration/LoadYearSelect.java --- a/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/inundationduration/LoadYearSelect.java Wed May 16 17:43:47 2018 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde - * Software engineering by Intevation GmbH - * - * This file is Free Software under the GNU AGPL (>=v3) - * and comes with ABSOLUTELY NO WARRANTY! Check out the - * documentation coming with Dive4Elements River for details. - */ - -package org.dive4elements.river.artifacts.uinfo.inundationduration; - -import org.apache.log4j.Logger; -import org.dive4elements.artifacts.Artifact; -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 "uinfo.inundationduration.load_year_select"; - } - - @Override - public boolean validate(final Artifact artifact) throws IllegalArgumentException { - return true; - // 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 : diff -r 02739b8c010d -r cd650cacc926 artifacts/src/main/resources/messages.properties --- a/artifacts/src/main/resources/messages.properties Wed May 16 17:43:47 2018 +0200 +++ b/artifacts/src/main/resources/messages.properties Thu May 17 13:06:12 2018 +0200 @@ -1100,6 +1100,9 @@ state.bundu.vollmer.preprocessing = Outliers state.bundu.vollmer.qs = Input for W/Q data state.bundu.yearselect = Bezugsjahr +state.bundu.fix.auto = Automatische Auswahl +state.bundu.fix.manual = Manuelle Auswahl +state.bundu.fixationchoice = Fixierungen help.state.bundu.river=${help.url}/OnlineHilfe/bunduierungsanalyse#help.state.bundu.river help.state.bundu.calculation.mode=${help.url}/OnlineHilfe/bunduierungsanalyse#help.state.bundu.calculation.mode diff -r 02739b8c010d -r cd650cacc926 artifacts/src/main/resources/messages_de.properties --- a/artifacts/src/main/resources/messages_de.properties Wed May 16 17:43:47 2018 +0200 +++ b/artifacts/src/main/resources/messages_de.properties Thu May 17 13:06:12 2018 +0200 @@ -1100,6 +1100,9 @@ state.bundu.vollmer.preprocessing = Ausrei\u00dfer state.bundu.vollmer.qs = Eingabe f\u00fcr W/Q Daten state.bundu.yearselect = Bezugsjahr +state.bundu.fix.auto = Automatische Auswahl +state.bundu.fix.manual = Manuelle Auswahl +state.bundu.fixationchoice = Fixierungen help.state.bundu.river=${help.url}/OnlineHilfe/bunduierungsanalyse#help.state.bundu.river help.state.bundu.calculation.mode=${help.url}/OnlineHilfe/bunduierungsanalyse#help.state.bundu.calculation.mode diff -r 02739b8c010d -r cd650cacc926 gwt-client/src/main/java/org/dive4elements/river/client/client/ui/UIProviderFactory.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/UIProviderFactory.java Wed May 16 17:43:47 2018 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/UIProviderFactory.java Thu May 17 13:06:12 2018 +0200 @@ -135,7 +135,7 @@ } else if (uiProvider.equals("parameter-matrix")) { return new ParameterMatrixPanel(); } else if (uiProvider.equals("minfo.bed.year_epoch")) { - return new RadioPanel(); + return new RadioPanel(); // legacy } else if (uiProvider.equals("radio_panel")) { return new RadioPanel(); } else if (uiProvider.equals("bedquality_periods_select")) { @@ -158,7 +158,7 @@ return new CollisionLoadEpochPanel(); } else if (uiProvider.equals("uinfo.inundation_duration.load_epoch_select")) { return new InundationDurLoadEpochPanel(); - } else if (uiProvider.equals("uinfo.inundationduration.load_year_select")) { + } else if (uiProvider.equals("common.state.load_single_year_select")) { return new LoadSingleYearPanel(); } else if (uiProvider.equals("uinfo.inundationduration.load_totalepoch_select")) { return new LoadSingleEpochPanel(); diff -r 02739b8c010d -r cd650cacc926 gwt-client/src/main/java/org/dive4elements/river/client/shared/model/BUNDUArtifact.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/shared/model/BUNDUArtifact.java Wed May 16 17:43:47 2018 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/shared/model/BUNDUArtifact.java Thu May 17 13:06:12 2018 +0200 @@ -42,5 +42,4 @@ return "state.bundu.eventselect"; // mit bundu.xml im server synchron halten :-( } -} -// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : +} \ No newline at end of file