public interface QueryExecution extends AutoCloseable
Modifier and Type | Method and Description |
---|---|
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
|
Model |
execConstruct()
Execute a CONSTRUCT query
|
Model |
execConstruct(Model model)
Execute a CONSTRUCT query, putting the statements into 'model'.
|
Dataset |
execConstructDataset()
Execute a CONSTRUCT query, putting the statements into 'dataset'.
|
Dataset |
execConstructDataset(Dataset dataset)
Execute a CONSTRUCT query, putting the statements into 'dataset'.
|
Iterator<Quad> |
execConstructQuads()
Execute a CONSTRUCT query, returning the results as an iterator of
Quad . |
Iterator<Triple> |
execConstructTriples()
Execute a CONSTRUCT query, returning the results as an iterator of
Triple . |
Model |
execDescribe()
Execute a DESCRIBE query
|
Model |
execDescribe(Model model)
Execute a DESCRIBE query, putting the statements into 'model'.
|
Iterator<Triple> |
execDescribeTriples()
Execute a DESCRIBE query, returning the results as an iterator of
Triple . |
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.
|
long |
getTimeout1()
Return the first timeout (time to first result), in millseconds: negative if unset
|
long |
getTimeout2()
Return the second timeout (overall query execution after first result), in millseconds: negative if unset
|
boolean |
isClosed()
Answer whether this QueryExecution object has been closed or not.
|
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.
|
void setInitialBinding(QuerySolution binding)
binding
- Dataset getDataset()
Context getContext()
Query getQuery()
ResultSet execSelect()
Important: The name of this method is somewhat of a misnomer in that depending on the underlying implementation this typically does not execute the SELECT query but rather answers a wrapper over an internal data structure that can be used to answer the query. In essence calling this method only returns a plan for executing this query which only gets evaluated when you actually start iterating over the results.
Model execConstruct()
Model execConstruct(Model model)
Iterator<Triple> execConstructTriples()
Triple
.
Caution: This method may return duplicate Triples. This method may be useful if you only need the results for stream processing, as it can avoid having to place the results in a Model.
Important: The name of this method is somewhat of a misnomer in that depending on the underlying implementation this typically does not execute the CONSTRUCT query but rather answers a wrapper over an internal data structure that can be used to answer the query. In essence calling this method only returns a plan for executing this query which only gets evaluated when you actually start iterating over the results.
Iterator<Quad> execConstructQuads()
Quad
.
Caution: This method may return duplicate Quads. This method may be useful if you only need the results for stream processing, as it can avoid having to place the results in a Model.
See execConstructTriples()
for usage and features.
Dataset execConstructDataset()
Dataset execConstructDataset(Dataset dataset)
Model execDescribe()
Model execDescribe(Model model)
Iterator<Triple> execDescribeTriples()
Triple
.
Caution: This method may return duplicate Triples. This method may be useful if you only need the results for stream processing, as it can avoid having to place the results in a Model.
Important: The name of this method is somewhat of a misnomer in that depending on the underlying implementation this typically does not execute the DESCRIBE query but rather answers a wrapper over an internal data structure that can be used to answer the query. In essence calling this method only returns a plan for executing this query which only gets evaluated when you actually start iterating over the results.
boolean execAsk()
void abort()
void close()
ResultSet
from execSelect()
,
can not be used once the QueryExecution is closed.
Model results from execConstruct()
and execDescribe()
are stil valid.
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.close
in interface AutoCloseable
boolean isClosed()
void setTimeout(long timeout, TimeUnit timeoutUnits)
void setTimeout(long timeout)
setTimeout(long, TimeUnit)
void setTimeout(long timeout1, TimeUnit timeUnit1, long timeout2, TimeUnit timeUnit2)
void setTimeout(long timeout1, long timeout2)
long getTimeout1()
long getTimeout2()
Licenced under the Apache License, Version 2.0