comparison artifacts/src/main/java/org/dive4elements/river/artifacts/states/HWSDatacageState.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
12 import org.w3c.dom.Element; 12 import org.w3c.dom.Element;
13 13
14 import org.dive4elements.artifacts.Artifact; 14 import org.dive4elements.artifacts.Artifact;
15 import org.dive4elements.artifacts.CallContext; 15 import org.dive4elements.artifacts.CallContext;
16 import org.dive4elements.artifacts.common.utils.XMLUtils.ElementCreator; 16 import org.dive4elements.artifacts.common.utils.XMLUtils.ElementCreator;
17 import org.dive4elements.river.artifacts.FLYSArtifact; 17 import org.dive4elements.river.artifacts.D4EArtifact;
18 18
19 19
20 public class HWSDatacageState 20 public class HWSDatacageState
21 extends DefaultState 21 extends DefaultState
22 { 22 {
29 } 29 }
30 30
31 31
32 @Override 32 @Override
33 protected Element createStaticData( 33 protected Element createStaticData(
34 FLYSArtifact flys, 34 D4EArtifact flys,
35 ElementCreator creator, 35 ElementCreator creator,
36 CallContext cc, 36 CallContext cc,
37 String name, 37 String name,
38 String value, 38 String value,
39 String type 39 String type
61 61
62 @Override 62 @Override
63 public boolean validate(Artifact artifact) 63 public boolean validate(Artifact artifact)
64 throws IllegalArgumentException 64 throws IllegalArgumentException
65 { 65 {
66 FLYSArtifact flys = (FLYSArtifact) artifact; 66 D4EArtifact flys = (D4EArtifact) artifact;
67 String hws = flys.getDataAsString("uesk.hws"); 67 String hws = flys.getDataAsString("uesk.hws");
68 logger.debug("hws: " + hws); 68 logger.debug("hws: " + hws);
69 return true; 69 return true;
70 } 70 }
71 71
72 72
73 /** 73 /**
74 * Returns the DGM specified in the parameters of <i>flys</i>. 74 * Returns the DGM specified in the parameters of <i>flys</i>.
75 * 75 *
76 * @param flys The FLYSArtifact that knows the ID of a DGM. 76 * @param flys The D4EArtifact that knows the ID of a DGM.
77 * 77 *
78 * @throws IllegalArgumentException If the FLYSArtifact doesn't know the ID 78 * @throws IllegalArgumentException If the D4EArtifact doesn't know the ID
79 * of a DGM. 79 * of a DGM.
80 * 80 *
81 * @return the DGM specified by FLYSArtifact's parameters. 81 * @return the DGM specified by D4EArtifact's parameters.
82 */ 82 */
83 public static String getHWS(FLYSArtifact flys) 83 public static String getHWS(D4EArtifact flys)
84 throws IllegalArgumentException 84 throws IllegalArgumentException
85 { 85 {
86 String hws= flys.getDataAsString("uesk.hws"); 86 String hws= flys.getDataAsString("uesk.hws");
87 if (hws == null) { 87 if (hws == null) {
88 return null; 88 return null;

http://dive4elements.wald.intevation.org