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's
OntologyService.-
Field Summary
Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
logger -
Constructor Summary
ConstructorsConstructorDescriptionOntologyServiceFactory(Class<T> ontologyServiceClass) Create a factory for an ontology service class.OntologyServiceFactory(T ontologyService) Create a factory for a pre-existing ontology service. -
Method Summary
Modifier and TypeMethodDescriptionprotected Tprotected voiddestroyInstance(T instance) Class<?> booleanvoidsetAdditionalPropertyUris(Set<String> additionalPropertyUris) Set the URIs used for inferring additional properties.voidsetAllowedUriPrefixes(String[] allowedUriPrefixes) Set the URI prefixes that can be returned from the ontology.voidsetAutoLoad(boolean autoLoad) Enable loading of ontologies on startup.voidsetEnableSearch(boolean enableSearch) Enable full-text search for the ontology.voidsetExcludedWordsFromStemming(Set<String> excludedWordsFromStemming) Set the list of words that should be excluded from stemming.voidsetForceIndexing(boolean forceIndexing) Force indexing for full-text search.voidsetForceLoad(boolean forceLoad) Force loading, regardless of theload.{name}Ontologyproperty value.voidsetInferenceMode(OntologyService.InferenceMode inferenceMode) Set the inference mode for the ontology.voidsetLanguageLevel(OntologyService.LanguageLevel languageLevel) Set the supported OWL language level for the ontology.voidsetLoadInBackground(boolean loadInBackground) Initialize the service using a background thread.voidsetProcessImports(boolean processImports) Enable import processing for the ontology.voidsetTaskExecutor(org.springframework.core.task.TaskExecutor taskExecutor) Set the task executor used for initializing ontology service in background.Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, setBeanClassLoader, setBeanFactory, setSingleton
-
Constructor Details
-
OntologyServiceFactory
Create a factory for an ontology service class.The class must have a no-arg constructor.
-
OntologyServiceFactory
Create a factory for a pre-existing ontology service.
-
-
Method Details
-
setAutoLoad
public void setAutoLoad(boolean autoLoad) Enable loading of ontologies on startup. -
setForceLoad
public void setForceLoad(boolean forceLoad) Force loading, regardless of theload.{name}Ontologyproperty 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.
- See Also:
-
setTaskExecutor
public void setTaskExecutor(org.springframework.core.task.TaskExecutor taskExecutor) Set the task executor used for initializing ontology service in background. -
setLanguageLevel
Set the supported OWL language level for the ontology.- See Also:
-
setInferenceMode
Set the inference mode for the ontology.- See Also:
-
setEnableSearch
public void setEnableSearch(boolean enableSearch) Enable full-text search for the ontology.- See Also:
-
setExcludedWordsFromStemming
Set the list of words that should be excluded from stemming.- See Also:
-
setProcessImports
public void setProcessImports(boolean processImports) Enable import processing for the ontology.- See Also:
-
setAdditionalPropertyUris
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.
- See Also:
-
setAllowedUriPrefixes
Set the URI prefixes that can be returned from the ontology.- See Also:
-
getObjectType
- Specified by:
getObjectTypein interfaceorg.springframework.beans.factory.FactoryBean<T extends OntologyService>- Specified by:
getObjectTypein classorg.springframework.beans.factory.config.AbstractFactoryBean<T extends OntologyService>
-
isSingleton
public boolean isSingleton()- Specified by:
isSingletonin interfaceorg.springframework.beans.factory.FactoryBean<T extends OntologyService>- Overrides:
isSingletonin classorg.springframework.beans.factory.config.AbstractFactoryBean<T extends OntologyService>
-
createInstance
- Specified by:
createInstancein classorg.springframework.beans.factory.config.AbstractFactoryBean<T extends OntologyService>- Throws:
Exception
-
destroyInstance
- Overrides:
destroyInstancein classorg.springframework.beans.factory.config.AbstractFactoryBean<T extends OntologyService>- Throws:
Exception
-