Package ubic.gemma.core.ontology
Class OntologyUtils
- java.lang.Object
-
- ubic.gemma.core.ontology.OntologyUtils
-
public class OntologyUtils extends Object
Utilities for working with ontologies.- Author:
- poirigui
-
-
Field Summary
Fields Modifier and Type Field Description static String
BASE_PURL_URI
Base URI used by PURL ontologies.
-
Constructor Summary
Constructors Constructor Description OntologyUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
ensureInitialized(OntologyService service)
Ensure that a given ontology is initialized, force-loading it viaOntologyService.initialize(boolean, boolean)
if necessary.static void
ensureInitialized(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 void
ensureInitializedLite(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 Detail
-
BASE_PURL_URI
public static final String BASE_PURL_URI
Base URI used by PURL ontologies.Read more about PURL here.
- See Also:
- Constant Field Values
-
-
Method Detail
-
ensureInitialized
public static void ensureInitialized(OntologyService service) throws InterruptedException
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
public static void ensureInitializedLite(OntologyService service) throws InterruptedException
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.- Parameters:
service
-- 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.- Parameters:
service
-mode
-level
-searchEnabled
-processImports
-- Throws:
InterruptedException
- in case the ontology initialization thread is started, we will wait which implies a possible interrupt
-
-