Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/exports/IsKmUpEvaluator.java @ 7143:053e39436ba3
Diagrams: Determine if axis should be inverted dynamically.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Wed, 25 Sep 2013 12:36:19 +0200 |
parents | |
children | a56fe3bc6700 |
comparison
equal
deleted
inserted
replaced
7142:8c70767028e1 | 7143:053e39436ba3 |
---|---|
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde | |
2 * Software engineering by Intevation GmbH | |
3 * | |
4 * This file is Free Software under the GNU AGPL (>=v3) | |
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the | |
6 * documentation coming with Dive4Elements River for details. | |
7 */ | |
8 | |
9 package org.dive4elements.river.exports; | |
10 | |
11 import org.dive4elements.artifacts.CallContext; | |
12 import org.dive4elements.river.artifacts.D4EArtifact; | |
13 import org.dive4elements.river.artifacts.access.RiverAccess; | |
14 import org.dive4elements.river.artifacts.model.RiverFactory; | |
15 import org.dive4elements.river.model.River; | |
16 | |
17 public class IsKmUpEvaluator | |
18 implements DiagramAttributes.Evaluator | |
19 { | |
20 public IsKmUpEvaluator() { | |
21 } | |
22 | |
23 @Override | |
24 public Object evaluate(D4EArtifact artifact, CallContext context) { | |
25 RiverAccess access = new RiverAccess(artifact); | |
26 River river = RiverFactory.getRiver(access.getRiver()); | |
27 return river == null | |
28 ? Boolean.FALSE | |
29 : river.getKmUp(); | |
30 } | |
31 } | |
32 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |