Mercurial > dive4elements > river
comparison flys-backend/src/main/java/de/intevation/flys/importer/ImportRiver.java @ 5261:1e403a0efc21
ImportRiver: Light cleaning up, waterlevelimport more parralel to other imports.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 13 Mar 2013 09:19:33 +0100 |
parents | 35b78d8c44b8 |
children | 0d9ad1c432b8 |
comparison
equal
deleted
inserted
replaced
5260:8f71fe38977c | 5261:1e403a0efc21 |
---|---|
128 | 128 |
129 protected List<ImportWst> floodWater; | 129 protected List<ImportWst> floodWater; |
130 | 130 |
131 protected List<ImportWst> floodProtection; | 131 protected List<ImportWst> floodProtection; |
132 | 132 |
133 /** Wst-structures from waterlevel-csv files. */ | |
134 protected List<ImportWst> waterlevels; | |
135 | |
133 /** Wst-structures from waterlevel-difference-csv files. */ | 136 /** Wst-structures from waterlevel-difference-csv files. */ |
134 protected List<ImportWst> waterlevelDifferences; | 137 protected List<ImportWst> waterlevelDifferences; |
135 | 138 |
136 protected List<ImportBedHeight> bedHeightSingles; | 139 protected List<ImportBedHeight> bedHeightSingles; |
137 | 140 |
201 crossSections = new ArrayList<ImportCrossSection>(); | 204 crossSections = new ArrayList<ImportCrossSection>(); |
202 extraWsts = new ArrayList<ImportWst>(); | 205 extraWsts = new ArrayList<ImportWst>(); |
203 fixations = new ArrayList<ImportWst>(); | 206 fixations = new ArrayList<ImportWst>(); |
204 officialLines = new ArrayList<ImportWst>(); | 207 officialLines = new ArrayList<ImportWst>(); |
205 floodWater = new ArrayList<ImportWst>(); | 208 floodWater = new ArrayList<ImportWst>(); |
209 waterlevels = new ArrayList<ImportWst>(); | |
206 waterlevelDifferences = new ArrayList<ImportWst>(); | 210 waterlevelDifferences = new ArrayList<ImportWst>(); |
207 floodProtection = new ArrayList<ImportWst>(); | 211 floodProtection = new ArrayList<ImportWst>(); |
208 sedimentDensities = new ArrayList<ImportSedimentDensity>(); | 212 sedimentDensities = new ArrayList<ImportSedimentDensity>(); |
209 morphologicalWidths = new ArrayList<ImportMorphWidth>(); | 213 morphologicalWidths = new ArrayList<ImportMorphWidth>(); |
210 flowVelocityModels = new ArrayList<ImportFlowVelocityModel>(); | 214 flowVelocityModels = new ArrayList<ImportFlowVelocityModel>(); |
562 // The parsed ImportWaterlevels are converted to | 566 // The parsed ImportWaterlevels are converted to |
563 // 'fixation'-wsts now. | 567 // 'fixation'-wsts now. |
564 for(ImportWst iw: parser.getWaterlevels()) { | 568 for(ImportWst iw: parser.getWaterlevels()) { |
565 iw.setDescription("CSV/" + iw.getDescription()); | 569 iw.setDescription("CSV/" + iw.getDescription()); |
566 iw.setKind(6); | 570 iw.setKind(6); |
567 fixations.add(iw); | 571 waterlevels.add(iw); |
568 } | 572 } |
569 } | 573 } |
570 | 574 |
571 protected void parseMeasurementStations() throws IOException { | 575 protected void parseMeasurementStations() throws IOException { |
572 if (Config.INSTANCE.skipMeasurementStations()) { | 576 if (Config.INSTANCE.skipMeasurementStations()) { |
1081 storeBedHeight(); | 1085 storeBedHeight(); |
1082 storeSedimentDensity(); | 1086 storeSedimentDensity(); |
1083 storeMorphologicalWidth(); | 1087 storeMorphologicalWidth(); |
1084 storeFlowVelocity(); | 1088 storeFlowVelocity(); |
1085 storeSedimentYield(); | 1089 storeSedimentYield(); |
1090 storeWaterlevels(); | |
1086 storeWaterlevelDifferences(); | 1091 storeWaterlevelDifferences(); |
1087 storeMeasurementStations(); | 1092 storeMeasurementStations(); |
1088 storeSQRelations(); | 1093 storeSQRelations(); |
1089 storeOfficialNumber(); | 1094 storeOfficialNumber(); |
1090 } | 1095 } |
1127 | 1132 |
1128 public void storeFixations() { | 1133 public void storeFixations() { |
1129 if (!Config.INSTANCE.skipFixations() || !Config.INSTANCE.skipWaterlevels()) { | 1134 if (!Config.INSTANCE.skipFixations() || !Config.INSTANCE.skipWaterlevels()) { |
1130 log.info("store fixation wsts and/or csvs"); | 1135 log.info("store fixation wsts and/or csvs"); |
1131 River river = getPeer(); | 1136 River river = getPeer(); |
1132 for (ImportWst fwst: fixations) { | 1137 for (ImportWst fWst: fixations) { |
1133 log.debug("name: " + fwst.getDescription()); | 1138 log.debug("Fixation name: " + fWst.getDescription()); |
1134 fwst.storeDependencies(river); | 1139 fWst.storeDependencies(river); |
1135 } | 1140 } |
1136 } | 1141 } |
1137 } | 1142 } |
1138 | 1143 |
1144 | |
1145 /** Store wsts from waterlevel-csv files. */ | |
1146 public void storeWaterlevels() { | |
1147 if (!Config.INSTANCE.skipWaterlevels()) | |
1148 | |
1149 log.info("store waterlevel wsts from csv"); | |
1150 River river = getPeer(); | |
1151 for (ImportWst wWst: waterlevels) { | |
1152 log.debug("Waterlevel name: " + wWst.getDescription()); | |
1153 wWst.storeDependencies(river); | |
1154 } | |
1155 } | |
1156 | |
1139 | 1157 |
1140 /** Store wsts from waterleveldifference-csv files. */ | 1158 /** Store wsts from waterleveldifference-csv files. */ |
1141 public void storeWaterlevelDifferences() { | 1159 public void storeWaterlevelDifferences() { |
1142 if (!Config.INSTANCE.skipWaterlevelDifferences()) | 1160 if (!Config.INSTANCE.skipWaterlevelDifferences()) |
1143 | 1161 |