# HG changeset patch # User Sascha L. Teichmann # Date 1372434447 -7200 # Node ID 1c68d4b2a1c0ba258cc7306068e12aa4e14768c2 # Parent 7664ab97b4c7f8aeaedcd2caeaf7445f72bf8111 Fix import of source from wst-files diff -r 7664ab97b4c7 -r 1c68d4b2a1c0 backend/src/main/java/org/dive4elements/river/importer/ImportWstColumn.java --- 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 columns = query.list(); if (columns.isEmpty()) { + log.debug("source: " + source); peer = new WstColumn( w, name, description, source, position, ti); session.save(peer); diff -r 7664ab97b4c7 -r 1c68d4b2a1c0 backend/src/main/java/org/dive4elements/river/importer/parsers/WstParser.java --- 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(); diff -r 7664ab97b4c7 -r 1c68d4b2a1c0 backend/src/main/java/org/dive4elements/river/model/WstColumn.java --- 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) {