Mercurial > dive4elements > river
comparison backend/src/main/java/org/dive4elements/river/importer/ImportRiver.java @ 6347:75c483450c96
Backend: Store official lines from config if they are any.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Fri, 14 Jun 2013 18:25:12 +0200 |
parents | 0f7e9a4f1c5a |
children | 0baf7abffcc6 |
comparison
equal
deleted
inserted
replaced
6346:b966c67a476d | 6347:75c483450c96 |
---|---|
1255 } | 1255 } |
1256 } | 1256 } |
1257 } | 1257 } |
1258 | 1258 |
1259 public void storeOfficialLines() { | 1259 public void storeOfficialLines() { |
1260 if (!Config.INSTANCE.skipOfficialLines()) { | 1260 if (Config.INSTANCE.skipOfficialLines() || officialLines.isEmpty()) { |
1261 log.info("store official lines wsts"); | 1261 return; |
1262 River river = getPeer(); | 1262 } |
1263 for (ImportWst wst: officialLines) { | 1263 |
1264 log.debug("name: " + wst.getDescription()); | 1264 log.info("store official lines wsts"); |
1265 wst.storeDependencies(river); | 1265 River river = getPeer(); |
1266 for (ImportWst wst: officialLines) { | |
1267 log.debug("name: " + wst.getDescription()); | |
1268 wst.storeDependencies(river); | |
1269 | |
1270 // Store the official lines after the columns are store. | |
1271 for (ImportWstColumn wc: wst.getColumns()) { | |
1272 ImportOfficialWstColumn owc = (ImportOfficialWstColumn)wc; | |
1273 ImportOfficialLine ioc = owc.getOfficialLine(); | |
1274 if (ioc != null) { | |
1275 if (ioc.getPeer(river) == null) { | |
1276 log.warn("Cannot store official line: " + ioc.getName()); | |
1277 } | |
1278 } | |
1266 } | 1279 } |
1267 } | 1280 } |
1268 } | 1281 } |
1269 | 1282 |
1270 public void storeFloodWater() { | 1283 public void storeFloodWater() { |