view artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/predefineddepthevol/PredefinedDepthEvolAccess.java @ 9033:384eee4b4135

Added datacage select and chart display for flow depth evolution series loaded from database, and a correction for the tkh data
author mschaefer
date Fri, 27 Apr 2018 17:41:59 +0200
parents
children 611a523fc42f
line wrap: on
line source
/** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde
 * Software engineering by
 *  Björnsen Beratende Ingenieure GmbH
 *  Dr. Schumacher Ingenieurbüro für Wasser und Umwelt
 *
 * This file is Free Software under the GNU AGPL (>=v3)
 * and comes with ABSOLUTELY NO WARRANTY! Check out the
 * documentation coming with Dive4Elements River for details.
 */

package org.dive4elements.river.artifacts.sinfo.predefineddepthevol;

import org.apache.commons.lang.math.DoubleRange;
import org.dive4elements.river.artifacts.D4EArtifact;
import org.dive4elements.river.artifacts.access.RangeAccess;

/**
 * Access to the database loaded depth evolution artifact data
 *
 * @author Matthias Schäfer
 */
final class PredefinedDepthEvolAccess extends RangeAccess {

    /***** FIELDS *****/

    private Integer id;

    private String name;


    /***** CONSTRUCTORS *****/

    public PredefinedDepthEvolAccess(final D4EArtifact artifact) {
        super(artifact);
    }


    /***** METHDOS *****/

    public DoubleRange getRange() {
        final double from = getFrom();
        final double to = getTo();
        return new DoubleRange(from, to);
    }

    public Integer getId() {
        if (this.id == null) {
            this.id = getInteger("depthevol_id");
        }
        return this.id;
    }

    public String getName() {
        if (this.name == null) {
            this.name = getString("name");
        }
        return this.name;
    }
}

http://dive4elements.wald.intevation.org