Class InsertRecord
java.lang.Object
org.projog.core.predicate.AbstractSingleResultPredicate
org.projog.core.predicate.builtin.db.InsertRecord
- All Implemented Interfaces:
KnowledgeBaseConsumer, PredicateFactory
recorda(X,Y,Z) / recordz(X,Y,Z) - associates a term with a key.
recorda(X,Y,Z) associates Y with X. The unique reference for this association
will be unified with Z. Y is added to the start of the list of terms already
associated with X.
recordz(X,Y,Z) associates Y with X. The unique reference for this association
will be unified with Z. Y is added to the end of the list of terms already
associated with X.
-
Method Summary
Modifier and TypeMethodDescriptionprotected booleanprotected booleanvoidinit()This method is called byAbstractSingleResultPredicate.setKnowledgeBase(KnowledgeBase).static InsertRecordrecordA()static InsertRecordrecordZ()Methods inherited from class AbstractSingleResultPredicate
evaluate, evaluate, evaluate, getArithmeticOperators, getFileHandles, getKnowledgeBase, getOperands, getPredicate, getPredicates, getProjogListeners, getSpyPoints, getTermFormatter, isRetryable, setKnowledgeBaseMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PredicateFactory
isAlwaysCutOnBacktrack, preprocess
-
Method Details
-
recordA
-
recordZ
-
init
public void init()Description copied from class:AbstractSingleResultPredicateThis method is called byAbstractSingleResultPredicate.setKnowledgeBase(KnowledgeBase).Can be overridden by subclasses to perform initialisation before any calls to
AbstractSingleResultPredicate.getPredicate(Term)are made. AsAbstractSingleResultPredicate.setKnowledgeBase(KnowledgeBase)will have already been called before this method is invoked, overridden versions will be able to access theKnowledgeBaseusingAbstractSingleResultPredicate.getKnowledgeBase().- Overrides:
initin classAbstractSingleResultPredicate
-
evaluate
- Overrides:
evaluatein classAbstractSingleResultPredicate
-
evaluate
- Overrides:
evaluatein classAbstractSingleResultPredicate
-