org.openrdf.query.impl
Class AbstractQuery

java.lang.Object
  extended by org.openrdf.query.impl.AbstractQuery
All Implemented Interfaces:
Query
Direct Known Subclasses:
HTTPQuery, SailQuery

public abstract class AbstractQuery
extends Object
implements Query

Abstract super class of all query types.


Field Summary
protected  MapBindingSet bindings
           
protected  Dataset dataset
           
protected  boolean includeInferred
           
 
Constructor Summary
protected AbstractQuery()
          Creates a new query object.
 
Method Summary
 BindingSet getBindings()
          Retrieves the bindings that have been set on this query.
 Dataset getDataset()
          Gets the dataset that has been set using Query.setDataset(Dataset), if any.
 boolean getIncludeInferred()
          Returns whether or not this query will return inferred statements (if any are present in the repository).
 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 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).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bindings

protected MapBindingSet bindings

dataset

protected Dataset dataset

includeInferred

protected boolean includeInferred
Constructor Detail

AbstractQuery

protected AbstractQuery()
Creates a new query object.

Method Detail

setBinding

public void setBinding(String name,
                       Value value)
Description copied from interface: Query
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 Query
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: Query
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 Query
Parameters:
name - The name of the variable from which the binding is to be removed.

getBindings

public BindingSet getBindings()
Description copied from interface: Query
Retrieves the bindings that have been set on this query.

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

setDataset

public void setDataset(Dataset dataset)
Description copied from interface: Query
Specifies the dataset against which to evaluate a query, overriding any dataset that is specified in the query itself.

Specified by:
setDataset in interface Query

getDataset

public Dataset getDataset()
Description copied from interface: Query
Gets the dataset that has been set using Query.setDataset(Dataset), if any.

Specified by:
getDataset in interface Query

setIncludeInferred

public void setIncludeInferred(boolean includeInferred)
Description copied from interface: Query
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 Query
Parameters:
includeInferred - indicates whether inferred statements should included in the result.

getIncludeInferred

public boolean getIncludeInferred()
Description copied from interface: Query
Returns whether or not this query will return inferred statements (if any are present in the repository).

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


Copyright © 2001-2008 Aduna. All Rights Reserved.