The service provider framework is improved and generalized beyond data services.
The basic idea of the service provider framework used is as follows. There is Interface, Provider, ProviderException and ProviderManager. Provider creates instances for a particular interface. There is a separate provider for each interface. Provider exposes a factory method to create instances and uses a subset of its arguments for recognizing a particular implementation. ProviderException contains information on errors while creating instances for a given provider. It may be subclassed if dedicated exception is warranted for a provider (e.g., data provider). ProviderManager manages multiple poviders. For each provider it has the corresponding factory method with the same signatures which is the preferred way for clients to get instances for the interface. It uses ServiceLoader to load all the implementations of the provider and only if the provider recognizes the particular implementation requested should the provider be used before using the next available provider implementation. One could also create a class, Providers, that collects all the provider interfaces as public static member variables.
Currently, the package genomemap.input has the following classes. InputData - the interface. InputDataDriver- the provider, DriverException- the provider exception, DriverManager- the provider manager. We want to rename the classes as follows to sync them with the improved version of the service provider framework. They are: InputData- unchanged, InputDataDriver- InputDataProvider, DriverException- InputDataProviderException, DriverManager- ProviderManager. We additionally want to create another class, ProviderException and InputDataProviderException would subclass it. We want to refactor the package. InputDataProvider should be in genomemap.data. The rest would be in genomemap.provider.
This may not be a good idea as this will create arbitrary dependency amongst the projects