io.engineblock.activities.csv.statements.CSVStmtDocList Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of at-basics Show documentation
Show all versions of at-basics Show documentation
A engineblock ActivityType (AT) driver module;
Provides a diagnostic activity that logs input at some interval
package io.engineblock.activities.csv.statements;
import io.engineblock.util.TagFilter;
import java.util.*;
import java.util.stream.Collectors;
public class CSVStmtDocList {
private List csvStmtDocList = new ArrayList<>();
public CSVStmtDocList(List csvStmtDocList) {
this.csvStmtDocList = csvStmtDocList;
}
public Map getFilteringDetails(String spec) {
Map details = new LinkedHashMap<>();
TagFilter ts = new TagFilter(spec);
for (CSVStmtDoc gsb : this.csvStmtDocList) {
TagFilter.Result result = ts.matchesTaggedResult(gsb);
details.put(gsb.getName(), result.getLog());
}
return details;
}
public List getMatching(String tagSpec) {
List matchingBlocks = new ArrayList<>();
TagFilter ts = new TagFilter(tagSpec);
return this.csvStmtDocList.stream().filter(ts::matchesTagged).collect(Collectors.toList());
}
public List getAll() {
return Collections.unmodifiableList(this.csvStmtDocList);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy