Mercurial > dive4elements > river
changeset 6506:1c68d4b2a1c0
Fix import of source from wst-files
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Fri, 28 Jun 2013 17:47:27 +0200 |
parents | 7664ab97b4c7 |
children | f4fb7e38a288 b2eab164a441 |
files | backend/src/main/java/org/dive4elements/river/importer/ImportWstColumn.java backend/src/main/java/org/dive4elements/river/importer/parsers/WstParser.java backend/src/main/java/org/dive4elements/river/model/WstColumn.java |
diffstat | 3 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/backend/src/main/java/org/dive4elements/river/importer/ImportWstColumn.java Fri Jun 28 17:00:55 2013 +0200 +++ b/backend/src/main/java/org/dive4elements/river/importer/ImportWstColumn.java Fri Jun 28 17:47:27 2013 +0200 @@ -169,6 +169,7 @@ List<WstColumn> columns = query.list(); if (columns.isEmpty()) { + log.debug("source: " + source); peer = new WstColumn( w, name, description, source, position, ti); session.save(peer);
--- a/backend/src/main/java/org/dive4elements/river/importer/parsers/WstParser.java Fri Jun 28 17:00:55 2013 +0200 +++ b/backend/src/main/java/org/dive4elements/river/importer/parsers/WstParser.java Fri Jun 28 17:47:27 2013 +0200 @@ -10,6 +10,7 @@ import java.util.ArrayList; import java.util.HashSet; +import java.util.Arrays; import java.io.File; import java.io.IOException; @@ -212,10 +213,12 @@ } } else if (spezial.startsWith(COLUMN_QUELLE)) { + spezial = spezial.substring(COLUMN_QUELLE.length()).trim(); if (spezial.length() == 0) { continue; } quellen = StringUtil.splitQuoted(spezial, '"'); + log.debug("sources: " + Arrays.toString(quellen)); } else if (spezial.startsWith(COLUMN_DATUM)) { spezial = spezial.substring(COLUMN_DATUM.length()).trim();
--- a/backend/src/main/java/org/dive4elements/river/model/WstColumn.java Fri Jun 28 17:00:55 2013 +0200 +++ b/backend/src/main/java/org/dive4elements/river/model/WstColumn.java Fri Jun 28 17:47:27 2013 +0200 @@ -96,7 +96,7 @@ @Column(name = "source") public String getSource() { - return description; + return source; } public void setSource(String source) {