Java library for accessing Beacon Network API.
- Prerequisites: Java 8, Maven 3.
- Dependencies: Beacon Network DTO.
- Building with Maven - in the root of the project, execute
mvn package
.
- Unit tests are run with your default Maven profile:
mvn test
- Integration tests against a running Beacon Network service can be executed with the
it
profile (server URL defaults tohttps://beacon-network.org/api/
):
mvn test -P it -DbeaconNetwork.test.url=[server_url].
- Make sure Beacon Network certificate is in your keystore. Depending on your JDK, you might need to download and import it.
- Add the relevant dependencies to your project:
<dependency>
<groupId>com.dnastack</groupId>
<artifactId>bob-client-api</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.dnastack</groupId>
<artifactId>bob-client-impl</artifactId>
<version>1.0-SNAPSHOT</version>
<!-- runtime in container-managed environment -->
<scope>compile</scope>
</dependency>
- Execute requests through an instance of
BeaconNetworkClient
. Example (BRCA2 query):
BeaconNetworkClient bnc = new BeaconNetworkClientImpl();
BeaconResponseDto response = bnc.getResponse(ChromosomeDto.CHR13, 32936732L, AlleleDto.C, ReferenceDto.HG19, "amplab");