From 1e42cfa09e948aea26d5e7c4c164a1df7617bee0 Mon Sep 17 00:00:00 2001 From: j2blake Date: Mon, 8 Dec 2014 10:54:26 -0500 Subject: [PATCH] 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. --- config/applicationSetup.n3 | 31 +++++++++++-------- .../WEB-INF/resources/startup_listeners.txt | 1 + 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/config/applicationSetup.n3 b/config/applicationSetup.n3 index 8f7ccf8e..46ee736c 100644 --- a/config/applicationSetup.n3 +++ b/config/applicationSetup.n3 @@ -3,33 +3,38 @@ :application a , ; - :hasSearchEngine :searchEngineWrapper ; - :hasImageProcessor :imageProcessor ; - :hasFileStorage :fileStorage ; - :hasContentTripleSource :contentTripleSource ; - :hasConfigurationTripleSource :configurationTripleSource . + :hasSearchEngine :instrumentedSearchEngineWrapper ; + :hasImageProcessor :jaiImageProcessor ; + :hasFileStorage :ptiFileStorage ; + :hasContentTripleSource :sdbContentTripleSource ; + :hasConfigurationTripleSource :tdbConfigurationTripleSource ; + :hasTBoxReasonerModule :pelletTBoxReasonerModule . -:imageProcessor +:jaiImageProcessor a , . -:fileStorage +:ptiFileStorage a , . -:searchEngineWrapper +:instrumentedSearchEngineWrapper a , ; - :wraps :searchEngine . + :wraps :solrSearchEngine . -:searchEngine +:solrSearchEngine a , . -:contentTripleSource +:sdbContentTripleSource a , . -:configurationTripleSource +:tdbConfigurationTripleSource a , - . \ No newline at end of file + . + +:pelletTBoxReasonerModule + a , + . \ No newline at end of file diff --git a/productMods/WEB-INF/resources/startup_listeners.txt b/productMods/WEB-INF/resources/startup_listeners.txt index 9514f2bf..0e84a98b 100644 --- a/productMods/WEB-INF/resources/startup_listeners.txt +++ b/productMods/WEB-INF/resources/startup_listeners.txt @@ -37,6 +37,7 @@ edu.cornell.mannlib.vitro.webapp.servlet.setup.FileGraphSetup # 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.application.ApplicationImpl$ReasonersSetup edu.cornell.mannlib.vitro.webapp.servlet.setup.SimpleReasonerSetup # Must run after JenaDataSourceSetup