virtuoso.sesame2.driver
Class VirtuosoQuery

java.lang.Object
  extended by virtuoso.sesame2.driver.VirtuosoQuery
All Implemented Interfaces:
org.openrdf.query.Query
Direct Known Subclasses:
VirtuosoBooleanQuery, VirtuosoGraphQuery, VirtuosoTupleQuery

public class VirtuosoQuery
extends java.lang.Object
implements org.openrdf.query.Query


Constructor Summary
VirtuosoQuery()
           
 
Method Summary
 void clearBindings()
          Removes all previously set bindings.
 org.openrdf.query.BindingSet getBindings()
          Retrieves the bindings that have been set on this query.
 org.openrdf.query.Dataset getDataset()
          Gets the dataset that has been set using setDataset(Dataset), if any.
 boolean getIncludeInferred()
          Returns whether or not this query will return inferred statements (if any are present in the repository).
 int getMaxQueryTime()
          Returns the maximum query evaluation time.
 void removeBinding(java.lang.String name)
          Removes a previously set binding on the supplied variable.
 void setBinding(java.lang.String name, org.openrdf.model.Value value)
          Binds the specified variable to the supplied value.
 void setDataset(org.openrdf.query.Dataset dataset)
          Specifies the dataset against which to evaluate a query, overriding any dataset that is specified in the query itself.
 void setIncludeInferred(boolean includeInferred)
          Determine whether evaluation results of this query should include inferred statements (if any inferred statements are present in the repository).
 void setMaxQueryTime(int maxQueryTime)
          Specifies the maximum time that a query is allowed to run.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VirtuosoQuery

public VirtuosoQuery()
Method Detail

setBinding

public void setBinding(java.lang.String name,
                       org.openrdf.model.Value value)
Binds the specified variable to the supplied value. Any value that was previously bound to the specified value will be overwritten.

Specified by:
setBinding in interface org.openrdf.query.Query
Parameters:
name - The name of the variable that should be bound.
value - The (new) value for the specified variable.

removeBinding

public void removeBinding(java.lang.String name)
Removes a previously set binding on the supplied variable. Calling this method with an unbound variable name has no effect.

Specified by:
removeBinding in interface org.openrdf.query.Query
Parameters:
name - The name of the variable from which the binding is to be removed.

clearBindings

public void clearBindings()
Removes all previously set bindings.

Specified by:
clearBindings in interface org.openrdf.query.Query

getBindings

public org.openrdf.query.BindingSet getBindings()
Retrieves the bindings that have been set on this query.

Specified by:
getBindings in interface org.openrdf.query.Query
Returns:
A (possibly empty) set of query variable bindings.
See Also:
setBinding(String, Value)

setDataset

public void setDataset(org.openrdf.query.Dataset dataset)
Specifies the dataset against which to evaluate a query, overriding any dataset that is specified in the query itself.

Specified by:
setDataset in interface org.openrdf.query.Query

getDataset

public org.openrdf.query.Dataset getDataset()
Gets the dataset that has been set using setDataset(Dataset), if any.

Specified by:
getDataset in interface org.openrdf.query.Query

setIncludeInferred

public void setIncludeInferred(boolean includeInferred)
Determine whether evaluation results of this query should include inferred statements (if any inferred statements are present in the repository). The default setting is 'true'.

Specified by:
setIncludeInferred in interface org.openrdf.query.Query
Parameters:
includeInferred - indicates whether inferred statements should included in the result.

getIncludeInferred

public boolean getIncludeInferred()
Returns whether or not this query will return inferred statements (if any are present in the repository).

Specified by:
getIncludeInferred in interface org.openrdf.query.Query
Returns:
true if inferred statements will be returned, false otherwise.

setMaxQueryTime

public void setMaxQueryTime(int maxQueryTime)
Specifies 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 in QueryInterruptedExceptions.

Specified by:
setMaxQueryTime in interface org.openrdf.query.Query
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()
Returns the maximum query evaluation time.

Specified by:
getMaxQueryTime in interface org.openrdf.query.Query
Returns:
The maximum query evaluation time, measured in seconds.
See Also:
maxQueryTime