com.hp.hpl.jena.sparql.engine
Class QueryExecutionBase

java.lang.Object
  extended by com.hp.hpl.jena.sparql.engine.QueryExecutionBase
All Implemented Interfaces:
QueryExecution

public class QueryExecutionBase
extends Object
implements QueryExecution

All the SPARQL query result forms made from a graph-level execution object


Field Summary
static boolean cancelAllowDrain
          Deprecated. 
 
Constructor Summary
QueryExecutionBase(Query query, Dataset dataset, Context context, QueryEngineFactory qeFactory)
           
 
Method Summary
 void abort()
          Stop in mid execution.
 void close()
          Close the query execution and stop query evaluation as soon as convenient.
 boolean execAsk()
          Execute an ASK query
 com.hp.hpl.jena.rdf.model.Model execConstruct()
          Execute a CONSTRUCT query
 com.hp.hpl.jena.rdf.model.Model execConstruct(com.hp.hpl.jena.rdf.model.Model model)
          Execute a CONSTRUCT query, putting the statements into 'model'.
 com.hp.hpl.jena.rdf.model.Model execDescribe()
          Execute a DESCRIBE query
 com.hp.hpl.jena.rdf.model.Model execDescribe(com.hp.hpl.jena.rdf.model.Model model)
          Execute a DESCRIBE query, putting the statements into 'model'.
 ResultSet execSelect()
          Execute a SELECT query
 Context getContext()
          The properties associated with a query execution - implementation specific parameters This includes Java objects (so it is not an RDF graph).
 Dataset getDataset()
          The dataset against which the query will execute.
 Plan getPlan()
           
 Query getQuery()
          The query associated with a query execution.
 void setFileManager(com.hp.hpl.jena.util.FileManager fm)
          Set the FileManger that might be used to load files.
 void setInitialBinding(QuerySolution startSolution)
          Set the initial association of variables and values.
 void setInitialBindings(ResultSet table)
           
 void setTimeout(long timeout)
          Set time, in milliseconds
 void setTimeout(long timeout1, long timeout2)
          Set time, in milliseconds
 void setTimeout(long timeout, TimeUnit timeUnit)
          Set a timeout on the query execution.
 void setTimeout(long timeout1, TimeUnit timeUnit1, long timeout2, TimeUnit timeUnit2)
          Set timeouts on the query execution; the first timeout refers to time to first result, the second refers to overall query execution after the first result.
static Context setupContext(Context context, DatasetGraph dataset)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cancelAllowDrain

@Deprecated
public static boolean cancelAllowDrain
Deprecated. 
Constructor Detail

QueryExecutionBase

public QueryExecutionBase(Query query,
                          Dataset dataset,
                          Context context,
                          QueryEngineFactory qeFactory)
Method Detail

setupContext

public static Context setupContext(Context context,
                                   DatasetGraph dataset)

close

public void close()
Description copied from interface: QueryExecution
Close the query execution and stop query evaluation as soon as convenient. It is important to close query execution objects in order to release resources such as working memory and to stop the query execution. Some storage subsystems require explicit ends of operations and this operation will cause those to be called where necessary. No operations on the query execution or any associated result set are permitted after this call. This method should not be called in parallel with other methods on the QueryExecution object.

Specified by:
close in interface QueryExecution

abort

public void abort()
Description copied from interface: QueryExecution
Stop in mid execution. This method can be called in parallel with other methods on the QueryExecution object. There is no guarantee that the concrete implementation actual will stop or that it will do so immediately. No operations on the query execution or any associated result set are permitted after this call and may cause exceptions to be thrown.

Specified by:
abort in interface QueryExecution

execSelect

public ResultSet execSelect()
Description copied from interface: QueryExecution
Execute a SELECT query

Specified by:
execSelect in interface QueryExecution

execConstruct

public com.hp.hpl.jena.rdf.model.Model execConstruct()
Description copied from interface: QueryExecution
Execute a CONSTRUCT query

