Class SyscodeBasedCodeMapper

  • All Implemented Interfaces:
    CodeMapper

    public class SyscodeBasedCodeMapper
    extends Object
    implements CodeMapper
    Basic code mapper which always uses xref.id and DataSource.systemCode
    Author:
    Christian
    • Constructor Detail

      • SyscodeBasedCodeMapper

        public SyscodeBasedCodeMapper()
    • Method Detail

      • toIdSysCodePair

        public IdSysCodePair toIdSysCodePair​(Xref xref)
        Description copied from interface: CodeMapper
        Creates an IdSysCodePair based on a xref. Changes the ref.id and dataSource.systemCode if required.
        Specified by:
        toIdSysCodePair in interface CodeMapper
        Returns:
        The pair used to represent this xref
      • toXref

        public Xref toXref​(IdSysCodePair pair)
                    throws BridgeDBException
        Description copied from interface: CodeMapper
        Creates a xref based on an IdSysCodePair Changes the ref.id and dataSource.systemCode if required.
        Specified by:
        toXref in interface CodeMapper
        Returns:
        The xref used to represent this pair
        Throws:
        BridgeDBException - Normally thrown if the pair is invalid, incomplete or can not be converted to a valid xref. If the syscode does not convert to a valid DataSource