Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/WQFacet.java @ 8369:a5bd0a5b8efd
Use the CURRENT_KM constant from injectors.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Thu, 02 Oct 2014 13:57:50 +0200 |
parents | af13ceeba52a |
children |
comparison
equal
deleted
inserted
replaced
8363:3508d625092f | 8369:a5bd0a5b8efd |
---|---|
12 import org.dive4elements.artifacts.CallContext; | 12 import org.dive4elements.artifacts.CallContext; |
13 | 13 |
14 import org.dive4elements.artifactdatabase.state.DefaultFacet; | 14 import org.dive4elements.artifactdatabase.state.DefaultFacet; |
15 | 15 |
16 import org.dive4elements.river.artifacts.WQKmsInterpolArtifact; | 16 import org.dive4elements.river.artifacts.WQKmsInterpolArtifact; |
17 import static org.dive4elements.river.exports.injector.InjectorConstants.CURRENT_KM; | |
17 | 18 |
18 /** | 19 /** |
19 * Facet to show W|Q Values. | 20 * Facet to show W|Q Values. |
20 */ | 21 */ |
21 public class WQFacet | 22 public class WQFacet |
48 */ | 49 */ |
49 @Override | 50 @Override |
50 public Object getData(Artifact artifact, CallContext context) { | 51 public Object getData(Artifact artifact, CallContext context) { |
51 WQKmsInterpolArtifact interpolData = | 52 WQKmsInterpolArtifact interpolData = |
52 (WQKmsInterpolArtifact) artifact; | 53 (WQKmsInterpolArtifact) artifact; |
53 Double currentKm = (Double)context.getContextValue("currentKm"); | 54 Double currentKm = (Double)context.getContextValue(CURRENT_KM); |
54 return interpolData.getWQAtKm(currentKm); | 55 return interpolData.getWQAtKm(currentKm); |
55 } | 56 } |
56 | 57 |
57 | 58 |
58 /** | 59 /** |