Interface Receiver
- All Known Subinterfaces:
DirectFilterBuiltin,Process,Store,TopDownStore
- All Known Implementing Classes:
And,BufferedStore,DirectBetween,DirectLess,DirectLessOrEqual,EmptyEventResultReceiver,EmptyStore,Encoder,End,EventReceiver,EventResultReceiver,ExecuteAggregation,ExecuteConnectorBuiltin,ExecuteDirectFilterBuiltin,ExecuteFilterBuiltin,ExecuteFunctionalBuiltin,ExecuteRelationalBuiltin,IntermediateResultProducer,IsNotFunctional2,IsNotFunctional3,Match,MaterializationReceiver,Not,ProcessImp,ResultReceiver,RuleEvaluator,Scatter,SetConstants,StoreEventResultReceiver,SubstituteFunction,SynchronizedBufferedStore,TestEqual,TopDown,TopDownBufferedStore,TopDownTrigger,TopDownUnbufferedStore,UnbufferedStore,VariableToVariable
public interface Receiver
A receiver collects tuples ad intermediate results during reasoning.
- Author:
- angele
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddRelation(ReasoningRelation relation) add a whole relation at the beginningintgetArity()arity of the tuplesget the basic tuple storebooleanreceiveRelation(ReasoningRelation relation) receive a whole relationbooleanreceiveTuple(int tuple) receive a single tuplebooleanreceiveTuple(long[] tuple) receive a single tuplebooleanreceiveTuple(TupleBuffer tuple) receive a single tuplestartTuples(Receiver source, boolean check4Duplicates) start delivering single tuplesvoidtuplesFinished(boolean isBottomUp) finish delivering single tuplesvoidtuplesFinished(String annotation, ReasoningRelation T1, ReasoningRelation T2) Finish delivering single tuples.
-
Method Details
-
startTuples
start delivering single tuples- Parameters:
check4Duplicates- , check for duplicates in the target storesource- , the delivering process- Returns:
- an object receiving the results
- Throws:
IOExceptionEDBException
-
tuplesFinished
void tuplesFinished(boolean isBottomUp) throws InterruptedException, IOException, SemReasonerException finish delivering single tuples- Parameters:
isBottomUp- TODO- Throws:
ReasoningExceptionInterruptedExceptionIOExceptionSemReasonerException
-
tuplesFinished
void tuplesFinished(String annotation, ReasoningRelation T1, ReasoningRelation T2) throws InterruptedException, IOException, SemReasonerException Finish delivering single tuples.
Cache result and annotate result.- Parameters:
annotation- , an annotation used for cachingT1- , the relations which have been combinedT2- , the relations which have been combined- Throws:
ReasoningExceptionInterruptedExceptionIOExceptionSemReasonerException
-
addRelation
add a whole relation at the beginning- Parameters:
relation- the relation to be added- Throws:
IOExceptionEDBException
-
getArity
int getArity()arity of the tuples- Returns:
- the arity of the receiver
-
getTupleStore
TupleStore getTupleStore()get the basic tuple store- Returns:
- the tuple store
-
receiveTuple
receive a single tuple- Parameters:
tuple- the tuple to be received- Returns:
- true if tuple has been used (tuple cannot be free'd up)
- Throws:
SemReasonerExceptionInterruptedExceptionIOException
-
receiveTuple
receive a single tuple- Parameters:
tuple- the tuple to be received- Returns:
- true if tuple has been used (tuple cannot be free'd up)
- Throws:
InterruptedExceptionIOExceptionSemReasonerException
-
receiveTuple
boolean receiveTuple(TupleBuffer tuple) throws InterruptedException, IOException, SemReasonerException receive a single tuple- Parameters:
tuple- the tuple to be received- Returns:
- true if tuple has been used (tuple cannot be free'd up)
- Throws:
ReasoningExceptionInterruptedExceptionIOExceptionSemReasonerException
-
receiveRelation
boolean receiveRelation(ReasoningRelation relation) throws SemReasonerException, InterruptedException, IOException receive a whole relation- Parameters:
relation- the whole relation to be received- Returns:
- true, if relation is later on dissolved, false otherwise
- Throws:
ReasoningExceptionInterruptedExceptionIOExceptionSemReasonerException
-