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

eworks.RQL.model
Class RangeList

java.lang.Object
  extended byeworks.RQL.model.RangeList

public class RangeList
extends Object

A list of single "RQL ranges" represented by Range-instances.

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)

Constructor Summary
RangeList()
          Creates a new and empty range list without any encapsulated range.
RangeList(Range range)
          Creates a new range list encapsulating a single range.
 
Method Summary
 void add(Range range)
          Adds a new range to this range list.
 void bindModel(Model model)
          Binds this range list to a certain model.
 void bindSymbols(SymbolTable symbols)
          Binds the current hit's values to some symbols.
 Range get(int i)
          Returns the i-th range that is encapsulated by this range list.
 int getLength()
          Returns the number of ranges encapsulated by this range list.
 boolean hasMoreHits()
          Checks if there are more hits that can be iteratively retrieved using nextHit().
 void nextHit()
          Gets the next hit, if any.
 String toString()
          Returns this range list's string representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RangeList

public RangeList()
Creates a new and empty range list without any encapsulated range.


RangeList

public RangeList(Range range)
Creates a new range list encapsulating a single range.

Parameters:
range - The range to encapsulate.
Method Detail

getLength

public int getLength()
Returns the number of ranges encapsulated by this range list.

Returns:
The number of ranges.

get

public Range get(int i)
Returns the i-th range that is encapsulated by this range list.

Parameters:
i - The number of the range to return.
Returns:
The i-th range (0 <= i <= getLength()).
Throws:
ArrayIndexOutOfBoundsException - if i is negative or not lower than getLength().
See Also:
getLength()

bindModel

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

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

hasMoreHits

public 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)

bindSymbols

public void bindSymbols(SymbolTable symbols)
                 throws NoModelBoundException,
                        NoSuchElementException,
                        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)

nextHit

public 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)

add

public void add(Range range)
Adds a new range to this range list.

Parameters:
range - The range to be added.

toString

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

Returns:
This range list's string representation.

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