Skip to content

Commit

Permalink
Beacon v2 abstract endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
redmitry committed Oct 17, 2023
1 parent 2372be6 commit a63b2e1
Show file tree
Hide file tree
Showing 32 changed files with 5,307 additions and 0 deletions.
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
These are Java Beans classes for the Beacon API v2.0.0 specification JSON schema.

Compiling:
```shell
>git https://github.com/elixir-europe/java-beacon-v2.api.git
>cd java-beacon-v2-api
>mvn install
```
Maven will build three libraries:
1. beacon-framework/target/beacon-framework-2.x.x.jar
these are java model classes for Beacon v2 framwork
2. beacon-data-model/target/beacon-data-model-2.x.x.jar
these are the java interfaces for Beacon v2 models
3. beacon-model/target/beacon-model-2.x.x.jar
these are the java interfaces for Beacon v2 endpoints

Most probably, you wont be needed to manually compile this project, but rather include the libararies in your own project

To include Beacon beans in a maven project (pom.xml):

```xml
<dependencies>
<dependency>
<groupId>es.bsc.inb.ga4gh</groupId>
<artifactId>beacon-model</artifactId>
<version>2.x.x</version>
</dependency>
</dependencies>

<repositories>
<repository>
<id>gitlab-bsc-maven</id>
<url>https://inb.bsc.es/maven</url>
</repository>
</repositories>
```
504 changes: 504 additions & 0 deletions beacon-model/LICENSE

Large diffs are not rendered by default.

105 changes: 105 additions & 0 deletions beacon-model/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2023 Spanish National Bioinformatics Institute (INB) and
Barcelona Supercomputing Center
Modifications to the initial code base are copyright of their respective
authors, or their employers as appropriate.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301 USA
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>es.bsc.inb.ga4gh</groupId>
<artifactId>beacon-v2-api</artifactId>
<version>2.0.4</version>
</parent>

<artifactId>beacon-model</artifactId>
<packaging>jar</packaging>

<description>
Beacon Java Data Model version 2.0.0
</description>

<organization>
<name>Barcelona Supercomputing Center</name>
<url>https://www.bsc.es/</url>
</organization>

<licenses>
<license>
<name>LGPL-2.1-or-later</name>
<url>https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt</url>
<distribution>repo</distribution>
</license>
</licenses>

<developers>
<developer>
<id>redmitry</id>
<name>Dmitry Repchevsky</name>
<email>[email protected]</email>
</developer>
</developers>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>

<jakarta.ws.rs-api.version>3.1.0</jakarta.ws.rs-api.version>
</properties>

<dependencies>

<dependency>
<groupId>es.bsc.inb.ga4gh</groupId>
<artifactId>beacon-framework</artifactId>
<version>2.0.4</version>
</dependency>

<dependency>
<groupId>es.bsc.inb.ga4gh</groupId>
<artifactId>beacon-data-model</artifactId>
<version>2.0.4</version>
</dependency>

<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<version>${jakarta.ws.rs-api.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-api</artifactId>
<version>${jakarta.json.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jakarta.json.bind</groupId>
<artifactId>jakarta.json.bind-api</artifactId>
<version>${jakarta.json.bind.version}</version>
<scope>provided</scope>
</dependency>

</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
/**
* *****************************************************************************
* Copyright (C) 2023 ELIXIR ES, Spanish National Bioinformatics Institute (INB)
* and Barcelona Supercomputing Center (BSC)
*
* Modifications to the initial code base are copyright of their respective
* authors, or their employers as appropriate.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
* *****************************************************************************
*/

package es.bsc.inb.ga4gh.beacon.framework;

import es.bsc.inb.ga4gh.beacon.framework.model.v200.requests.BeaconQueryFilter;
import es.bsc.inb.ga4gh.beacon.framework.model.v200.requests.BeaconRequestBody;
import es.bsc.inb.ga4gh.beacon.framework.model.v200.responses.BeaconFilteringTermsResponse;
import es.bsc.inb.ga4gh.beacon.framework.model.v200.responses.BeaconResultsetsResponse;
import java.util.List;

/**
* GA4GH Beacon API Specification - Analysis endpoints
*
* @author Dmitry Repchevsky
*/

public interface AnalysesInterface {

/**
* Get a list of bioinformatics analyses.
*
* @param requested_schema
* @param skip
* @param limit
* @param include_responses
* @param filters
*
* @return
*/
BeaconResultsetsResponse getAnalyses(
String requested_schema, Integer skip, Integer limit,
String include_responses, List<BeaconQueryFilter> filters);

/**
* Get a list of bioinformatics analyses.
*
* @param request
* @return
*/
BeaconResultsetsResponse postAnalyses(BeaconRequestBody request);

/**
* Get details about one bioinformatics analysis, identified by its (unique) 'id'
*
* @param id
* @return
*/
BeaconResultsetsResponse getOneAnalysis(String id);

/**
* Get details about one bioinformatics analysis, identified by its (unique) 'id'
*
* @param id
* @param request
* @return
*/
BeaconResultsetsResponse postOneAnalysisRequest(String id, BeaconRequestBody request);

/**
* Get the list of variants instances for one bioinformatics analysis, identified by its (unique) 'id'
*
* @param id
* @param requested_schema
* @param skip
* @param limit
* @return
*/
BeaconResultsetsResponse getOneAnalysisGenomicVariants(
String id, String requested_schema, Integer skip, Integer limit);

/**
* Get the list of variants instances for one bioinformatics analysis, identified by its (unique) 'id'
*
* @param id
* @param request
* @return
*/
BeaconResultsetsResponse postOneAnalysisGenomicVariantsRequest(String id, BeaconRequestBody request);

/**
* Get the list of filtering terms that could be used with analyses.
*
* @param skip
* @param limit
* @return
*/
BeaconFilteringTermsResponse getAnalysesFilteringTerms(Integer skip, Integer limit);

/**
* Get the list of filtering terms that could be used with analyses.
*
* @param request
* @return
*/
BeaconFilteringTermsResponse postAnalysesFilteringTermsRequest(BeaconRequestBody request);

}
Loading

0 comments on commit a63b2e1

Please sign in to comment.