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 EntityMapper
EntityMapper.MappingStatistics, EntityMapper.StatefulEntityMapper<T> -
Constructor Summary
ConstructorsConstructorDescriptionRenamingBioAssayMapper(BioAssayMapper delegate, String[] bioAssayNames, String[] sampleNames) -
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(Collection<BioAssay> bioAssays, String sampleName) Check if any of the candidates can be mapped to the identifier.booleancontainsAny(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 Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface BioAssayMapper
forCandidatesMethods inherited from interface 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:EntityMapperObtain the name of the mapping strategy.- Specified by:
getNamein interfaceEntityMapper<BioAssay>
-
contains
Description copied from interface:EntityMapperCheck if any of the candidates can be mapped to the identifier.- Specified by:
containsin interfaceEntityMapper<BioAssay>
-
containsAny
Description copied from interface:EntityMapperCheck if any of the candidates can be mapped to any of the identifiers.- Specified by:
containsAnyin interfaceEntityMapper<BioAssay>
-
matchOne
Description copied from interface:EntityMapperMap the identifier to a single candidate.If more than one candidate matches the identifier,
Optional.empty()is returned.- Specified by:
matchOnein interfaceEntityMapper<BioAssay>
-
matchAll
Description copied from interface:EntityMapperMatch the identifier to all the candidates.- Specified by:
matchAllin interfaceEntityMapper<BioAssay>
-
toString
-
forCandidates
Description copied from interface:EntityMapperCreate a stateful mapper for a set of candidates.- Specified by:
forCandidatesin interfaceEntityMapper<BioAssay>
-