@Unstable
@Role
public interface VocabularyManager
Modifier and Type | Method and Description |
---|---|
List<String> |
getAvailableCategories()
Retrieves a list of category names that are available for use with
getVocabularies(String) . |
List<String> |
getAvailableVocabularies()
Retrieves a list of vocabulary ids that are available for use with
getVocabulary(String) . |
Set<Vocabulary> |
getVocabularies(String category)
Retrieve a set of
Vocabulary objects that fall under the provided vocabulary category . |
Vocabulary |
getVocabulary(String vocabularyId)
Retrieve a vocabulary given its identifier.
|
boolean |
hasCategory(String category)
Returns true iff the provided
category name is valid, false otherwise. |
boolean |
hasVocabulary(String vocabulary)
Returns true iff the provided
vocabulary identifier is valid, false otherwise. |
VocabularyTerm |
resolveTerm(String termId)
Retrieve a term from its owner vocabulary.
|
List<VocabularyTerm> |
search(String input,
String category,
int maxResults)
Suggest the terms that best match the user's input, in all vocabularies
supporting the target category of terms . |
VocabularyTerm resolveTerm(String termId)
termId
- the term identifier, in the format <vocabulary prefix>:<term id>
, for example
HP:0002066
null
if the term doesn't exist in the vocabulary, or no matching
vocabulary is availableVocabulary getVocabulary(String vocabularyId)
vocabularyId
- the vocabulary identifier, which is also used as a prefix in every term identifier from that
vocabulary, for example HP
or MIM
, or one of its known
aliases
null
if it doesn't exist or isn't available in the platformSet<Vocabulary> getVocabularies(String category)
Vocabulary
objects that fall under the provided vocabulary category
.category
- the vocabulary category, e.g. "phenotype"Vocabulary
objects that fall under the category
List<String> getAvailableVocabularies()
getVocabulary(String)
.vocabulary identifiers
, one for each vocabularyList<String> getAvailableCategories()
getVocabularies(String)
.List<VocabularyTerm> search(String input, String category, int maxResults)
supporting the target category of terms
.input
- the text to search forcategory
- the category of terms to search inmaxResults
- the maximum number of terms to be returnedboolean hasVocabulary(String vocabulary)
vocabulary
identifier is valid, false otherwise.vocabulary
- a vocabulary identifiervocabulary
is valid, false otherwise.boolean hasCategory(String category)
category
name is valid, false otherwise.category
- a category namecategory
is valid, false otherwise.Copyright © 2011–2018 University of Toronto, Computational Biology Lab. All rights reserved.