Class FedXTupleQuery
java.lang.Object
org.eclipse.rdf4j.query.impl.AbstractOperation
org.eclipse.rdf4j.query.impl.AbstractQuery
org.eclipse.rdf4j.query.impl.AbstractParserQuery
org.eclipse.rdf4j.repository.sail.SailQuery
org.eclipse.rdf4j.repository.sail.SailTupleQuery
org.eclipse.rdf4j.federated.structures.FedXTupleQuery
- All Implemented Interfaces:
Operation,Query,TupleQuery
Abstraction of a
SailTupleQuery which takes care for tracking the
FedXRepositoryConnection.BINDING_ORIGINAL_MAX_EXECUTION_TIME during evaluation.
All methods are delegated to the actual SailTupleQuery.
- Author:
- Andreas Schwarte
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.rdf4j.query.impl.AbstractParserQuery
AbstractParserQuery.QueryInterruptIterationNested classes/interfaces inherited from interface org.eclipse.rdf4j.query.Query
Query.QueryType -
Field Summary
FieldsFields inherited from class org.eclipse.rdf4j.query.impl.AbstractParserQuery
DEFAULT_EXPLANATION_EXECUTION_TIMEOUTFields inherited from class org.eclipse.rdf4j.query.impl.AbstractOperation
bindings, dataset, includeInferred -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidRemoves all previously set bindings.booleanevaluate()voidevaluate(TupleQueryResultHandler handler) Gets the "active" dataset for this query.Retrieves the bindings that have been set on this operation.Gets the dataset that has been set usingOperation.setDataset(Dataset), if any.booleanReturns whether or not this operation will return inferred statements (if any are present in the repository).intReturns the maximum operation execution time.intReturns the maximum query evaluation time.inthashCode()voidremoveBinding(String name) Removes a previously set binding on the supplied variable.voidsetBinding(String name, Value value) Binds the specified variable to the supplied value.voidsetDataset(Dataset dataset) Specifies the dataset against which to execute an operation, overriding any dataset that is specified in the operation itself.voidsetIncludeInferred(boolean includeInferred) Determine whether evaluation results of this operation should include inferred statements (if any inferred statements are present in the repository).voidsetMaxExecutionTime(int maxExecutionTimeSeconds) Specifies the maximum time that an operation is allowed to run.voidsetMaxQueryTime(int maxQueryTime) Specifies the maximum time that a query is allowed to run.toString()Methods inherited from class org.eclipse.rdf4j.repository.sail.SailQuery
explain, getConnectionMethods inherited from class org.eclipse.rdf4j.query.impl.AbstractParserQuery
enforceMaxQueryTime
-
Field Details
-
delegate
-
-
Constructor Details
-
FedXTupleQuery
-
-
Method Details
-
evaluate
- Specified by:
evaluatein interfaceTupleQuery- Overrides:
evaluatein classSailTupleQuery- Throws:
QueryEvaluationException
-
evaluate
public void evaluate(TupleQueryResultHandler handler) throws QueryEvaluationException, TupleQueryResultHandlerException - Specified by:
evaluatein interfaceTupleQuery- Overrides:
evaluatein classSailTupleQuery- Throws:
QueryEvaluationExceptionTupleQueryResultHandlerException
-
setMaxQueryTime
public void setMaxQueryTime(int maxQueryTime) Description copied from interface:QuerySpecifies the maximum time that a query is allowed to run. The query will be interrupted when it exceeds the time limit. Any consecutive requests to fetch query results will result inQueryInterruptedExceptions.- Specified by:
setMaxQueryTimein interfaceQuery- Overrides:
setMaxQueryTimein classAbstractQuery- Parameters:
maxQueryTime- The maximum query time, measured in seconds. A negative or zero value indicates an unlimited query time (which is the default).
-
getMaxQueryTime
public int getMaxQueryTime()Description copied from interface:QueryReturns the maximum query evaluation time.- Specified by:
getMaxQueryTimein interfaceQuery- Overrides:
getMaxQueryTimein classAbstractQuery- Returns:
- The maximum query evaluation time, measured in seconds.
- See Also:
-
setBinding
Description copied from interface:OperationBinds the specified variable to the supplied value. Any value that was previously bound to the specified value will be overwritten.- Specified by:
setBindingin interfaceOperation- Overrides:
setBindingin classAbstractOperation- Parameters:
name- The name of the variable that should be bound.value- The (new) value for the specified variable.
-
removeBinding
Description copied from interface:OperationRemoves a previously set binding on the supplied variable. Calling this method with an unbound variable name has no effect.- Specified by:
removeBindingin interfaceOperation- Overrides:
removeBindingin classAbstractOperation- Parameters:
name- The name of the variable from which the binding is to be removed.
-
clearBindings
public void clearBindings()Description copied from interface:OperationRemoves all previously set bindings.- Specified by:
clearBindingsin interfaceOperation- Overrides:
clearBindingsin classAbstractOperation
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractParserQuery
-
getParsedQuery
- Overrides:
getParsedQueryin classSailTupleQuery
-
getBindings
Description copied from interface:OperationRetrieves the bindings that have been set on this operation.- Specified by:
getBindingsin interfaceOperation- Overrides:
getBindingsin classAbstractOperation- Returns:
- A (possibly empty) set of operation variable bindings.
- See Also:
-
setDataset
Description copied from interface:OperationSpecifies the dataset against which to execute an operation, overriding any dataset that is specified in the operation itself.- Specified by:
setDatasetin interfaceOperation- Overrides:
setDatasetin classAbstractOperation
-
getDataset
Description copied from interface:OperationGets the dataset that has been set usingOperation.setDataset(Dataset), if any.- Specified by:
getDatasetin interfaceOperation- Overrides:
getDatasetin classAbstractOperation
-
setIncludeInferred
public void setIncludeInferred(boolean includeInferred) Description copied from interface:OperationDetermine whether evaluation results of this operation should include inferred statements (if any inferred statements are present in the repository). The default setting is 'true'.- Specified by:
setIncludeInferredin interfaceOperation- Overrides:
setIncludeInferredin classAbstractOperation- Parameters:
includeInferred- indicates whether inferred statements should be included in the result.
-
getActiveDataset
Description copied from class:AbstractParserQueryGets the "active" dataset for this query. The active dataset is either the dataset that has been specified usingAbstractOperation.setDataset(Dataset)or the dataset that has been specified in the query, where the former takes precedence over the latter.- Overrides:
getActiveDatasetin classAbstractParserQuery- Returns:
- The active dataset, or null if there is no dataset.
-
getIncludeInferred
public boolean getIncludeInferred()Description copied from interface:OperationReturns whether or not this operation will return inferred statements (if any are present in the repository).- Specified by:
getIncludeInferredin interfaceOperation- Overrides:
getIncludeInferredin classAbstractOperation- Returns:
- true if inferred statements will be returned, false otherwise.
-
setMaxExecutionTime
public void setMaxExecutionTime(int maxExecutionTimeSeconds) Description copied from interface:OperationSpecifies the maximum time that an operation is allowed to run. The operation will be interrupted when it exceeds the time limit. Any consecutive requests to fetch query results will result inQueryInterruptedExceptions orUpdateExecutionExceptions (depending on whether the operation is a query or an update).- Specified by:
setMaxExecutionTimein interfaceOperation- Overrides:
setMaxExecutionTimein classAbstractOperation- Parameters:
maxExecutionTimeSeconds- The maximum query time, measured in seconds. A negative or zero value indicates an unlimited execution time (which is the default).
-
getMaxExecutionTime
public int getMaxExecutionTime()Description copied from interface:OperationReturns the maximum operation execution time.- Specified by:
getMaxExecutionTimein interfaceOperation- Overrides:
getMaxExecutionTimein classAbstractOperation- Returns:
- The maximum operation execution time, measured in seconds.
- See Also:
-
toString
- Overrides:
toStringin classAbstractParserQuery
-
equals
- Overrides:
equalsin classAbstractParserQuery
-