generated from GenomicDataInfrastructure/oss-project-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from GenomicDataInfrastructure/26-gdi-dataset-…
…discovery-service-add-facet-query-operator 26 gdi dataset discovery service add facet query operator
- Loading branch information
Showing
5 changed files
with
73 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
.../java/io/github/genomicdatainfrastructure/discovery/services/CkanQueryOperatorMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// SPDX-FileCopyrightText: 2024 PNED G.I.E. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package io.github.genomicdatainfrastructure.discovery.services; | ||
|
||
import io.github.genomicdatainfrastructure.discovery.model.DatasetSearchQuery; | ||
import lombok.experimental.UtilityClass; | ||
|
||
@UtilityClass | ||
public class CkanQueryOperatorMapper { | ||
|
||
private final String AND = " AND "; | ||
private final String OR = " OR "; | ||
|
||
public String getOperator(DatasetSearchQuery.OperatorEnum operator) { | ||
return operator.equals(DatasetSearchQuery.OperatorEnum.OR) ? OR : AND; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters