public class HyperGraphClauseStore extends Object implements ClauseStore
| Constructor and Description | 
|---|
HyperGraphClauseStore(Prolog engine,
                     org.hypergraphdb.HyperGraph graph,
                     String predicateName,
                     int arity,
                     org.hypergraphdb.HGSearchResult<?> rs)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
close()
 Clause the store and free any external resources or caches associated
 with it. 
 | 
ClauseInfo | 
fetch()
 Get the next clause compatible with the current goal. 
 | 
int | 
getArity()  | 
org.hypergraphdb.HyperGraph | 
getGraph()  | 
String | 
getPredicateName()  | 
Prolog | 
getProlog()  | 
boolean | 
hasCompatibleClause()
 Return  
true if there are more clauses compatible with the current
 goal, irrespective of local variable bindings. | 
boolean | 
haveAlternatives()
 Return  
true if there are more clauses available compatible with 
 the current goal and false otherwise. | 
Term | 
toTerm(org.hypergraphdb.HGHandle h)  | 
public void close()
ClauseStoreClause the store and free any external resources or caches associated with it. This method must be implemented by variants that access external resources such disk or DBMSs.
This being a cleanup method, implementations should try not to throw any exceptions here. It should also be possible to call this method repeatedly on the same instance without failure.
close in interface ClauseStorepublic Prolog getProlog()
public org.hypergraphdb.HyperGraph getGraph()
public String getPredicateName()
public int getArity()
public ClauseInfo fetch()
ClauseStoreGet the next clause compatible with the current goal. As a side-effect, all variables local to the clause store should be freed and available for unification again.
fetch in interface ClauseStorepublic boolean hasCompatibleClause()
ClauseStore
 Return true if there are more clauses compatible with the current
 goal, irrespective of local variable bindings.
 
hasCompatibleClause in interface ClauseStorepublic boolean haveAlternatives()
ClauseStore
 Return true if there are more clauses available compatible with 
 the current goal and false otherwise. A first call to this
 method is equivalent to a call to hasCompatibleClause (since
 no variables would have been bound as yet).
 
haveAlternatives in interface ClauseStorepublic Term toTerm(org.hypergraphdb.HGHandle h)
Copyright © 2015. All rights reserved.