Package ubic.gemma.rest.util.args
Class DatasetArgService
- java.lang.Object
-
- ubic.gemma.rest.util.args.AbstractEntityArgService<ExpressionExperiment,ExpressionExperimentService>
-
- ubic.gemma.rest.util.args.DatasetArgService
-
- All Implemented Interfaces:
EntityArgService<ExpressionExperiment,ExpressionExperimentService>
@Service public class DatasetArgService extends AbstractEntityArgService<ExpressionExperiment,ExpressionExperimentService>
-
-
Field Summary
-
Fields inherited from class ubic.gemma.rest.util.args.AbstractEntityArgService
service
-
-
Constructor Summary
Constructors Constructor Description DatasetArgService(ExpressionExperimentService service, SearchService searchService, ArrayDesignService adService, BioAssayService baService, OutlierDetectionService outlierDetectionService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<AnnotationValueObject>
getAnnotations(DatasetArg<?> arg)
List<String>
getExcludedUris(StringArrayArg excludedUrisArg, boolean excludeFreeText, boolean excludeUncategorizedTerms)
Obtain a list of exclude URIs from an argument containing excluded URIs.Filters
getFilters(FilterArg<ExpressionExperiment> filterArg)
Filters
getFilters(FilterArg<ExpressionExperiment> filterArg, Collection<OntologyTerm> mentionedTerm)
Set<Long>
getIdsForSearchQuery(QueryArg query)
Shortcut for extracting the result IDs fromgetResultsForSearchQuery(QueryArg, Highlighter)
.Set<Long>
getIdsForSearchQuery(QueryArg query, Map<Long,Double> scoreById)
Shortcut for extracting the result IDs and scores fromgetResultsForSearchQuery(QueryArg, Highlighter)
.List<ArrayDesignValueObject>
getPlatforms(DatasetArg<?> arg)
Retrieves the Platforms of the Dataset that this argument represents.Set<QuantitationTypeValueObject>
getQuantitationTypes(DatasetArg<?> arg)
Retrieve a dataset with quantitation type initialized.List<SearchResult<ExpressionExperiment>>
getResultsForSearchQuery(QueryArg query, Highlighter highlighter)
Obtain the search results for a given query and highlighter.List<BioAssayValueObject>
getSamples(DatasetArg<?> arg)
Sort
getSort(SortArg<ExpressionExperiment> sortArg)
-
Methods inherited from class ubic.gemma.rest.util.args.AbstractEntityArgService
checkEntity, entityArgValueOf, getArgsByPropertyName, getElementClass, getEntities, getEntities, getEntity, getFilterableProperties, getFilterablePropertyAllowedValues, getFilterablePropertyConfigAttributes, getFilterablePropertyDescription, getFilterablePropertyIsUsingSubquery, getFilterablePropertyResolvableAllowedValuesLabels, getFilterablePropertyType, getFilters, getFilters
-
-
-
-
Constructor Detail
-
DatasetArgService
@Autowired public DatasetArgService(ExpressionExperimentService service, SearchService searchService, ArrayDesignService adService, BioAssayService baService, OutlierDetectionService outlierDetectionService)
-
-
Method Detail
-
getExcludedUris
@Nullable public List<String> getExcludedUris(@Nullable StringArrayArg excludedUrisArg, boolean excludeFreeText, boolean excludeUncategorizedTerms)
Obtain a list of exclude URIs from an argument containing excluded URIs.- Parameters:
excludedUrisArg
- argument containing excluded URIs or null if unspecifiedexcludeFreeText
- if true, null will be included in the returned list which will result in the exclusion of free-text categories or terms- Returns:
- null if excludedUrisArg is null and excludeFreeText is false, otherwise a list of excluded URIs
-
getFilters
public Filters getFilters(FilterArg<ExpressionExperiment> filterArg) throws javax.ws.rs.BadRequestException, javax.ws.rs.ServiceUnavailableException
- Specified by:
getFilters
in interfaceEntityArgService<ExpressionExperiment,ExpressionExperimentService>
- Overrides:
getFilters
in classAbstractEntityArgService<ExpressionExperiment,ExpressionExperimentService>
- Throws:
javax.ws.rs.BadRequestException
javax.ws.rs.ServiceUnavailableException
-
getSort
public Sort getSort(SortArg<ExpressionExperiment> sortArg) throws javax.ws.rs.BadRequestException
- Specified by:
getSort
in interfaceEntityArgService<ExpressionExperiment,ExpressionExperimentService>
- Overrides:
getSort
in classAbstractEntityArgService<ExpressionExperiment,ExpressionExperimentService>
- Throws:
javax.ws.rs.BadRequestException
-
getFilters
public Filters getFilters(FilterArg<ExpressionExperiment> filterArg, @Nullable Collection<OntologyTerm> mentionedTerm) throws javax.ws.rs.ServiceUnavailableException
- Throws:
javax.ws.rs.ServiceUnavailableException
-
getResultsForSearchQuery
public List<SearchResult<ExpressionExperiment>> getResultsForSearchQuery(QueryArg query, @Nullable Highlighter highlighter) throws javax.ws.rs.BadRequestException, javax.ws.rs.ServiceUnavailableException, javax.ws.rs.InternalServerErrorException
Obtain the search results for a given query and highlighter.- Parameters:
highlighter
- a highlighter to use for the query or null to ignore- Throws:
javax.ws.rs.BadRequestException
- if the query is emptyjavax.ws.rs.ServiceUnavailableException
- if the search times outjavax.ws.rs.InternalServerErrorException
- for any other search-related exceptions
-
getIdsForSearchQuery
public Set<Long> getIdsForSearchQuery(QueryArg query, Map<Long,Double> scoreById)
Shortcut for extracting the result IDs and scores fromgetResultsForSearchQuery(QueryArg, Highlighter)
.
-
getIdsForSearchQuery
public Set<Long> getIdsForSearchQuery(QueryArg query)
Shortcut for extracting the result IDs fromgetResultsForSearchQuery(QueryArg, Highlighter)
.
-
getQuantitationTypes
public Set<QuantitationTypeValueObject> getQuantitationTypes(DatasetArg<?> arg)
Retrieve a dataset with quantitation type initialized.
-
getPlatforms
public List<ArrayDesignValueObject> getPlatforms(DatasetArg<?> arg)
Retrieves the Platforms of the Dataset that this argument represents.- Returns:
- a collection of Platforms that the dataset represented by this argument is in.
-
getSamples
public List<BioAssayValueObject> getSamples(DatasetArg<?> arg)
- Returns:
- a collection of BioAssays that represent the experiments samples.
-
getAnnotations
public Set<AnnotationValueObject> getAnnotations(DatasetArg<?> arg)
- Returns:
- a collection of Annotations value objects that represent the experiments annotations.
-
-