Mercurial > dive4elements > river
diff artifacts/src/main/java/org/dive4elements/river/artifacts/states/WQFixing.java @ 6060:0a200ba54461
Fix WQ input validation for fixing analysis
It is basically the same as the other WQ inputs but here all
positive numbers are valid.
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Wed, 22 May 2013 17:08:06 +0200 |
parents | |
children | 1a169e10c0f3 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WQFixing.java Wed May 22 17:08:06 2013 +0200 @@ -0,0 +1,37 @@ +/* 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.dive4elements.artifacts.Artifact; + +import org.apache.log4j.Logger; + +/** + * State to input W/Q data for fixings + * @author <a href="mailto:aheinecke@intevation.de">Andre Heinecke</a> + */ +public class WQFixing extends WQAdapted { + + /** The logger used in this state.*/ + private static Logger logger = Logger.getLogger(WQFixing.class); + + @Override + public boolean validate(Artifact artifact) + throws IllegalArgumentException + { + logger.debug("WQFixing.validate"); + // A check for positive values is already done by the client + // all positive values are valid + return true; + } + + @Override + protected String getUIProvider() { + return "wq_panel_adapted_fixing"; + } +}