Package ubic.gemma.rest.util.args
Class TaxonArgService
- java.lang.Object
-
- ubic.gemma.rest.util.args.AbstractEntityArgService<Taxon,TaxonService>
-
- ubic.gemma.rest.util.args.TaxonArgService
-
- All Implemented Interfaces:
EntityArgService<Taxon,TaxonService>
@Service public class TaxonArgService extends AbstractEntityArgService<Taxon,TaxonService>
-
-
Field Summary
-
Fields inherited from class ubic.gemma.rest.util.args.AbstractEntityArgService
service
-
-
Constructor Summary
Constructors Constructor Description TaxonArgService(TaxonService service, ChromosomeService chromosomeService, GeneService geneService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Map<String,List<String>>
getArgsByPropertyName(AbstractEntityArrayArg<Taxon,TaxonService> entitiesArg)
Given aAbstractEntityArrayArg
, construct a mapping of properties it refers to values those properties are allowed to take in a filter.<A> Filters
getFilters(AbstractEntityArg<A,Taxon,TaxonService> entityArg)
Translate the provided entity argument into aFilters
.List<GeneValueObject>
getGenesOnChromosome(TaxonArg<?> arg, String chromosomeName, String strand, long start, int size)
Lists Genes overlapping a location on a specific chromosome on a taxon that this TaxonArg represents.-
Methods inherited from class ubic.gemma.rest.util.args.AbstractEntityArgService
checkEntity, entityArgValueOf, getElementClass, getEntities, getEntities, getEntity, getFilterableProperties, getFilterablePropertyAllowedValues, getFilterablePropertyConfigAttributes, getFilterablePropertyDescription, getFilterablePropertyIsUsingSubquery, getFilterablePropertyResolvableAllowedValuesLabels, getFilterablePropertyType, getFilters, getFilters, getSort
-
-
-
-
Constructor Detail
-
TaxonArgService
@Autowired public TaxonArgService(TaxonService service, ChromosomeService chromosomeService, GeneService geneService)
-
-
Method Detail
-
getFilters
public <A> Filters getFilters(AbstractEntityArg<A,Taxon,TaxonService> entityArg) throws javax.ws.rs.BadRequestException
Description copied from interface:EntityArgService
Translate the provided entity argument into aFilters
.This will generate clause in the form of
property = value
.- Specified by:
getFilters
in interfaceEntityArgService<Taxon,TaxonService>
- Overrides:
getFilters
in classAbstractEntityArgService<Taxon,TaxonService>
- Throws:
javax.ws.rs.BadRequestException
- if the argument is malformed
-
getArgsByPropertyName
protected Map<String,List<String>> getArgsByPropertyName(AbstractEntityArrayArg<Taxon,TaxonService> entitiesArg)
Description copied from class:AbstractEntityArgService
Given aAbstractEntityArrayArg
, construct a mapping of properties it refers to values those properties are allowed to take in a filter.- Overrides:
getArgsByPropertyName
in classAbstractEntityArgService<Taxon,TaxonService>
-
getGenesOnChromosome
public List<GeneValueObject> getGenesOnChromosome(TaxonArg<?> arg, String chromosomeName, @Nullable String strand, long start, int size) throws javax.ws.rs.NotFoundException
Lists Genes overlapping a location on a specific chromosome on a taxon that this TaxonArg represents.- Parameters:
chromosomeName
- name of the chromosome to look onstrand
- the strand that the gene has to have which is either '+' or '-', or null to ignorestart
- the start nucleotide denoting the location to look for genes at.size
- the size (in nucleotides) of the location from the 'start' nucleotide.- Returns:
- collection of Gene VOs overlapping the location defined by the 'start' and 'size' parameters.
- Throws:
javax.ws.rs.NotFoundException
- if the taxon cannot retrieved
-
-