Mercurial > dive4elements > river
annotate gwt-client/src/main/java/org/dive4elements/river/client/client/ui/StringArrayParseHelper.java @ 9661:9b8ba3b83a15
Importer (s/u-info) vegetation zones: new database column in vegetation_type table for german type name,
localized vegetation type names by querying the database instead of translating by resource property,
detecting and cancelling the import of a second vegetation zone file for a river,
detecting, logging, cancelling in case of wrong column titles,
detecting, logging and ignoring lines with missing (color) values,
comparing vegetation zone name and class with the database and logging+ignoring in case of inconsistencies,
starting the most elevated zone with 0 instead of -1 overflow days
author | mschaefer |
---|---|
date | Mon, 23 Mar 2020 16:38:12 +0100 |
parents | 7337034eb5d5 |
children |
rev | line source |
---|---|
9270 | 1 /** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde |
2 * Software engineering by | |
3 * Björnsen Beratende Ingenieure GmbH | |
4 * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt | |
5 * | |
6 * This file is Free Software under the GNU AGPL (>=v3) | |
7 * and comes with ABSOLUTELY NO WARRANTY! Check out the | |
8 * documentation coming with Dive4Elements River for details. | |
9 */ | |
10 package org.dive4elements.river.client.client.ui; | |
11 | |
12 /** | |
13 * @author Domenico Nardi Tironi | |
14 * | |
15 */ | |
16 public class StringArrayParseHelper { | |
17 | |
18 public static final String[] getArrayFromRawString(final String raw) { | |
19 if (raw != null) { | |
20 return raw.trim().replaceAll("\\s+", " ").split(" "); | |
21 } | |
22 return new String[] {}; | |
23 } | |
24 | |
25 public static final String trimRawString(final String raw) { | |
26 if (raw != null) { | |
27 return raw.trim().replaceAll("\\s+", " "); | |
28 } | |
29 return ""; | |
30 } | |
31 | |
32 } |