comparison flys-backend/src/main/java/de/intevation/flys/importer/ImportRiver.java @ 3329:cc8fc6b29649

Store sq relations into database after parsing. flys-backend/trunk@4647 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 13 Jun 2012 08:12:00 +0000
parents a41f279a66e2
children 36edf9a71cbd
comparison
equal deleted inserted replaced
3328:a41f279a66e2 3329:cc8fc6b29649
528 } 528 }
529 529
530 530
531 protected void parseSQRelation() throws IOException { 531 protected void parseSQRelation() throws IOException {
532 if (Config.INSTANCE.skipSQRelation()) { 532 if (Config.INSTANCE.skipSQRelation()) {
533 log.info("skip sq relation"); 533 log.info("skip parsing sq relation");
534 return; 534 return;
535 } 535 }
536 536
537 log.info("Parse sq relations"); 537 log.info("Parse sq relations");
538 538
1226 1226
1227 public void storeSQRelations() { 1227 public void storeSQRelations() {
1228 if (!Config.INSTANCE.skipSQRelation()) { 1228 if (!Config.INSTANCE.skipSQRelation()) {
1229 log.info("store sq relations"); 1229 log.info("store sq relations");
1230 1230
1231 // TODO 1231 River river = getPeer();
1232
1233 int count = 0;
1234
1235 for (ImportSQRelation sqRelation: sqRelations) {
1236 try {
1237 sqRelation.storeDependencies(river);
1238 count++;
1239 }
1240 catch (SQLException sqle) {
1241 log.error("Error while storing sq relation.", sqle);
1242 }
1243 catch (ConstraintViolationException cve) {
1244 log.error("Error while storing sq relation.", cve);
1245 }
1246 }
1247
1248 log.info("stored " + count + " sq relations.");
1232 } 1249 }
1233 } 1250 }
1234 1251
1235 1252
1236 public void storeAnnotations() { 1253 public void storeAnnotations() {

http://dive4elements.wald.intevation.org