Interface CharacteristicDao
-
- All Superinterfaces:
BaseDao<Characteristic>
,BaseVoEnabledDao<Characteristic,CharacteristicValueObject>
,BrowsingDao<Characteristic>
,FilteringDao<Characteristic>
,FilteringVoEnabledDao<Characteristic,CharacteristicValueObject>
- All Known Implementing Classes:
CharacteristicDaoImpl
public interface CharacteristicDao extends BrowsingDao<Characteristic>, FilteringVoEnabledDao<Characteristic,CharacteristicValueObject>
- See Also:
Characteristic
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
CharacteristicDao.CharacteristicUsageFrequency
Represents a set of characteristics grouped byCharacteristic.getValueUri()
orCharacteristic.getValue()
.
-
Field Summary
Fields Modifier and Type Field Description static String
OBJECT_ALIAS
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<Characteristic>
browse(int start, int limit)
Browse through the characteristics, excluding GO annotations.List<Characteristic>
browse(int start, int limit, String sortField, boolean descending)
Browse through the characteristics, excluding GO annotations, with sorting.Map<String,Long>
countCharacteristicsByValueUriGroupedByNormalizedValue(Collection<String> uris)
Count characteristics matching the provided value URIs.Characteristic
findBestByUri(String uri)
Return the characteristic with the most frequently used non-null value by URI.Collection<? extends Characteristic>
findByCategory(String query)
Collection<Characteristic>
findByUri(String searchString)
Collection<Characteristic>
findByUri(Collection<String> uris)
Collection<Characteristic>
findByValue(String search)
Finds all Characteristics whose value match the given search termMap<String,Characteristic>
findCharacteristicsByValueUriOrValueLikeGroupedByNormalizedValue(String value)
Find characteristics by value matching the provided LIKE pattern.Map<Class<? extends Identifiable>,Map<String,Set<ExpressionExperiment>>>
findExperimentReferencesByUris(Collection<String> uris, Taxon taxon, int limit, boolean rankByLevel)
Similar tofindExperimentsByUris(Collection, Taxon, int, boolean)
, but returns proxies with instead of initializing all the EEs in bulk.Map<Class<? extends Identifiable>,Map<String,Set<ExpressionExperiment>>>
findExperimentsByUris(Collection<String> uris, Taxon taxon, int limit, boolean rankByLevel)
This search looks at direct annotations, factor values and biomaterials in that order.Map<Characteristic,Identifiable>
getParents(Collection<Characteristic> characteristics, Collection<Class<?>> parentClasses, int maxResults)
Obtain the parents (i.e.String
normalizeByValue(Characteristic characteristic)
Normalize a characteristic by value.-
Methods inherited from interface ubic.gemma.persistence.service.BaseDao
countAll, create, create, find, findOrCreate, getElementClass, getIdentifierPropertyName, load, load, loadAll, loadReference, loadReference, remove, remove, remove, save, save, update, update
-
Methods inherited from interface ubic.gemma.persistence.service.BaseVoEnabledDao
loadAllValueObjects, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjectsByIds
-
Methods inherited from interface ubic.gemma.persistence.service.FilteringDao
count, getFilter, getFilter, getFilter, getFilter, getFilterableProperties, getFilterablePropertyAllowedValues, getFilterablePropertyDescription, getFilterablePropertyIsUsingSubquery, getFilterablePropertyType, getSort, load, load, loadIds
-
Methods inherited from interface ubic.gemma.persistence.service.FilteringVoEnabledDao
loadValueObjects, loadValueObjects
-
-
-
-
Field Detail
-
OBJECT_ALIAS
static final String OBJECT_ALIAS
- See Also:
- Constant Field Values
-
-
Method Detail
-
browse
List<Characteristic> browse(int start, int limit)
Browse through the characteristics, excluding GO annotations.- Specified by:
browse
in interfaceBrowsingDao<Characteristic>
- Parameters:
start
- How far into the list to startlimit
- Maximum records to retrieve (might be subject to security filtering)- Returns:
- characteristics
-
browse
List<Characteristic> browse(int start, int limit, String sortField, boolean descending)
Browse through the characteristics, excluding GO annotations, with sorting.- Specified by:
browse
in interfaceBrowsingDao<Characteristic>
- Parameters:
start
- query offsetlimit
- maximum amount of entriesdescending
- order directionsortField
- order field- Returns:
- characteristics
-
findByCategory
Collection<? extends Characteristic> findByCategory(String query)
-
findExperimentsByUris
Map<Class<? extends Identifiable>,Map<String,Set<ExpressionExperiment>>> findExperimentsByUris(Collection<String> uris, @Nullable Taxon taxon, int limit, boolean rankByLevel)
This search looks at direct annotations, factor values and biomaterials in that order.Resulting EEs are filtered by ACLs.
The returned collection of EEs is effectively a
Set
, but since we cannot use since this should be interchangable withfindExperimentReferencesByUris(Collection, Taxon, int, boolean)
.Ranking results by level guarantees correctness if a limit is used as datasets matched by direct annotation will be considered before those matched by factor values or biomaterials. It is however expensive.
- Parameters:
uris
- collection of URIs used for matching characteristics (viaCharacteristic.getValueUri()
)taxon
- taxon to restrict EEs to, or null to ignorelimit
- limit how many results to return. Set to -1 for no limit.rankByLevel
- rank results by level before limiting, has no effect if limit is -1- Returns:
- map of classes (
ExpressionExperiment
,FactorValue
,BioMaterial
) to the matching URI to EEs which have an associated characteristic using the given URI. The class lets us track where the annotation was.
-
findExperimentReferencesByUris
Map<Class<? extends Identifiable>,Map<String,Set<ExpressionExperiment>>> findExperimentReferencesByUris(Collection<String> uris, @Nullable Taxon taxon, int limit, boolean rankByLevel)
Similar tofindExperimentsByUris(Collection, Taxon, int, boolean)
, but returns proxies with instead of initializing all the EEs in bulk.- See Also:
Session.load(Object, Serializable)
-
findByUri
Collection<Characteristic> findByUri(Collection<String> uris)
-
findByUri
Collection<Characteristic> findByUri(String searchString)
-
findBestByUri
Characteristic findBestByUri(String uri)
Return the characteristic with the most frequently used non-null value by URI.
-
findCharacteristicsByValueUriOrValueLikeGroupedByNormalizedValue
Map<String,Characteristic> findCharacteristicsByValueUriOrValueLikeGroupedByNormalizedValue(String value)
Find characteristics by value matching the provided LIKE pattern.The mapping key is the normalized value of the characteristics as per
normalizeByValue(Characteristic)
.
-
countCharacteristicsByValueUriGroupedByNormalizedValue
Map<String,Long> countCharacteristicsByValueUriGroupedByNormalizedValue(Collection<String> uris)
Count characteristics matching the provided value URIs.The mapping key is the normalized value of the characteristics as per
normalizeByValue(Characteristic)
.
-
normalizeByValue
String normalizeByValue(Characteristic characteristic)
Normalize a characteristic by value.This is obtained by taking the value URI or value if the former is null and converting it to lowercase.
-
findByValue
Collection<Characteristic> findByValue(String search)
Finds all Characteristics whose value match the given search term- Parameters:
search
- search- Returns:
- characteristics
-
getParents
Map<Characteristic,Identifiable> getParents(Collection<Characteristic> characteristics, @Nullable Collection<Class<?>> parentClasses, int maxResults)
Obtain the parents (i.e. owners) of the given characteristics.If a characteristic lacks a parent, its entry will be missing from the returned map.
-
-