Mercurial > dive4elements > river
comparison backend/src/main/java/org/dive4elements/river/importer/parsers/FlowVelocityModelParser.java @ 6414:61e55f36e764 double-precision
Flow Velocity Parser: fixed regular expression for guessing main values
author | Tom Gottfried <tom.gottfried@intevation.de> |
---|---|
date | Tue, 25 Jun 2013 10:57:08 +0200 |
parents | b95504c34060 |
children | 1bdfc099286e |
comparison
equal
deleted
inserted
replaced
6410:df867072d003 | 6414:61e55f36e764 |
---|---|
32 | 32 |
33 private static final Logger log = | 33 private static final Logger log = |
34 Logger.getLogger(FlowVelocityModelParser.class); | 34 Logger.getLogger(FlowVelocityModelParser.class); |
35 | 35 |
36 private static final Pattern META_REGEX = | 36 private static final Pattern META_REGEX = |
37 Pattern.compile(".*Rechnung (.*) \\(Pegel (.*)\\).*"); | 37 Pattern.compile(".*Rechnung [unter ]*(.*) \\(Pegel (.*)\\).*"); |
38 | 38 |
39 private static final Pattern META_GAUGE = | 39 private static final Pattern META_GAUGE = |
40 Pattern.compile("(.*) Q=(\\w*)m3/s"); | 40 Pattern.compile("(.*) Q=(\\w*)m3/s"); |
41 | 41 |
42 private static final Pattern META_MAINVALUE_A = | 42 private static final Pattern META_MAINVALUE_A = |
43 Pattern.compile("([a-zA-Z]+)+(\\d+)*"); | 43 Pattern.compile("([a-zA-Z]+)+(\\d+)*\\S*"); |
44 | 44 |
45 private static final Pattern META_MAINVALUE_B = | 45 private static final Pattern META_MAINVALUE_B = |
46 Pattern.compile("(([a-zA-Z]+)+(\\d+)*)\\s*-\\s*(([a-zA-Z]+)+(\\d+)*.*)"); | 46 Pattern.compile("(([a-zA-Z]+)+(\\d+)*)\\s*-\\s*(([a-zA-Z]+)+(\\d+)*\\S*)"); |
47 | 47 |
48 private static final Pattern META_MAINVALUE_C = | 48 private static final Pattern META_MAINVALUE_C = |
49 Pattern.compile("([0-9]++)\\s?(\\w*)|([0-9]++,[0-9]++)\\s?(\\w*)"); | 49 Pattern.compile("([0-9]++)\\s?(\\S*)|([0-9]++,[0-9]++)\\s?(\\S*)"); |
50 | 50 |
51 private static final Pattern META_MAINVALUE_D = | 51 private static final Pattern META_MAINVALUE_D = |
52 Pattern.compile("(([0-9]*)\\s?(\\w*)|([0-9]++,[0-9]++)\\s?(\\w*))\\s*bis (([0-9]*)\\s?([a-zA-Z_0-9()]*)|([0-9]++,[0-9]++)\\s?(.*))"); | 52 Pattern.compile("(([0-9]*)\\s?(\\w*)|([0-9]++,[0-9]++)\\s?(\\w*))\\s*bis (([0-9]*)\\s?(\\S*)|([0-9]++,[0-9]++)\\s?(\\S*))"); |
53 | 53 |
54 private static final Pattern META_MAINVALUE_E = | 54 private static final Pattern META_MAINVALUE_E = |
55 Pattern.compile("(([a-zA-Z]+)+(\\d+)*)\\s*bis (([a-zA-Z]+)+(\\d+)*.*)"); | 55 Pattern.compile("(([a-zA-Z]+)+(\\d+)*)\\s*bis (([a-zA-Z]+)+(\\d+)*\\S*)"); |
56 | 56 |
57 private static final NumberFormat nf = | 57 private static final NumberFormat nf = |
58 NumberFormat.getInstance(DEFAULT_LOCALE); | 58 NumberFormat.getInstance(DEFAULT_LOCALE); |
59 | 59 |
60 | 60 |