public class IndexedTermQueryHandler extends java.lang.Object
|Constructor and Description|
|Modifier and Type||Method and Description|
Will query the database and return a map of terms that match a partial term name present in a specific ontology
public java.util.HashMap<java.lang.String,java.lang.String> getTermsByName(java.lang.String partialName, java.lang.String ontologyName, boolean includeObsoleteTerms, java.lang.Integer maxHits, boolean reverseKeyOrder, boolean includePrefix)
Note: if terms are keyed on accession, if a term has multiple synonyms, the preferred term will be returned instead of the synonym. If the preferred term is not present in the term result, the first synonym will be returned:
Example: a query on ABCD returns the following results: accession: term:1234 name: ABCD (synonym) accession: term:1234 name: ABCD-1 (preferred) If keyed on accession, the returned map will only contain: key: term:1234 value: ABCD-1 If keyed on name (reverseKeyOrder = true), the returned map will contain: key: ABCD [term:1234] value: term:1234 key: ABCD-1 [term:1234] value: term:1234
Assuming that the query returns only synonyms, the first one encountered will be returned if keyed on accession.
partialName- term to query (eg mitochondria)
ontologyName- - shortName of the ontology in which to the query - null to search in all ontologies
includeObsoleteTerms- - if true, the method will also search in obseleted terms. if false obselete terms are ignored from the query
maxHits- - if not null, the max number of terms to return from this query
reverseKeyOrder- - if true, the key will be the termName and the value will be the termId. Default is false.
includePrefix- - if true, will append the shortOntologyName to the returned term name.
Copyright © 2015. All Rights Reserved.