Package org.eclipse.rdf4j.query.impl
Class AbstractOperation
- java.lang.Object
-
- org.eclipse.rdf4j.query.impl.AbstractOperation
-
- All Implemented Interfaces:
Operation
- Direct Known Subclasses:
AbstractQuery,AbstractUpdate
public abstract class AbstractOperation extends Object implements Operation
Abstract super class of all operation types.- Author:
- Jeen Broekstra
-
-
Field Summary
Fields Modifier and Type Field Description protected MapBindingSetbindingsprotected Datasetdatasetprotected booleanincludeInferred
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractOperation()Creates a new operation object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearBindings()Removes all previously set bindings.BindingSetgetBindings()Retrieves the bindings that have been set on this operation.DatasetgetDataset()Gets the dataset that has been set usingOperation.setDataset(Dataset), if any.booleangetIncludeInferred()Returns whether or not this operation will return inferred statements (if any are present in the repository).intgetMaxExecutionTime()Returns the maximum operation execution time.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.
-
-
-
Field Detail
-
bindings
protected final MapBindingSet bindings
-
dataset
protected Dataset dataset
-
includeInferred
protected boolean includeInferred
-
-
Method Detail
-
setBinding
public void setBinding(String name, Value value)
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- Parameters:
name- The name of the variable that should be bound.value- The (new) value for the specified variable.
-
removeBinding
public void removeBinding(String name)
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- 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
-
getBindings
public BindingSet getBindings()
Description copied from interface:OperationRetrieves the bindings that have been set on this operation.- Specified by:
getBindingsin interfaceOperation- Returns:
- A (possibly empty) set of operation variable bindings.
- See Also:
Operation.setBinding(String, Value)
-
setDataset
public void setDataset(Dataset dataset)
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
-
getDataset
public Dataset getDataset()
Description copied from interface:OperationGets the dataset that has been set usingOperation.setDataset(Dataset), if any.- Specified by:
getDatasetin interfaceOperation
-
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- Parameters:
includeInferred- indicates whether inferred statements should be included in the result.
-
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- 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- 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- Returns:
- The maximum operation execution time, measured in seconds.
- See Also:
Operation.setMaxExecutionTime(int)
-
-