comparison flys-backend/src/main/java/de/intevation/flys/importer/ImportRiver.java @ 201:3169b559ca3c

Build models for wsts, wst columns and q ranges and store them in the backend. flys-backend/trunk@1549 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 23 Mar 2011 15:22:32 +0000
parents c0dcc2357106
children 3a99d0295006
comparison
equal deleted inserted replaced
200:88048d4f6e4d 201:3169b559ca3c
27 protected File bbInfoFile; 27 protected File bbInfoFile;
28 28
29 protected List<ImportGauge> gauges; 29 protected List<ImportGauge> gauges;
30 30
31 protected List<ImportAnnotation> annotations; 31 protected List<ImportAnnotation> annotations;
32
33 protected ImportWst wst;
32 34
33 protected River peer; 35 protected River peer;
34 36
35 public ImportRiver() { 37 public ImportRiver() {
36 } 38 }
63 65
64 public void setBBInfo(File bbInfoFile) { 66 public void setBBInfo(File bbInfoFile) {
65 this.bbInfoFile = bbInfoFile; 67 this.bbInfoFile = bbInfoFile;
66 } 68 }
67 69
70 public ImportWst getWst() {
71 return wst;
72 }
73
74 public void setWst(ImportWst wst) {
75 this.wst = wst;
76 }
77
68 public void parseDependencies() throws IOException { 78 public void parseDependencies() throws IOException {
69 parseGauges(); 79 parseGauges();
70 parseAnnotations(); 80 parseAnnotations();
71 parseWst(); 81 parseWst();
72 } 82 }
73 83
74 public void parseWst() throws IOException { 84 public void parseWst() throws IOException {
75 WstParser wstParser = new WstParser(); 85 WstParser wstParser = new WstParser();
76 wstParser.parse(wstFile); 86 wstParser.parse(wstFile);
87 wst = wstParser.getWst();
77 } 88 }
78 89
79 public void parseGauges() throws IOException { 90 public void parseGauges() throws IOException {
80 File gltFile = new File(wstFile.getParentFile(), PEGEL_GLT); 91 File gltFile = new File(wstFile.getParentFile(), PEGEL_GLT);
81 gltFile = FileTools.repair(gltFile); 92 gltFile = FileTools.repair(gltFile);
104 } 115 }
105 116
106 public void storeDependencies() { 117 public void storeDependencies() {
107 storeAnnotations(); 118 storeAnnotations();
108 storeGauges(); 119 storeGauges();
120 storeWst();
121 }
122
123 public void storeWst() {
124 River river = getPeer();
125 wst.storeDependencies(river);
109 } 126 }
110 127
111 public void storeAnnotations() { 128 public void storeAnnotations() {
112 River river = getPeer(); 129 River river = getPeer();
113 for (ImportAnnotation annotation: annotations) { 130 for (ImportAnnotation annotation: annotations) {

http://dive4elements.wald.intevation.org