OpenCGA has a large and rich suite of web services to store and query almost anything imaginable in bioinformatics. Because, calling those web services directly from Java could be a pain, we have designed and implemented a Java API client really easy to use even for non experts.
Library design
Developers only need to call to OpenCGAClient class passing the client configuration file (client-configuration.yml) as an argument and, optionally, the user and password or a valid token to start doing calls as an authenticated user. The only role of the OpenCGAClient class is to work as a factory of the actual clients.
OpenCGAClient opencgaClient = new OpenCGAClient(clientConfiguration);
OpenCGAClient opencgaClient = new OpenCGAClient("myUserId", "myPassword", clientConfiguration);
OpenCGAClient opencgaClient = new OpenCGAClient("myValidToken", clientConfiguration);
A different client class have been created for every single category present in the web services (user, project, study...). The list of all the available clients can be found below:
These clients will inherit the implementation of the most common actions from an abstract parent class called CatalogClient. Each client will contain specific methods for every single action that can be found in the web services.