Class AbstractBioAssayMapper
- java.lang.Object
-
- ubic.gemma.core.loader.util.mapper.AbstractBioAssayMapper
-
- All Implemented Interfaces:
BioAssayMapper
,EntityMapper<BioAssay>
- Direct Known Subclasses:
GeoBioAssayMapper
,SimpleBioAssayMapper
public abstract class AbstractBioAssayMapper extends Object implements BioAssayMapper
-
-
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 AbstractBioAssayMapper()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
contains(Collection<BioAssay> candidates, String identifier)
Check if any of the candidates can be mapped to the identifier.boolean
containsAny(Collection<BioAssay> candidates, Collection<String> identifiers)
Check if any of the candidates can be mapped to any of the identifiers.EntityMapper.StatefulEntityMapper<BioAssay>
forCandidates(Collection<BioAssay> candidates)
Create a stateful mapper for a set of candidates.Set<BioAssay>
matchAll(Collection<BioAssay> candidates, String identifier)
Match the identifier to all the candidates.Map<String,Set<BioAssay>>
matchAll(Collection<BioAssay> candidates, Collection<String> identifiers)
Match each identifier to all the candidates.protected abstract Set<BioAssay>
matchAllInternal(Collection<BioAssay> candidates, String identifier)
protected boolean
matchDescriptionIgnoreCase(String a, String b)
protected boolean
matchId(Long a, String b)
protected boolean
matchName(String a, String b)
protected boolean
matchNameIgnoreCase(String a, String b)
Optional<BioAssay>
matchOne(Collection<BioAssay> candidates, String identifier)
Map the identifier to a single candidate.Map<String,BioAssay>
matchOne(Collection<BioAssay> candidates, Collection<String> identifiers)
Match each identifier to a single candidate.protected <T> boolean
matchWithFunction(Collection<BioAssay> bas, Function<BioAssay,T> extractor, BiFunction<T,String,Boolean> func, String sampleName, Collection<BioAssay> results)
String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ubic.gemma.core.loader.util.mapper.BioAssayMapper
forCandidates
-
Methods inherited from interface ubic.gemma.core.loader.util.mapper.EntityMapper
getMappingStatistics, getName
-
-
-
-
Method Detail
-
forCandidates
public EntityMapper.StatefulEntityMapper<BioAssay> forCandidates(Collection<BioAssay> candidates)
Description copied from interface:EntityMapper
Create a stateful mapper for a set of candidates.- Specified by:
forCandidates
in interfaceEntityMapper<BioAssay>
-
contains
public boolean contains(Collection<BioAssay> candidates, String identifier)
Description copied from interface:EntityMapper
Check if any of the candidates can be mapped to the identifier.- Specified by:
contains
in interfaceEntityMapper<BioAssay>
-
containsAny
public boolean containsAny(Collection<BioAssay> candidates, Collection<String> identifiers)
Description copied from interface:EntityMapper
Check if any of the candidates can be mapped to any of the identifiers.- Specified by:
containsAny
in interfaceEntityMapper<BioAssay>
-
matchOne
public Optional<BioAssay> matchOne(Collection<BioAssay> candidates, String identifier)
Description copied from interface:EntityMapper
Map the identifier to a single candidate.If more than one candidate matches the identifier,
Optional.empty()
is returned.- Specified by:
matchOne
in interfaceEntityMapper<BioAssay>
-
matchOne
public Map<String,BioAssay> matchOne(Collection<BioAssay> candidates, Collection<String> identifiers)
Description copied from interface:EntityMapper
Match each identifier to a single candidate.- Specified by:
matchOne
in interfaceEntityMapper<BioAssay>
-
matchAll
public Set<BioAssay> matchAll(Collection<BioAssay> candidates, String identifier)
Description copied from interface:EntityMapper
Match the identifier to all the candidates.- Specified by:
matchAll
in interfaceEntityMapper<BioAssay>
-
matchAll
public Map<String,Set<BioAssay>> matchAll(Collection<BioAssay> candidates, Collection<String> identifiers)
Description copied from interface:EntityMapper
Match each identifier to all the candidates.- Specified by:
matchAll
in interfaceEntityMapper<BioAssay>
-
matchAllInternal
protected abstract Set<BioAssay> matchAllInternal(Collection<BioAssay> candidates, String identifier)
-
matchWithFunction
protected <T> boolean matchWithFunction(Collection<BioAssay> bas, Function<BioAssay,T> extractor, BiFunction<T,String,Boolean> func, String sampleName, Collection<BioAssay> results)
-
-