Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/states/LocationDistanceSelect.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 | 4897a58c8746 |
children | af13ceeba52a |
comparison
equal
deleted
inserted
replaced
5866:9a6741ccf6d4 | 5867:59ff03ff48f1 |
---|---|
14 | 14 |
15 import org.dive4elements.artifacts.Artifact; | 15 import org.dive4elements.artifacts.Artifact; |
16 | 16 |
17 import org.dive4elements.artifactdatabase.data.StateData; | 17 import org.dive4elements.artifactdatabase.data.StateData; |
18 | 18 |
19 import org.dive4elements.river.artifacts.FLYSArtifact; | 19 import org.dive4elements.river.artifacts.D4EArtifact; |
20 import org.dive4elements.river.artifacts.WINFOArtifact; | 20 import org.dive4elements.river.artifacts.WINFOArtifact; |
21 | 21 |
22 | 22 |
23 /** | 23 /** |
24 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | 24 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
55 public boolean validate(Artifact artifact) | 55 public boolean validate(Artifact artifact) |
56 throws IllegalArgumentException | 56 throws IllegalArgumentException |
57 { | 57 { |
58 logger.debug("LocationDistanceSelect.validate"); | 58 logger.debug("LocationDistanceSelect.validate"); |
59 | 59 |
60 FLYSArtifact flys = (FLYSArtifact)artifact; | 60 D4EArtifact flys = (D4EArtifact)artifact; |
61 StateData mode = getData(flys, MODE); | 61 StateData mode = getData(flys, MODE); |
62 String mValue = mode != null ? (String)mode.getValue() : null; | 62 String mValue = mode != null ? (String)mode.getValue() : null; |
63 if (mValue != null) { | 63 if (mValue != null) { |
64 if (mValue.equals("distance")) { | 64 if (mValue.equals("distance")) { |
65 return super.validate(flys); | 65 return super.validate(flys); |
71 return false; | 71 return false; |
72 } | 72 } |
73 | 73 |
74 | 74 |
75 /** Validate selected locations. */ | 75 /** Validate selected locations. */ |
76 protected boolean validateLocations(FLYSArtifact flys) | 76 protected boolean validateLocations(D4EArtifact flys) |
77 throws IllegalArgumentException | 77 throws IllegalArgumentException |
78 { | 78 { |
79 StateData dValues = getData(flys, LOCATIONS); | 79 StateData dValues = getData(flys, LOCATIONS); |
80 String values = dValues != null ? (String)dValues.getValue() : null; | 80 String values = dValues != null ? (String)dValues.getValue() : null; |
81 | 81 |