org.semanticweb.elk.reasoner.stages
Class IncrementalContextCleaningStage

java.lang.Object
  extended by org.semanticweb.elk.reasoner.stages.IncrementalContextCleaningStage
All Implemented Interfaces:
ReasonerStage

public class IncrementalContextCleaningStage
extends Object

Author:
Pavel Klinov pavel.klinov@uni-ulm.de

Constructor Summary
IncrementalContextCleaningStage(AbstractReasonerState reasoner, org.semanticweb.elk.reasoner.stages.AbstractReasonerStage... preStages)
           
 
Method Summary
 void clearInterrupt()
          Clears the interrupt status of this executor
 void execute()
          Performs the execution of this stage.
 void executeStage()
          Execute the stage with initialized parameters
 String getName()
           
 Iterable<? extends ReasonerStage> getPreStages()
           
protected  SaturationStatistics getRuleAndConclusionStatistics()
           
 boolean isCompleted()
           
 boolean isInterrupted()
           
protected  void markAllContextsAsSaturated()
           
 boolean postExecute()
          Clear the parameters of the computation for this stage; this is the last thing to be done when the stage is executed *
 boolean preExecute()
          Initialize the parameters of the computation for this stage; this is the first thing to be done before stage is executed
 void printInfo()
          Prints detailed information about the (progress) of this stage.
 boolean spuriousInterrupt()
          Check if the reasoner was interrupted and clears the interrupt status
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IncrementalContextCleaningStage

public IncrementalContextCleaningStage(AbstractReasonerState reasoner,
                                       org.semanticweb.elk.reasoner.stages.AbstractReasonerStage... preStages)
Method Detail

getName

public String getName()
Returns:
a string identifier of this stage

preExecute

public boolean preExecute()
Initialize the parameters of the computation for this stage; this is the first thing to be done before stage is executed

Specified by:
preExecute in interface ReasonerStage
Returns:
true if the operation is successful

executeStage

public void executeStage()
                  throws ElkInterruptedException
Execute the stage with initialized parameters

Throws:
ElkInterruptedException

postExecute

public boolean postExecute()
Clear the parameters of the computation for this stage; this is the last thing to be done when the stage is executed *

Specified by:
postExecute in interface ReasonerStage
Returns:
true if the operation is successful

printInfo

public void printInfo()
Description copied from interface: ReasonerStage
Prints detailed information about the (progress) of this stage. This function can be used to print statistics after this stage is executed or interrupted.


isCompleted

public boolean isCompleted()
Specified by:
isCompleted in interface ReasonerStage
Returns:
true if the results for this stage have been already computed; this does not necessarily mean that this stage was executed: the results of the computation could have been computed by other stages

getPreStages

public Iterable<? extends ReasonerStage> getPreStages()
Specified by:
getPreStages in interface ReasonerStage
Returns:
the list of stages that are required to be executed before executing this stage; the order of the execution does not matter

isInterrupted

public boolean isInterrupted()
Specified by:
isInterrupted in interface ReasonerStage
Returns:
true if this executor was interrupted

clearInterrupt

public void clearInterrupt()
Description copied from interface: ReasonerStage
Clears the interrupt status of this executor

Specified by:
clearInterrupt in interface ReasonerStage

spuriousInterrupt

public boolean spuriousInterrupt()
                          throws ElkInterruptedException
Check if the reasoner was interrupted and clears the interrupt status

Returns:
true if the current thread was interrupted but the reasoner was not interrupted (e.g., spurious interrupt)
Throws:
ElkInterruptedException - if the reasoner was interrupted

execute

public void execute()
             throws ElkException
Description copied from interface: ReasonerStage
Performs the execution of this stage.

Specified by:
execute in interface ReasonerStage
Throws:
ElkException - if execution was not successful

markAllContextsAsSaturated

protected void markAllContextsAsSaturated()

getRuleAndConclusionStatistics

protected SaturationStatistics getRuleAndConclusionStatistics()


Copyright © 2011-2013 Department of Computer Science, University of Oxford. All Rights Reserved.