Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/exports/injector/ComputedDischargeInjector.java @ 8326:10917ec29625
Inject current km and pnp into the context used to calculate W in cm at gauge.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Thu, 25 Sep 2014 17:23:12 +0200 |
parents | e3a8aa6eee32 |
children |
comparison
equal
deleted
inserted
replaced
8321:a5e7e2d833ea | 8326:10917ec29625 |
---|---|
27 Artifact artifact, | 27 Artifact artifact, |
28 Document doc | 28 Document doc |
29 ) { | 29 ) { |
30 RangeAccess access = new RangeAccess((D4EArtifact)artifact); | 30 RangeAccess access = new RangeAccess((D4EArtifact)artifact); |
31 if (access.hasFrom()) { | 31 if (access.hasFrom()) { |
32 double km = access.getFrom(); | 32 ctx.putContextValue(CURRENT_KM, access.getFrom()); |
33 ctx.putContextValue(CURRENT_KM, km); | 33 } |
34 else if (access.getLocations() != null && | |
35 access.getLocations().length > 0) { | |
36 ctx.putContextValue(CURRENT_KM, access.getLocations()[0]); | |
34 } | 37 } |
35 } | 38 } |
36 } | 39 } |