comparison backend/src/main/java/org/dive4elements/river/importer/parsers/LineParser.java @ 8032:fd3a24336e6a

SCHEMA CHANGE and Importer (only longitudinal section data so far): only grain fractions given now in schema are valid. We are handling sediment loads, not yields.
author "Tom Gottfried <tom@intevation.de>"
date Mon, 14 Jul 2014 15:36:44 +0200
parents 07cc4cd9233e
children 9342d7fe0ee7
comparison
equal deleted inserted replaced
8031:6954ac9b7591 8032:fd3a24336e6a
111 111
112 112
113 protected static String stripMetaLine(String line) { 113 protected static String stripMetaLine(String line) {
114 String tmp = line.substring(1, line.length()); 114 String tmp = line.substring(1, line.length());
115 115
116 if (tmp.startsWith(" ")) { 116 // meta-lines often have trailing semicolons in real data
117 return tmp.substring(1, tmp.length()); 117 return tmp.replaceAll(SEPERATOR_CHAR + "*$", "").trim();
118 }
119 else {
120 return tmp;
121 }
122 } 118 }
123 119
124 public static double getDouble(String doubleString) throws ParseException { 120 public static double getDouble(String doubleString) throws ParseException {
125 NumberFormat nf = NumberFormat.getInstance(DEFAULT_LOCALE); 121 NumberFormat nf = NumberFormat.getInstance(DEFAULT_LOCALE);
126 Number value = nf.parse(doubleString); 122 Number value = nf.parse(doubleString);

http://dive4elements.wald.intevation.org