Class OntologyServiceFactory<T extends OntologyService>
- java.lang.Object
-
- org.springframework.beans.factory.config.AbstractFactoryBean<T>
-
- ubic.gemma.core.ontology.providers.OntologyServiceFactory<T>
-
- Type Parameters:
T
- the type of ontology service this factory produces
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanClassLoaderAware
,org.springframework.beans.factory.BeanFactoryAware
,org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.FactoryBean<T>
,org.springframework.beans.factory.InitializingBean
public class OntologyServiceFactory<T extends OntologyService> extends org.springframework.beans.factory.config.AbstractFactoryBean<T>
Factory bean for baseCode'sOntologyService
.
-
-
Constructor Summary
Constructors Constructor Description OntologyServiceFactory(Class<T> ontologyServiceClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected T
createInstance()
protected void
destroyInstance(T instance)
Class<?>
getObjectType()
boolean
isSingleton()
void
setAdditionalPropertyUris(Set<String> additionalPropertyUris)
Set the URIs used for inferring additional properties.void
setAutoLoad(boolean autoLoad)
Enable loading of ontologies on startup.void
setEnableSearch(boolean enableSearch)
Enable full-text search for the ontology.void
setExcludedWordsFromStemming(Set<String> excludedWordsFromStemming)
Set the list of words that should be excluded from stemming.void
setForceIndexing(boolean forceIndexing)
Force indexing for full-text search.void
setForceLoad(boolean forceLoad)
Force loading, regardless of theload.{name}Ontology
property value.void
setInferenceMode(OntologyService.InferenceMode inferenceMode)
Set the inference mode for the ontology.void
setLanguageLevel(OntologyService.LanguageLevel languageLevel)
Set the supported OWL language level for the ontology.void
setLoadInBackground(boolean loadInBackground)
Initialize the service using a background thread.void
setProcessImports(boolean processImports)
Enable import processing for the ontology.void
setTaskExecutor(org.springframework.core.task.TaskExecutor taskExecutor)
Set the task executor used for initializing ontology service in background.
-
-
-
Method Detail
-
setAutoLoad
public void setAutoLoad(boolean autoLoad)
Enable loading of ontologies on startup.
-
setForceLoad
public void setForceLoad(boolean forceLoad)
Force loading, regardless of theload.{name}Ontology
property value.
-
setForceIndexing
public void setForceIndexing(boolean forceIndexing)
Force indexing for full-text search.
-
setLoadInBackground
public void setLoadInBackground(boolean loadInBackground)
Initialize the service using a background thread.If an executor is supplied via
setTaskExecutor(TaskExecutor)
, it will be used for initializing the ontology, otherwise one thread per ontology will be created viaOntologyService.startInitializationThread(boolean, boolean)
.If false, the ontology will be initialized in the foreground. This will dramatically impact the startup time of Gemma.
-
setTaskExecutor
public void setTaskExecutor(org.springframework.core.task.TaskExecutor taskExecutor)
Set the task executor used for initializing ontology service in background.
-
setLanguageLevel
public void setLanguageLevel(OntologyService.LanguageLevel languageLevel)
Set the supported OWL language level for the ontology.
-
setInferenceMode
public void setInferenceMode(OntologyService.InferenceMode inferenceMode)
Set the inference mode for the ontology.
-
setEnableSearch
public void setEnableSearch(boolean enableSearch)
Enable full-text search for the ontology.
-
setExcludedWordsFromStemming
public void setExcludedWordsFromStemming(@Nullable Set<String> excludedWordsFromStemming)
Set the list of words that should be excluded from stemming.
-
setProcessImports
public void setProcessImports(boolean processImports)
Enable import processing for the ontology.
-
setAdditionalPropertyUris
public void setAdditionalPropertyUris(@Nullable Set<String> additionalPropertyUris)
Set the URIs used for inferring additional properties.If null, baseCode's defaults will be used. You may use an empty set to disable additional properties inference.
-
getObjectType
public Class<?> getObjectType()
- Specified by:
getObjectType
in interfaceorg.springframework.beans.factory.FactoryBean<T extends OntologyService>
- Specified by:
getObjectType
in classorg.springframework.beans.factory.config.AbstractFactoryBean<T extends OntologyService>
-
isSingleton
public boolean isSingleton()
- Specified by:
isSingleton
in interfaceorg.springframework.beans.factory.FactoryBean<T extends OntologyService>
- Overrides:
isSingleton
in classorg.springframework.beans.factory.config.AbstractFactoryBean<T extends OntologyService>
-
createInstance
protected T createInstance() throws Exception
- Specified by:
createInstance
in classorg.springframework.beans.factory.config.AbstractFactoryBean<T extends OntologyService>
- Throws:
Exception
-
destroyInstance
protected void destroyInstance(T instance)
- Overrides:
destroyInstance
in classorg.springframework.beans.factory.config.AbstractFactoryBean<T extends OntologyService>
-
-