Package ubic.gemma.core.search.source
Class DatabaseSearchSource
- java.lang.Object
-
- ubic.gemma.core.search.source.DatabaseSearchSource
-
- All Implemented Interfaces:
org.springframework.core.Ordered,SearchSource
@Component public class DatabaseSearchSource extends Object implements SearchSource, org.springframework.core.Ordered
Search source for direct database results.- Author:
- klc, paul, keshav, poirigui
-
-
Field Summary
Fields Modifier and Type Field Description static doubleMATCH_BY_ACCESSION_SCOREstatic doubleMATCH_BY_ID_SCOREScore when a result is matched exactly by numerical ID.static doubleMATCH_BY_NAME_SCOREstatic doubleMATCH_BY_SHORT_NAME_SCOREstatic StringNCBI_GENE_ID_URI_PREFIX
-
Constructor Summary
Constructors Constructor Description DatabaseSearchSource()
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ubic.gemma.core.search.SearchSource
searchBibliographicReference
-
-
-
-
Field Detail
-
NCBI_GENE_ID_URI_PREFIX
public static final String NCBI_GENE_ID_URI_PREFIX
- See Also:
- Constant Field Values
-
MATCH_BY_ID_SCORE
public static final double MATCH_BY_ID_SCORE
Score when a result is matched exactly by numerical ID.- See Also:
- Constant Field Values
-
MATCH_BY_SHORT_NAME_SCORE
public static final double MATCH_BY_SHORT_NAME_SCORE
- See Also:
- Constant Field Values
-
MATCH_BY_ACCESSION_SCORE
public static final double MATCH_BY_ACCESSION_SCORE
- See Also:
- Constant Field Values
-
MATCH_BY_NAME_SCORE
public static final double MATCH_BY_NAME_SCORE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getOrder
public int getOrder()
- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-
accepts
public boolean accepts(SearchSettings settings)
Description copied from interface:SearchSourceIndicate if this source accepts the given search settings.- Specified by:
acceptsin interfaceSearchSource
-
searchArrayDesign
public Collection<SearchResult<ArrayDesign>> searchArrayDesign(SearchSettings settings) throws SearchException
A general search for array designs.This search does both an database search and a compass search. This is also contains an underlying
CompositeSequencesearch, returning theArrayDesigncollection for the given composite sequence search string (the returned collection of array designs does not contain duplicates).Searches the DB for array designs which have composite sequences whose names match the given search string. Because of the underlying database search, this is acl aware. That is, returned array designs are filtered based on access control list (ACL) permissions.
- Specified by:
searchArrayDesignin interfaceSearchSource- Throws:
SearchException
-
searchExperimentSet
public Collection<SearchResult<ExpressionExperimentSet>> searchExperimentSet(SearchSettings settings) throws SearchException
- Specified by:
searchExperimentSetin interfaceSearchSource- Throws:
SearchException
-
searchBioSequence
public Collection<SearchResult<BioSequence>> searchBioSequence(SearchSettings settings) throws SearchException
A database search for biosequences. Biosequence names are already indexed by compass...- Specified by:
searchBioSequencein interfaceSearchSource- Throws:
SearchException
-
searchBioSequenceAndGene
public Collection<SearchResult<?>> searchBioSequenceAndGene(SearchSettings settings, @Nullable Collection<SearchResult<Gene>> previousGeneSearchResults) throws SearchException
Description copied from interface:SearchSourceSearch for biosequence and, unfortunately genes.I wanted to remove this, but there's some logic with indirect gene hit penalty that we might want to keep around.
- Specified by:
searchBioSequenceAndGenein interfaceSearchSource- Returns:
- a mixture of
BioSequenceandGenematching the search settings. - Throws:
SearchException
-
searchCompositeSequence
public Collection<SearchResult<CompositeSequence>> searchCompositeSequence(SearchSettings settings) throws SearchException
- Specified by:
searchCompositeSequencein interfaceSearchSource- Throws:
SearchException
-
searchCompositeSequenceAndGene
public Collection<SearchResult<?>> searchCompositeSequenceAndGene(SearchSettings settings) throws SearchException
Search the DB for composite sequences and the genes that are matched to them.- Specified by:
searchCompositeSequenceAndGenein interfaceSearchSource- Returns:
- a mixture of
GeneandCompositeSequencematching the search settings - Throws:
SearchException
-
searchExpressionExperiment
public Collection<SearchResult<ExpressionExperiment>> searchExpressionExperiment(SearchSettings settings) throws SearchException
Does search on exact string by: id, name and short name. This only returns results if these fields match exactly, but it's fast.- Specified by:
searchExpressionExperimentin interfaceSearchSource- Returns:
Collection- Throws:
SearchException
-
searchGene
public Collection<SearchResult<Gene>> searchGene(SearchSettings settings) throws SearchException
Search the DB for genes that exactly match the given search string searches geneProducts, gene and bioSequence tables- Specified by:
searchGenein interfaceSearchSource- Throws:
SearchException
-
searchGeneSet
public Collection<SearchResult<GeneSet>> searchGeneSet(SearchSettings settings) throws SearchException
- Specified by:
searchGeneSetin interfaceSearchSource- Throws:
SearchException
-
searchBlacklistedEntities
public Collection<SearchResult<BlacklistedEntity>> searchBlacklistedEntities(SearchSettings settings) throws SearchException
- Specified by:
searchBlacklistedEntitiesin interfaceSearchSource- Throws:
SearchException
-
-