use of fr.lirmm.graphik.graal.core.ruleset.IndexedByHeadPredicatesRuleSet in project graal by graphik-team.
the class RewritinCloseableIterator method compute.
// /////////////////////////////////////////////////////////////////////////
// PRIVATE METHODS
// /////////////////////////////////////////////////////////////////////////
private void compute() {
if (this.getProfiler() != null && this.getProfiler().isProfilingEnabled()) {
this.getProfiler().trace(this.pquery.getLabel());
}
IndexedByHeadPredicatesRuleSet indexedRuleSet = new IndexedByHeadPredicatesRuleSet(this.ruleset);
// rewriting
RewritingAlgorithm algo = new RewritingAlgorithm(this.operator);
operator.setProfiler(this.getProfiler());
algo.setProfiler(this.getProfiler());
Iterable<ConjunctiveQuery> queries = algo.execute(pquery, indexedRuleSet, compilation);
if (this.unfolding) {
queries = Utils.unfold(queries, this.compilation, this.getProfiler());
}
this.rewrites = new CloseableIteratorAdapter<ConjunctiveQuery>(queries.iterator());
}
Aggregations