Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixOutlierFacet.java @ 3729:e727e3ebdf85
Factored out a pure QW model to be more reusable.
flys-artifacts/trunk@5402 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Sat, 08 Sep 2012 14:19:40 +0000 |
parents | 8160e62bbb3a |
children | 26774405c884 |
comparison
equal
deleted
inserted
replaced
3728:d03e65378b9f | 3729:e727e3ebdf85 |
---|---|
63 | 63 |
64 FixResult result = (FixResult) res.getData(); | 64 FixResult result = (FixResult) res.getData(); |
65 double currentKm = | 65 double currentKm = |
66 ((Double)context.getContextValue("currentKm")).doubleValue(); | 66 ((Double)context.getContextValue("currentKm")).doubleValue(); |
67 | 67 |
68 KMIndex<QW []> kmQWs = result.getOutliers(); | 68 KMIndex<QWI []> kmQWs = result.getOutliers(); |
69 KMIndex.Entry<QW []> qwsEntry = kmQWs.binarySearch(currentKm); | 69 KMIndex.Entry<QWI []> qwsEntry = kmQWs.binarySearch(currentKm); |
70 | 70 |
71 QW[] qws = null; | 71 QWI [] qws = null; |
72 if(qwsEntry != null) { | 72 if (qwsEntry != null) { |
73 qws = qwsEntry.getValue(); | 73 qws = qwsEntry.getValue(); |
74 | 74 |
75 logger.debug("Found " + (qws != null ? qws.length : 0) | 75 if (logger.isDebugEnabled()) { |
76 + " KMIndex.Entry for km " + currentKm); | 76 logger.debug("Found " + (qws != null ? qws.length : 0) |
77 + " KMIndex.Entry for km " + currentKm); | |
78 } | |
77 } | 79 } |
78 else { | 80 else { |
79 logger.debug("Found no KMIndex.Entry for km " + currentKm); | 81 logger.debug("Found no KMIndex.Entry for km " + currentKm); |
80 } | 82 } |
81 | 83 |
82 return qws; | 84 return qws; |
83 } | 85 } |
84 else { | 86 |
85 logger.warn("Not an instance of FLYSArtifact."); | 87 logger.warn("Not an instance of FLYSArtifact."); |
86 return null; | 88 return null; |
87 } | |
88 } | 89 } |
89 | 90 |
90 | 91 |
91 /** | 92 /** |
92 * Create a deep copy of this Facet. | 93 * Create a deep copy of this Facet. |