fr.boreal.backward_chaining.evaluators.RewritingInputWrapper Maven / Gradle / Ivy
package fr.boreal.backward_chaining.evaluators;
import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;
import fr.boreal.model.formula.api.FOFormula;
import fr.boreal.model.kb.api.RuleBase;
import fr.boreal.model.query.api.FOQuery;
import fr.boreal.model.ruleCompilation.api.RuleCompilation;
public class RewritingInputWrapper {
private final Collection> queries;
private final RuleBase ruleBase;
private final RuleCompilation compilation;
public RewritingInputWrapper(Collection> queries, RuleBase ruleBase, RuleCompilation compilation) {
this.queries = queries;
this.ruleBase = ruleBase;
this.compilation = compilation;
}
public List createRewritingInputs() {
return queries.stream()
.map(query -> new RewritingInput(query, ruleBase, compilation))
.collect(Collectors.toList());
}
}