Interface EntityMapper<T extends Identifiable>
-
- Type Parameters:
T- the type of entity being mapped
- All Known Subinterfaces:
BioAssayMapper,DesignElementMapper,HintingEntityMapper<T>
- All Known Implementing Classes:
AbstractBioAssayMapper,AbstractGeneIdentifierBasedDesignElementMapper,CellIdOverlapBioAssayMapper,ChainedEntityMapper,EnsemblIdDesignElementMapper,GeneNameDesignElementMapper,GeoBioAssayMapper,MapBasedDesignElementMapper,MapBasedEntityMapper,NcbiIdDesignElementMapper,OfficialSymbolDesignElementMapper,RenamingBioAssayMapper,SimpleBioAssayMapper,SimpleDesignElementMapper
public interface EntityMapper<T extends Identifiable>Map external identifiers to Gemma entities.- Author:
- poirigui
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classEntityMapper.MappingStatisticsMapping statistics computed from a given set of entities and identifiers.static interfaceEntityMapper.StatefulEntityMapper<T extends Identifiable>A stateful entity mapper keeps an internal state for a set of candidates to optimize the mapping process.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default booleancontains(Collection<T> candidates, String identifier)Check if any of the candidates can be mapped to the identifier.default booleancontainsAny(Collection<T> candidates, Collection<String> identifiers)Check if any of the candidates can be mapped to any of the identifiers.EntityMapper.StatefulEntityMapper<T>forCandidates(Collection<T> candidates)Create a stateful mapper for a set of candidates.default EntityMapper.MappingStatisticsgetMappingStatistics(Collection<T> candidates, Collection<String> identifiers)Calculate mapping statistics for a set of gene identifiers and candidates.StringgetName()Obtain the name of the mapping strategy.default Set<T>matchAll(Collection<T> candidates, String identifier)Match the identifier to all the candidates.default Map<String,Set<T>>matchAll(Collection<T> candidates, Collection<String> identifiers)Match each identifier to all the candidates.default Optional<T>matchOne(Collection<T> candidates, String identifier)Map the identifier to a single candidate.default Map<String,T>matchOne(Collection<T> candidates, Collection<String> identifiers)Match each identifier to a single candidate.
-
-
-
Method Detail
-
getName
String getName()
Obtain the name of the mapping strategy.
-
forCandidates
EntityMapper.StatefulEntityMapper<T> forCandidates(Collection<T> candidates)
Create a stateful mapper for a set of candidates.
-
contains
default boolean contains(Collection<T> candidates, String identifier)
Check if any of the candidates can be mapped to the identifier.
-
containsAny
default boolean containsAny(Collection<T> candidates, Collection<String> identifiers)
Check if any of the candidates can be mapped to any of the identifiers.
-
matchOne
default Optional<T> matchOne(Collection<T> candidates, String identifier)
Map the identifier to a single candidate.If more than one candidate matches the identifier,
Optional.empty()is returned.
-
matchOne
default Map<String,T> matchOne(Collection<T> candidates, Collection<String> identifiers)
Match each identifier to a single candidate.
-
matchAll
default Set<T> matchAll(Collection<T> candidates, String identifier)
Match the identifier to all the candidates.
-
matchAll
default Map<String,Set<T>> matchAll(Collection<T> candidates, Collection<String> identifiers)
Match each identifier to all the candidates.
-
getMappingStatistics
default EntityMapper.MappingStatistics getMappingStatistics(Collection<T> candidates, Collection<String> identifiers)
Calculate mapping statistics for a set of gene identifiers and candidates.
-
-