comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WaterlevelFacet.java @ 722:4800230fba8a

Improved situtation on rendering "Abflusskurve am Pegel". Not fully working, yet. flys-artifacts/trunk@2200 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 22 Jun 2011 10:36:27 +0000
parents 3b7e9ddf6bb1
children c09c9e05ecfa
comparison
equal deleted inserted replaced
721:7298d58a1f5a 722:4800230fba8a
13 13
14 public class WaterlevelFacet extends DefaultFacet { 14 public class WaterlevelFacet extends DefaultFacet {
15 15
16 private static Logger logger = Logger.getLogger(WaterlevelFacet.class); 16 private static Logger logger = Logger.getLogger(WaterlevelFacet.class);
17 17
18 protected ComputeType type;
19 protected String stateID;
20 protected String hash;
18 21
19 public WaterlevelFacet(int index, String name, String description) { 22 public WaterlevelFacet(int index, String name, String description) {
20 super(index, name, description); 23 this(index, name, description, ComputeType.ADVANCE, null, null);
21 } 24 }
22 25
26 public WaterlevelFacet(
27 int index,
28 String name,
29 String description,
30 ComputeType type,
31 String stateID,
32 String hash
33
34 ) {
35 super(index, name, description);
36 this.type = type;
37 this.stateID = stateID;
38 this.hash = hash;
39 }
23 40
24 public Object getData(Artifact artifact, CallContext context) { 41 public Object getData(Artifact artifact, CallContext context) {
25 logger.debug("Get data for waterlevels at index: " + index); 42 logger.debug("Get data for waterlevels at index: " + index);
26 43
27 WINFOArtifact winfo = (WINFOArtifact)artifact; 44 WINFOArtifact winfo = (WINFOArtifact)artifact;
28 45
29 CalculationResult res = (CalculationResult) 46 CalculationResult res = (CalculationResult)
30 winfo.compute(context, ComputeType.ADVANCE, false); 47 winfo.compute(context, stateID, hash, type, false);
31 48
32 WQKms [] wqkms = (WQKms [])res.getData(); 49 WQKms [] wqkms = (WQKms [])res.getData();
33 50
34 return wqkms[index]; 51 return wqkms[index];
35 } 52 }

http://dive4elements.wald.intevation.org