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

eworks.RQL.model
Class InstancesOfClassRange

java.lang.Object
  extended byeworks.RQL.model.Range
      extended byeworks.RQL.model.InstancesOfClassRange

public class InstancesOfClassRange
extends Range

Represents a RQL range that retrieves instances of "RDFS classes".

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
 
Fields inherited from class eworks.RQL.model.Range
expression, model
 
Constructor Summary
InstancesOfClassRange(String className)
          Creates a new range using the name of a certain "RDFS class".
InstancesOfClassRange(String className, Variable var)
          Creates a new range using the name of a certain "RDFS class" and a certain variable to bound.
 
Method Summary
 void bindSymbols(SymbolTable symbols)
          Binds the current hit's values to some symbols.
 boolean hasMoreHits()
          Checks if there are more hits that can be iteratively retrieved using nextHit().
 void nextHit()
          Gets the next hit, if any.
 void reset()
          Resets this range so that a succeeding call of nextHit() will return the first hit (if any).
 
Methods inherited from class eworks.RQL.model.Range
bindModel, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InstancesOfClassRange

public InstancesOfClassRange(String className,
                             Variable var)
Creates a new range using the name of a certain "RDFS class" and a certain variable to bound. All instances of the given "RDFS class" will be bound to the given variable.

Parameters:
className - The name of the "RDFS class".
var - The variable to bound.

InstancesOfClassRange

public InstancesOfClassRange(String className)
Creates a new range using the name of a certain "RDFS class".

Parameters:
className - The name of the "RDFS class".
Method Detail

reset

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

Specified by:
reset in class Range
Throws:
NoModelBoundException - if no model has been bound using bindModel().
See Also:
nextHit(), Range.bindModel(Model)

hasMoreHits

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

Specified by:
hasMoreHits in class Range
Returns:
true if and only if there are more hits.
Throws:
NoModelBoundException - if no model has been bound using bindModel().
See Also:
nextHit(), Range.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.

Specified by:
nextHit in class Range
Throws:
NoModelBoundException - if no model has been bound using bindModel().
NoSuchElementException - if there is no further hit.
See Also:
hasMoreHits(), bindSymbols(SymbolTable), Range.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.

Specified by:
bindSymbols in class Range
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(), Range.bindModel(Model)

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