Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixDeviationFacet.java @ 8202:e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Fri, 05 Sep 2014 12:58:17 +0200 |
parents | 29dc6b6e7199 |
children | 0a5239a1e46e |
comparison
equal
deleted
inserted
replaced
8201:4b8c5a08de04 | 8202:e4606eae8ea5 |
---|---|
29 */ | 29 */ |
30 public class FixDeviationFacet | 30 public class FixDeviationFacet |
31 extends FixingsFacet | 31 extends FixingsFacet |
32 implements FacetTypes { | 32 implements FacetTypes { |
33 | 33 |
34 /** House logger. */ | 34 /** House log. */ |
35 private static Logger logger = Logger.getLogger(FixDeviationFacet.class); | 35 private static Logger log = Logger.getLogger(FixDeviationFacet.class); |
36 | 36 |
37 public static final String [] STD_DEV_COLUMN = { "std-dev" }; | 37 public static final String [] STD_DEV_COLUMN = { "std-dev" }; |
38 | 38 |
39 /** Trivial Constructor. */ | 39 /** Trivial Constructor. */ |
40 public FixDeviationFacet() { | 40 public FixDeviationFacet() { |
61 * | 61 * |
62 * @return the data. | 62 * @return the data. |
63 */ | 63 */ |
64 @Override | 64 @Override |
65 public Object getData(Artifact artifact, CallContext context) { | 65 public Object getData(Artifact artifact, CallContext context) { |
66 logger.debug("FixDeviationFacet.getData"); | 66 log.debug("FixDeviationFacet.getData"); |
67 if (artifact instanceof D4EArtifact) { | 67 if (artifact instanceof D4EArtifact) { |
68 D4EArtifact flys = (D4EArtifact)artifact; | 68 D4EArtifact flys = (D4EArtifact)artifact; |
69 | 69 |
70 CalculationResult res = | 70 CalculationResult res = |
71 (CalculationResult) flys.compute(context, | 71 (CalculationResult) flys.compute(context, |
79 | 79 |
80 double[] stdDev = | 80 double[] stdDev = |
81 params.interpolate("km", currentKm, STD_DEV_COLUMN); | 81 params.interpolate("km", currentKm, STD_DEV_COLUMN); |
82 | 82 |
83 if (stdDev == null) { | 83 if (stdDev == null) { |
84 logger.warn("getData: stdDev == null at km " + currentKm); | 84 log.warn("getData: stdDev == null at km " + currentKm); |
85 return null; | 85 return null; |
86 } | 86 } |
87 | 87 |
88 return stdDev; | 88 return stdDev; |
89 } | 89 } |
90 else { | 90 else { |
91 logger.debug("Not an instance of FixationArtifact."); | 91 log.debug("Not an instance of FixationArtifact."); |
92 return null; | 92 return null; |
93 } | 93 } |
94 } | 94 } |
95 | 95 |
96 | 96 |