teichmann@7143: /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde teichmann@7143: * Software engineering by Intevation GmbH teichmann@7143: * teichmann@7143: * This file is Free Software under the GNU AGPL (>=v3) teichmann@7143: * and comes with ABSOLUTELY NO WARRANTY! Check out the teichmann@7143: * documentation coming with Dive4Elements River for details. teichmann@7143: */ teichmann@7143: teichmann@7143: package org.dive4elements.river.exports; teichmann@7143: teichmann@7143: import org.dive4elements.artifacts.CallContext; teichmann@7143: import org.dive4elements.river.artifacts.D4EArtifact; teichmann@7143: import org.dive4elements.river.artifacts.access.RiverAccess; teichmann@7143: import org.dive4elements.river.artifacts.model.RiverFactory; teichmann@7143: import org.dive4elements.river.model.River; teichmann@7143: teichmann@7143: public class IsKmUpEvaluator teichmann@7143: implements DiagramAttributes.Evaluator teichmann@7143: { teichmann@7143: public IsKmUpEvaluator() { teichmann@7143: } teichmann@7143: teichmann@7143: @Override teichmann@7143: public Object evaluate(D4EArtifact artifact, CallContext context) { teichmann@7143: RiverAccess access = new RiverAccess(artifact); teichmann@7143: River river = RiverFactory.getRiver(access.getRiver()); teichmann@7143: return river == null teichmann@7143: ? Boolean.FALSE teichmann@7143: : river.getKmUp(); teichmann@7143: } teichmann@7143: } teichmann@7143: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :