Skip to content
Snippets Groups Projects
Commit 74fb652c authored by Lange, Dr. Herbert's avatar Lange, Dr. Herbert
Browse files

add report-limit parameter to config

parent 8de2b80d
No related branches found
No related tags found
No related merge requests found
Pipeline #12388 passed
...@@ -26,6 +26,9 @@ public class Config { ...@@ -26,6 +26,9 @@ public class Config {
@JsonProperty("parameters") @JsonProperty("parameters")
Map<String,String> parameters = new HashMap<>(); Map<String,String> parameters = new HashMap<>();
@JsonProperty("report-limit")
int reportLimit = 0;
public Config() { public Config() {
} }
...@@ -90,12 +93,21 @@ public class Config { ...@@ -90,12 +93,21 @@ public class Config {
return props; return props;
} }
public int getReportLimit() {
return reportLimit;
}
public void setReportLimit(int reportLimit) {
this.reportLimit = reportLimit;
}
@Override @Override
public String toString() { public String toString() {
return "Config{" + return "Config{" +
"name='" + name + '\'' + "name='" + name + '\'' +
", functions=" + String.join(",", functions) + ", functions=" + String.join(",", functions) +
", params=" + parameters + ", params=" + parameters +
", report-limit=" + reportLimit +
'}'; '}';
} }
} }
...@@ -32,7 +32,8 @@ class CorpusThread extends Thread { ...@@ -32,7 +32,8 @@ class CorpusThread extends Thread {
Function<String,Void> callbackFunction; Function<String,Void> callbackFunction;
CorpusThread(String name, String infile, String outfile, List<String> functions, Properties properties, CorpusThread(String name, String infile, String outfile, List<String> functions, Properties properties,
Function<String, Void> callback) { int reportLimit, Function<String, Void> callback) {
Report.reportLimit = reportLimit;
this.corpusName=name; this.corpusName=name;
if (infile.equals("tmp")) if (infile.equals("tmp"))
this.inFile = System.getProperty("java.io.tmpdir") + "/corpus-files"; this.inFile = System.getProperty("java.io.tmpdir") + "/corpus-files";
... ...
......
...@@ -109,6 +109,7 @@ public class GUI { ...@@ -109,6 +109,7 @@ public class GUI {
, "tmp" // write report to tmp , "tmp" // write report to tmp
, config.getFunctions() , config.getFunctions()
, config.getParametersAsProperties() , config.getParametersAsProperties()
, config.reportLimit
, callback); , callback);
worker.start(); worker.start();
} catch (IOException e) { } catch (IOException e) {
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment