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
FieldsModifier and TypeFieldDescriptionstatic final doublestatic final doubleScore when a result is matched exactly by numerical ID.static final doublestatic final doublestatic final StringFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccepts(SearchSettings settings) Indicate if this source accepts the given search settings.intgetOrder()searchArrayDesign(SearchSettings settings, SearchContext context) A general search for array designs.searchBioSequence(SearchSettings settings, SearchContext context) A database search for biosequences.searchBioSequenceAndGene(SearchSettings settings, SearchContext context, Collection<SearchResult<Gene>> previousGeneSearchResults) Search for biosequence and, unfortunately genes.searchBlacklistedEntities(SearchSettings settings, SearchContext context) searchCompositeSequence(SearchSettings settings, SearchContext context) searchCompositeSequenceAndGene(SearchSettings settings, SearchContext context) Search the DB for composite sequences and the genes that are matched to them.searchExperimentSet(SearchSettings settings, SearchContext context) searchExpressionExperiment(SearchSettings settings, SearchContext context) Does search on exact string by: id, name and short name.searchGene(SearchSettings settings, SearchContext context) Search the DB for genes that exactly match the given search string searches geneProducts, gene and bioSequence tablessearchGeneSet(SearchSettings settings, SearchContext context) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ubic.gemma.core.search.SearchSource
searchBibliographicReference
-
Field Details
-
NCBI_GENE_ID_URI_PREFIX
- See Also:
-
MATCH_BY_ID_SCORE
public static final double MATCH_BY_ID_SCOREScore when a result is matched exactly by numerical ID.- See Also:
-
MATCH_BY_SHORT_NAME_SCORE
public static final double MATCH_BY_SHORT_NAME_SCORE- See Also:
-
MATCH_BY_ACCESSION_SCORE
public static final double MATCH_BY_ACCESSION_SCORE- See Also:
-
MATCH_BY_NAME_SCORE
public static final double MATCH_BY_NAME_SCORE- See Also:
-
-
Constructor Details
-
DatabaseSearchSource
public DatabaseSearchSource()
-
-
Method Details
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-
accepts
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, SearchContext context) 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, SearchContext context) throws SearchException - Specified by:
searchExperimentSetin interfaceSearchSource- Throws:
SearchException
-
searchBioSequence
public Collection<SearchResult<BioSequence>> searchBioSequence(SearchSettings settings, SearchContext context) 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, SearchContext context, @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, SearchContext context) throws SearchException - Specified by:
searchCompositeSequencein interfaceSearchSource- Throws:
SearchException
-
searchCompositeSequenceAndGene
public Collection<SearchResult<?>> searchCompositeSequenceAndGene(SearchSettings settings, SearchContext context) 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, SearchContext context) 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, SearchContext context) 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, SearchContext context) throws SearchException - Specified by:
searchGeneSetin interfaceSearchSource- Throws:
SearchException
-
searchBlacklistedEntities
public Collection<SearchResult<BlacklistedEntity>> searchBlacklistedEntities(SearchSettings settings, SearchContext context) throws SearchException - Specified by:
searchBlacklistedEntitiesin interfaceSearchSource- Throws:
SearchException
-