Specified by:
execConstruct in interface QueryExecution

execConstruct

public com.hp.hpl.jena.rdf.model.Model execConstruct(com.hp.hpl.jena.rdf.model.Model model)
Description copied from interface: QueryExecution
Execute a CONSTRUCT query, putting the statements into 'model'.

Specified by:
execConstruct in interface QueryExecution
Returns:
Model The model argument for casaded code.

execDescribe

public com.hp.hpl.jena.rdf.model.Model execDescribe()
Description copied from interface: QueryExecution
Execute a DESCRIBE query

Specified by:
execDescribe in interface QueryExecution

execDescribe

public com.hp.hpl.jena.rdf.model.Model execDescribe(com.hp.hpl.jena.rdf.model.Model model)
Description copied from interface: QueryExecution
Execute a DESCRIBE query, putting the statements into 'model'.

Specified by:
execDescribe in interface QueryExecution
Returns:
Model The model argument for casaded code.

execAsk

public boolean execAsk()
Description copied from interface: QueryExecution
Execute an ASK query

Specified by:
execAsk in interface QueryExecution

setTimeout

public void setTimeout(long timeout,
                       TimeUnit timeUnit)
Description copied from interface: QueryExecution
Set a timeout on the query execution. Processing will be aborted after the timeout (which starts when the approprate exec call is made). Not all query execution systems support timeouts. A timeout of less than zero means no timeout.

Specified by:
setTimeout in interface QueryExecution

setTimeout

public void setTimeout(long timeout)
Description copied from interface: QueryExecution
Set time, in milliseconds

Specified by:
setTimeout in interface QueryExecution
See Also:
QueryExecution.setTimeout(long, TimeUnit)

setTimeout

public void setTimeout(long timeout1,
                       TimeUnit timeUnit1,
                       long timeout2,
                       TimeUnit timeUnit2)
Description copied from interface: QueryExecution
Set timeouts on the query execution; the first timeout refers to time to first result, the second refers to overall query execution after the first result. Processing will be aborted if a timeout expires. Not all query execution systems support timeouts. A timeout of less than zero means no timeout; this can be used for timeout1 or timeout2.

Specified by:
setTimeout in interface QueryExecution

setTimeout

public void setTimeout(long timeout1,
                       long timeout2)
Description copied from interface: QueryExecution
Set time, in milliseconds

Specified by:
setTimeout in interface QueryExecution
See Also:
QueryExecution.setTimeout(long, TimeUnit, long, TimeUnit)

getPlan

public Plan getPlan()

getContext

public Context getContext()
Description copied from interface: QueryExecution
The properties associated with a query execution - implementation specific parameters This includes Java objects (so it is not an RDF graph). Keys should be URIs as strings. May be null (this implementation does not provide any configuration).

Specified by:
getContext in interface QueryExecution

getDataset

public Dataset getDataset()
Description copied from interface: QueryExecution
The dataset against which the query will execute. May be null, implying it is expected that the query itself has a dataset description.

Specified by:
getDataset in interface QueryExecution

getQuery

public Query getQuery()
Description copied from interface: QueryExecution
The query associated with a query execution. May be null (QueryExecution may have been created by other means)

Specified by:
getQuery in interface QueryExecution

setFileManager

public void setFileManager(com.hp.hpl.jena.util.FileManager fm)
Description copied from interface: QueryExecution
Set the FileManger that might be used to load files. May not be supported by all QueryExecution implementations.

Specified by:
setFileManager in interface QueryExecution

setInitialBinding

public void setInitialBinding(QuerySolution startSolution)
Description copied from interface: QueryExecution
Set the initial association of variables and values. May not be supported by all QueryExecution implementations.

Specified by:
setInitialBinding in interface QueryExecution

setInitialBindings

public void setInitialBindings(ResultSet table)


Licenced under the Apache License, Version 2.0