Class RenamingBioAssayMapper
java.lang.Object
ubic.gemma.core.loader.util.mapper.RenamingBioAssayMapper
- All Implemented Interfaces:
BioAssayMapper
,EntityMapper<BioAssay>
A BioAssay-to-sample-name matcher that renames samples before matching them.
- 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
ConstructorsConstructorDescriptionRenamingBioAssayMapper
(BioAssayMapper delegate, String[] bioAssayNames, String[] sampleNames) -
Method Summary
Modifier and TypeMethodDescriptionboolean
contains
(Collection<BioAssay> bioAssays, String sampleName) Check if any of the candidates can be mapped to the identifier.boolean
containsAny
(Collection<BioAssay> bioAssays, Collection<String> sampleNames) Check if any of the candidates can be mapped to any of the identifiers.forCandidates
(Collection<BioAssay> candidates) Create a stateful mapper for a set of candidates.getName()
Obtain the name of the mapping strategy.matchAll
(Collection<BioAssay> bioAssays, String sampleName) Match the identifier to all the candidates.matchOne
(Collection<BioAssay> bioAssays, String sampleName) Map the identifier to a single candidate.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, matchAll, matchOne
-
Constructor Details
-
RenamingBioAssayMapper
public RenamingBioAssayMapper(BioAssayMapper delegate, String[] bioAssayNames, String[] sampleNames) - Parameters:
delegate
- a matcher that performs the underlying comparison of BA IDsbioAssayNames
- the BioAssay identifiers to usesampleNames
- the corresponding sample identifiers to use
-
-
Method Details
-
getName
Description copied from interface:EntityMapper
Obtain the name of the mapping strategy.- Specified by:
getName
in interfaceEntityMapper<BioAssay>
-
contains
Description copied from interface:EntityMapper
Check if any of the candidates can be mapped to the identifier.- Specified by:
contains
in interfaceEntityMapper<BioAssay>
-
containsAny
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
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>
-
matchAll
Description copied from interface:EntityMapper
Match the identifier to all the candidates.- Specified by:
matchAll
in interfaceEntityMapper<BioAssay>
-
toString
-
forCandidates
Description copied from interface:EntityMapper
Create a stateful mapper for a set of candidates.- Specified by:
forCandidates
in interfaceEntityMapper<BioAssay>
-