9063
|
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde |
|
2 * Software engineering by Intevation GmbH |
|
3 * |
|
4 * This file is Free Software under the GNU AGPL (>=v3) |
|
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the |
|
6 * documentation coming with Dive4Elements River for details. |
|
7 */ |
|
8 |
|
9 package org.dive4elements.river.artifacts.uinfo.inundationduration; |
|
10 |
|
11 import org.apache.log4j.Logger; |
|
12 import org.dive4elements.artifacts.Artifact; |
|
13 import org.dive4elements.river.artifacts.states.DefaultState; |
|
14 |
|
15 /** State in which to fetch years for sedminent load calculation. */ |
|
16 public class LoadScenarioSelect extends DefaultState { |
|
17 private static final long serialVersionUID = 1L; |
|
18 /** The log used in this class. */ |
|
19 private static Logger log = Logger.getLogger(LoadScenarioSelect.class); |
|
20 |
|
21 /** |
|
22 * The default constructor that initializes an empty State object. |
|
23 */ |
|
24 public LoadScenarioSelect() { |
|
25 } |
|
26 |
|
27 /** Year Select Widget. */ |
|
28 @Override |
|
29 protected String getUIProvider() { |
|
30 return "minfo.sedimentload_year_select"; // TODO: eigenes Panel oder allgemeineren Code und an SCENARIO AUS DB ANPASSEN! |
|
31 } |
|
32 |
|
33 @Override |
|
34 public boolean validate(final Artifact artifact) throws IllegalArgumentException { |
|
35 return true; |
|
36 // final CollisionLoadYearEpochAccess access = new CollisionLoadYearEpochAccess((D4EArtifact) artifact); |
|
37 // |
|
38 // // Second year should be later than first. |
|
39 // if (access.getYears() == null || access.getYears().length == 0) |
|
40 // return true; // TODO: richtig in CollisionLoadYear... implementieren |
|
41 // // throw new IllegalArgumentException("error_years_wrong"); |
|
42 // |
|
43 // return true; |
|
44 } |
|
45 } |
|
46 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |