public class FedXTupleQuery extends SailTupleQuery
SailTupleQuery
which takes care for tracking the
FedXRepositoryConnection.BINDING_ORIGINAL_MAX_EXECUTION_TIME
during evaluation.
All methods are delegated to the actual SailTupleQuery
.AbstractParserQuery.QueryInterruptIteration
Modifier and Type | Field and Description |
---|---|
protected SailTupleQuery |
delegate |
bindings, dataset, includeInferred
Constructor and Description |
---|
FedXTupleQuery(SailTupleQuery delegate) |
Modifier and Type | Method and Description |
---|---|
void |
clearBindings()
Removes all previously set bindings.
|
boolean |
equals(Object obj) |
TupleQueryResult |
evaluate() |
void |
evaluate(TupleQueryResultHandler handler) |
Dataset |
getActiveDataset()
Gets the "active" dataset for this query.
|
BindingSet |
getBindings()
Retrieves the bindings that have been set on this operation.
|
Dataset |
getDataset()
Gets the dataset that has been set using
Operation.setDataset(Dataset) , if any. |
boolean |
getIncludeInferred()
Returns whether or not this operation will return inferred statements (if any are present in the repository).
|
int |
getMaxExecutionTime()
Returns the maximum operation execution time.
|
int |
getMaxQueryTime()
Returns the maximum query evaluation time.
|
ParsedTupleQuery |
getParsedQuery() |
int |
hashCode() |
void |
removeBinding(String name)
Removes a previously set binding on the supplied variable.
|
void |
setBinding(String name,
Value value)
Binds the specified variable to the supplied value.
|
void |
setDataset(Dataset dataset)
Specifies the dataset against which to execute an operation, overriding any dataset that is specified in the
operation itself.
|
void |
setIncludeInferred(boolean includeInferred)
Determine whether evaluation results of this operation should include inferred statements (if any inferred
statements are present in the repository).
|
void |
setMaxExecutionTime(int maxExecutionTime)
Specifies the maximum time that an operation is allowed to run.
|
void |
setMaxQueryTime(int maxQueryTime)
Specifies the maximum time that a query is allowed to run.
|
String |
toString() |
getConnection
enforceMaxQueryTime
protected final SailTupleQuery delegate
public FedXTupleQuery(SailTupleQuery delegate)
public TupleQueryResult evaluate() throws QueryEvaluationException
evaluate
in interface TupleQuery
evaluate
in class SailTupleQuery
QueryEvaluationException
public void evaluate(TupleQueryResultHandler handler) throws QueryEvaluationException, TupleQueryResultHandlerException
evaluate
in interface TupleQuery
evaluate
in class SailTupleQuery
QueryEvaluationException
TupleQueryResultHandlerException
public void setMaxQueryTime(int maxQueryTime)
Query
QueryInterruptedException
s.setMaxQueryTime
in interface Query
setMaxQueryTime
in class AbstractQuery
maxQueryTime
- The maximum query time, measured in seconds. A negative or zero value indicates an unlimited
query time (which is the default).public int getMaxQueryTime()
Query
getMaxQueryTime
in interface Query
getMaxQueryTime
in class AbstractQuery
Query.setMaxQueryTime(int)
public void setBinding(String name, Value value)
Operation
setBinding
in interface Operation
setBinding
in class AbstractOperation
name
- The name of the variable that should be bound.value
- The (new) value for the specified variable.public void removeBinding(String name)
Operation
removeBinding
in interface Operation
removeBinding
in class AbstractOperation
name
- The name of the variable from which the binding is to be removed.public void clearBindings()
Operation
clearBindings
in interface Operation
clearBindings
in class AbstractOperation
public ParsedTupleQuery getParsedQuery()
getParsedQuery
in class SailTupleQuery
public BindingSet getBindings()
Operation
getBindings
in interface Operation
getBindings
in class AbstractOperation
Operation.setBinding(String, Value)
public void setDataset(Dataset dataset)
Operation
setDataset
in interface Operation
setDataset
in class AbstractOperation
public Dataset getDataset()
Operation
Operation.setDataset(Dataset)
, if any.getDataset
in interface Operation
getDataset
in class AbstractOperation
public void setIncludeInferred(boolean includeInferred)
Operation
setIncludeInferred
in interface Operation
setIncludeInferred
in class AbstractOperation
includeInferred
- indicates whether inferred statements should be included in the result.public Dataset getActiveDataset()
AbstractParserQuery
AbstractOperation.setDataset(Dataset)
or the dataset that has been specified in the query, where the former takes
precedence over the latter.getActiveDataset
in class AbstractParserQuery
public boolean getIncludeInferred()
Operation
getIncludeInferred
in interface Operation
getIncludeInferred
in class AbstractOperation
public void setMaxExecutionTime(int maxExecutionTime)
Operation
QueryInterruptedException
s
or UpdateExecutionException
s (depending on whether the operation is a query or an update).setMaxExecutionTime
in interface Operation
setMaxExecutionTime
in class AbstractOperation
maxExecutionTime
- The maximum query time, measured in seconds. A negative or zero value indicates an unlimited
execution time (which is the default).public int getMaxExecutionTime()
Operation
getMaxExecutionTime
in interface Operation
getMaxExecutionTime
in class AbstractOperation
Operation.setMaxExecutionTime(int)
public String toString()
toString
in class AbstractParserQuery
Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.