Class EmptyStore
java.lang.Object
com.semedy.reasoner.reasoning.processes.ProcessImp
com.semedy.reasoner.reasoning.processes.UnbufferedStore
com.semedy.reasoner.reasoning.processes.BufferedStore
com.semedy.reasoner.reasoning.processes.EmptyStore
An empty store, i.E. all incoming tuples are thrown away
- Author:
- angele
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addNegatedNeighbour
(And join) add a negated rule body operator as next operatorvoid
addNeighbour
(And join) add a rule body operator as next operatorvoid
attach a next receiver which receives input from thisvoid
add a whole relation at the beginningvoid
clear()
free up ressourcesvoid
dispose()
free ressources allocated by this processvoid
evaluate()
evaluate a process during reasoning.void
evaluationFinished
(long querykey) the whole evaluation is finishedget all received tuplesint
getArity()
arity of the tuplesget the last stores resultsget all neighboursint
get the priority of a processint
get the stratumget the basic tuple storeboolean
If process is not queued for reasoning set it as queued for reasoningboolean
Store is subsumed.get next processvoid
this process is finishedvoid
readAccessBegin
(Set<Integer> tickets, boolean lock) Reading of the store by an operator starts.boolean
readAccessEnd
(ProcessImp source, Set<Integer> tickets, boolean lock, boolean pushed) Reading of a store ends.boolean
receive a whole relationboolean
receiveTuple
(int tuple) receive a single tupleboolean
receiveTuple
(long[] tuple) receive a single tupleboolean
receiveTuple
(TupleBuffer tuple) receive a single tuplevoid
setDataFlowGraph
(ProcessExecutor processExecutor) set the executor for this processvoid
setStratum
(int s) set the stratum of this processlong
size()
startTuples
(Receiver source, boolean check4Duplicates) start delivering single tuplesvoid
triggerNeighbours
(int ticket) trigger neighbours for evaluationvoid
tuplesFinished
(boolean isBottomUp) finish delivering single tuplesvoid
tuplesFinished
(String annotation, ReasoningRelation R1, ReasoningRelation R2) Finish delivering single tuples.Methods inherited from class com.semedy.reasoner.reasoning.processes.BufferedStore
bufferedSize, reset1
Methods inherited from class com.semedy.reasoner.reasoning.processes.UnbufferedStore
incrementalSize, toString
Methods inherited from class com.semedy.reasoner.reasoning.processes.ProcessImp
evaluationFinished, isQueued, setQueued
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
EmptyStore
public EmptyStore(int arity) - Parameters:
interruptFlag
-monitor
-arity
-predicate
-cepReasoning
-cepReasoningWithRetracts
-executor
-sorted
-
-
-
Method Details
-
getPriority
public int getPriority()Description copied from interface:Process
get the priority of a process- Specified by:
getPriority
in interfaceProcess
- Overrides:
getPriority
in classProcessImp
- Returns:
-
isNotQueuedSetQueued
public boolean isNotQueuedSetQueued()Description copied from interface:Process
If process is not queued for reasoning set it as queued for reasoning- Specified by:
isNotQueuedSetQueued
in interfaceProcess
- Overrides:
isNotQueuedSetQueued
in classProcessImp
- Returns:
-
setDataFlowGraph
Description copied from interface:Process
set the executor for this process- Specified by:
setDataFlowGraph
in interfaceProcess
- Overrides:
setDataFlowGraph
in classProcessImp
-
operationFinished
Description copied from interface:Process
this process is finished- Specified by:
operationFinished
in interfaceProcess
- Overrides:
operationFinished
in classProcessImp
- Throws:
SemReasonerException
-
addNextReceiver
Description copied from interface:Process
attach a next receiver which receives input from this- Specified by:
addNextReceiver
in interfaceProcess
- Overrides:
addNextReceiver
in classProcessImp
-
dispose
public void dispose()Description copied from interface:Process
free ressources allocated by this process- Specified by:
dispose
in interfaceProcess
- Overrides:
dispose
in classProcessImp
-
setStratum
public void setStratum(int s) Description copied from interface:Process
set the stratum of this process- Specified by:
setStratum
in interfaceProcess
- Overrides:
setStratum
in classProcessImp
-
getStratum
public int getStratum()Description copied from interface:Process
get the stratum- Specified by:
getStratum
in interfaceProcess
- Overrides:
getStratum
in classProcessImp
- Returns:
-
nextReceiver
Description copied from interface:Process
get next process- Specified by:
nextReceiver
in interfaceProcess
- Overrides:
nextReceiver
in classProcessImp
- Returns:
-
clear
Description copied from class:ProcessImp
free up ressources- Specified by:
clear
in interfaceProcess
- Overrides:
clear
in classBufferedStore
- Throws:
IOException
-
receiveTuple
Description copied from interface:Receiver
receive a single tuple- Specified by:
receiveTuple
in interfaceReceiver
- Overrides:
receiveTuple
in classBufferedStore
- Parameters:
tuple
- the tuple to be received- Returns:
- true if tuple has been used (tuple cannot be free'd up)
- Throws:
IOException
ReasoningException
SemReasonerException
-
evaluationFinished
Description copied from interface:Process
the whole evaluation is finished- Specified by:
evaluationFinished
in interfaceProcess
- Specified by:
evaluationFinished
in interfaceStore
- Overrides:
evaluationFinished
in classBufferedStore
- Throws:
ReasoningException
SemReasonerException
-
size
- Specified by:
size
in interfaceStore
- Overrides:
size
in classBufferedStore
- Returns:
- Throws:
IOException
EDBException
- How many tuples are stored
-
getAllTuples
- Specified by:
getAllTuples
in interfaceStore
- Overrides:
getAllTuples
in classBufferedStore
- Returns:
- Throws:
EDBException
- get a list of all relations stored in storeIOException
-
getAllTuplesInOne
Description copied from interface:Store
get all received tuples- Specified by:
getAllTuplesInOne
in interfaceStore
- Overrides:
getAllTuplesInOne
in classBufferedStore
- Returns:
- Throws:
IOException
-
addNegatedNeighbour
Description copied from interface:Store
add a negated rule body operator as next operator- Specified by:
addNegatedNeighbour
in interfaceStore
- Overrides:
addNegatedNeighbour
in classBufferedStore
-
addNeighbour
Description copied from interface:Store
add a rule body operator as next operator- Specified by:
addNeighbour
in interfaceStore
- Overrides:
addNeighbour
in classBufferedStore
-
readAccessBegin
Description copied from interface:Store
Reading of the store by an operator starts.
Every reading is uniquely identified by a ticket.
Lock indicates that ressources must be locked- Specified by:
readAccessBegin
in interfaceStore
- Overrides:
readAccessBegin
in classBufferedStore
-
readAccessEnd
public boolean readAccessEnd(ProcessImp source, Set<Integer> tickets, boolean lock, boolean pushed) throws IOException, SemReasonerException Description copied from interface:Store
Reading of a store ends.- Specified by:
readAccessEnd
in interfaceStore
- Overrides:
readAccessEnd
in classBufferedStore
- Parameters:
source
- , the readertickets
- , the ticket of the reading processlock
- , was a lock required at begin of the reading processpushed
- , have relations be pushed instead of joined- Returns:
- Throws:
IOException
SemReasonerException
-
receiveRelation
public boolean receiveRelation(ReasoningRelation R) throws SemReasonerException, InterruptedException, IOException Description copied from interface:Receiver
receive a whole relation- Specified by:
receiveRelation
in interfaceReceiver
- Specified by:
receiveRelation
in interfaceStore
- Overrides:
receiveRelation
in classBufferedStore
- Parameters:
R
- the whole relation to be received- Returns:
- true, if relation is later on dissolved, false otherwise
- Throws:
ReasoningException
InterruptedException
IOException
SemReasonerException
-
addRelation
Description copied from interface:Receiver
add a whole relation at the beginning- Specified by:
addRelation
in interfaceProcess
- Specified by:
addRelation
in interfaceReceiver
- Specified by:
addRelation
in interfaceStore
- Overrides:
addRelation
in classBufferedStore
- Parameters:
R
- the relation to be added- Throws:
IOException
EDBException
-
startTuples
public Receiver startTuples(Receiver source, boolean check4Duplicates) throws EDBException, IOException Description copied from interface:Receiver
start delivering single tuples- Specified by:
startTuples
in interfaceReceiver
- Specified by:
startTuples
in interfaceStore
- Overrides:
startTuples
in classUnbufferedStore
- Parameters:
source
- , the delivering processcheck4Duplicates
- , check for duplicates in the target store- Returns:
- an object receiving the results
- Throws:
EDBException
IOException
-
incrementalRelations
- Specified by:
incrementalRelations
in interfaceStore
- Overrides:
incrementalRelations
in classUnbufferedStore
- Returns:
- Throws:
IOException
EDBException
- get a list of incremental relations
-
relations
- Specified by:
relations
in interfaceStore
- Overrides:
relations
in classUnbufferedStore
- Returns:
- Throws:
IOException
EDBException
- get a list of received relations
-
getArity
public int getArity()Description copied from interface:Receiver
arity of the tuples -
isSubsumed
public boolean isSubsumed()Description copied from interface:Store
Store is subsumed. This means that no additional tuples are stored.- Specified by:
isSubsumed
in interfaceStore
- Overrides:
isSubsumed
in classBufferedStore
- Returns:
-
receiveTuple
Description copied from interface:Receiver
receive a single tuple- Specified by:
receiveTuple
in interfaceReceiver
- Specified by:
receiveTuple
in interfaceStore
- Overrides:
receiveTuple
in classBufferedStore
- Parameters:
tuple
- the tuple to be received- Returns:
- true if tuple has been used (tuple cannot be free'd up)
- Throws:
SemReasonerException
IOException
-
receiveTuple
Description copied from interface:Receiver
receive a single tuple- Specified by:
receiveTuple
in interfaceReceiver
- Specified by:
receiveTuple
in interfaceStore
- Overrides:
receiveTuple
in classBufferedStore
- Parameters:
tuple
- the tuple to be received- Returns:
- true if tuple has been used (tuple cannot be free'd up)
- Throws:
SemReasonerException
IOException
-
getTupleStore
Description copied from interface:Receiver
get the basic tuple store- Specified by:
getTupleStore
in interfaceProcess
- Specified by:
getTupleStore
in interfaceReceiver
- Specified by:
getTupleStore
in interfaceStore
- Overrides:
getTupleStore
in classBufferedStore
- Returns:
- the tuple store
-
evaluate
Description copied from interface:Process
evaluate a process during reasoning.
Returns how the number of tuples sent away- Specified by:
evaluate
in interfaceProcess
- Specified by:
evaluate
in interfaceStore
- Overrides:
evaluate
in classBufferedStore
- Throws:
InterruptedException
ReasoningException
IOException
SemReasonerException
-
tuplesFinished
public void tuplesFinished(String annotation, ReasoningRelation R1, ReasoningRelation R2) throws IOException, SemReasonerException, InterruptedException Description copied from interface:Receiver
Finish delivering single tuples.
Cache result and annotate result.- Specified by:
tuplesFinished
in interfaceReceiver
- Specified by:
tuplesFinished
in interfaceStore
- Overrides:
tuplesFinished
in classBufferedStore
- Parameters:
annotation
- , an annotation used for cachingR1
- , the relations which have been combinedR2
- , the relations which have been combined- Throws:
IOException
ReasoningException
SemReasonerException
InterruptedException
-
tuplesFinished
public void tuplesFinished(boolean isBottomUp) throws SemReasonerException, InterruptedException, IOException Description copied from interface:Receiver
finish delivering single tuples- Specified by:
tuplesFinished
in interfaceReceiver
- Specified by:
tuplesFinished
in interfaceStore
- Overrides:
tuplesFinished
in classBufferedStore
- Parameters:
isBottomUp
- TODO- Throws:
ReasoningException
SemReasonerException
InterruptedException
IOException
-
triggerNeighbours
Description copied from interface:Store
trigger neighbours for evaluation- Specified by:
triggerNeighbours
in interfaceStore
- Overrides:
triggerNeighbours
in classBufferedStore
- Throws:
ReasoningException
IOException
SemReasonerException
-
getNeighbours
Description copied from interface:Store
get all neighbours- Specified by:
getNeighbours
in interfaceStore
- Overrides:
getNeighbours
in classBufferedStore
- Returns:
-
getLastResults
Description copied from interface:Store
get the last stores results- Specified by:
getLastResults
in interfaceStore
- Overrides:
getLastResults
in classBufferedStore
- Returns:
-