eRqlEngine API documentation - http://www.wleklinski.de/rdf/

eworks.RQL.model
Class Range

java.lang.Object
  extended byeworks.RQL.model.Range
Direct Known Subclasses:
InstancesOfClassRange, StatementRange

public abstract class Range
extends Object

An abstract base class for classes that represent RQL ranges.

A RQL range is used to define a query's "data source", that's the expression after "FROM" according to the RQL syntax. A range is compareable to the list of table names (after "FROM" as well) according to the SQL syntax.

Version:
1.00 (2003-11-03)
Author:
Fabian Wleklinski (fabian@wleklinski.de)
See Also:
The RDF Query Language (RQL)

Field Summary
protected  String expression
          This range's expression, used for toString().
protected  Model model
          The RDF model to which this range is bound.
 
Constructor Summary
Range(String expression)
          Creates a new range that is defined by the given expression.
 
Method Summary
 void bindModel(Model model)
          Binds this range to a certain model.
abstract  void bindSymbols(SymbolTable symbols)
          Binds the current hit's values to some symbols.
abstract  boolean hasMoreHits()
          Checks if there are more hits that can be iteratively retrieved using nextHit().
abstract  void nextHit()
          Gets the next hit, if any.
abstract  void reset()
          Resets this range so that a succeeding call of nextHit() will return the first hit (if any).
 String toString()
          Returns this range's string representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

expression

protected String expression
This range's expression, used for toString().

See Also:
toString()

model

protected Model model
The RDF model to which this range is bound.

Constructor Detail

Range

public Range(String expression)
Creates a new range that is defined by the given expression.

Parameters:
expression - The expression that defines this range according to the RQL syntax.
Method Detail

toString

public String toString()
Returns this range's string representation.

Returns:
This range's string representation.

bindModel

public void bindModel(Model model)
Binds this range to a certain model.

Parameters:
model - The model this range is bound to.

reset

public abstract void reset()
                    throws NoModelBoundException
Resets this range so that a succeeding call of nextHit() will return the first hit (if any).

Throws:
NoModelBoundException - if no model has been bound using bindModel().
See Also:
nextHit(), bindModel(Model)

hasMoreHits

public abstract boolean hasMoreHits()
                             throws NoModelBoundException
Checks if there are more hits that can be iteratively retrieved using nextHit().

Returns:
true if and only if there are more hits.
Throws:
NoModelBoundException - if no model has been bound using bindModel().
See Also:
nextHit(), bindModel(Model)

nextHit

public abstract void nextHit()
                      throws NoModelBoundException,
                             NoSuchElementException
Gets the next hit, if any. Callers should use hasMoreHits() before to ensure that there is a further hit. After calling this method bindSymbols() can be used to bind the next hit's values to some symbols.

Throws:
NoModelBoundException - if no model has been bound using bindModel().
NoSuchElementException - if there is no further hit.
See Also:
hasMoreHits(), bindSymbols(SymbolTable), bindModel(Model)

bindSymbols

public abstract void bindSymbols(SymbolTable symbols)
                          throws NoModelBoundException,
                                 VariableAlreadyBoundException,
                                 URISyntaxException
Binds the current hit's values to some symbols. A caller should use hasMoreHits() and nextHit() to ensure that there is are some hits and to navigate iteratively forward trough them.

Throws:
NoModelBoundException - if no model has been bound using bindModel().
NoSuchElementException - if there is no current hit.
VariableAlreadyBoundException - if the used variable has already been bound to another value.
URISyntaxException - if a ressource is no valid URI, see Universal Resource identifiers in WWW.
See Also:
hasMoreHits(), nextHit(), bindModel(Model)

eRqlEngine API documentation - http://www.wleklinski.de/rdf/