Skip to content

Commit b8b3be5

Browse files
committed
update model to the 'OR' filters
1 parent 2d30bb9 commit b8b3be5

18 files changed

+108
-30
lines changed

beacon-framework/src/main/java/es/bsc/inb/ga4gh/beacon/framework/model/v200/requests/BeaconQueryFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* @author Dmitry Repchevsky
3838
*/
3939

40-
public interface BeaconQueryFilter {
40+
public interface BeaconQueryFilter extends BeaconQueryFilterGroupInterface {
4141

4242
String getId();
4343
void setId(String id);
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/**
2+
* *****************************************************************************
3+
* Copyright (C) 2025 ELIXIR ES, Spanish National Bioinformatics Institute (INB)
4+
* and Barcelona Supercomputing Center (BSC)
5+
*
6+
* Modifications to the initial code base are copyright of their respective
7+
* authors, or their employers as appropriate.
8+
*
9+
* This library is free software; you can redistribute it and/or
10+
* modify it under the terms of the GNU Lesser General Public
11+
* License as published by the Free Software Foundation; either
12+
* version 2.1 of the License, or (at your option) any later version.
13+
*
14+
* This library is distributed in the hope that it will be useful,
15+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17+
* Lesser General Public License for more details.
18+
*
19+
* You should have received a copy of the GNU Lesser General Public
20+
* License along with this library; if not, write to the Free Software
21+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
22+
* MA 02110-1301 USA
23+
* *****************************************************************************
24+
*/
25+
26+
package es.bsc.inb.ga4gh.beacon.framework.model.v200.requests;
27+
28+
import java.util.ArrayList;
29+
import java.util.List;
30+
31+
/**
32+
* Logical 'OR' query filters group.
33+
*
34+
* @author Dmitry Repchevsky
35+
*/
36+
37+
public class BeaconQueryFilterGroup extends ArrayList<BeaconQueryFilter>
38+
implements List<BeaconQueryFilter>, BeaconQueryFilterGroupInterface {
39+
40+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/**
2+
* *****************************************************************************
3+
* Copyright (C) 2025 ELIXIR ES, Spanish National Bioinformatics Institute (INB)
4+
* and Barcelona Supercomputing Center (BSC)
5+
*
6+
* Modifications to the initial code base are copyright of their respective
7+
* authors, or their employers as appropriate.
8+
*
9+
* This library is free software; you can redistribute it and/or
10+
* modify it under the terms of the GNU Lesser General Public
11+
* License as published by the Free Software Foundation; either
12+
* version 2.1 of the License, or (at your option) any later version.
13+
*
14+
* This library is distributed in the hope that it will be useful,
15+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17+
* Lesser General Public License for more details.
18+
*
19+
* You should have received a copy of the GNU Lesser General Public
20+
* License along with this library; if not, write to the Free Software
21+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
22+
* MA 02110-1301 USA
23+
* *****************************************************************************
24+
*/
25+
26+
package es.bsc.inb.ga4gh.beacon.framework.model.v200.requests;
27+
28+
/**
29+
* The common interface for the single filter and a group of filters.
30+
*
31+
* @author Dmitry Repchevsky
32+
*/
33+
34+
public interface BeaconQueryFilterGroupInterface {
35+
36+
}

beacon-framework/src/main/java/es/bsc/inb/ga4gh/beacon/framework/model/v200/requests/BeaconRequestQuery.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
public class BeaconRequestQuery {
3636

3737
private BeaconRequestParameters request_parameters;
38-
private List<BeaconQueryFilter> filters;
38+
private List<BeaconQueryFilterGroupInterface> filters;
3939
private String include_resultset_responses;
4040
private Pagination pagination;
4141
private String granularity;
@@ -49,11 +49,11 @@ public void setRequestParameters(BeaconRequestParameters request_parameters) {
4949
this.request_parameters = request_parameters;
5050
}
5151

52-
public List<BeaconQueryFilter> getFilters() {
52+
public List<BeaconQueryFilterGroupInterface> getFilters() {
5353
return filters;
5454
}
5555

56-
public void setFilters(List<BeaconQueryFilter> filters) {
56+
public void setFilters(List<BeaconQueryFilterGroupInterface> filters) {
5757
this.filters = filters;
5858
}
5959

beacon-model/src/main/java/es/bsc/inb/ga4gh/beacon/framework/AnalysesInterface.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

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

28-
import es.bsc.inb.ga4gh.beacon.framework.model.v200.requests.BeaconQueryFilter;
28+
import es.bsc.inb.ga4gh.beacon.framework.model.v200.requests.BeaconQueryFilterGroupInterface;
2929
import es.bsc.inb.ga4gh.beacon.framework.model.v200.requests.BeaconRequestBody;
3030
import es.bsc.inb.ga4gh.beacon.framework.model.v200.responses.BeaconResultsetsResponse;
3131
import java.util.List;
@@ -51,7 +51,7 @@ public interface AnalysesInterface {
5151
*/
5252
BeaconResultsetsResponse getAnalyses(
5353
String requested_schema, Integer skip, Integer limit,
54-
String include_responses, List<BeaconQueryFilter> filters);
54+
String include_responses, List<BeaconQueryFilterGroupInterface> filters);
5555

5656
/**
5757
* Get a list of bioinformatics analyses.

beacon-model/src/main/java/es/bsc/inb/ga4gh/beacon/framework/BiosamplesInterface.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

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

28-
import es.bsc.inb.ga4gh.beacon.framework.model.v200.requests.BeaconQueryFilter;
28+
import es.bsc.inb.ga4gh.beacon.framework.model.v200.requests.BeaconQueryFilterGroupInterface;
2929
import es.bsc.inb.ga4gh.beacon.framework.model.v200.requests.BeaconRequestBody;
3030
import es.bsc.inb.ga4gh.beacon.framework.model.v200.responses.BeaconResultsetsResponse;
3131
import java.util.List;
@@ -50,7 +50,7 @@ public interface BiosamplesInterface {
5050
*/
5151
BeaconResultsetsResponse getBiosamples(
5252
String requested_schema, Integer skip, Integer limit,
53-
String include_responses, List<BeaconQueryFilter> filters);
53+
String include_responses, List<BeaconQueryFilterGroupInterface> filters);
5454

5555
/**
5656
* Get a list of biosamples.

beacon-model/src/main/java/es/bsc/inb/ga4gh/beacon/framework/CohortsInterface.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

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

28-
import es.bsc.inb.ga4gh.beacon.framework.model.v200.requests.BeaconQueryFilter;
28+
import es.bsc.inb.ga4gh.beacon.framework.model.v200.requests.BeaconQueryFilterGroupInterface;
2929
import es.bsc.inb.ga4gh.beacon.framework.model.v200.requests.BeaconRequestBody;
3030
import es.bsc.inb.ga4gh.beacon.framework.model.v200.responses.BeaconCollectionsResponse;
3131
import es.bsc.inb.ga4gh.beacon.framework.model.v200.responses.BeaconResultsetsResponse;
@@ -50,7 +50,7 @@ public interface CohortsInterface {
5050
* @return
5151
*/
5252
BeaconCollectionsResponse getCohorts(
53-
String requested_schema, Integer skip, Integer limit, List<BeaconQueryFilter> filters);
53+
String requested_schema, Integer skip, Integer limit, List<BeaconQueryFilterGroupInterface> filters);
5454

5555
/**
5656
* Get a list of cohorts.

beacon-model/src/main/java/es/bsc/inb/ga4gh/beacon/framework/DatasetsInterface.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

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

28-
import es.bsc.inb.ga4gh.beacon.framework.model.v200.requests.BeaconQueryFilter;
28+
import es.bsc.inb.ga4gh.beacon.framework.model.v200.requests.BeaconQueryFilterGroupInterface;
2929
import es.bsc.inb.ga4gh.beacon.framework.model.v200.responses.BeaconFilteringTermsResponse;
3030
import es.bsc.inb.ga4gh.beacon.framework.model.v200.requests.BeaconRequestBody;
3131
import es.bsc.inb.ga4gh.beacon.framework.model.v200.responses.BeaconCollectionsResponse;
@@ -51,7 +51,7 @@ public interface DatasetsInterface {
5151
* @return
5252
*/
5353
BeaconCollectionsResponse getDatasets(String requested_schema, Integer skip,
54-
Integer limit, List<BeaconQueryFilter> filters);
54+
Integer limit, List<BeaconQueryFilterGroupInterface> filters);
5555

5656
/**
5757
* Get a list of datasets.

beacon-model/src/main/java/es/bsc/inb/ga4gh/beacon/framework/GenomicVariationsInterface.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

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

28-
import es.bsc.inb.ga4gh.beacon.framework.model.v200.requests.BeaconQueryFilter;
28+
import es.bsc.inb.ga4gh.beacon.framework.model.v200.requests.BeaconQueryFilterGroupInterface;
2929
import es.bsc.inb.ga4gh.beacon.framework.model.v200.requests.BeaconRequestBody;
3030
import es.bsc.inb.ga4gh.beacon.framework.model.v200.responses.BeaconResultsetsResponse;
3131
import java.util.List;
@@ -65,7 +65,7 @@ BeaconResultsetsResponse getGenomicVariations(
6565
String include_responses, long[] start, long[] end, String assembly_id,
6666
String reference_name, String reference_bases, String alternate_bases,
6767
Long variant_min_length, Long variant_max_length, String genomic_allele_short_form,
68-
String gene_id, String aminoacid_change, List<BeaconQueryFilter> filters);
68+
String gene_id, String aminoacid_change, List<BeaconQueryFilterGroupInterface> filters);
6969

7070
BeaconResultsetsResponse postGenomicVariationsRequest(BeaconRequestBody request);
7171

beacon-model/src/main/java/es/bsc/inb/ga4gh/beacon/framework/IndividualsInterface.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

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

28-
import es.bsc.inb.ga4gh.beacon.framework.model.v200.requests.BeaconQueryFilter;
28+
import es.bsc.inb.ga4gh.beacon.framework.model.v200.requests.BeaconQueryFilterGroupInterface;
2929
import es.bsc.inb.ga4gh.beacon.framework.model.v200.requests.BeaconRequestBody;
3030
import es.bsc.inb.ga4gh.beacon.framework.model.v200.responses.BeaconResultsetsResponse;
3131
import java.util.List;
@@ -50,7 +50,7 @@ public interface IndividualsInterface {
5050
*/
5151
BeaconResultsetsResponse getIndividuals(
5252
String requested_schema, Integer skip, Integer limit,
53-
String include_responses, List<BeaconQueryFilter> filters);
53+
String include_responses, List<BeaconQueryFilterGroupInterface> filters);
5454

5555
/**
5656
* Get a list of individuals.

0 commit comments

Comments
 (0)