VIVO-778 Refactor the connections to the TBox reasoner.

Replace PelletListener with a TBoxReasonerModule in the Application.
   The reasoner will be accessible only through here, not as a context attribute or through the WebappDaoFactory.
Split out the initialization of the TBox reasoner from SimpleReasonerSetup.
Break out the filtering of TBox changes into a ConfiguredReasonerListener.
Refactor the threading logic into a BasicTBoxReasonerDriver.
   Add a factory for creating VitroBackgroundThreads in an Executor.
Isolate the actual reasoner into a TBoxReasoner implementation. In this case, PelletTBoxReasoner.
Combine the consistency flag, error flag, explanation, and running status into one TBoxReasonerStatus object.
This commit is contained in:
j2blake 2014-12-08 10:54:26 -05:00
parent 721fc7437b
commit 1e42cfa09e
2 changed files with 19 additions and 13 deletions

View file

@ -3,33 +3,38 @@
:application :application
a <java:edu.cornell.mannlib.vitro.webapp.application.ApplicationImpl> , a <java:edu.cornell.mannlib.vitro.webapp.application.ApplicationImpl> ,
<java:edu.cornell.mannlib.vitro.webapp.modules.Application> ; <java:edu.cornell.mannlib.vitro.webapp.modules.Application> ;
:hasSearchEngine :searchEngineWrapper ; :hasSearchEngine :instrumentedSearchEngineWrapper ;
:hasImageProcessor :imageProcessor ; :hasImageProcessor :jaiImageProcessor ;
:hasFileStorage :fileStorage ; :hasFileStorage :ptiFileStorage ;
:hasContentTripleSource :contentTripleSource ; :hasContentTripleSource :sdbContentTripleSource ;
:hasConfigurationTripleSource :configurationTripleSource . :hasConfigurationTripleSource :tdbConfigurationTripleSource ;
:hasTBoxReasonerModule :pelletTBoxReasonerModule .
:imageProcessor :jaiImageProcessor
a <java:edu.cornell.mannlib.vitro.webapp.imageprocessor.jai.JaiImageProcessor> , a <java:edu.cornell.mannlib.vitro.webapp.imageprocessor.jai.JaiImageProcessor> ,
<java:edu.cornell.mannlib.vitro.webapp.modules.imageProcessor.ImageProcessor> . <java:edu.cornell.mannlib.vitro.webapp.modules.imageProcessor.ImageProcessor> .
:fileStorage :ptiFileStorage
a <java:edu.cornell.mannlib.vitro.webapp.filestorage.impl.FileStorageImplWrapper> , a <java:edu.cornell.mannlib.vitro.webapp.filestorage.impl.FileStorageImplWrapper> ,
<java:edu.cornell.mannlib.vitro.webapp.modules.fileStorage.FileStorage> . <java:edu.cornell.mannlib.vitro.webapp.modules.fileStorage.FileStorage> .
:searchEngineWrapper :instrumentedSearchEngineWrapper
a <java:edu.cornell.mannlib.vitro.webapp.searchengine.InstrumentedSearchEngineWrapper> , a <java:edu.cornell.mannlib.vitro.webapp.searchengine.InstrumentedSearchEngineWrapper> ,
<java:edu.cornell.mannlib.vitro.webapp.modules.searchEngine.SearchEngine> ; <java:edu.cornell.mannlib.vitro.webapp.modules.searchEngine.SearchEngine> ;
:wraps :searchEngine . :wraps :solrSearchEngine .
:searchEngine :solrSearchEngine
a <java:edu.cornell.mannlib.vitro.webapp.searchengine.solr.SolrSearchEngine> , a <java:edu.cornell.mannlib.vitro.webapp.searchengine.solr.SolrSearchEngine> ,
<java:edu.cornell.mannlib.vitro.webapp.modules.searchEngine.SearchEngine> . <java:edu.cornell.mannlib.vitro.webapp.modules.searchEngine.SearchEngine> .
:contentTripleSource :sdbContentTripleSource
a <java:edu.cornell.mannlib.vitro.webapp.triplesource.impl.sdb.ContentTripleSourceSDB> , a <java:edu.cornell.mannlib.vitro.webapp.triplesource.impl.sdb.ContentTripleSourceSDB> ,
<java:edu.cornell.mannlib.vitro.webapp.modules.tripleSource.ContentTripleSource> . <java:edu.cornell.mannlib.vitro.webapp.modules.tripleSource.ContentTripleSource> .
:configurationTripleSource :tdbConfigurationTripleSource
a <java:edu.cornell.mannlib.vitro.webapp.triplesource.impl.tdb.ConfigurationTripleSourceTDB> , a <java:edu.cornell.mannlib.vitro.webapp.triplesource.impl.tdb.ConfigurationTripleSourceTDB> ,
<java:edu.cornell.mannlib.vitro.webapp.modules.tripleSource.ConfigurationTripleSource> . <java:edu.cornell.mannlib.vitro.webapp.modules.tripleSource.ConfigurationTripleSource> .
:pelletTBoxReasonerModule
a <java:edu.cornell.mannlib.vitro.webapp.tboxreasoner.impl.pellet.PelletTBoxReasonerModule> ,
<java:edu.cornell.mannlib.vitro.webapp.modules.tboxreasoner.TBoxReasonerModule> .

View file

@ -37,6 +37,7 @@ edu.cornell.mannlib.vitro.webapp.servlet.setup.FileGraphSetup
# Invokes process to perform updates to align with ontology changes if needed --> # Invokes process to perform updates to align with ontology changes if needed -->
edu.cornell.mannlib.vitro.webapp.servlet.setup.UpdateKnowledgeBase edu.cornell.mannlib.vitro.webapp.servlet.setup.UpdateKnowledgeBase
edu.cornell.mannlib.vitro.webapp.application.ApplicationImpl$ReasonersSetup
edu.cornell.mannlib.vitro.webapp.servlet.setup.SimpleReasonerSetup edu.cornell.mannlib.vitro.webapp.servlet.setup.SimpleReasonerSetup
# Must run after JenaDataSourceSetup # Must run after JenaDataSourceSetup