Mercurial > dive4elements > river
annotate backend/src/main/java/org/dive4elements/river/importer/parsers/NameAndTimeInterval.java @ 9801:1d7a72a50183 3.2.x tip
Assume Compose V2, consistently
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Thu, 23 Nov 2023 10:14:13 +0100 |
parents | 0a5239a1e46e |
children |
rev | line source |
---|---|
6328
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
2 * Software engineering by Intevation GmbH |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
3 * |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
4 * This file is Free Software under the GNU AGPL (>=v3) |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
6 * documentation coming with Dive4Elements River for details. |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
7 */ |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
8 package org.dive4elements.river.importer.parsers; |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
9 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
10 import java.util.ArrayList; |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
11 import java.util.Date; |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
12 import java.util.List; |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
13 import java.util.regex.Pattern; |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
14 |
9726 | 15 import org.apache.logging.log4j.Logger; |
16 import org.apache.logging.log4j.LogManager; | |
6328
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
17 import org.dive4elements.river.importer.ImportTimeInterval; |
8187
3bb1c62ad732
Moved package org.dive4elements.river.utils to org.dive4elements.river.backend.utils.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6334
diff
changeset
|
18 import org.dive4elements.river.backend.utils.DateGuesser; |
6328
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
19 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
20 public class NameAndTimeInterval { |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
21 |
9726 | 22 private static Logger log = LogManager.getLogger(NameAndTimeInterval.class); |
6328
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
23 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
24 // TODO: To be extented. |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
25 private static final Pattern MAIN_VALUE = Pattern.compile( |
6334
9231940bd192
Backend: Extended list of recognized main value names in STA/official line classification
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6328
diff
changeset
|
26 "^(HQ|HSQ|MHW|GLQ|NMQ|HQEXT)(\\d*)$"); |
6328
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
27 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
28 private String name; |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
29 private ImportTimeInterval timeInterval; |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
30 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
31 public NameAndTimeInterval() { |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
32 } |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
33 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
34 public NameAndTimeInterval(String name) { |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
35 this(name, null); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
36 } |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
37 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
38 public NameAndTimeInterval(String name, ImportTimeInterval timeInterval) { |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
39 this.name = name; |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
40 this.timeInterval = timeInterval; |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
41 } |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
42 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
43 public String getName() { |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
44 return name; |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
45 } |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
46 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
47 public ImportTimeInterval getTimeInterval() { |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
48 return timeInterval; |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
49 } |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
50 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
51 @Override |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
52 public String toString() { |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
53 return "name: " + name + " time interval: " + timeInterval; |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
54 } |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
55 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
56 public static boolean isMainValue(String s) { |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
57 s = s.replace(" ", "").toUpperCase(); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
58 return MAIN_VALUE.matcher(s).matches(); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
59 } |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
60 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
61 public static NameAndTimeInterval parseName(String name) { |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
62 List<String> result = new ArrayList<String>(); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
63 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
64 unbracket(name, 0, result); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
65 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
66 int length = result.size(); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
67 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
68 if (length < 1) { // Should not happen. |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
69 return new NameAndTimeInterval(name); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
70 } |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
71 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
72 if (length == 1) { // No date at all -> use first part. |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
73 return new NameAndTimeInterval(result.get(0).trim()); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
74 } |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
75 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
76 if (length == 2) { // e.g. HQ(1994) or HQ(1994 - 1999) |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
77 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
78 String type = result.get(0).trim(); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
79 ImportTimeInterval timeInterval = null; |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
80 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
81 String datePart = result.get(1).trim(); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
82 if (isMainValue(datePart)) { // e.g. W(HQ100) |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
83 type += "(" + datePart + ")"; |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
84 timeInterval = null; |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
85 } |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
86 else { |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
87 timeInterval = getTimeInterval(result.get(1).trim()); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
88 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
89 if (timeInterval == null) { // No date at all. |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
90 type = name; |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
91 } |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
92 } |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
93 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
94 return new NameAndTimeInterval(type, timeInterval); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
95 } |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
96 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
97 if (length == 3) { // e.g W(Q(1994)) or W(Q(1994 - 1999)) |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
98 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
99 String type = |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
100 result.get(0).trim() + "(" + |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
101 result.get(1).trim() + ")"; |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
102 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
103 ImportTimeInterval timeInterval = getTimeInterval( |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
104 result.get(2).trim()); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
105 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
106 if (timeInterval == null) { // No date at all. |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
107 type = name; |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
108 } |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
109 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
110 return new NameAndTimeInterval(type, timeInterval); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
111 } |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
112 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
113 // more than 3 elements return unmodified. |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
114 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
115 return new NameAndTimeInterval(name); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
116 } |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
117 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
118 private static ImportTimeInterval getTimeInterval(String datePart) { |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
119 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
120 int minus = datePart.indexOf('-'); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
121 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
122 if (minus < 0) { // '-' not found |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
123 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
124 Date date = null; |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
125 try { |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
126 date = DateGuesser.guessDate(datePart); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
127 } |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
128 catch (IllegalArgumentException iae) { |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
129 log.warn("STA: Invalid date '" + datePart + "'"); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
130 return null; |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
131 } |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
132 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
133 return new ImportTimeInterval(date); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
134 } |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
135 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
136 // Found '-' so we have <from> - <to> |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
137 String startPart = datePart.substring(0, minus).trim(); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
138 String endPart = datePart.substring(minus).trim(); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
139 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
140 Date startDate = null; |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
141 Date endDate = null; |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
142 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
143 try { |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
144 startDate = DateGuesser.guessDate(startPart); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
145 } |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
146 catch (IllegalArgumentException iae) { |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
147 log.warn("STA: Invalid start date '" + startPart + "'"); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
148 } |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
149 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
150 try { |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
151 endDate = DateGuesser.guessDate(endPart); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
152 } |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
153 catch (IllegalArgumentException iae) { |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
154 log.warn("STA: Invalid end date '" + endPart + "'"); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
155 } |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
156 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
157 if (startDate == null) { |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
158 log.warn("STA: Need start date."); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
159 return null; |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
160 } |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
161 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
162 return new ImportTimeInterval(startDate, endDate); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
163 } |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
164 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
165 private static int unbracket(String s, int index, List<String> result) { |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
166 StringBuilder sb = new StringBuilder(); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
167 int length = s.length(); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
168 while (index < length) { |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
169 char c = s.charAt(index); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
170 switch (c) { |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
171 case '(': |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
172 index = unbracket(s, index+1, result); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
173 break; |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
174 case ')': |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
175 result.add(0, sb.toString()); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
176 return index+1; |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
177 default: |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
178 sb.append(c); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
179 ++index; |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
180 } |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
181 } |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
182 result.add(0, sb.toString()); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
183 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
184 return index; |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
185 } |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
186 |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
187 /* |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
188 public static void main(String [] args) { |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
189 for (String arg: args) { |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
190 NameAndTimeInterval nti = parseName(arg); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
191 System.out.println(arg + " -> " + nti); |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
192 } |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
193 } |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
194 */ |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
195 } |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
196 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |
53d08f33d094
Backend: Moved guessing of main values and there time intervals out of the STA parser. Same come will be useful to extend the WST parser to better handle official lines.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
197 |