com.hp.hpl.jena.query
Interface QueryExecution

All Known Implementing Classes:
QueryEngineHTTP, QueryExecutionBase

public interface QueryExecution

A interface for a single execution of a query.


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.
 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 binding)
          Set the initial association of variables and values.
 void setTimeout(long timeout)
          Set time, in milliseconds
 void setTimeout(long timeout1, long timeout2)
          Set time, in milliseconds
 void setTimeout(long timeout, TimeUnit timeoutUnits)
          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.
 

Method Detail

setFileManager

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


setInitialBinding

void setInitialBinding(QuerySolution binding)
Set the initial association of variables and values. May not be supported by all QueryExecution implementations.

Parameters:
binding -

getDataset

Dataset getDataset()
The dataset against which the query will execute. May be null, implying it is expected that the query itself has a dataset description.


getContext

Context getContext()
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).


getQuery

Query getQuery()
The query associated with a query execution. May be null (QueryExecution may have been created by other means)


execSelect

ResultSet execSelect()
Execute a SELECT query


execConstruct

com.hp.hpl.jena.rdf.model.Model execConstruct()
Execute a CONSTRUCT query


execConstruct

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'.

Returns:
Model The model argument for casaded code.

execDescribe

com.hp.hpl.jena.rdf.model.Model execDescribe()
Execute a DESCRIBE query


execDescribe

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'.

Returns:
Model The model argument for casaded code.

execAsk

boolean execAsk()
Execute an ASK query


abort

void abort()
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.


close

void close()
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.


setTimeout

void setTimeout(long timeout,
                TimeUnit timeoutUnits)
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.


setTimeout

void setTimeout(long timeout)
Set time, in milliseconds

See Also:
setTimeout(long, TimeUnit)

setTimeout

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. 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.


setTimeout

void setTimeout(long timeout1,
                long timeout2)
Set time, in milliseconds

See Also:
setTimeout(long, TimeUnit, long, TimeUnit)


Licenced under the Apache License, Version 2.0