Mercurial > dive4elements > river
view gwt-client/src/test/java/test/sinfo/SinfoFloodDurationRiversideChoice.java @ 9533:d9fda7af24ca
No discharge zone calculation and output for gauges unknown in flys for sinfo collision (Meilenstein 2, 2.2.1)
author | mschaefer |
---|---|
date | Thu, 04 Oct 2018 12:48:57 +0200 |
parents | e567fac95e3d |
children |
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 test.sinfo; /** * @author Domenico Nardi Tironi * */ final class SinfoFloodDurationRiversideChoice { // THIS IS A COPY!!!! public enum RiversideChoiceKey { NONE("", AttributeKey.NONE), // LEFT("state.sinfo.riverside.left", AttributeKey.LEFT), // RIGHT("state.sinfo.riverside.right", AttributeKey.RIGHT), // BOTH("state.sinfo.riverside.both", AttributeKey.UNKNOWN); private final String key; private final AttributeKey attributeKey; RiversideChoiceKey(final String key, final AttributeKey attributeKey) { this.key = key; this.attributeKey = attributeKey; } public static RiversideChoiceKey fromKey(final String key) { for (final RiversideChoiceKey v : values()) { if (key.equalsIgnoreCase(v.key)) return v; } return NONE; } public String getKey() { return this.key; } public AttributeKey getAttributeKey() { return this.attributeKey; } } /// THIS IS ALSO A COPY FROM org.dive4elements.river.model.Attribute (shortend, no DB-Queries) public enum AttributeKey { NONE(""), STRECKE(">>>>>>>>>>>>>>>"), LEFT("links"), RIGHT("rechts"), UNKNOWN("?"); private final String name; private int id; private boolean ready; AttributeKey(final String name) { this.name = name; this.id = 0; this.ready = false; } /** * Type name in the database */ public String getName() { return this.name; } /** * Type id in the database */ public int getId() { // initFromDatabase(); return this.id; } /** * Set the type id */ public void setId(final int id) { this.id = id; } protected boolean getReady() { return this.ready; } protected void setReady(final boolean ready) { this.ready = ready; } } }