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 ClassesModifier and TypeInterfaceDescriptionstatic final classMapping statistics computed from a given set of entities and identifiers.static interfaceA stateful entity mapper keeps an internal state for a set of candidates to optimize the mapping process. -
Method Summary
Modifier and TypeMethodDescriptiondefault 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.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.getName()Obtain the name of the mapping strategy.matchAll(Collection<T> candidates, String identifier) Match the identifier to all the candidates.matchAll(Collection<T> candidates, Collection<String> identifiers) Match each identifier to all the candidates.matchOne(Collection<T> candidates, String identifier) Map the identifier to a single candidate.matchOne(Collection<T> candidates, Collection<String> identifiers) Match each identifier to a single candidate.
-
Method Details
-
getName
String getName()Obtain the name of the mapping strategy. -
forCandidates
Create a stateful mapper for a set of candidates. -
contains
Check if any of the candidates can be mapped to the identifier. -
containsAny
Check if any of the candidates can be mapped to any of the identifiers. -
matchOne
Map the identifier to a single candidate.If more than one candidate matches the identifier,
Optional.empty()is returned. -
matchOne
Match each identifier to a single candidate. -
matchAll
Match the identifier to all the candidates. -
matchAll
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.
-