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 TypeMethodDescriptionvoid
addRelation
(ReasoningRelation relation) add a whole relation at the beginningint
getArity()
arity of the tuplesget the basic tuple storeboolean
receiveRelation
(ReasoningRelation relation) receive a whole relationboolean
receiveTuple
(int tuple) receive a single tupleboolean
receiveTuple
(long[] tuple) receive a single tupleboolean
receiveTuple
(TupleBuffer tuple) receive a single tuplestartTuples
(Receiver source, boolean check4Duplicates) start delivering single tuplesvoid
tuplesFinished
(boolean isBottomUp) finish delivering single tuplesvoid
tuplesFinished
(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:
IOException
EDBException
-
tuplesFinished
void tuplesFinished(boolean isBottomUp) throws InterruptedException, IOException, SemReasonerException finish delivering single tuples- Parameters:
isBottomUp
- TODO- Throws:
ReasoningException
InterruptedException
IOException
SemReasonerException
-
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:
ReasoningException
InterruptedException
IOException
SemReasonerException
-
addRelation
add a whole relation at the beginning- Parameters:
relation
- the relation to be added- Throws:
IOException
EDBException
-
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:
SemReasonerException
InterruptedException
IOException
-
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:
InterruptedException
IOException
SemReasonerException
-
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:
ReasoningException
InterruptedException
IOException
SemReasonerException
-
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:
ReasoningException
InterruptedException
IOException
SemReasonerException
-