-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_parser.java
More file actions
27 lines (24 loc) · 1.11 KB
/
test_parser.java
File metadata and controls
27 lines (24 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import org.joshsim.pipeline.job.config.JobVariationParser;
import org.joshsim.pipeline.job.JoshJobBuilder;
import org.joshsim.pipeline.job.JoshJob;
import java.util.List;
public class test_parser {
public static void main(String[] args) {
JobVariationParser parser = new JobVariationParser();
JoshJobBuilder builder = new JoshJobBuilder().setReplicates(1);
String[] dataFiles = {"example.jshc=test_data/example_1.jshc,other.jshd=test_data/other_1.jshd"};
try {
List<JoshJobBuilder> results = parser.parseDataFiles(builder, dataFiles);
System.out.println("Results count: " + results.size());
for (int i = 0; i < results.size(); i++) {
JoshJob job = results.get(i).build();
System.out.println("Job " + i + ":");
for (String fileName : job.getFileNames()) {
System.out.println(" " + fileName + " -> " + job.getFilePath(fileName));
}
}
} catch (Exception e) {
System.out.println("Exception: " + e.getMessage());
}
}
}