public interface OntologyService
Modifier and Type | Method and Description |
---|---|
void |
cancelInitializationThread() |
Collection<OntologyIndividual> |
findIndividuals(String search)
Looks for any OntologyIndividuals that match the given search string.
|
Collection<OntologyResource> |
findResources(String searchString)
Looks for any OntologyIndividuals or ontologyTerms that match the given search string
|
Collection<OntologyTerm> |
findTerm(String search)
Looks for any ontologyTerms that match the given search string.
|
OntologyTerm |
findUsingAlternativeId(String alternativeId) |
Set<String> |
getAllURIs() |
OntologyResource |
getResource(String uri)
Looks through both Terms and Individuals for a OntologyResource that has a uri matching the uri given.
|
OntologyTerm |
getTerm(String uri)
Looks for a OntologyTerm that has the match in URI given
|
Collection<OntologyIndividual> |
getTermIndividuals(String uri) |
void |
index(boolean force)
Index the ontology for performing full-text searches.
|
void |
initialize(boolean forceLoad,
boolean forceIndexing)
Initialize this ontology service.
|
boolean |
isEnabled() |
boolean |
isInitializationThreadAlive() |
boolean |
isInitializationThreadCancelled() |
boolean |
isOntologyLoaded()
Used for determining if the Ontology has finished loading into memory.
|
void |
loadTermsInNameSpace(InputStream is,
boolean forceIndex)
For testing!
|
void |
startInitializationThread(boolean forceLoad,
boolean forceIndexing)
Start the initialization thread.
|
void |
waitForInitializationThread()
Wait for the initialization thread to finish.
|
void initialize(boolean forceLoad, boolean forceIndexing)
Collection<OntologyIndividual> findIndividuals(String search) throws OntologySearchException
OntologySearchException
Collection<OntologyResource> findResources(String searchString) throws OntologySearchException
OntologySearchException
Collection<OntologyTerm> findTerm(String search) throws OntologySearchException
OntologySearchException
OntologyTerm findUsingAlternativeId(String alternativeId)
OntologyResource getResource(String uri)
OntologyTerm getTerm(String uri)
Collection<OntologyIndividual> getTermIndividuals(String uri)
boolean isEnabled()
boolean isOntologyLoaded()
void startInitializationThread(boolean forceLoad, boolean forceIndexing)
If the initialization thread is already running, this method does nothing. If the initialization thread previously completed, the ontology will be reinitialized.
forceLoad
- Force loading of ontology, even if it is already loadedforceIndexing
- If forceLoad is also true, indexing will be performed. If you know the index is
up to date, there's no need to do it again. Normally indexing is only done if there is no
index, or if the ontology has changed since last loaded.boolean isInitializationThreadAlive()
boolean isInitializationThreadCancelled()
void cancelInitializationThread()
void waitForInitializationThread() throws InterruptedException
InterruptedException
void index(boolean force)
void loadTermsInNameSpace(InputStream is, boolean forceIndex)
is
- input stream from which the ontology model is loadedforceIndex
- initialize the index. Otherwise it will only be initialized if it doesn't exist.Copyright © 2003–2023 UBC Michael Smith Laboratories. All rights reserved.