Package virtuoso.jena.driver
Class VirtuosoQueryExecution
- java.lang.Object
-
- virtuoso.jena.driver.VirtuosoQueryExecution
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.apache.jena.query.QueryExecution
public class VirtuosoQueryExecution extends java.lang.Object implements org.apache.jena.query.QueryExecution
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
VirtuosoQueryExecution.VResultSet
-
Field Summary
Fields Modifier and Type Field Description protected long
timeout
-
Constructor Summary
Constructors Constructor Description VirtuosoQueryExecution(java.lang.String query, VirtGraph _graph)
VirtuosoQueryExecution(org.apache.jena.query.Query query, VirtGraph _graph)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
abort()
void
close()
boolean
execAsk()
org.apache.jena.rdf.model.Model
execConstruct()
org.apache.jena.rdf.model.Model
execConstruct(org.apache.jena.rdf.model.Model model)
org.apache.jena.query.Dataset
execConstructDataset()
Execute a CONSTRUCT query, putting the statements into 'dataset'.org.apache.jena.query.Dataset
execConstructDataset(org.apache.jena.query.Dataset dataset)
Execute a CONSTRUCT query, putting the statements into 'dataset'.java.util.Iterator<org.apache.jena.sparql.core.Quad>
execConstructQuads()
Execute a CONSTRUCT query, returning the results as an iterator ofQuad
.java.util.Iterator<org.apache.jena.graph.Triple>
execConstructTriples()
Execute a CONSTRUCT query, returning the results as an iterator ofTriple
.org.apache.jena.rdf.model.Model
execDescribe()
org.apache.jena.rdf.model.Model
execDescribe(org.apache.jena.rdf.model.Model model)
java.util.Iterator<org.apache.jena.graph.Triple>
execDescribeTriples()
Execute a DESCRIBE query, returning the results as an iterator ofTriple
.org.apache.jena.atlas.json.JsonArray
execJson()
java.util.Iterator<org.apache.jena.atlas.json.JsonObject>
execJsonItems()
org.apache.jena.query.ResultSet
execSelect()
org.apache.jena.sparql.util.Context
getContext()
org.apache.jena.query.Dataset
getDataset()
org.apache.jena.query.Query
getQuery()
long
getTimeout1()
Return the first timeout (time to first result), in millseconds: negative if unsetlong
getTimeout2()
Return the second timeout (overall query execution after first result), in millseconds: negative if unsetboolean
isClosed()
void
setFileManager(org.apache.jena.util.FileManager arg)
void
setInitialBinding(org.apache.jena.query.QuerySolution arg)
void
setTimeout(long timeout)
Set time, in millisecondsvoid
setTimeout(long timeout1, long timeout2)
Set time, in millisecondsvoid
setTimeout(long timeout, java.util.concurrent.TimeUnit timeoutUnits)
Set a timeout on the query execution.void
setTimeout(long timeout1, java.util.concurrent.TimeUnit timeUnit1, long timeout2, java.util.concurrent.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
-
execSelect
public org.apache.jena.query.ResultSet execSelect()
- Specified by:
execSelect
in interfaceorg.apache.jena.query.QueryExecution
-
setFileManager
public void setFileManager(org.apache.jena.util.FileManager arg)
-
setInitialBinding
public void setInitialBinding(org.apache.jena.query.QuerySolution arg)
- Specified by:
setInitialBinding
in interfaceorg.apache.jena.query.QueryExecution
-
getDataset
public org.apache.jena.query.Dataset getDataset()
- Specified by:
getDataset
in interfaceorg.apache.jena.query.QueryExecution
-
getContext
public org.apache.jena.sparql.util.Context getContext()
- Specified by:
getContext
in interfaceorg.apache.jena.query.QueryExecution
-
getQuery
public org.apache.jena.query.Query getQuery()
- Specified by:
getQuery
in interfaceorg.apache.jena.query.QueryExecution
-
execConstructQuads
public java.util.Iterator<org.apache.jena.sparql.core.Quad> execConstructQuads()
Execute a CONSTRUCT query, returning the results as an iterator ofQuad
.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.
- Specified by:
execConstructQuads
in interfaceorg.apache.jena.query.QueryExecution
- Returns:
- An iterator of Quad objects (possibly containing duplicates) generated
by applying the CONSTRUCT template of the query to the bindings in the WHERE clause.
See
execConstructTriples()
for usage and features.
-
execConstructDataset
public org.apache.jena.query.Dataset execConstructDataset()
Execute a CONSTRUCT query, putting the statements into 'dataset'. This maybe an exetended synatx query (if supported).- Specified by:
execConstructDataset
in interfaceorg.apache.jena.query.QueryExecution
-
execConstructDataset
public org.apache.jena.query.Dataset execConstructDataset(org.apache.jena.query.Dataset dataset)
Execute a CONSTRUCT query, putting the statements into 'dataset'. This maybe an exetended synatx query (if supported).- Specified by:
execConstructDataset
in interfaceorg.apache.jena.query.QueryExecution
-
execConstruct
public org.apache.jena.rdf.model.Model execConstruct()
- Specified by:
execConstruct
in interfaceorg.apache.jena.query.QueryExecution
-
execConstruct
public org.apache.jena.rdf.model.Model execConstruct(org.apache.jena.rdf.model.Model model)
- Specified by:
execConstruct
in interfaceorg.apache.jena.query.QueryExecution
-
execConstructTriples
public java.util.Iterator<org.apache.jena.graph.Triple> execConstructTriples()
Execute a CONSTRUCT query, returning the results as an iterator ofTriple
. 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.- Specified by:
execConstructTriples
in interfaceorg.apache.jena.query.QueryExecution
- Returns:
- An iterator of Triple objects (possibly containing duplicates) generated by applying the CONSTRUCT template of the query to the bindings in the WHERE clause.
-
execDescribe
public org.apache.jena.rdf.model.Model execDescribe()
- Specified by:
execDescribe
in interfaceorg.apache.jena.query.QueryExecution
-
execDescribe
public org.apache.jena.rdf.model.Model execDescribe(org.apache.jena.rdf.model.Model model)
- Specified by:
execDescribe
in interfaceorg.apache.jena.query.QueryExecution
-
execDescribeTriples
public java.util.Iterator<org.apache.jena.graph.Triple> execDescribeTriples()
Execute a DESCRIBE query, returning the results as an iterator ofTriple
. 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.- Specified by:
execDescribeTriples
in interfaceorg.apache.jena.query.QueryExecution
- Returns:
- An iterator of Triple objects (possibly containing duplicates) generated as the output of the DESCRIBE query.
-
execAsk
public boolean execAsk()
- Specified by:
execAsk
in interfaceorg.apache.jena.query.QueryExecution
-
execJson
public org.apache.jena.atlas.json.JsonArray execJson()
- Specified by:
execJson
in interfaceorg.apache.jena.query.QueryExecution
-
execJsonItems
public java.util.Iterator<org.apache.jena.atlas.json.JsonObject> execJsonItems()
- Specified by:
execJsonItems
in interfaceorg.apache.jena.query.QueryExecution
-
abort
public void abort()
- Specified by:
abort
in interfaceorg.apache.jena.query.QueryExecution
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceorg.apache.jena.query.QueryExecution
-
isClosed
public boolean isClosed()
- Specified by:
isClosed
in interfaceorg.apache.jena.query.QueryExecution
-
setTimeout
public void setTimeout(long timeout, java.util.concurrent.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.- Specified by:
setTimeout
in interfaceorg.apache.jena.query.QueryExecution
-
setTimeout
public void setTimeout(long timeout)
Set time, in milliseconds- Specified by:
setTimeout
in interfaceorg.apache.jena.query.QueryExecution
- See Also:
setTimeout(long, TimeUnit)
-
setTimeout
public void setTimeout(long timeout1, java.util.concurrent.TimeUnit timeUnit1, long timeout2, java.util.concurrent.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.- Specified by:
setTimeout
in interfaceorg.apache.jena.query.QueryExecution
-
setTimeout
public void setTimeout(long timeout1, long timeout2)
Set time, in milliseconds- Specified by:
setTimeout
in interfaceorg.apache.jena.query.QueryExecution
- See Also:
setTimeout(long, TimeUnit, long, TimeUnit)
-
getTimeout1
public long getTimeout1()
Return the first timeout (time to first result), in millseconds: negative if unset- Specified by:
getTimeout1
in interfaceorg.apache.jena.query.QueryExecution
-
getTimeout2
public long getTimeout2()
Return the second timeout (overall query execution after first result), in millseconds: negative if unset- Specified by:
getTimeout2
in interfaceorg.apache.jena.query.QueryExecution
-
-