Mercurial > dive4elements > river
view artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/WstSoundingIdPair.java @ 8978:b5600453bb8f
SINFO Calculations: do not produce result rows if some input data has missing values.
Also check for years of waterlevels in flow depth development calculation.
author | gernotbelger |
---|---|
date | Thu, 05 Apr 2018 11:57:54 +0200 |
parents | 5d5d482da3e9 |
children | 5c34fe17ef15 |
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.flowdepth; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.dive4elements.river.backend.utils.StringUtil; /** * @author Gernot Belger */ public final class WstSoundingIdPair { private final String wstId; private final String soundingId; public WstSoundingIdPair(final String wstId, final String soundingId) { this.wstId = wstId; this.soundingId = soundingId; } public String getWstId() { return this.wstId; } public String getSoundingId() { return this.soundingId; } public static List<WstSoundingIdPair> parsePairs(final String diffids) { // FIXME: this way of parsing the datacage-ids is repeated all over flys! final String datas[] = diffids.split("#"); final List<WstSoundingIdPair> diffPairs = new ArrayList<>(datas.length); for (int i = 0; i < datas.length; i += 2) { final String leftId = StringUtil.unbracket(datas[i]); final String rightId = StringUtil.unbracket(datas[i + 1]); diffPairs.add(new WstSoundingIdPair(leftId, rightId)); } return Collections.unmodifiableList(diffPairs); } }