Search in sources :

Example 1 with IndexedByHeadPredicatesRuleSet

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());
}
Also used : IndexedByHeadPredicatesRuleSet(fr.lirmm.graphik.graal.core.ruleset.IndexedByHeadPredicatesRuleSet) ConjunctiveQuery(fr.lirmm.graphik.graal.api.core.ConjunctiveQuery)

Aggregations

ConjunctiveQuery (fr.lirmm.graphik.graal.api.core.ConjunctiveQuery)1 IndexedByHeadPredicatesRuleSet (fr.lirmm.graphik.graal.core.ruleset.IndexedByHeadPredicatesRuleSet)1