Class MapBasedEntityMapper<T extends Identifiable>
- java.lang.Object
-
- ubic.gemma.core.loader.util.mapper.MapBasedEntityMapper<T>
-
- All Implemented Interfaces:
EntityMapper<T>
- Direct Known Subclasses:
CellIdOverlapBioAssayMapper
,MapBasedDesignElementMapper
public class MapBasedEntityMapper<T extends Identifiable> extends Object implements EntityMapper<T>
A simple implementation ofEntityMapper
that uses aMap
to store association between identifiers and entities.- Author:
- poirigui
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface ubic.gemma.core.loader.util.mapper.EntityMapper
EntityMapper.MappingStatistics, EntityMapper.StatefulEntityMapper<T extends Identifiable>
-
-
Constructor Summary
Constructors Constructor Description MapBasedEntityMapper(String name, Map<String,T> elementsMapping)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EntityMapper.StatefulEntityMapper<T>
forCandidates(Collection<T> candidates)
Create a stateful mapper for a set of candidates.String
getName()
Obtain the name of the mapping strategy.protected String
processIdentifier(String identifier)
Process the identifier before using it to query the mapping.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ubic.gemma.core.loader.util.mapper.EntityMapper
contains, containsAny, getMappingStatistics, matchAll, matchAll, matchOne, matchOne
-
-
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:EntityMapper
Obtain the name of the mapping strategy.- Specified by:
getName
in interfaceEntityMapper<T extends Identifiable>
-
forCandidates
public EntityMapper.StatefulEntityMapper<T> forCandidates(Collection<T> candidates)
Description copied from interface:EntityMapper
Create a stateful mapper for a set of candidates.- Specified by:
forCandidates
in interfaceEntityMapper<T extends Identifiable>
-
-