Class ExecuteRelationalBuiltin
java.lang.Object
com.semedy.reasoner.reasoning.processes.ProcessImp
com.semedy.reasoner.reasoning.processes.ExecuteRelationalBuiltin
-
Constructor Summary
ConstructorDescriptionExecuteRelationalBuiltin
(int i, InterruptFlag interruptFlag, ReasoningMonitor monitor, VariableHandler vh, RelationalBuiltin builtin, SymbolTable symboltable, RuleEvaluator reval, boolean cepReasoning) -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
free up ressourcesvoid
evaluate()
evaluate a process during reasoning.void
evaluationFinished
(long querykey) the whole evaluation is finishedget the basic tuple storevoid
push()
boolean
receiveRelation
(ReasoningRelation relation) receive a whole relationboolean
receiveTuple
(int tuple) receive a single tupleboolean
receiveTuple
(long[] tuple) receive a single tuplevoid
tuplesFinished
(String annotation, ReasoningRelation T1, ReasoningRelation T2) Finish delivering single tuples.Methods inherited from class com.semedy.reasoner.reasoning.processes.ProcessImp
addNextReceiver, addRelation, dispose, evaluationFinished, getArity, getPriority, getStratum, isNotQueuedSetQueued, isQueued, nextReceiver, operationFinished, receiveTuple, setDataFlowGraph, setQueued, setStratum, startTuples, tuplesFinished
-
Constructor Details
-
ExecuteRelationalBuiltin
public ExecuteRelationalBuiltin(int i, InterruptFlag interruptFlag, ReasoningMonitor monitor, VariableHandler vh, RelationalBuiltin builtin, SymbolTable symboltable, RuleEvaluator reval, boolean cepReasoning) - Parameters:
interruptFlag
-i
-interruptFlag
-monitor
-vh
-builtin
-symboltable
-reval
-cepReasoning
-
-
-
Method Details
-
evaluationFinished
Description copied from interface:Process
the whole evaluation is finished- Specified by:
evaluationFinished
in interfaceProcess
- Overrides:
evaluationFinished
in classProcessImp
- Throws:
ReasoningException
IOException
SemReasonerException
-
getTupleStore
Description copied from interface:Receiver
get the basic tuple store- Specified by:
getTupleStore
in interfaceProcess
- Specified by:
getTupleStore
in interfaceReceiver
- Overrides:
getTupleStore
in classProcessImp
- Returns:
- the tuple store
-
receiveTuple
public boolean receiveTuple(int tuple) throws SemReasonerException, InterruptedException, IOException Description copied from interface:Receiver
receive a single tuple- Specified by:
receiveTuple
in interfaceReceiver
- Overrides:
receiveTuple
in classProcessImp
- Parameters:
tuple
- the tuple to be received- Returns:
- true if tuple has been used (tuple cannot be free'd up)
- Throws:
SemReasonerException
InterruptedException
IOException
-
receiveTuple
public boolean receiveTuple(long[] tuple) throws SemReasonerException, InterruptedException, IOException Description copied from interface:Receiver
receive a single tuple- Specified by:
receiveTuple
in interfaceReceiver
- Overrides:
receiveTuple
in classProcessImp
- Parameters:
tuple
- the tuple to be received- Returns:
- true if tuple has been used (tuple cannot be free'd up)
- Throws:
SemReasonerException
InterruptedException
IOException
-
receiveRelation
public boolean receiveRelation(ReasoningRelation relation) throws SemReasonerException, InterruptedException, IOException Description copied from interface:Receiver
receive a whole relation- Specified by:
receiveRelation
in interfaceReceiver
- Overrides:
receiveRelation
in classProcessImp
- Parameters:
relation
- the whole relation to be received- Returns:
- true, if relation is later on dissolved, false otherwise
- Throws:
ReasoningException
InterruptedException
IOException
SemReasonerException
-
push
-
evaluate
Description copied from interface:Process
evaluate a process during reasoning.
Returns how the number of tuples sent away- Specified by:
evaluate
in interfaceProcess
- Overrides:
evaluate
in classProcessImp
- Throws:
InterruptedException
ReasoningException
IOException
SemReasonerException
-
tuplesFinished
public void tuplesFinished(String annotation, ReasoningRelation T1, ReasoningRelation T2) throws SemReasonerException, InterruptedException, IOException Description copied from interface:Receiver
Finish delivering single tuples.
Cache result and annotate result.- Specified by:
tuplesFinished
in interfaceReceiver
- Overrides:
tuplesFinished
in classProcessImp
- Parameters:
annotation
- , an annotation used for cachingT1
- , the relations which have been combinedT2
- , the relations which have been combined- Throws:
ReasoningException
SemReasonerException
InterruptedException
IOException
-
clear
public void clear()Description copied from class:ProcessImp
free up ressources- Specified by:
clear
in interfaceProcess
- Overrides:
clear
in classProcessImp
-