Package org.eclipse.rdf4j.query
Interface Operation
-
- All Known Subinterfaces:
BooleanQuery
,GraphQuery
,Query
,TupleQuery
,Update
- All Known Implementing Classes:
AbstractHTTPQuery
,AbstractHTTPUpdate
,AbstractOperation
,AbstractParserQuery
,AbstractParserQuery
,AbstractParserUpdate
,AbstractParserUpdate
,AbstractQuery
,AbstractUpdate
,ClearableAwareUpdate
,DelegatingGraphQuery
,DelegatingTupleQuery
,DelegatingUpdate
,FedXBooleanQuery
,FedXGraphQuery
,FedXTupleQuery
,HTTPBooleanQuery
,HTTPGraphQuery
,HTTPTupleQuery
,HTTPUpdate
,LoggingGraphQuery
,LoggingTupleQuery
,LoggingUpdate
,ResultCachingGraphQuery
,ResultCachingTupleQuery
,SailBooleanQuery
,SailGraphQuery
,SailQuery
,SailTupleQuery
,SailUpdate
,SPARQLBooleanQuery
,SPARQLGraphQuery
,SPARQLOperation
,SPARQLTupleQuery
,SPARQLUpdate
public interface Operation
An operation (e.g. a query or an update) on a repository that can be formulated in one of the supported query languages (for example SPARQL). It allows one to predefine bindings in the operation to be able to reuse the same operation with different bindings.- Author:
- Jeen
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clearBindings()
Removes all previously set bindings.BindingSet
getBindings()
Retrieves the bindings that have been set on this operation.Dataset
getDataset()
Gets the dataset that has been set usingsetDataset(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.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 maxExecutionTimeSeconds)
Specifies the maximum time that an operation is allowed to run.
-
-
-
Method Detail
-
setBinding
void setBinding(String name, Value value)
Binds the specified variable to the supplied value. Any value that was previously bound to the specified value will be overwritten.- Parameters:
name
- The name of the variable that should be bound.value
- The (new) value for the specified variable.
-
removeBinding
void removeBinding(String name)
Removes a previously set binding on the supplied variable. Calling this method with an unbound variable name has no effect.- Parameters:
name
- The name of the variable from which the binding is to be removed.
-
clearBindings
void clearBindings()
Removes all previously set bindings.
-
getBindings
BindingSet getBindings()
Retrieves the bindings that have been set on this operation.- Returns:
- A (possibly empty) set of operation variable bindings.
- See Also:
setBinding(String, Value)
-
setDataset
void setDataset(Dataset dataset)
Specifies the dataset against which to execute an operation, overriding any dataset that is specified in the operation itself.
-
getDataset
Dataset getDataset()
Gets the dataset that has been set usingsetDataset(Dataset)
, if any.
-
setIncludeInferred
void setIncludeInferred(boolean includeInferred)
Determine whether evaluation results of this operation should include inferred statements (if any inferred statements are present in the repository). The default setting is 'true'.- Parameters:
includeInferred
- indicates whether inferred statements should be included in the result.
-
getIncludeInferred
boolean getIncludeInferred()
Returns whether or not this operation will return inferred statements (if any are present in the repository).- Returns:
- true if inferred statements will be returned, false otherwise.
-
setMaxExecutionTime
void setMaxExecutionTime(int maxExecutionTimeSeconds)
Specifies 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 inQueryInterruptedException
s orUpdateExecutionException
s (depending on whether the operation is a query or an update).- Parameters:
maxExecutionTimeSeconds
- The maximum query time, measured in seconds. A negative or zero value indicates an unlimited execution time (which is the default).
-
getMaxExecutionTime
int getMaxExecutionTime()
Returns the maximum operation execution time.- Returns:
- The maximum operation execution time, measured in seconds.
- See Also:
setMaxExecutionTime(int)
-
-