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 classVirtuosoQueryExecution.VResultSet
-
Field Summary
Fields Modifier and Type Field Description protected longtimeout
-
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 voidabort()voidclose()booleanexecAsk()org.apache.jena.rdf.model.ModelexecConstruct()org.apache.jena.rdf.model.ModelexecConstruct(org.apache.jena.rdf.model.Model model)org.apache.jena.query.DatasetexecConstructDataset()Execute a CONSTRUCT query, putting the statements into 'dataset'.org.apache.jena.query.DatasetexecConstructDataset(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.ModelexecDescribe()org.apache.jena.rdf.model.ModelexecDescribe(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.JsonArrayexecJson()java.util.Iterator<org.apache.jena.atlas.json.JsonObject>execJsonItems()org.apache.jena.query.ResultSetexecSelect()org.apache.jena.sparql.util.ContextgetContext()org.apache.jena.query.DatasetgetDataset()org.apache.jena.query.QuerygetQuery()longgetTimeout1()Return the first timeout (time to first result), in millseconds: negative if unsetlonggetTimeout2()Return the second timeout (overall query execution after first result), in millseconds: negative if unsetbooleanisClosed()voidsetFileManager(org.apache.jena.util.FileManager arg)voidsetInitialBinding(org.apache.jena.query.QuerySolution arg)voidsetTimeout(long timeout)Set time, in millisecondsvoidsetTimeout(long timeout1, long timeout2)Set time, in millisecondsvoidsetTimeout(long timeout, java.util.concurrent.TimeUnit timeoutUnits)Set a timeout on the query execution.voidsetTimeout(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:
execSelectin 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:
setInitialBindingin interfaceorg.apache.jena.query.QueryExecution
-
getDataset
public org.apache.jena.query.Dataset getDataset()
- Specified by:
getDatasetin interfaceorg.apache.jena.query.QueryExecution
-
getContext
public org.apache.jena.sparql.util.Context getContext()
- Specified by:
getContextin interfaceorg.apache.jena.query.QueryExecution
-
getQuery
public org.apache.jena.query.Query getQuery()
- Specified by:
getQueryin 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:
execConstructQuadsin 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:
execConstructDatasetin 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:
execConstructDatasetin interfaceorg.apache.jena.query.QueryExecution
-
execConstruct
public org.apache.jena.rdf.model.Model execConstruct()
- Specified by:
execConstructin interfaceorg.apache.jena.query.QueryExecution
-
execConstruct
public org.apache.jena.rdf.model.Model execConstruct(org.apache.jena.rdf.model.Model model)
- Specified by:
execConstructin 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:
execConstructTriplesin 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:
execDescribein interfaceorg.apache.jena.query.QueryExecution
-
execDescribe
public org.apache.jena.rdf.model.Model execDescribe(org.apache.jena.rdf.model.Model model)
- Specified by:
execDescribein 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:
execDescribeTriplesin 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:
execAskin interfaceorg.apache.jena.query.QueryExecution
-
execJson
public org.apache.jena.atlas.json.JsonArray execJson()
- Specified by:
execJsonin interfaceorg.apache.jena.query.QueryExecution
-
execJsonItems
public java.util.Iterator<org.apache.jena.atlas.json.JsonObject> execJsonItems()
- Specified by:
execJsonItemsin interfaceorg.apache.jena.query.QueryExecution
-
abort
public void abort()
- Specified by:
abortin interfaceorg.apache.jena.query.QueryExecution
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfaceorg.apache.jena.query.QueryExecution
-
isClosed
public boolean isClosed()
- Specified by:
isClosedin 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:
setTimeoutin interfaceorg.apache.jena.query.QueryExecution
-
setTimeout
public void setTimeout(long timeout)
Set time, in milliseconds- Specified by:
setTimeoutin 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:
setTimeoutin interfaceorg.apache.jena.query.QueryExecution
-
setTimeout
public void setTimeout(long timeout1, long timeout2)Set time, in milliseconds- Specified by:
setTimeoutin 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:
getTimeout1in 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:
getTimeout2in interfaceorg.apache.jena.query.QueryExecution
-
-