specify additional tags for CSV upload
You can now specify additional tags to be added to all entries. This makes it possible to remove columns that would be identical for all entries.
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
package org.lucares.pdbui;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.lucares.utils.Preconditions;
|
||||
@@ -12,6 +14,8 @@ public class CsvReaderSettings {
|
||||
|
||||
private Set<String> ignoreColumnNames = new HashSet<String>();
|
||||
|
||||
private final Map<String, String> additionalTags = new HashMap<String, String>();
|
||||
|
||||
private String timeColumn;
|
||||
|
||||
public CsvReaderSettings() {
|
||||
@@ -73,4 +77,12 @@ public class CsvReaderSettings {
|
||||
return ignoreColumnNames.contains(columnName);
|
||||
}
|
||||
|
||||
public void putAdditionalTag(final String field, final String value) {
|
||||
additionalTags.put(field, value);
|
||||
}
|
||||
|
||||
public Map<String, String> getAdditionalTags() {
|
||||
return Map.copyOf(additionalTags);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user