view artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/vegetationzones/VegetationZonesTableEditState.java @ 9107:41f4bc83aa7a

vegzones improved
author gernotbelger
date Tue, 29 May 2018 15:19:03 +0200
parents 1ffd38826175
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