Package org.bridgedb

Interface Driver


  • public interface Driver
    A Driver knows how to create an IDMapper instance. The connect method should not be called directly, instead use BridgeDb.connect() to automatically pick the correct driver for a protocol.
    • Method Detail

      • connect

        IDMapper connect​(String locationString)
                  throws IDMapperException
        Never call this method directly, use BridgeDb.connect(java.lang.String) instead. This method interprets the location part of the connection string and uses that to configure an IDMapper.
        Parameters:
        locationString - string with all necessary information to configure the resource. e.g. this could contain a URL or file location with optional parameters at the end.
        Returns:
        a new instance of the correct IDMapper implementation every time, configured according to the locationString.
        Throws:
        IDMapperException - when a connection to the resource could not be created, or the IDMapper implementation could not be instantiated for any reason. IDMapperException should be thrown also if the locationString could not be parsed, or if it was wrongly formatted.