view artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/vegetationzones/VegetationZonesTableEditState.java @ 9069:1ffd38826175

access uinfo.vegetationzones+inundation_duration
author gernotbelger
date Tue, 15 May 2018 12:00:26 +0200
parents b5d7a9d79837
children 431f1c269be5
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.uinfo.vegetationzones;

import org.dive4elements.artifacts.Artifact;
import org.dive4elements.river.artifacts.states.DefaultState;

/**
 * @author Domenico Nardi Tironi
 */
public class VegetationZonesTableEditState extends DefaultState {

    private static final long serialVersionUID = 1L;

    @Override
    protected String getUIProvider() {
        return "uinfo.vegetationzones.table.edit";
    }

    @Override
    public boolean validate(final Artifact artifact) throws IllegalArgumentException {
        // TODO: check verstehen

        // final InundationDurationAccess access = new InundationDurationAccess((SINFOArtifact) artifact);

        // Second year should be later than first.

        // if (access.getYears() == null || access.getYears().length == 0)
        return true;
        // throw new IllegalArgumentException("error_years_wrong");

        // return true;
    }
}

http://dive4elements.wald.intevation.org