|
|||||||||
| Home >> All >> com >> hp >> hpl >> jena >> reasoner >> rulesys >> impl >> [ oldCode overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.hp.hpl.jena.reasoner.rulesys.impl.oldCode
Class TopGoalIterator

java.lang.Objectcom.hp.hpl.jena.reasoner.rulesys.impl.oldCode.TopGoalIterator
- All Implemented Interfaces:
- java.util.Iterator
- public class TopGoalIterator
- extends java.lang.Object
- implements java.util.Iterator
- extends java.lang.Object
Wraps up the backward chaining engine as an iterator-like object that can be used in InfGraphs to implement a "find" operation. It creates a top level GoalState and pumps that for results until the agenda is empty.
- Version:
- $Revision: 1.4 $ on $Date: 2005/02/21 12:18:06 $
| Field Summary | |
(package private) BRuleEngine |
engine
The parent backward chaining engine |
(package private) GoalState |
goalState
The GoalState which is traversing the top level derivation tree |
(package private) java.lang.Object |
lookAhead
The next result to be returned, or null if we have finished |
| Constructor Summary | |
TopGoalIterator(BRuleEngine engine,
com.hp.hpl.jena.reasoner.TriplePattern goal)
Constructor. |
|
| Method Summary | |
void |
close()
|
boolean |
hasNext()
Tests whether there are elements remaining in the collection. |
private void |
moveForward()
Find the next result in the goal state and put it in the lookahead buffer. |
java.lang.Object |
next()
Obtain the next element in the collection. |
void |
remove()
Remove from the underlying collection the last element returned by next (optional operation). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
goalState
GoalState goalState
- The GoalState which is traversing the top level derivation tree
lookAhead
java.lang.Object lookAhead
- The next result to be returned, or null if we have finished
engine
BRuleEngine engine
- The parent backward chaining engine
| Constructor Detail |
TopGoalIterator
public TopGoalIterator(BRuleEngine engine, com.hp.hpl.jena.reasoner.TriplePattern goal)
- Constructor. Wraps a top level goal state as an iterator
| Method Detail |
moveForward
private void moveForward()
- Find the next result in the goal state and put it in the
lookahead buffer.
close
public void close()
hasNext
public boolean hasNext()
- Description copied from interface:
java.util.Iterator - Tests whether there are elements remaining in the collection. In other
words, calling
next()will not throw an exception.- Specified by:
hasNextin interfacejava.util.Iterator
next
public java.lang.Object next()
- Description copied from interface:
java.util.Iterator - Obtain the next element in the collection.
- Specified by:
nextin interfacejava.util.Iterator
remove
public void remove()
- Description copied from interface:
java.util.Iterator - Remove from the underlying collection the last element returned by next
(optional operation). This method can be called only once after each
call to
next(). It does not affect what will be returned by subsequent calls to next.- Specified by:
removein interfacejava.util.Iterator
|
|||||||||
| Home >> All >> com >> hp >> hpl >> jena >> reasoner >> rulesys >> impl >> [ oldCode overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.hp.hpl.jena.reasoner.rulesys.impl.oldCode.TopGoalIterator