Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/states/DischargeState.java @ 5867:59ff03ff48f1
River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Sun, 28 Apr 2013 15:23:01 +0200 |
parents | 73da40528cf2 |
children | af13ceeba52a |
comparison
equal
deleted
inserted
replaced
5866:9a6741ccf6d4 | 5867:59ff03ff48f1 |
---|---|
18 import org.dive4elements.artifacts.common.model.KVP; | 18 import org.dive4elements.artifacts.common.model.KVP; |
19 | 19 |
20 import org.dive4elements.river.model.DischargeZone; | 20 import org.dive4elements.river.model.DischargeZone; |
21 import org.dive4elements.river.model.River; | 21 import org.dive4elements.river.model.River; |
22 | 22 |
23 import org.dive4elements.river.artifacts.FLYSArtifact; | 23 import org.dive4elements.river.artifacts.D4EArtifact; |
24 import org.dive4elements.river.utils.RiverUtils; | 24 import org.dive4elements.river.utils.RiverUtils; |
25 | 25 |
26 | 26 |
27 public class DischargeState extends MultiIntArrayState { | 27 public class DischargeState extends MultiIntArrayState { |
28 | 28 |
44 * This method fetches all DischargeZones for a given river (extracted from | 44 * This method fetches all DischargeZones for a given river (extracted from |
45 * <i>artifact</i>) and returns a KVP[] where the key is the ID of the | 45 * <i>artifact</i>) and returns a KVP[] where the key is the ID of the |
46 * DischargeZone and the value is a string that consists of lower discharge | 46 * DischargeZone and the value is a string that consists of lower discharge |
47 * and upper discharge. | 47 * and upper discharge. |
48 * | 48 * |
49 * @param artifact Needs to be a FLYSArtifact that provides river | 49 * @param artifact Needs to be a D4EArtifact that provides river |
50 * information. | 50 * information. |
51 * @param parameterName The name of a parameter. | 51 * @param parameterName The name of a parameter. |
52 * | 52 * |
53 * @return a KVP[]. | 53 * @return a KVP[]. |
54 */ | 54 */ |
141 | 141 |
142 /** | 142 /** |
143 * Returns all discharge zones for a given river. The river information is | 143 * Returns all discharge zones for a given river. The river information is |
144 * extracted from <i>artifact</i> using RiverUtils.getRiver(). | 144 * extracted from <i>artifact</i> using RiverUtils.getRiver(). |
145 * | 145 * |
146 * @param artifact Needs to be a FLYSArtifact that stores a rivername. | 146 * @param artifact Needs to be a D4EArtifact that stores a rivername. |
147 * | 147 * |
148 * @return a list of DischargeZones. | 148 * @return a list of DischargeZones. |
149 * | 149 * |
150 * @throws IllegalArgumentException if no river information is provided by | 150 * @throws IllegalArgumentException if no river information is provided by |
151 * <i>artifact</i>. | 151 * <i>artifact</i>. |
152 */ | 152 */ |
153 protected List<DischargeZone> getDischargeZones(Artifact artifact) | 153 protected List<DischargeZone> getDischargeZones(Artifact artifact) |
154 throws IllegalArgumentException | 154 throws IllegalArgumentException |
155 { | 155 { |
156 River river = RiverUtils.getRiver((FLYSArtifact) artifact); | 156 River river = RiverUtils.getRiver((D4EArtifact) artifact); |
157 | 157 |
158 if (river == null) { | 158 if (river == null) { |
159 throw new IllegalArgumentException("No river found"); | 159 throw new IllegalArgumentException("No river found"); |
160 } | 160 } |
161 | 161 |