comparison artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadYearSelect.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
10 10
11 import org.apache.log4j.Logger; 11 import org.apache.log4j.Logger;
12 12
13 import org.dive4elements.artifacts.Artifact; 13 import org.dive4elements.artifacts.Artifact;
14 14
15 import org.dive4elements.river.artifacts.FLYSArtifact; 15 import org.dive4elements.river.artifacts.D4EArtifact;
16 16
17 import org.dive4elements.river.artifacts.access.SedimentLoadAccess; 17 import org.dive4elements.river.artifacts.access.SedimentLoadAccess;
18 import org.dive4elements.river.artifacts.states.DefaultState; 18 import org.dive4elements.river.artifacts.states.DefaultState;
19 19
20 20
42 42
43 @Override 43 @Override
44 public boolean validate(Artifact artifact) 44 public boolean validate(Artifact artifact)
45 throws IllegalArgumentException 45 throws IllegalArgumentException
46 { 46 {
47 SedimentLoadAccess access = new SedimentLoadAccess((FLYSArtifact) artifact, null); 47 SedimentLoadAccess access = new SedimentLoadAccess((D4EArtifact) artifact, null);
48 48
49 // Second year should be later than first. 49 // Second year should be later than first.
50 if (access.getPeriod() != null && access.getPeriod()[1] < access.getPeriod()[0]) 50 if (access.getPeriod() != null && access.getPeriod()[1] < access.getPeriod()[0])
51 throw new IllegalArgumentException("error_years_wrong"); 51 throw new IllegalArgumentException("error_years_wrong");
52 52

http://dive4elements.wald.intevation.org