edu.stanford.smi.protegex.owl.inference.protegeowl.task
Class AbstractSingleConceptWithConceptCollectionResultTask

java.lang.Object
  extended byedu.stanford.smi.protegex.owl.inference.protegeowl.task.AbstractReasonerTask
      extended byedu.stanford.smi.protegex.owl.inference.protegeowl.task.AbstractSingleConceptWithConceptCollectionResultTask
All Implemented Interfaces:
CollectionResultReasonerTask, ReasonerTask
Direct Known Subclasses:
GetAncestorConceptsTask, GetDescendantConceptsTask, GetEquivalentConceptsTask, GetSubConceptsTask, GetSuperConceptsTask

public abstract class AbstractSingleConceptWithConceptCollectionResultTask
extends AbstractReasonerTask
implements CollectionResultReasonerTask

User: matthewhorridge
The Univeristy Of Manchester
Medical Informatics Group
Date: Aug 17, 2004

matthew.horridge@cs.man.ac.uk
www.cs.man.ac.uk/~horridgm

An abstract base class for task that take a single concept as a parameter, and return a collection of concepts as a result.


Field Summary
private  OWLClass aClass
           
private  HashSet parents
           
private  ProtegeOWLReasoner protegeOWLReasoner
           
private  String taskDesciption
           
 
Fields inherited from class edu.stanford.smi.protegex.owl.inference.protegeowl.task.AbstractReasonerTask
 
Constructor Summary
AbstractSingleConceptWithConceptCollectionResultTask(String taskDescription, OWLClass aClass, ProtegeOWLReasoner protegeOWLReasoner)
           
 
Method Summary
abstract  void createQuery(Document doc)
          This method must be implemented by concrete subclasses.
protected  RDFSClass getCls()
           
protected  ProtegeOWLReasoner getProtegeOWLReasoner()
           
 Collection getResult()
           
 int getTaskSize()
          Gets the size of the task.
 void run()
          Executes the task.
 
Methods inherited from class edu.stanford.smi.protegex.owl.inference.protegeowl.task.AbstractReasonerTask
addTaskListener, doAbortCheck, fireDescriptionChangedEvent, fireMessageChangedEvent, fireProgressChangedEvent, fireProgressIndeterminateChnaged, fireTaskCompletedEvent, fireTaskFailedEvent, getDescription, getMessage, getProgress, getTranslator, isProgressIndeterminate, isRequestAbort, postLogRecord, removeTaskListener, setDescription, setMessage, setProgress, setProgressIndeterminate, setRequestAbort, setTaskCompleted, setTaskFailed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.stanford.smi.protegex.owl.inference.protegeowl.task.ReasonerTask
addTaskListener, getDescription, getMessage, getProgress, isProgressIndeterminate, isRequestAbort, removeTaskListener, setRequestAbort
 

Field Detail

aClass

private OWLClass aClass

protegeOWLReasoner

private ProtegeOWLReasoner protegeOWLReasoner

parents

private HashSet parents

taskDesciption

private String taskDesciption
Constructor Detail

AbstractSingleConceptWithConceptCollectionResultTask

public AbstractSingleConceptWithConceptCollectionResultTask(String taskDescription,
                                                            OWLClass aClass,
                                                            ProtegeOWLReasoner protegeOWLReasoner)
Method Detail

getTaskSize

public int getTaskSize()
Description copied from interface: ReasonerTask
Gets the size of the task. When the progress reaches this size, the task should be complete.

Specified by:
getTaskSize in interface ReasonerTask

run

public void run()
         throws DIGReasonerException
Description copied from interface: ReasonerTask
Executes the task.

Specified by:
run in interface ReasonerTask
Throws:
DIGReasonerException

getResult

public Collection getResult()
Specified by:
getResult in interface CollectionResultReasonerTask

createQuery

public abstract void createQuery(Document doc)
                          throws DIGReasonerException
This method must be implemented by concrete subclasses. It will be called by the run method in order to generate the DIGQuery.

Parameters:
doc - The base Document for the query.
Throws:
DIGReasonerException

getCls

protected RDFSClass getCls()

getProtegeOWLReasoner

protected ProtegeOWLReasoner getProtegeOWLReasoner()