com.clarkparsia.explanation
Class SingleExplanationGeneratorImpl

java.lang.Object
  extended by com.clarkparsia.explanation.SingleExplanationGeneratorImpl
All Implemented Interfaces:
SingleExplanationGenerator
Direct Known Subclasses:
BlackBoxExplanation

public abstract class SingleExplanationGeneratorImpl
extends java.lang.Object
implements SingleExplanationGenerator

Title: SingleExplanationGeneratorImpl

Description: An abstract implementation of SingleExplanationGenerator that can be used as the basis for different explanation generator techniques.

Copyright: Copyright (c) 2007

Company: Clark & Parsia, LLC.

Author:
Evren Sirin

Field Summary
protected  OWLClassReasoner altReasoner
           
protected  DefinitionTracker definitionTracker
           
protected  OWLOntology ontology
           
protected  OWLOntologyManager owlOntologyManager
           
protected  OWLClassReasoner reasoner
           
protected  ReasonerFactory reasonerFactory
           
 
Constructor Summary
SingleExplanationGeneratorImpl(OWLOntologyManager manager)
           
 
Method Summary
 OWLClassReasoner getAltReasoner()
           
 OWLOntology getOntology()
          Returns the ontology according to which the explanations are generated.
 OWLOntologyManager getOntologyManager()
          Get the ontology manager for this explanation generator.
 OWLClassReasoner getReasoner()
          Returns the reasoner associated with this generator.
 ReasonerFactory getReasonerFactory()
          Returns the reasoner factory used to generate reasoners.
protected  boolean isFirstExplanation()
           
 void setOntology(OWLOntology ontology)
          Sets the ontology according to which the explanations are generated.
 void setReasoner(OWLClassReasoner reasoner)
          Sets the reasoner that will be used to generate explanations.
 void setReasonerFactory(ReasonerFactory reasonerFactory)
          Sets the reasoner factory that will be used to generate fresh reasoners.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.clarkparsia.explanation.SingleExplanationGenerator
getExplanation
 

Field Detail

owlOntologyManager

protected OWLOntologyManager owlOntologyManager

ontology

protected OWLOntology ontology

reasoner

protected OWLClassReasoner reasoner

reasonerFactory

protected ReasonerFactory reasonerFactory

definitionTracker

protected DefinitionTracker definitionTracker

altReasoner

protected OWLClassReasoner altReasoner
Constructor Detail

SingleExplanationGeneratorImpl

public SingleExplanationGeneratorImpl(OWLOntologyManager manager)
Method Detail

getOntologyManager

public OWLOntologyManager getOntologyManager()
Description copied from interface: SingleExplanationGenerator
Get the ontology manager for this explanation generator.

Specified by:
getOntologyManager in interface SingleExplanationGenerator

setOntology

public void setOntology(OWLOntology ontology)
Description copied from interface: SingleExplanationGenerator
Sets the ontology according to which the explanations are generated.

Specified by:
setOntology in interface SingleExplanationGenerator

getReasoner

public OWLClassReasoner getReasoner()
Description copied from interface: SingleExplanationGenerator
Returns the reasoner associated with this generator.

Specified by:
getReasoner in interface SingleExplanationGenerator

setReasoner

public void setReasoner(OWLClassReasoner reasoner)
Description copied from interface: SingleExplanationGenerator
Sets the reasoner that will be used to generate explanations. This function is provided in addition to SingleExplanationGenerator.setReasonerFactory(ReasonerFactory) because the reasoning results already computed by the given reasoner can be reused. It is guaranteed that the state of this reasoner will not be invalidated by explanation generation, i.e. if the reasoner was in classified state it will stay in classified state.

Specified by:
setReasoner in interface SingleExplanationGenerator

getOntology

public OWLOntology getOntology()
Description copied from interface: SingleExplanationGenerator
Returns the ontology according to which the explanations are generated.

Specified by:
getOntology in interface SingleExplanationGenerator

getReasonerFactory

public ReasonerFactory getReasonerFactory()
Description copied from interface: SingleExplanationGenerator
Returns the reasoner factory used to generate reasoners.

Specified by:
getReasonerFactory in interface SingleExplanationGenerator

setReasonerFactory

public void setReasonerFactory(ReasonerFactory reasonerFactory)
Description copied from interface: SingleExplanationGenerator
Sets the reasoner factory that will be used to generate fresh reasoners. We create new reasoner instances to avoid invalidating the reasoning state of existing reasoners. Explanation generation process will modify the original ontology and/or reason over a subset of the original ontology. Using an alternate fresh reasoner for these tasks ensures efficient explanation generation without side effects to anything outside the explanation generatyor.

Specified by:
setReasonerFactory in interface SingleExplanationGenerator

getAltReasoner

public OWLClassReasoner getAltReasoner()

isFirstExplanation

protected boolean isFirstExplanation()