Mercurial > dive4elements > river
comparison flys-backend/src/main/java/de/intevation/flys/importer/ImportRiver.java @ 186:cf8cbcb6a10d
Added parser to read *.KM files.
flys-backend/trunk@1506 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 17 Mar 2011 17:43:57 +0000 |
parents | 4ab2c3bd474c |
children | 003ac16812dd |
comparison
equal
deleted
inserted
replaced
185:a60edcfe5f53 | 186:cf8cbcb6a10d |
---|---|
20 protected File wstFile; | 20 protected File wstFile; |
21 | 21 |
22 protected File bbInfoFile; | 22 protected File bbInfoFile; |
23 | 23 |
24 protected List<ImportGauge> gauges; | 24 protected List<ImportGauge> gauges; |
25 | |
26 protected List<ImportAnnotation> annotations; | |
25 | 27 |
26 public ImportRiver() { | 28 public ImportRiver() { |
27 } | 29 } |
28 | 30 |
29 public ImportRiver(String name, File wstFile, File bbInfoFile) { | 31 public ImportRiver(String name, File wstFile, File bbInfoFile) { |
54 | 56 |
55 public void setBBInfo(File bbInfoFile) { | 57 public void setBBInfo(File bbInfoFile) { |
56 this.bbInfoFile = bbInfoFile; | 58 this.bbInfoFile = bbInfoFile; |
57 } | 59 } |
58 | 60 |
61 public void parseDependencies() throws IOException { | |
62 parseGauges(); | |
63 parseAnnotations(); | |
64 } | |
65 | |
59 public void parseGauges() throws IOException { | 66 public void parseGauges() throws IOException { |
60 File gltFile = new File(wstFile.getParentFile(), PEGEL_GLT); | 67 File gltFile = new File(wstFile.getParentFile(), PEGEL_GLT); |
61 gltFile = FileTools.repair(gltFile); | 68 gltFile = FileTools.repair(gltFile); |
62 | 69 |
63 if (!gltFile.isFile() || !gltFile.canRead()) { | 70 if (!gltFile.isFile() || !gltFile.canRead()) { |
68 PegelGltParser pgltp = new PegelGltParser(); | 75 PegelGltParser pgltp = new PegelGltParser(); |
69 pgltp.parse(gltFile); | 76 pgltp.parse(gltFile); |
70 | 77 |
71 gauges = pgltp.getGauges(); | 78 gauges = pgltp.getGauges(); |
72 } | 79 } |
80 | |
81 public void parseAnnotations() throws IOException { | |
82 File riverDir = wstFile.getParentFile().getParentFile(); | |
83 AnnotationsParser aparser = new AnnotationsParser(); | |
84 aparser.parse(riverDir); | |
85 | |
86 annotations = aparser.getAnnotations(); | |
87 } | |
73 } | 88 } |
74 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 89 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |