java.lang .Object com.hp.hpl.jena.reasoner.rulesys.impl .LPTopGoalIterator LPTopGoalIterator public class LPTopGoalIterator implements ClosableIterator ,LPInterpreterContext (Code) Wraps up the results an LP rule engine instance into a conventional
iterator. Ensures that the engine is closed and detached from the
inference graph if the iterator hits the end of the result set.
author: Dave Reynolds version: $Revision: 1.13 $ on $Date: 2008/01/02 12:06:16 $
checkReadyNeeded protected boolean checkReadyNeeded(Code) set to true if at least one branch has block so an active readiness check is required
choicePoints protected Set choicePoints(Code) The set of choice points that the top level interpter is waiting for
initialVersion protected int initialVersion(Code) Version stamp of the graph when we start
interpreter LPInterpreter interpreter (Code) The parent backward chaining engine - nulled on close
isReady protected boolean isReady(Code) set to true if we should be able to usefully run
lookAhead Object lookAhead (Code) The next result to be returned, or null if we have finished
started boolean started (Code) True if the iteration has started
LPTopGoalIterator public LPTopGoalIterator(LPInterpreter engine)(Code) Constructor. Wraps a top level goal state as an iterator
isReady public boolean isReady()(Code) Return true if the iterator is ready to be scheduled (i.e. it is not
known to be complete and not known to be waiting for a dependent generator).
notifyBlockedOn public void notifyBlockedOn(ConsumerChoicePointFrame ccp)(Code) Notify this context that a brach was suspended awaiting futher
results from the given generator.
notifyFinished public void notifyFinished(ConsumerChoicePointFrame ccp)(Code) Notify this context that the given choice point has terminated
and can be remove from the wait list.
setReady public void setReady(ConsumerChoicePointFrame ccp)(Code) Directly set that this generator is ready (because the generating
for one of its generatingCPs has produced new results).