- All Superinterfaces:
- AutoCloseable
- All Known Implementing Classes:
- QueryExecutionAdapter,- QueryExecutionCompat,- QueryExecutionHTTP
- 
Method SummaryModifier and TypeMethodDescriptionvoidabort()Stop in mid execution.voidclose()Close the query execution and stop query evaluation as soon as convenient.static QueryExecutionDatasetBuildercreate()Create a local execution builderstatic QueryExecutionCreate a local execution on a dataset for a given querystatic QueryExecutionCreate a local execution on a dataset for a given querystatic QueryExecutionCreate a local execution on a dataset for a given querystatic QueryExecutionCreate a local execution on a dataset for a given querystatic QueryExecutionDatasetBuilderCreate a local execution builder on a datasetbooleanexecAsk()Execute an ASK queryorg.apache.jena.rdf.model.ModelExecute a CONSTRUCT queryorg.apache.jena.rdf.model.ModelexecConstruct(org.apache.jena.rdf.model.Model model) Execute a CONSTRUCT query, putting the statements into 'model'.Execute a CONSTRUCT query, putting the statements into 'dataset'.execConstructDataset(Dataset dataset) Execute a CONSTRUCT query, putting the statements into 'dataset'.Execute a CONSTRUCT query, returning the results as an iterator ofQuad.Iterator<org.apache.jena.graph.Triple>Execute a CONSTRUCT query, returning the results as an iterator ofTriple.org.apache.jena.rdf.model.ModelExecute a DESCRIBE queryorg.apache.jena.rdf.model.ModelexecDescribe(org.apache.jena.rdf.model.Model model) Execute a DESCRIBE query, putting the statements into 'model'.Iterator<org.apache.jena.graph.Triple>Execute a DESCRIBE query, returning the results as an iterator ofTriple.execJson()Execute a JSON query and return a json arrayExecute a JSON query and return an interatorExecute a SELECT queryThe properties associated with a query execution - implementation specific parameters This includes Java objects (so it is not an RDF graph).The dataset against which the query will execute.getQuery()The query associated with a query execution.The query as a string.longReturn the first timeout (time to first result), in milliseconds: negative if unsetlongReturn the second timeout (overall query execution after first result), in milliseconds: negative if unsetbooleanisClosed()Answer whether this QueryExecution object has been closed or not.static QueryExecutionDatasetBuildermodel(org.apache.jena.rdf.model.Model model) Create a local execution builder on a modelstatic QueryExecutionHTTPBuilderCreate a remote execution builder going to an endpoint URL.static QueryExecutionHTTPCreate a remote execution.static QueryExecutionCreate a remote execution.
- 
Method Details- 
createCreate a local execution on a dataset for a given query
- 
createCreate a local execution on a dataset for a given query
- 
createCreate a local execution on a dataset for a given query
- 
createCreate a local execution on a dataset for a given query
- 
serviceCreate a remote execution.
- 
serviceCreate a remote execution.
- 
datasetCreate a local execution builder on a dataset
- 
modelCreate a local execution builder on a model
- 
serviceCreate a remote execution builder going to an endpoint URL.
- 
createCreate a local execution builder
- 
getDatasetDataset getDataset()The dataset against which the query will execute. May be null, implying it is expected that the query itself has a dataset description.
- 
getContextContext 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).
- 
getQueryQuery getQuery()The query associated with a query execution. May be null (QueryExecution may have been created by other means)
- 
getQueryStringString getQueryString()The query as a string. This may be null (QueryExecution may have been created by other means). This may contain non-Jena extensions and can not be parsed by Jena. IfgetQuery()is not null, this is a corresponding string that parses to the same query.
- 
execSelectResultSet execSelect()Execute a SELECT queryImportant: 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. 
- 
execConstructorg.apache.jena.rdf.model.Model execConstruct()Execute a CONSTRUCT query
- 
execConstructorg.apache.jena.rdf.model.Model execConstruct(org.apache.jena.rdf.model.Model model) Execute a CONSTRUCT query, putting the statements into 'model'.- Returns:
- Model The model argument for cascaded code.
 
- 
execConstructTriplesIterator<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. 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. - 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.
 
- 
execConstructQuadsExecute 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. See execConstructTriples()for usage and features.- 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.
 
- 
execConstructDatasetDataset execConstructDataset()Execute a CONSTRUCT query, putting the statements into 'dataset'. This maybe an extended syntax query (if supported).
- 
execConstructDatasetExecute a CONSTRUCT query, putting the statements into 'dataset'. This maybe an extended syntax query (if supported).
- 
execDescribeorg.apache.jena.rdf.model.Model execDescribe()Execute a DESCRIBE query
- 
execDescribeorg.apache.jena.rdf.model.Model execDescribe(org.apache.jena.rdf.model.Model model) Execute a DESCRIBE query, putting the statements into 'model'.- Returns:
- Model The model argument for cascaded code.
 
- 
execDescribeTriplesIterator<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. 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. - Returns:
- An iterator of Triple objects (possibly containing duplicates) generated as the output of the DESCRIBE query.
 
- 
execAskboolean execAsk()Execute an ASK query
- 
execJsonJsonArray execJson()Execute a JSON query and return a json array
- 
execJsonItemsIterator<JsonObject> execJsonItems()Execute a JSON query and return an interator
- 
abortvoid 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.
- 
closevoid close()Close the query execution and stop query evaluation as soon as convenient. QueryExecution objects, and aResultSetfromexecSelect(), can not be used once the QueryExecution is closed. Model results fromexecConstruct()andexecDescribe()are still 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.- Specified by:
- closein interface- AutoCloseable
 
- 
isClosedboolean isClosed()Answer whether this QueryExecution object has been closed or not.- Returns:
- boolean
 
- 
getTimeout1long getTimeout1()Return the first timeout (time to first result), in milliseconds: negative if unset
- 
getTimeout2long getTimeout2()Return the second timeout (overall query execution after first result), in milliseconds: negative if unset
 
-