comparison backend/src/main/java/org/dive4elements/river/importer/ImportRiver.java @ 7751:24408bce2fdb

Parse and import model_uuid for rivers.
author Raimund Renkert <rrenkert@intevation.de>
date Thu, 27 Feb 2014 14:46:30 +0100
parents 46273d890da5
children 754ed00963d6
comparison
equal deleted inserted replaced
7750:6ff574778491 7751:24408bce2fdb
129 129
130 public static final String MINFO_SQ_DIR = "Feststofftransport-Abfluss-Beziehung"; 130 public static final String MINFO_SQ_DIR = "Feststofftransport-Abfluss-Beziehung";
131 131
132 protected String name; 132 protected String name;
133 133
134 protected String modelUuid;
135
134 protected Long officialNumber; 136 protected Long officialNumber;
135 137
136 protected File wstFile; 138 protected File wstFile;
137 139
138 protected File bbInfoFile; 140 protected File bbInfoFile;
293 sqRelations = new ArrayList<ImportSQRelation>(); 295 sqRelations = new ArrayList<ImportSQRelation>();
294 } 296 }
295 297
296 public ImportRiver( 298 public ImportRiver(
297 String name, 299 String name,
300 String modelUuid,
298 File wstFile, 301 File wstFile,
299 File bbInfoFile, 302 File bbInfoFile,
300 AnnotationClassifier annotationClassifier 303 AnnotationClassifier annotationClassifier
301 ) { 304 ) {
302 this(); 305 this();
303 this.name = name; 306 this.name = name;
307 this.modelUuid = modelUuid;
304 this.wstFile = wstFile; 308 this.wstFile = wstFile;
305 this.bbInfoFile = bbInfoFile; 309 this.bbInfoFile = bbInfoFile;
306 this.annotationClassifier = annotationClassifier; 310 this.annotationClassifier = annotationClassifier;
307 } 311 }
308 312
310 return name; 314 return name;
311 } 315 }
312 316
313 public void setName(String name) { 317 public void setName(String name) {
314 this.name = name; 318 this.name = name;
319 }
320
321 public String getModelUuid() {
322 return modelUuid;
323 }
324
325 public void setModelUuid(String modelUuid) {
326 this.modelUuid = modelUuid;
315 } 327 }
316 328
317 public Long getOfficialNumber() { 329 public Long getOfficialNumber() {
318 return this.officialNumber; 330 return this.officialNumber;
319 } 331 }
1580 1592
1581 query.setString("name", name); 1593 query.setString("name", name);
1582 List<River> rivers = query.list(); 1594 List<River> rivers = query.list();
1583 if (rivers.isEmpty()) { 1595 if (rivers.isEmpty()) {
1584 log.info("Store new river '" + name + "'"); 1596 log.info("Store new river '" + name + "'");
1585 peer = new River(name, u); 1597 peer = new River(name, u, modelUuid);
1586 if (!Config.INSTANCE.skipBWASTR()) { 1598 if (!Config.INSTANCE.skipBWASTR()) {
1587 peer.setOfficialNumber(officialNumber); 1599 peer.setOfficialNumber(officialNumber);
1588 } 1600 }
1589 session.save(peer); 1601 session.save(peer);
1590 } 1602 }

http://dive4elements.wald.intevation.org