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
-
-
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>
countByValueUriGroupedByNormalizedValue(Collection<String> uris, Collection<Class<?>> parentClasses)
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<Characteristic>
findByCategory(String value)
Collection<Characteristic>
findByCategoryLike(String query)
Collection<Characteristic>
findByCategoryUri(String uri)
Collection<Characteristic>
findByUri(String searchString)
Collection<Characteristic>
findByUri(Collection<String> uris)
Collection<Characteristic>
findByValue(String search)
Collection<Characteristic>
findByValueLike(String search)
Finds all Characteristics whose value match the given search termMap<String,Characteristic>
findByValueLikeGroupedByNormalizedValue(String valueLike, Collection<Class<?>> parentClasses)
Find characteristics by value matching the provided LIKE pattern.Map<String,Characteristic>
findByValueUriGroupedByNormalizedValue(String valueUri, Collection<Class<?>> parentClasses)
Find characteristics by URI.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, 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<Characteristic> findByCategory(String value)
-
findByCategoryLike
Collection<Characteristic> findByCategoryLike(String query)
-
findByCategoryUri
Collection<Characteristic> findByCategoryUri(String uri)
-
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.
-
findByValueUriGroupedByNormalizedValue
Map<String,Characteristic> findByValueUriGroupedByNormalizedValue(String valueUri, @Nullable Collection<Class<?>> parentClasses)
Find characteristics by URI.The mapping key is the normalized value of the characteristics as per
normalizeByValue(Characteristic)
.
-
findByValueLikeGroupedByNormalizedValue
Map<String,Characteristic> findByValueLikeGroupedByNormalizedValue(String valueLike, @Nullable Collection<Class<?>> parentClasses)
Find characteristics by value matching the provided LIKE pattern.The mapping key is the normalized value of the characteristics as per
normalizeByValue(Characteristic)
.
-
countByValueUriGroupedByNormalizedValue
Map<String,Long> countByValueUriGroupedByNormalizedValue(Collection<String> uris, @Nullable Collection<Class<?>> parentClasses)
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)
-
findByValueLike
Collection<Characteristic> findByValueLike(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.
-
-