Package org.bridgedb

Class AbstractIDMapper

  • All Implemented Interfaces:
    IDMapper
    Direct Known Subclasses:
    IDMapperWebservice

    public abstract class AbstractIDMapper
    extends Object
    implements IDMapper
    Contains default implementation of some IDMapper methods.
    • Constructor Detail

      • AbstractIDMapper

        public AbstractIDMapper()
    • Method Detail

      • mapID

        public Set<Xref> mapID​(Xref srcRef,
                               DataSource... tgtDataSources)
                        throws IDMapperException
        Default implementation of mapID. This just calls
        mapID (Set<Xref>, Set<DataSource>)
        for mapping multiple id's with a set containing only a single Xref. Get all cross-references for the given entity, restricting the result to contain only references from the given set of data sources.
        Specified by:
        mapID in interface IDMapper
        Parameters:
        srcRef - the entity to get cross-references for.
        tgtDataSources - target ID types/data sources. Set this to null if you want to retrieve all results.
        Returns:
        A Set containing the cross references, or an empty Set when no cross references could be found. This method does not return null.
        Throws:
        IDMapperException - if the mapping service is (temporarily) unavailable