Search in sources :

Example 1 with TripleSource

use of org.openrdf.query.algebra.evaluation.TripleSource in project blueprints by tinkerpop.

the class GraphSailConnection method evaluateInternal.

public CloseableIteration<? extends BindingSet, QueryEvaluationException> evaluateInternal(TupleExpr tupleExpr, final Dataset dataset, final BindingSet bindings, final boolean includeInferred) throws SailException {
    try {
        TripleSource tripleSource = new SailConnectionTripleSource(this, store.valueFactory, includeInferred);
        EvaluationStrategyImpl strategy = new EvaluationStrategyImpl(tripleSource, dataset);
        return strategy.evaluate(tupleExpr, bindings);
    } catch (QueryEvaluationException e) {
        throw new SailException(e);
    }
}
Also used : SailConnectionTripleSource(net.fortytwo.sesametools.SailConnectionTripleSource) TripleSource(org.openrdf.query.algebra.evaluation.TripleSource) QueryEvaluationException(org.openrdf.query.QueryEvaluationException) SailConnectionTripleSource(net.fortytwo.sesametools.SailConnectionTripleSource) SailException(org.openrdf.sail.SailException) EvaluationStrategyImpl(org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl)

Example 2 with TripleSource

use of org.openrdf.query.algebra.evaluation.TripleSource in project blueprints by tinkerpop.

the class PropertyGraphSailConnection method evaluateInternal.

protected CloseableIteration<? extends BindingSet, QueryEvaluationException> evaluateInternal(final TupleExpr query, final Dataset dataset, final BindingSet bindings, final boolean includeInferred) throws SailException {
    try {
        TripleSource tripleSource = new SailConnectionTripleSource(this, context.valueFactory, includeInferred);
        EvaluationStrategyImpl strategy = new EvaluationStrategyImpl(tripleSource, dataset);
        return strategy.evaluate(query, bindings);
    } catch (QueryEvaluationException e) {
        throw new SailException(e);
    }
}
Also used : SailConnectionTripleSource(net.fortytwo.sesametools.SailConnectionTripleSource) TripleSource(org.openrdf.query.algebra.evaluation.TripleSource) QueryEvaluationException(org.openrdf.query.QueryEvaluationException) SailConnectionTripleSource(net.fortytwo.sesametools.SailConnectionTripleSource) SailException(org.openrdf.sail.SailException) EvaluationStrategyImpl(org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl)

Aggregations

SailConnectionTripleSource (net.fortytwo.sesametools.SailConnectionTripleSource)2 QueryEvaluationException (org.openrdf.query.QueryEvaluationException)2 TripleSource (org.openrdf.query.algebra.evaluation.TripleSource)2 EvaluationStrategyImpl (org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl)2 SailException (org.openrdf.sail.SailException)2