Class QueryExecBaseSelect
java.lang.Object
org.aksw.commons.util.closeable.AutoCloseableBase
org.aksw.jenax.dataaccess.sparql.exec.query.QueryExecBaseSelect
- All Implemented Interfaces:
AutoCloseable,QueryExecBaseIterator,org.apache.jena.sparql.exec.QueryExec
- Direct Known Subclasses:
QueryExecOverRowSet,QueryExecSelect
public abstract class QueryExecBaseSelect
extends org.aksw.commons.util.closeable.AutoCloseableBase
implements QueryExecBaseIterator
Map all non-select sparql query types to select queries.
Works for CONSTRUCT and ASK. DESCRIBE and JSON not yet supported.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.jena.sparql.exec.QueryExecprotected booleanprotected org.apache.jena.query.Queryprotected booleanIf true, then triples and quads are produced by raw substitution with the bindings.Fields inherited from class org.aksw.commons.util.closeable.AutoCloseableBase
closeStackTrace, enableCloseStackTrace, isClosed -
Constructor Summary
ConstructorsConstructorDescriptionQueryExecBaseSelect(org.apache.jena.query.Query query) QueryExecBaseSelect(org.apache.jena.query.Query query, boolean rawTuples) -
Method Summary
Modifier and TypeMethodDescriptionvoidabort()static org.apache.jena.query.Queryadjust(org.apache.jena.query.Query query) booleanask()protected voidIterator<org.apache.jena.sparql.core.Quad>Iterator<org.apache.jena.graph.Triple>Iterator<org.apache.jena.graph.Triple>We use this query execution for retrieving the result set of the where clause, but we neet the subFactory to describe the individual resources then.protected abstract org.apache.jena.sparql.exec.QueryExecdoSelect(org.apache.jena.query.Query selectQuery) The actual method that needs to be implemented.Iterator<org.apache.jena.atlas.json.JsonObject>org.apache.jena.sparql.util.Contextorg.apache.jena.sparql.core.DatasetGraphorg.apache.jena.query.QuerygetQuery()protected org.apache.jena.sparql.exec.RowSetinternalSelect(org.apache.jena.query.Query selectQuery) booleanisClosed()org.apache.jena.sparql.exec.RowSetselect()protected voidsetActiveQueryExec(org.apache.jena.sparql.exec.QueryExec queryExec) Methods inherited from class org.aksw.commons.util.closeable.AutoCloseableBase
close, ensureOpen, throwClosedExceptionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.jena.sparql.exec.QueryExec
closeMethods inherited from interface org.aksw.jenax.dataaccess.sparql.exec.query.QueryExecBaseIterator
construct, construct, constructDataset, constructDataset, describe, describe, execJson
-
Field Details
-
query
protected org.apache.jena.query.Query query -
rawTuples
protected boolean rawTuplesIf true, then triples and quads are produced by raw substitution with the bindings. This means literals and variables (that are not substituted) may appear in any component. -
activeQueryExec
protected volatile org.apache.jena.sparql.exec.QueryExec activeQueryExec -
isCancelled
protected volatile boolean isCancelled
-
-
Constructor Details
-
QueryExecBaseSelect
public QueryExecBaseSelect(org.apache.jena.query.Query query) -
QueryExecBaseSelect
public QueryExecBaseSelect(org.apache.jena.query.Query query, boolean rawTuples)
-
-
Method Details
-
doSelect
protected abstract org.apache.jena.sparql.exec.QueryExec doSelect(org.apache.jena.query.Query selectQuery) The actual method that needs to be implemented. The argument is always a SPARQL query of select type. The RowSet may need to implement close() in order to close an underlying query execution. -
getDataset
public org.apache.jena.sparql.core.DatasetGraph getDataset()- Specified by:
getDatasetin interfaceorg.apache.jena.sparql.exec.QueryExec
-
getContext
public org.apache.jena.sparql.util.Context getContext()- Specified by:
getContextin interfaceorg.apache.jena.sparql.exec.QueryExec
-
abort
public void abort()- Specified by:
abortin interfaceorg.apache.jena.sparql.exec.QueryExec
-
closeActual
- Overrides:
closeActualin classorg.aksw.commons.util.closeable.AutoCloseableBase- Throws:
Exception
-
setActiveQueryExec
protected void setActiveQueryExec(org.apache.jena.sparql.exec.QueryExec queryExec) -
internalSelect
protected org.apache.jena.sparql.exec.RowSet internalSelect(org.apache.jena.query.Query selectQuery) -
adjust
public static org.apache.jena.query.Query adjust(org.apache.jena.query.Query query) -
ask
public boolean ask()- Specified by:
askin interfaceorg.apache.jena.sparql.exec.QueryExec
-
constructQuads
- Specified by:
constructQuadsin interfaceorg.apache.jena.sparql.exec.QueryExec
-
constructTriples
- Specified by:
constructTriplesin interfaceorg.apache.jena.sparql.exec.QueryExec
-
select
public org.apache.jena.sparql.exec.RowSet select()- Specified by:
selectin interfaceorg.apache.jena.sparql.exec.QueryExec
-
getQuery
public org.apache.jena.query.Query getQuery()- Specified by:
getQueryin interfaceorg.apache.jena.sparql.exec.QueryExec
-
getQueryString
- Specified by:
getQueryStringin interfaceorg.apache.jena.sparql.exec.QueryExec
-
execJsonItems
- Specified by:
execJsonItemsin interfaceorg.apache.jena.sparql.exec.QueryExec
-
isClosed
public boolean isClosed()- Specified by:
isClosedin interfaceorg.apache.jena.sparql.exec.QueryExec
-
describeTriples
We use this query execution for retrieving the result set of the where clause, but we neet the subFactory to describe the individual resources then.- Specified by:
describeTriplesin interfaceorg.apache.jena.sparql.exec.QueryExec- Returns:
-