com.bigdata.rdf.sparql.ast.eval
Class ASTEvalHelper

java.lang.Object
  extended by com.bigdata.rdf.sparql.ast.eval.ASTEvalHelper

public class ASTEvalHelper
extends Object

Helper class for evaluating SPARQL queries.

Version:
$Id: ASTEvalHelper.java 6281 2012-04-12 17:27:36Z thompsonbry $
Author:
Bryan Thompson

Constructor Summary
ASTEvalHelper()
           
 
Method Summary
static boolean evaluateBooleanQuery(AbstractTripleStore store, ASTContainer astContainer, BindingSet bs)
          Evaluate a boolean query.
static GraphQueryResult evaluateGraphQuery(AbstractTripleStore store, ASTContainer astContainer, QueryBindingSet bs)
          Evaluate a CONSTRUCT/DESCRIBE query.
static TupleQueryResult evaluateTupleQuery(AbstractTripleStore store, ASTContainer astContainer, QueryBindingSet bs)
          Evaluate a SELECT query.
static ICloseableIterator<IBindingSet[]> evaluateTupleQuery2(AbstractTripleStore store, ASTContainer astContainer, QueryBindingSet bs, boolean materialize)
          Evaluate a SELECT query without converting the results into openrdf solutions.
static long executeUpdate(BigdataSailRepositoryConnection conn, ASTContainer astContainer, Dataset dataset, boolean includeInferred)
          Evaluate a SPARQL UPDATE request (core method).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ASTEvalHelper

public ASTEvalHelper()
Method Detail

evaluateBooleanQuery

public static boolean evaluateBooleanQuery(AbstractTripleStore store,
                                           ASTContainer astContainer,
                                           BindingSet bs)
                                    throws QueryEvaluationException
Evaluate a boolean query.

Parameters:
store - The AbstractTripleStore having the data.
astContainer - The ASTContainer.
bs - The initial solution to kick things off.
Returns:
true if there are any solutions to the query.
Throws:
QueryEvaluationException

evaluateTupleQuery

public static TupleQueryResult evaluateTupleQuery(AbstractTripleStore store,
                                                  ASTContainer astContainer,
                                                  QueryBindingSet bs)
                                           throws QueryEvaluationException
Evaluate a SELECT query.

Parameters:
store - The AbstractTripleStore having the data.
queryPlan - The ASTContainer.
bs - The initial solution to kick things off.
Returns:
An object from which the solutions may be drained.
Throws:
QueryEvaluationException

evaluateTupleQuery2

public static ICloseableIterator<IBindingSet[]> evaluateTupleQuery2(AbstractTripleStore store,
                                                                    ASTContainer astContainer,
                                                                    QueryBindingSet bs,
                                                                    boolean materialize)
                                                             throws QueryEvaluationException
Evaluate a SELECT query without converting the results into openrdf solutions.

Parameters:
store - The AbstractTripleStore having the data.
queryPlan - The ASTContainer.
bs - The initial solution to kick things off.
materialize - When true, IVs will be materialized (their IVCache association will be set to the corresponding RDF Value). When false, this materialization step will be skipped. However, it is possible that IVs in the query plan will be materialized anyway (for example, materialization might be required to support FILTERs in the query).
Returns:
An object from which the solutions may be drained.
Throws:
QueryEvaluationException

evaluateGraphQuery

public static GraphQueryResult evaluateGraphQuery(AbstractTripleStore store,
                                                  ASTContainer astContainer,
                                                  QueryBindingSet bs)
                                           throws QueryEvaluationException
Evaluate a CONSTRUCT/DESCRIBE query.

Parameters:
store - The AbstractTripleStore having the data.
astContainer - The ASTContainer.
bs - The initial solution to kick things off.
Throws:
QueryEvaluationException

executeUpdate

public static long executeUpdate(BigdataSailRepositoryConnection conn,
                                 ASTContainer astContainer,
                                 Dataset dataset,
                                 boolean includeInferred)
                          throws UpdateExecutionException
Evaluate a SPARQL UPDATE request (core method).

Parameters:
astContainer - The query model.
ctx - The evaluation context.
dataset - A dataset which will override the data set declaration for each DeleteInsertGraph operation in the update sequence (optional).
includeInferred - if inferences should be included in various operations.
Returns:
The timestamp of the commit point.
Throws:
SailException - TODO timeout for update?
UpdateExecutionException


Copyright © 2006-2012 SYSTAP, LLC. All Rights Reserved.