comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/GaugeDischargeFacet.java @ 2733:ac9a03ed32c1

More debugging of discharge-curve issue. flys-artifacts/trunk@4466 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 22 May 2012 19:51:05 +0000
parents 5ce5abd173b9
children 0905d1e7b37e
comparison
equal deleted inserted replaced
2732:7311d0336600 2733:ac9a03ed32c1
10 import de.intevation.flys.artifacts.FLYSArtifact; 10 import de.intevation.flys.artifacts.FLYSArtifact;
11 import de.intevation.flys.artifacts.states.DefaultState.ComputeType; 11 import de.intevation.flys.artifacts.states.DefaultState.ComputeType;
12 12
13 13
14 /** 14 /**
15 * Access Discharge Curve of a gauge.
15 */ 16 */
16 public class GaugeDischargeFacet extends DataFacet { 17 public class GaugeDischargeFacet extends DataFacet {
17 18
18 private static final Logger logger = 19 private static final Logger logger =
19 Logger.getLogger(GaugeDischargeFacet.class); 20 Logger.getLogger(GaugeDischargeFacet.class);
41 } 42 }
42 43
43 44
44 @Override 45 @Override
45 public Facet deepCopy() { 46 public Facet deepCopy() {
46 // TODO why waterlevel?
47 GaugeDischargeFacet copy = new GaugeDischargeFacet(); 47 GaugeDischargeFacet copy = new GaugeDischargeFacet();
48 copy.set(this); 48 copy.set(this);
49 copy.type = type; 49 copy.type = type;
50 copy.hash = hash; 50 copy.hash = hash;
51 copy.stateId = stateId; 51 copy.stateId = stateId;
58 if (logger.isDebugEnabled()) { 58 if (logger.isDebugEnabled()) {
59 logger.debug("Get data for discharge curves at index: " + 59 logger.debug("Get data for discharge curves at index: " +
60 index + " / stateId: " + stateId); 60 index + " / stateId: " + stateId);
61 } 61 }
62 62
63 if (stateId == null) {
64 logger.error("GaugeDischargeFacet.getData: stateId is null.");
65 }
63 FLYSArtifact flys = (FLYSArtifact) artifact; 66 FLYSArtifact flys = (FLYSArtifact) artifact;
64 67
65 CalculationResult res = (CalculationResult) 68 CalculationResult res = (CalculationResult)
66 flys.compute(context, hash, stateId, type, false); 69 flys.compute(context, hash, stateId, type, false);
67 70
68 WQKms[] discharge = (WQKms[]) res.getData(); 71 WQKms[] discharge = (WQKms[]) res.getData();
69 72
70 return discharge[index]; 73 return discharge[index];
71 } 74 }

http://dive4elements.wald.intevation.org