Class CharacteristicReadServiceImpl
java.lang.Object
ubic.gemma.persistence.service.common.description.CharacteristicReadServiceImpl
- All Implemented Interfaces:
CharacteristicReadService
@Service("characteristicReadService")
public class CharacteristicReadServiceImpl
extends Object
implements CharacteristicReadService
Implementation of
CharacteristicReadService.
All public methods are @Transactional(readOnly = true). ACL enforcement is the
responsibility of the facade CharacteristicService interface -- this class is
unsecured at the AOP boundary on purpose, so intra-gemma-core callers can
bypass duplicate ACL checks once authenticated.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCharacteristicReadServiceImpl(CharacteristicDao characteristicDao, StatementDao statementDao) -
Method Summary
Modifier and TypeMethodDescriptionbrowse(int start, int limit) Browse through the characteristics, excluding GO annotations.Browse through the characteristics, excluding GO annotations.countByValueUri(Collection<String> uris, Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents) countExperimentsByUris(Collection<String> uris, boolean includeSubjects, boolean includePredicates, boolean includeObjects, boolean includeCategories, Taxon taxon, Collection<Long> excludedExperimentIds) countExperimentsByUris(Collection<String> uris, boolean includeSubjects, boolean includePredicates, boolean includeObjects, Taxon taxon, Collection<Long> excludedExperimentIds) findBestByUri(String uri) Find the best possible characteristic for a given URI.Collection<? extends Characteristic> findByAnyUri(String uri) Find a characteristic or statement by any URI it contains including its category, value, predicates and objects.Collection<? extends Characteristic> findByAnyValue(String value) Find a characteristic by any value it contains including its category, value, predicates and objects.Collection<? extends Characteristic> findByAnyValueStartingWith(String value) Find a characteristic by any value it contains including its category, value, predicates and objects that starts with the given query.findByCategoryStartingWith(String query, Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents, int maxResults) findByCategoryUri(String query, Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents, int maxResults) findByObject(String value) findByObjectUri(String uri) findByParentClasses(Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents, String category, int maxResults) Find characteristics that have a particular parent class or lack thereof.findByPredicate(String value) findByPredicateUri(String uri) findByUri(String uri, String category, Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents, int maxResults) Looks for an exact match of the given string to a valueUri in the characteristic database.findByUriInAnySlot(String uri) findByValueLike(String search, String category, Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents, int maxResults) Returns a collection of characteristics that have a value matching the given SQLLIKEpattern.findByValueStartingWith(String search, String category, Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents, int maxResults) Returns a collection of characteristics that have a value starting with the given string.findByValueUriOrValueStartingWith(String search, Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents) Find characteristics that have a value (prefix) or value URI (exact match) matching the given string.findCategoryGroupedByCategoryUri(Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents, int maxResults) findEeCountsByUriForOriginalValue(Collection<String> uris, String originalValue) findEeCountsByUriForOriginalValue(Collection<String> uris, String originalValue, Collection<Long> excludedExperimentIds) Map<Class<? extends Identifiable>, Map<String, Set<ExpressionExperiment>>> findExperimentsByUris(Collection<String> uris, boolean includeSubjects, boolean includePredicates, boolean includeObjects, Taxon taxon, int limit, boolean loadEEs, boolean rankByLevel) findPriorCurationByOriginalValue(String originalValue, int maxResults, Collection<Long> excludedExperimentIds) findRepresentativeUsageByValueUris(Collection<String> valueUris) For each value URI, return one representative ACL-visible usage, or omit URIs with no accessible usage.findValueGroupedByValueUri(Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents, boolean includePredicates, boolean includeObjects, int maxResults) getParents(Collection<Characteristic> characteristics, Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents, boolean thawParents)
-
Constructor Details
-
CharacteristicReadServiceImpl
@Autowired public CharacteristicReadServiceImpl(CharacteristicDao characteristicDao, StatementDao statementDao)
-
-
Method Details
-
browse
Description copied from interface:CharacteristicReadServiceBrowse through the characteristics, excluding GO annotations.- Specified by:
browsein interfaceCharacteristicReadService
-
browse
@Transactional(readOnly=true) public List<Characteristic> browse(int start, int limit, String sortField, boolean descending) Description copied from interface:CharacteristicReadServiceBrowse through the characteristics, excluding GO annotations.- Specified by:
browsein interfaceCharacteristicReadService
-
findExperimentsByUris
@Transactional(readOnly=true) public Map<Class<? extends Identifiable>, Map<String, Set<ExpressionExperiment>>> findExperimentsByUris(Collection<String> uris, boolean includeSubjects, boolean includePredicates, boolean includeObjects, @Nullable Taxon taxon, int limit, boolean loadEEs, boolean rankByLevel) - Specified by:
findExperimentsByUrisin interfaceCharacteristicReadService- See Also:
-
countExperimentsByUris
@Transactional(readOnly=true) public Map<String,Long> countExperimentsByUris(Collection<String> uris, boolean includeSubjects, boolean includePredicates, boolean includeObjects, @Nullable Taxon taxon, Collection<Long> excludedExperimentIds) - Specified by:
countExperimentsByUrisin interfaceCharacteristicReadService- See Also:
-
countExperimentsByUris
@Transactional(readOnly=true) public Map<String,Long> countExperimentsByUris(Collection<String> uris, boolean includeSubjects, boolean includePredicates, boolean includeObjects, boolean includeCategories, @Nullable Taxon taxon, Collection<Long> excludedExperimentIds) - Specified by:
countExperimentsByUrisin interfaceCharacteristicReadService- See Also:
-
findByParentClasses
@Transactional(readOnly=true) public Collection<Characteristic> findByParentClasses(@Nullable Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents, @Nullable String category, int maxResults) Description copied from interface:CharacteristicReadServiceFind characteristics that have a particular parent class or lack thereof.- Specified by:
findByParentClassesin interfaceCharacteristicReadService
-
findByUri
@Transactional(readOnly=true) public Collection<Characteristic> findByUri(String uri, @Nullable String category, @Nullable Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents, int maxResults) Description copied from interface:CharacteristicReadServiceLooks for an exact match of the given string to a valueUri in the characteristic database.- Specified by:
findByUriin interfaceCharacteristicReadService
-
findBestByUri
Description copied from interface:CharacteristicReadServiceFind the best possible characteristic for a given URI.- Specified by:
findBestByUriin interfaceCharacteristicReadService
-
findRepresentativeUsageByValueUris
@Transactional(readOnly=true) public Map<String, CharacteristicDao.UsageExample> findRepresentativeUsageByValueUris(Collection<String> valueUris) Description copied from interface:CharacteristicReadServiceFor each value URI, return one representative ACL-visible usage, or omit URIs with no accessible usage.- Specified by:
findRepresentativeUsageByValueUrisin interfaceCharacteristicReadService- See Also:
-
findByValueStartingWith
@Transactional(readOnly=true) public Collection<Characteristic> findByValueStartingWith(String search, @Nullable String category, @Nullable Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents, int maxResults) Description copied from interface:CharacteristicReadServiceReturns a collection of characteristics that have a value starting with the given string.- Specified by:
findByValueStartingWithin interfaceCharacteristicReadService
-
findByValueLike
@Transactional(readOnly=true) public Collection<Characteristic> findByValueLike(String search, @Nullable String category, @Nullable Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents, int maxResults) Description copied from interface:CharacteristicReadServiceReturns a collection of characteristics that have a value matching the given SQLLIKEpattern.- Specified by:
findByValueLikein interfaceCharacteristicReadService
-
findByValueUriOrValueStartingWith
@Transactional(readOnly=true) public Map<String, Characteristic> findByValueUriOrValueStartingWith(String search, @Nullable Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents) Description copied from interface:CharacteristicReadServiceFind characteristics that have a value (prefix) or value URI (exact match) matching the given string.- Specified by:
findByValueUriOrValueStartingWithin interfaceCharacteristicReadService
-
countByValueUri
@Transactional(readOnly=true) public Map<String,Long> countByValueUri(Collection<String> uris, @Nullable Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents) - Specified by:
countByValueUriin interfaceCharacteristicReadService
-
findEeCountsByUriGroupedByCategory
@Transactional(readOnly=true) public Map<String, Map<String,Long>> findEeCountsByUriGroupedByCategory(Collection<String> uris) - Specified by:
findEeCountsByUriGroupedByCategoryin interfaceCharacteristicReadService- See Also:
-
findEeCountsByUriForOriginalValue
@Transactional(readOnly=true) public Map<String,Long> findEeCountsByUriForOriginalValue(Collection<String> uris, String originalValue) - Specified by:
findEeCountsByUriForOriginalValuein interfaceCharacteristicReadService- See Also:
-
findEeCountsByUriForOriginalValue
@Transactional(readOnly=true) public Map<String,Long> findEeCountsByUriForOriginalValue(Collection<String> uris, String originalValue, Collection<Long> excludedExperimentIds) - Specified by:
findEeCountsByUriForOriginalValuein interfaceCharacteristicReadService- See Also:
-
findPriorCurationByOriginalValue
@Transactional(readOnly=true) public List<CharacteristicDao.PriorCurationUsage> findPriorCurationByOriginalValue(String originalValue, int maxResults, Collection<Long> excludedExperimentIds) - Specified by:
findPriorCurationByOriginalValuein interfaceCharacteristicReadService- See Also:
-
findValueGroupedByValueUri
@Transactional(readOnly=true) public Map<String,String> findValueGroupedByValueUri(@Nullable Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents, boolean includePredicates, boolean includeObjects, int maxResults) - Specified by:
findValueGroupedByValueUriin interfaceCharacteristicReadService- See Also:
-
findCategoryGroupedByCategoryUri
@Transactional(readOnly=true) public Map<String,String> findCategoryGroupedByCategoryUri(@Nullable Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents, int maxResults) - Specified by:
findCategoryGroupedByCategoryUriin interfaceCharacteristicReadService- See Also:
-
findByUriInAnySlot
- Specified by:
findByUriInAnySlotin interfaceCharacteristicReadService- See Also:
-
findExperimentIdsByUriInAnySlot
- Specified by:
findExperimentIdsByUriInAnySlotin interfaceCharacteristicReadService- See Also:
-
getParents
@Transactional(readOnly=true) public Map<Characteristic, Identifiable> getParents(Collection<Characteristic> characteristics, @Nullable Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents, boolean thawParents) - Specified by:
getParentsin interfaceCharacteristicReadService- Parameters:
thawParents- if true, the parents will be initialized if they are proxies- See Also:
-
findByCategoryStartingWith
@Transactional(readOnly=true) public Collection<Characteristic> findByCategoryStartingWith(String query, @Nullable Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents, int maxResults) - Specified by:
findByCategoryStartingWithin interfaceCharacteristicReadService
-
findByCategoryUri
@Transactional(readOnly=true) public Collection<Characteristic> findByCategoryUri(String query, @Nullable Collection<Class<? extends Identifiable>> parentClasses, boolean includeNoParents, int maxResults) - Specified by:
findByCategoryUriin interfaceCharacteristicReadService
-
findByAnyValue
@Transactional(readOnly=true) public Collection<? extends Characteristic> findByAnyValue(String value) Description copied from interface:CharacteristicReadServiceFind a characteristic by any value it contains including its category, value, predicates and objects.- Specified by:
findByAnyValuein interfaceCharacteristicReadService
-
findByAnyValueStartingWith
@Transactional(readOnly=true) public Collection<? extends Characteristic> findByAnyValueStartingWith(String value) Description copied from interface:CharacteristicReadServiceFind a characteristic by any value it contains including its category, value, predicates and objects that starts with the given query.- Specified by:
findByAnyValueStartingWithin interfaceCharacteristicReadService
-
findByAnyUri
Description copied from interface:CharacteristicReadServiceFind a characteristic or statement by any URI it contains including its category, value, predicates and objects.- Specified by:
findByAnyUriin interfaceCharacteristicReadService
-
findByPredicate
- Specified by:
findByPredicatein interfaceCharacteristicReadService
-
findByPredicateUri
- Specified by:
findByPredicateUriin interfaceCharacteristicReadService
-
findByObject
- Specified by:
findByObjectin interfaceCharacteristicReadService
-
findByObjectUri
- Specified by:
findByObjectUriin interfaceCharacteristicReadService
-