Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/LoadSingleYearSelectState.java @ 9321:a978b601a034
Salix: Fixed ArrrayoutOfBoundsException; minor cleanup
author | gernotbelger |
---|---|
date | Fri, 27 Jul 2018 10:25:09 +0200 |
parents | f5cff8708531 |
children |
comparison
equal
deleted
inserted
replaced
9320:61e6d158a20f | 9321:a978b601a034 |
---|---|
8 | 8 |
9 package org.dive4elements.river.artifacts.uinfo.salix; | 9 package org.dive4elements.river.artifacts.uinfo.salix; |
10 | 10 |
11 import java.util.List; | 11 import java.util.List; |
12 | 12 |
13 import org.apache.log4j.Logger; | |
14 import org.dive4elements.artifacts.Artifact; | 13 import org.dive4elements.artifacts.Artifact; |
15 import org.dive4elements.artifacts.CallContext; | 14 import org.dive4elements.artifacts.CallContext; |
16 import org.dive4elements.artifacts.common.utils.XMLUtils.ElementCreator; | 15 import org.dive4elements.artifacts.common.utils.XMLUtils.ElementCreator; |
17 import org.dive4elements.river.artifacts.states.DefaultState; | 16 import org.dive4elements.river.artifacts.states.DefaultState; |
18 import org.dive4elements.river.artifacts.uinfo.UINFOArtifact; | 17 import org.dive4elements.river.artifacts.uinfo.UINFOArtifact; |
19 import org.dive4elements.river.model.BedHeight; | 18 import org.dive4elements.river.model.BedHeight; |
20 import org.w3c.dom.Element; | 19 import org.w3c.dom.Element; |
21 | 20 |
22 /** State in which to fetch years for sedminent load calculation. */ | 21 /** State in which to fetch years for sedminent load calculation. */ |
23 public class LoadSingleYearSelectState extends DefaultState { | 22 public class LoadSingleYearSelectState extends DefaultState { |
23 | |
24 private static final long serialVersionUID = 1L; | 24 private static final long serialVersionUID = 1L; |
25 /** The log used in this class. */ | |
26 private static Logger log = Logger.getLogger(LoadSingleYearSelectState.class); | |
27 | 25 |
28 /** | 26 /** |
29 * The default constructor that initializes an empty State object. | 27 * The default constructor that initializes an empty State object. |
30 */ | 28 */ |
31 public LoadSingleYearSelectState() { | 29 public LoadSingleYearSelectState() { |
43 final String dataKeyofState = "singleyear";// siehe .xml | 41 final String dataKeyofState = "singleyear";// siehe .xml |
44 try { | 42 try { |
45 if (dataKeyofState.equals(name)) { | 43 if (dataKeyofState.equals(name)) { |
46 final SalixLineAccess access = new SalixLineAccess((UINFOArtifact) artifact); | 44 final SalixLineAccess access = new SalixLineAccess((UINFOArtifact) artifact); |
47 final List<BedHeight> bhs = BedHeight.getBedHeightYear(access.getRiver(), access.getLowerKm(), access.getUpperKm()); | 45 final List<BedHeight> bhs = BedHeight.getBedHeightYear(access.getRiver(), access.getLowerKm(), access.getUpperKm()); |
48 LoadSingleEpochSelectState.makeDataSourceYearEpoch(artifact, creator, select, context, bhs); | 46 LoadSingleEpochSelectState.makeDataSourceYearEpoch(creator, select, context, bhs); |
49 } | 47 } |
50 } | 48 } |
51 catch ( | 49 catch ( |
52 | 50 |
53 final IllegalArgumentException iae) { | 51 final IllegalArgumentException iae) { |
54 iae.printStackTrace(); | 52 iae.printStackTrace(); |
55 } | 53 } |
56 | |
57 } | 54 } |
58 } | 55 } |
59 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |