[Dive4elements-commits] [PATCH 2 of 2] Fix Waterlevel*-Parser to correctly register the wst-columns
Wald Commits
scm-commit at wald.intevation.org
Wed Mar 13 09:59:07 CET 2013
# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1363165586 -3600
# Node ID 731030b69c7e2c879dbe4392cd915ad0bb3f9ddf
# Parent db341e37d194352e76b8a25c84b862d25b3d05b0
Fix Waterlevel*-Parser to correctly register the wst-columns.
diff -r db341e37d194 -r 731030b69c7e flys-backend/src/main/java/de/intevation/flys/importer/parsers/WaterlevelDifferencesParser.java
--- a/flys-backend/src/main/java/de/intevation/flys/importer/parsers/WaterlevelDifferencesParser.java Wed Mar 13 10:05:47 2013 +0100
+++ b/flys-backend/src/main/java/de/intevation/flys/importer/parsers/WaterlevelDifferencesParser.java Wed Mar 13 10:06:26 2013 +0100
@@ -145,13 +145,15 @@
private void initColumns(String[] cols) {
- columns = new ImportWstColumn[cols.length];
+ current.setNumberColumns(cols.length);
+ columns = current.getColumns().toArray(new ImportWstColumn[cols.length]);
for (int i = 0; i < cols.length; i++) {
String name = cols[i].replace("\"", "");
log.debug("Create new column '" + name + "'");
- columns[i] = new ImportWstColumn(current, name, name, i);
+ current.getColumn(i).setName(name);
+ current.getColumn(i).setDescription(name);
}
}
diff -r db341e37d194 -r 731030b69c7e flys-backend/src/main/java/de/intevation/flys/importer/parsers/WaterlevelParser.java
--- a/flys-backend/src/main/java/de/intevation/flys/importer/parsers/WaterlevelParser.java Wed Mar 13 10:05:47 2013 +0100
+++ b/flys-backend/src/main/java/de/intevation/flys/importer/parsers/WaterlevelParser.java Wed Mar 13 10:06:26 2013 +0100
@@ -79,10 +79,10 @@
protected void reset() {
currentQRange = null;
current = new ImportWst(currentDescription);
- column = new ImportWstColumn(current,
- currentDescription,
- currentDescription,
- 0);
+ current.setNumberColumns(1);
+ column = current.getColumn(0);
+ column.setName(currentDescription);
+ column.setDescription(currentDescription);
current.setKind(6);
}
More information about the Dive4elements-commits
mailing list