Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/extreme/ExtremeCurveFacet.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 | a0078e5e3b39 |
children | 5e38e2924c07 |
comparison
equal
deleted
inserted
replaced
8201:4b8c5a08de04 | 8202:e4606eae8ea5 |
---|---|
31 */ | 31 */ |
32 public class ExtremeCurveFacet | 32 public class ExtremeCurveFacet |
33 extends FixingsFacet | 33 extends FixingsFacet |
34 implements FacetTypes { | 34 implements FacetTypes { |
35 | 35 |
36 /** House logger. */ | 36 /** House log. */ |
37 private static Logger logger = Logger.getLogger(ExtremeCurveFacet.class); | 37 private static Logger log = Logger.getLogger(ExtremeCurveFacet.class); |
38 | 38 |
39 | 39 |
40 /** Trivial Constructor. */ | 40 /** Trivial Constructor. */ |
41 public ExtremeCurveFacet() { | 41 public ExtremeCurveFacet() { |
42 } | 42 } |
74 * | 74 * |
75 * @return the data. | 75 * @return the data. |
76 */ | 76 */ |
77 @Override | 77 @Override |
78 public Object getData(Artifact artifact, CallContext context) { | 78 public Object getData(Artifact artifact, CallContext context) { |
79 logger.debug("ExtremeCurveFacet.getData"); | 79 log.debug("ExtremeCurveFacet.getData"); |
80 if (artifact instanceof D4EArtifact) { | 80 if (artifact instanceof D4EArtifact) { |
81 D4EArtifact flys = (D4EArtifact)artifact; | 81 D4EArtifact flys = (D4EArtifact)artifact; |
82 CalculationResult res = | 82 CalculationResult res = |
83 (CalculationResult) flys.compute(context, | 83 (CalculationResult) flys.compute(context, |
84 ComputeType.ADVANCE, | 84 ComputeType.ADVANCE, |
90 KMIndex<Curve> curves = result.getCurves(); | 90 KMIndex<Curve> curves = result.getCurves(); |
91 | 91 |
92 KMIndex.Entry<Curve> curveEntry = curves.search(currentKm); | 92 KMIndex.Entry<Curve> curveEntry = curves.search(currentKm); |
93 | 93 |
94 if (curveEntry != null) { | 94 if (curveEntry != null) { |
95 logger.debug("A curve at km = " + currentKm); | 95 log.debug("A curve at km = " + currentKm); |
96 Curve c = curveEntry.getValue(); | 96 Curve c = curveEntry.getValue(); |
97 // Find segment in which the curr. km is located. | 97 // Find segment in which the curr. km is located. |
98 ExtremeAccess access = new ExtremeAccess(flys); | 98 ExtremeAccess access = new ExtremeAccess(flys); |
99 | 99 |
100 double[] ds = access.getValuesForRange(currentKm); | 100 double[] ds = access.getValuesForRange(currentKm); |
107 } | 107 } |
108 | 108 |
109 return c; | 109 return c; |
110 } | 110 } |
111 else { | 111 else { |
112 logger.debug("No curve at km = " + currentKm); | 112 log.debug("No curve at km = " + currentKm); |
113 return null; | 113 return null; |
114 } | 114 } |
115 } | 115 } |
116 else { | 116 else { |
117 logger.debug("Not an instance of D4EArtifact / WINFOArtifact."); | 117 log.debug("Not an instance of D4EArtifact / WINFOArtifact."); |
118 return null; | 118 return null; |
119 } | 119 } |
120 } | 120 } |
121 | 121 |
122 | 122 |