Package ubic.gemma.core.ontology
Class OntologyUtils
java.lang.Object
ubic.gemma.core.ontology.OntologyUtils
Utilities for working with ontologies.
- Author:
- poirigui
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidensureInitialized(OntologyService service) Ensure that a given ontology is initialized, force-loading it viaOntologyService.initialize(boolean, boolean)if necessary.static voidensureInitialized(OntologyService service, OntologyService.InferenceMode mode, OntologyService.LanguageLevel level, Boolean searchEnabled, Boolean processImports) Ensure that a given ontology is initialized, force-loading it viaOntologyService.initialize(boolean, boolean), but first setting how we load it.static voidensureInitializedLite(OntologyService service) Ensure that a given ontology is initialized, force-loading it viaOntologyService.initialize(boolean, boolean), but setting the language level to LITE, Inferencing to NONE, processImports to false, and enable search to false, if the ontology isn't already loaded.
-
Field Details
-
BASE_PURL_URI
Base URI used by PURL ontologies.Read more about PURL here.
- See Also:
-
-
Constructor Details
-
OntologyUtils
public OntologyUtils()
-
-
Method Details
-
ensureInitialized
Ensure that a given ontology is initialized, force-loading it viaOntologyService.initialize(boolean, boolean)if necessary.If the ontology was started via
OntologyService.startInitializationThread(boolean, boolean), this method will patiently wait until it completes.- Throws:
InterruptedException- in case the ontology initialization thread is started, we will wait which implies a possible interrupt
-
ensureInitializedLite
Ensure that a given ontology is initialized, force-loading it viaOntologyService.initialize(boolean, boolean), but setting the language level to LITE, Inferencing to NONE, processImports to false, and enable search to false, if the ontology isn't already loaded.- Throws:
InterruptedException
-
ensureInitialized
public static void ensureInitialized(OntologyService service, OntologyService.InferenceMode mode, OntologyService.LanguageLevel level, Boolean searchEnabled, Boolean processImports) throws InterruptedException Ensure that a given ontology is initialized, force-loading it viaOntologyService.initialize(boolean, boolean), but first setting how we load it. However, those parameters are ignored if the ontology is already loaded or in progress.- Throws:
InterruptedException- in case the ontology initialization thread is started, we will wait which implies a possible interrupt
-