diff --git a/src/main/java/io/github/genomicdatainfrastructure/discovery/api/DatasetQueryApiImpl.java b/src/main/java/io/github/genomicdatainfrastructure/discovery/api/DatasetQueryApiImpl.java index 9d42806..dd08294 100644 --- a/src/main/java/io/github/genomicdatainfrastructure/discovery/api/DatasetQueryApiImpl.java +++ b/src/main/java/io/github/genomicdatainfrastructure/discovery/api/DatasetQueryApiImpl.java @@ -4,9 +4,9 @@ package io.github.genomicdatainfrastructure.discovery.api; -import io.github.genomicdatainfrastructure.discovery.datasets.application.usecases.SearchDatasetsQuery; import io.github.genomicdatainfrastructure.discovery.model.DatasetSearchQuery; import io.github.genomicdatainfrastructure.discovery.services.RetrieveDatasetService; +import io.github.genomicdatainfrastructure.discovery.services.SearchDatasetsService; import io.quarkus.oidc.runtime.OidcJwtCallerPrincipal; import io.quarkus.security.identity.SecurityIdentity; import jakarta.ws.rs.core.Response; @@ -16,12 +16,12 @@ public class DatasetQueryApiImpl implements DatasetQueryApi { private final SecurityIdentity identity; + private final SearchDatasetsService searchDatasetsService; private final RetrieveDatasetService retrievedDatasetService; - private final SearchDatasetsQuery searchDatasetsQuery; @Override public Response datasetSearch(DatasetSearchQuery datasetSearchQuery) { - var content = searchDatasetsQuery.execute(datasetSearchQuery, accessToken()); + var content = searchDatasetsService.search(datasetSearchQuery, accessToken()); return Response.ok(content).build(); } diff --git a/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/application/ports/DatasetIdsCollector.java b/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/application/ports/DatasetIdsCollector.java deleted file mode 100644 index 21c1dac..0000000 --- a/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/application/ports/DatasetIdsCollector.java +++ /dev/null @@ -1,14 +0,0 @@ -// SPDX-FileCopyrightText: 2024 PNED G.I.E. -// -// SPDX-License-Identifier: Apache-2.0 - -package io.github.genomicdatainfrastructure.discovery.datasets.application.ports; - -import io.github.genomicdatainfrastructure.discovery.model.DatasetSearchQuery; - -import java.util.List; - -public interface DatasetIdsCollector { - - List collect(DatasetSearchQuery query, String accessToken); -} diff --git a/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/application/ports/DatasetsRepository.java b/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/application/ports/DatasetsRepository.java deleted file mode 100644 index 01c643e..0000000 --- a/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/application/ports/DatasetsRepository.java +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-FileCopyrightText: 2024 PNED G.I.E. -// -// SPDX-License-Identifier: Apache-2.0 - -package io.github.genomicdatainfrastructure.discovery.datasets.application.ports; - -import io.github.genomicdatainfrastructure.discovery.model.SearchedDataset; - -import java.util.List; - -public interface DatasetsRepository { - - List search(List datasetIds, - String returnFields, - String sort, - Integer rows, - Integer start, - String accessToken); -} diff --git a/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/application/ports/FacetsBuilder.java b/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/application/ports/FacetsBuilder.java deleted file mode 100644 index 070ec76..0000000 --- a/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/application/ports/FacetsBuilder.java +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-FileCopyrightText: 2024 PNED G.I.E. -// -// SPDX-License-Identifier: Apache-2.0 - -package io.github.genomicdatainfrastructure.discovery.datasets.application.ports; - -import io.github.genomicdatainfrastructure.discovery.model.DatasetSearchQuery; -import io.github.genomicdatainfrastructure.discovery.model.FacetGroup; - -public interface FacetsBuilder { - - FacetGroup build(DatasetSearchQuery query, String accessToken); -} diff --git a/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/application/ports/RecordsCountCollector.java b/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/application/ports/RecordsCountCollector.java deleted file mode 100644 index ca8c33d..0000000 --- a/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/application/ports/RecordsCountCollector.java +++ /dev/null @@ -1,14 +0,0 @@ -// SPDX-FileCopyrightText: 2024 PNED G.I.E. -// -// SPDX-License-Identifier: Apache-2.0 - -package io.github.genomicdatainfrastructure.discovery.datasets.application.ports; - -import io.github.genomicdatainfrastructure.discovery.model.DatasetSearchQuery; - -import java.util.Map; - -public interface RecordsCountCollector { - - Map collectRecordsCount(DatasetSearchQuery query, String accessToken); -} diff --git a/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/application/usecases/SearchDatasetsQuery.java b/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/application/usecases/SearchDatasetsQuery.java deleted file mode 100644 index d0fdb0a..0000000 --- a/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/application/usecases/SearchDatasetsQuery.java +++ /dev/null @@ -1,81 +0,0 @@ -// SPDX-FileCopyrightText: 2024 PNED G.I.E. -// -// SPDX-License-Identifier: Apache-2.0 - -package io.github.genomicdatainfrastructure.discovery.datasets.application.usecases; - -import io.github.genomicdatainfrastructure.discovery.datasets.application.ports.DatasetIdsCollector; -import io.github.genomicdatainfrastructure.discovery.datasets.application.ports.DatasetsRepository; -import io.github.genomicdatainfrastructure.discovery.datasets.application.ports.FacetsBuilder; -import io.github.genomicdatainfrastructure.discovery.datasets.application.ports.RecordsCountCollector; -import io.github.genomicdatainfrastructure.discovery.model.DatasetSearchQuery; -import io.github.genomicdatainfrastructure.discovery.model.DatasetsSearchResponse; -import jakarta.enterprise.context.ApplicationScoped; -import jakarta.enterprise.inject.Instance; -import jakarta.inject.Inject; -import lombok.RequiredArgsConstructor; - -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.stream.Collectors; - -import static java.util.Optional.ofNullable; - -@ApplicationScoped -@RequiredArgsConstructor(onConstructor = @__(@Inject)) -public class SearchDatasetsQuery { - - private final DatasetsRepository repository; - private final Instance collectors; - private final Instance facetsBuilders; - private final RecordsCountCollector recordsCountCollector; - - public DatasetsSearchResponse execute(DatasetSearchQuery query, String accessToken) { - var datasetIds = collectors - .stream() - .map(collector -> collector.collect(query, accessToken)) - .filter(Objects::nonNull) - .reduce(this::findIdsIntersection) - .orElse(List.of()); - - var datasets = repository.search(datasetIds, - query.getReturnFields(), - query.getSort(), - query.getRows(), - query.getStart(), - accessToken); - - var potentialRecordsCounts = ofNullable(recordsCountCollector.collectRecordsCount(query, - accessToken)); - - var enhancedDatasets = datasets - .stream() - .map(dataset -> dataset - .toBuilder() - .recordsCount(potentialRecordsCounts - .map(recordsCounts -> recordsCounts.get(dataset.getIdentifier())) - .orElse(null)) - .build()) - .toList(); - - var facetGroups = facetsBuilders - .stream() - .map(facetBuilder -> facetBuilder.build(query, accessToken)) - .filter(Objects::nonNull) - .collect(Collectors.toList()); - - return DatasetsSearchResponse - .builder() - .count(datasetIds.size()) - .results(enhancedDatasets) - .facetGroups(facetGroups) - .build(); - } - - private List findIdsIntersection(List a, List b) { - return a.stream() - .filter(b::contains) - .toList(); - } -} diff --git a/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/infrastructure/beacon/auth/BeaconAuth.java b/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/infrastructure/beacon/auth/BeaconAuth.java deleted file mode 100644 index 7b40deb..0000000 --- a/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/infrastructure/beacon/auth/BeaconAuth.java +++ /dev/null @@ -1,55 +0,0 @@ -// SPDX-FileCopyrightText: 2024 PNED G.I.E. -// -// SPDX-License-Identifier: Apache-2.0 - -package io.github.genomicdatainfrastructure.discovery.datasets.infrastructure.beacon.auth; - -import io.github.genomicdatainfrastructure.discovery.remote.keycloak.api.KeycloakQueryApi; -import jakarta.enterprise.context.ApplicationScoped; -import jakarta.ws.rs.WebApplicationException; -import lombok.extern.java.Log; -import org.eclipse.microprofile.config.inject.ConfigProperty; -import org.eclipse.microprofile.rest.client.inject.RestClient; - -import java.util.Set; -import java.util.logging.Level; - -@Log -@ApplicationScoped -public class BeaconAuth { - - private static final String BEACON_ACCESS_TOKEN_INFO = "Skipping beacon search, user is not authorized or the token is invalid."; - private static final String BEARER_PATTERN = "Bearer %s"; - private static final Set SKIP_BEACON_QUERY_STATUS = Set.of(400, 401, 403); - - private final KeycloakQueryApi keycloakQueryApi; - private final String beaconIdpAlias; - - public BeaconAuth( - @RestClient KeycloakQueryApi keycloakQueryApi, - @ConfigProperty(name = "quarkus.rest-client.keycloak_yaml.beacon_idp_alias") String beaconIdpAlias - ) { - this.keycloakQueryApi = keycloakQueryApi; - this.beaconIdpAlias = beaconIdpAlias; - } - - public String retrieveAuthorization(String accessToken) { - if (accessToken == null) { - return null; - } - - var keycloakAuthorization = BEARER_PATTERN.formatted(accessToken); - - try { - var response = keycloakQueryApi.retriveIdpTokens(beaconIdpAlias, keycloakAuthorization); - return BEARER_PATTERN.formatted(response.getAccessToken()); - } catch (WebApplicationException exception) { - if (SKIP_BEACON_QUERY_STATUS.contains(exception.getResponse().getStatus())) { - log.log(Level.INFO, BEACON_ACCESS_TOKEN_INFO); - log.log(Level.WARNING, exception, exception::getMessage); - return null; - } - throw exception; - } - } -} diff --git a/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/infrastructure/beacon/persistence/BeaconDatasetIdsCollector.java b/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/infrastructure/beacon/persistence/BeaconDatasetIdsCollector.java deleted file mode 100644 index 9545b43..0000000 --- a/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/infrastructure/beacon/persistence/BeaconDatasetIdsCollector.java +++ /dev/null @@ -1,87 +0,0 @@ -// SPDX-FileCopyrightText: 2024 PNED G.I.E. -// -// SPDX-License-Identifier: Apache-2.0 - -package io.github.genomicdatainfrastructure.discovery.datasets.infrastructure.beacon.persistence; - -import io.github.genomicdatainfrastructure.discovery.datasets.application.ports.DatasetIdsCollector; -import io.github.genomicdatainfrastructure.discovery.datasets.application.ports.RecordsCountCollector; -import io.github.genomicdatainfrastructure.discovery.datasets.infrastructure.beacon.auth.BeaconAuth; -import io.github.genomicdatainfrastructure.discovery.model.DatasetSearchQuery; -import io.github.genomicdatainfrastructure.discovery.remote.beacon.api.BeaconQueryApi; -import io.github.genomicdatainfrastructure.discovery.remote.beacon.model.BeaconIndividualsResponse; -import io.github.genomicdatainfrastructure.discovery.remote.beacon.model.BeaconIndividualsResponseContent; -import io.github.genomicdatainfrastructure.discovery.remote.beacon.model.BeaconResultSet; -import io.github.genomicdatainfrastructure.discovery.utils.BeaconIndividualsRequestMapper; -import io.quarkus.arc.lookup.LookupIfProperty; -import io.quarkus.cache.CacheResult; -import jakarta.enterprise.context.ApplicationScoped; -import jakarta.inject.Inject; -import org.apache.commons.lang3.ObjectUtils; -import org.eclipse.microprofile.rest.client.inject.RestClient; - -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.stream.Collectors; - -import static java.util.Optional.ofNullable; -import static java.util.stream.Collectors.toList; -import static java.util.stream.Collectors.toMap; -import static org.apache.commons.lang3.StringUtils.isNotBlank; - -@ApplicationScoped -@LookupIfProperty(name = "sources.beacon", stringValue = "true") -public class BeaconDatasetIdsCollector implements DatasetIdsCollector, RecordsCountCollector { - - private static final String BEACON_DATASET_TYPE = "dataset"; - - private final BeaconQueryApi beaconQueryApi; - private final BeaconAuth beaconAuth; - - @Inject - public BeaconDatasetIdsCollector(@RestClient BeaconQueryApi beaconQueryApi, - BeaconAuth beaconAuth) { - this.beaconQueryApi = beaconQueryApi; - this.beaconAuth = beaconAuth; - } - - @Override - public List collect(DatasetSearchQuery query, String accessToken) { - var recordsCount = collectRecordsCount(query, accessToken); - - var datasetIds = ofNullable(recordsCount) - .map(Map::keySet) - .map(it -> it.stream().toList()) - .orElse(null); - - return datasetIds; - } - - @CacheResult(cacheName = "beacon-results-sets") - @Override - public Map collectRecordsCount(DatasetSearchQuery query, String accessToken) { - var beaconAuthorization = beaconAuth.retrieveAuthorization(accessToken); - - var beaconQuery = BeaconIndividualsRequestMapper.from(query); - - if (beaconAuthorization == null || beaconQuery.getQuery().getFilters().isEmpty()) { - return null; - } - - var response = beaconQueryApi.listIndividuals(beaconAuthorization, beaconQuery); - - var nonNullResultSets = ofNullable(response) - .map(BeaconIndividualsResponse::getResponse) - .map(BeaconIndividualsResponseContent::getResultSets) - .filter(ObjectUtils::isNotEmpty) - .orElseGet(List::of); - - return nonNullResultSets.stream() - .filter(Objects::nonNull) - .filter(it -> BEACON_DATASET_TYPE.equals(it.getSetType())) - .filter(it -> isNotBlank(it.getId())) - .filter(it -> it.getResultsCount() != null && it.getResultsCount() > 0) - .collect(toMap(BeaconResultSet::getId, BeaconResultSet::getResultsCount)); - } -} diff --git a/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/infrastructure/beacon/persistence/BeaconFacetsBuilder.java b/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/infrastructure/beacon/persistence/BeaconFacetsBuilder.java deleted file mode 100644 index ea9be29..0000000 --- a/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/infrastructure/beacon/persistence/BeaconFacetsBuilder.java +++ /dev/null @@ -1,37 +0,0 @@ -// SPDX-FileCopyrightText: 2024 PNED G.I.E. -// -// SPDX-License-Identifier: Apache-2.0 - -package io.github.genomicdatainfrastructure.discovery.datasets.infrastructure.beacon.persistence; - -import io.github.genomicdatainfrastructure.discovery.datasets.application.ports.FacetsBuilder; -import io.github.genomicdatainfrastructure.discovery.datasets.infrastructure.beacon.auth.BeaconAuth; -import io.github.genomicdatainfrastructure.discovery.model.DatasetSearchQuery; -import io.github.genomicdatainfrastructure.discovery.model.FacetGroup; -import io.github.genomicdatainfrastructure.discovery.services.BeaconFilteringTermsService; -import io.quarkus.arc.lookup.LookupIfProperty; -import jakarta.enterprise.context.ApplicationScoped; -import jakarta.inject.Inject; - -@ApplicationScoped -@LookupIfProperty(name = "sources.beacon", stringValue = "true") -public class BeaconFacetsBuilder implements FacetsBuilder { - - private final BeaconFilteringTermsService service; - private final BeaconAuth beaconAuth; - - @Inject - public BeaconFacetsBuilder(BeaconFilteringTermsService service, BeaconAuth beaconAuth) { - this.service = service; - this.beaconAuth = beaconAuth; - } - - @Override - public FacetGroup build(DatasetSearchQuery query, String accessToken) { - var beaconAuthorization = beaconAuth.retrieveAuthorization(accessToken); - if (beaconAuthorization == null) { - return null; - } - return service.listFilteringTerms(beaconAuthorization); - } -} diff --git a/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/infrastructure/ckan/config/CkanConfiguration.java b/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/infrastructure/ckan/config/CkanConfiguration.java deleted file mode 100644 index 99d1d61..0000000 --- a/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/infrastructure/ckan/config/CkanConfiguration.java +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-FileCopyrightText: 2024 PNED G.I.E. -// -// SPDX-License-Identifier: Apache-2.0 - -package io.github.genomicdatainfrastructure.discovery.datasets.infrastructure.ckan.config; - -public class CkanConfiguration { - - public static final String CKAN_IDENTIFIER_FIELD = "identifier"; - public static final String CKAN_FACET_GROUP = "ckan"; - public static final String CKAN_FACET_LABEL = "DCAT-AP"; - public static final int CKAN_PAGINATION_MAX_SIZE = 1000; -} diff --git a/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/infrastructure/ckan/persistence/CkanDatasetIdsCollector.java b/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/infrastructure/ckan/persistence/CkanDatasetIdsCollector.java deleted file mode 100644 index 2c4ddac..0000000 --- a/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/infrastructure/ckan/persistence/CkanDatasetIdsCollector.java +++ /dev/null @@ -1,58 +0,0 @@ -// SPDX-FileCopyrightText: 2024 PNED G.I.E. -// -// SPDX-License-Identifier: Apache-2.0 - -package io.github.genomicdatainfrastructure.discovery.datasets.infrastructure.ckan.persistence; - -import io.github.genomicdatainfrastructure.discovery.datasets.application.ports.DatasetIdsCollector; -import io.github.genomicdatainfrastructure.discovery.model.DatasetSearchQuery; -import io.github.genomicdatainfrastructure.discovery.remote.ckan.api.CkanQueryApi; -import io.github.genomicdatainfrastructure.discovery.remote.ckan.model.CkanPackage; -import io.github.genomicdatainfrastructure.discovery.utils.CkanFacetsQueryBuilder; -import jakarta.enterprise.context.ApplicationScoped; -import jakarta.inject.Inject; -import org.eclipse.microprofile.rest.client.inject.RestClient; - -import java.util.List; - -import static io.github.genomicdatainfrastructure.discovery.datasets.infrastructure.ckan.config.CkanConfiguration.CKAN_IDENTIFIER_FIELD; -import static io.github.genomicdatainfrastructure.discovery.datasets.infrastructure.ckan.config.CkanConfiguration.CKAN_PAGINATION_MAX_SIZE; - -@ApplicationScoped -public class CkanDatasetIdsCollector implements DatasetIdsCollector { - - private final CkanQueryApi ckanQueryApi; - - @Inject - public CkanDatasetIdsCollector( - @RestClient CkanQueryApi ckanQueryApi - ) { - this.ckanQueryApi = ckanQueryApi; - } - - @Override - public List collect(DatasetSearchQuery query, String accessToken) { - var facetsQuery = CkanFacetsQueryBuilder.buildFacetQuery(query); - - var response = ckanQueryApi.packageSearch( - query.getQuery(), - facetsQuery, - CKAN_IDENTIFIER_FIELD, - "", - CKAN_PAGINATION_MAX_SIZE, - 0, - "", - accessToken - ); - - var datasetIds = response - .getResult() - .getResults() - .stream() - .map(CkanPackage::getIdentifier) - .toList(); - - return datasetIds; - - } -} diff --git a/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/infrastructure/ckan/persistence/CkanDatasetsRepository.java b/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/infrastructure/ckan/persistence/CkanDatasetsRepository.java deleted file mode 100644 index bfd8286..0000000 --- a/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/infrastructure/ckan/persistence/CkanDatasetsRepository.java +++ /dev/null @@ -1,139 +0,0 @@ -// SPDX-FileCopyrightText: 2024 PNED G.I.E. -// -// SPDX-License-Identifier: Apache-2.0 - -package io.github.genomicdatainfrastructure.discovery.datasets.infrastructure.ckan.persistence; - -import io.github.genomicdatainfrastructure.discovery.datasets.application.ports.DatasetsRepository; -import io.github.genomicdatainfrastructure.discovery.model.*; -import io.github.genomicdatainfrastructure.discovery.remote.ckan.api.CkanQueryApi; -import io.github.genomicdatainfrastructure.discovery.remote.ckan.model.CkanOrganization; -import io.github.genomicdatainfrastructure.discovery.remote.ckan.model.CkanPackage; -import io.github.genomicdatainfrastructure.discovery.remote.ckan.model.CkanValueLabel; -import io.github.genomicdatainfrastructure.discovery.remote.ckan.model.PackagesSearchResult; -import io.github.genomicdatainfrastructure.discovery.utils.CkanFacetsQueryBuilder; -import io.github.genomicdatainfrastructure.discovery.utils.DatasetOrganizationMapper; -import jakarta.enterprise.context.ApplicationScoped; -import jakarta.inject.Inject; -import org.apache.commons.lang3.ObjectUtils; -import org.eclipse.microprofile.rest.client.inject.RestClient; - -import java.time.LocalDateTime; -import java.time.format.DateTimeFormatter; -import java.util.List; -import java.util.Objects; - -import static io.github.genomicdatainfrastructure.discovery.datasets.infrastructure.ckan.config.CkanConfiguration.CKAN_FACET_GROUP; -import static io.github.genomicdatainfrastructure.discovery.datasets.infrastructure.ckan.config.CkanConfiguration.CKAN_IDENTIFIER_FIELD; -import static java.util.Optional.ofNullable; - -@ApplicationScoped -public class CkanDatasetsRepository implements DatasetsRepository { - - private static final DateTimeFormatter DATE_FORMATTER = DateTimeFormatter.ofPattern( - "yyyy-MM-dd'T'HH:mm:ss.SSSSSS" - ); - - private final CkanQueryApi ckanQueryApi; - - @Inject - public CkanDatasetsRepository( - @RestClient CkanQueryApi ckanQueryApi - ) { - this.ckanQueryApi = ckanQueryApi; - } - - @Override - public List search(List datasetIds, - String returnFields, - String sort, - Integer rows, - Integer start, - String accessToken) { - - if (datasetIds == null || datasetIds.isEmpty()) { - return List.of(); - } - - var facets = datasetIds - .stream() - .map(id -> DatasetSearchQueryFacet - .builder() - .facetGroup(CKAN_FACET_GROUP) - .facet(CKAN_IDENTIFIER_FIELD) - .value(id) - .build()) - .toList(); - - var facetsQuery = CkanFacetsQueryBuilder.buildFacetQuery(DatasetSearchQuery - .builder() - .facets(facets) - .build()); - - var response = ckanQueryApi.packageSearch( - "", - facetsQuery, - returnFields, - sort, - rows, - start, - "", - accessToken - ); - - return results(response.getResult()); - } - - private List results(PackagesSearchResult result) { - var nonNullPackages = ofNullable(result) - .map(PackagesSearchResult::getResults) - .filter(ObjectUtils::isNotEmpty) - .orElseGet(List::of); - - return nonNullPackages.stream() - .map(this::result) - .toList(); - } - - private SearchedDataset result(CkanPackage dataset) { - var catalogue = ofNullable(dataset.getOrganization()) - .map(CkanOrganization::getTitle) - .orElse(null); - - return SearchedDataset.builder() - .id(dataset.getId()) - .identifier(dataset.getIdentifier()) - .title(dataset.getTitle()) - .description(dataset.getNotes()) - .themes(values(dataset.getTheme())) - .catalogue(catalogue) - .organization(DatasetOrganizationMapper.from(dataset.getOrganization())) - .modifiedAt(parse(dataset.getMetadataModified())) - .createdAt(parse(dataset.getMetadataCreated())) - .build(); - } - - private List values(List values) { - return ofNullable(values) - .orElseGet(List::of) - .stream() - .map(this::value) - .filter(Objects::nonNull) - .toList(); - } - - private ValueLabel value(CkanValueLabel value) { - return ofNullable(value) - .map(it -> ValueLabel.builder() - .value(it.getName()) - .label(it.getDisplayName()) - .build()) - .orElse(null); - } - - private LocalDateTime parse(String date) { - return ofNullable(date) - .map(it -> LocalDateTime.parse(it, DATE_FORMATTER)) - .orElse(null); - } -} diff --git a/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/infrastructure/ckan/persistence/CkanFacetsBuilder.java b/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/infrastructure/ckan/persistence/CkanFacetsBuilder.java deleted file mode 100644 index bff9eee..0000000 --- a/src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/infrastructure/ckan/persistence/CkanFacetsBuilder.java +++ /dev/null @@ -1,89 +0,0 @@ -// SPDX-FileCopyrightText: 2024 PNED G.I.E. -// -// SPDX-License-Identifier: Apache-2.0 - -package io.github.genomicdatainfrastructure.discovery.datasets.infrastructure.ckan.persistence; - -import io.github.genomicdatainfrastructure.discovery.datasets.application.ports.FacetsBuilder; -import io.github.genomicdatainfrastructure.discovery.model.*; -import io.github.genomicdatainfrastructure.discovery.remote.ckan.api.CkanQueryApi; -import io.github.genomicdatainfrastructure.discovery.remote.ckan.model.*; -import io.github.genomicdatainfrastructure.discovery.utils.CkanFacetsQueryBuilder; -import jakarta.enterprise.context.ApplicationScoped; -import org.eclipse.microprofile.config.inject.ConfigProperty; -import org.eclipse.microprofile.rest.client.inject.RestClient; - -import java.util.List; -import java.util.Map; - -import static io.github.genomicdatainfrastructure.discovery.datasets.infrastructure.ckan.config.CkanConfiguration.*; -import static java.util.Optional.ofNullable; - -@ApplicationScoped -public class CkanFacetsBuilder implements FacetsBuilder { - - private static final String SELECTED_FACETS_PATTERN = "[\"%s\"]"; - - private final CkanQueryApi ckanQueryApi; - private final String selectedFacets; - - public CkanFacetsBuilder(@RestClient CkanQueryApi ckanQueryApi, - @ConfigProperty(name = "datasets.filters") String datasetFiltersAsString) { - this.ckanQueryApi = ckanQueryApi; - this.selectedFacets = SELECTED_FACETS_PATTERN.formatted(String.join("\",\"", - datasetFiltersAsString.split(","))); - } - - @Override - public FacetGroup build(DatasetSearchQuery query, String accessToken) { - var facetsQuery = CkanFacetsQueryBuilder.buildFacetQuery(query); - - var response = ckanQueryApi.packageSearch( - query.getQuery(), - facetsQuery, - query.getReturnFields(), - query.getSort(), - 0, - query.getStart(), - selectedFacets, - accessToken - ); - - var nonNullSearchFacets = ofNullable(response.getResult()) - .map(PackagesSearchResult::getSearchFacets) - .orElseGet(Map::of); - - return facetGroup(nonNullSearchFacets); - } - - private FacetGroup facetGroup(Map facets) { - return FacetGroup.builder() - .key(CKAN_FACET_GROUP) - .label(CKAN_FACET_LABEL) - .facets(facets.entrySet().stream() - .map(this::facet) - .toList()) - .build(); - } - - private Facet facet(Map.Entry entry) { - var key = entry.getKey(); - var facet = entry.getValue(); - var values = ofNullable(facet.getItems()) - .orElseGet(List::of) - .stream() - .map(value -> ValueLabel.builder() - .value(value.getName()) - .label(value.getDisplayName()) - .build() - ) - .toList(); - - return Facet.builder() - .key(key) - .label(facet.getTitle()) - .values(values) - .build(); - } - -} diff --git a/src/main/java/io/github/genomicdatainfrastructure/discovery/repositories/BeaconDatasetsRepository.java b/src/main/java/io/github/genomicdatainfrastructure/discovery/repositories/BeaconDatasetsRepository.java new file mode 100644 index 0000000..d17164f --- /dev/null +++ b/src/main/java/io/github/genomicdatainfrastructure/discovery/repositories/BeaconDatasetsRepository.java @@ -0,0 +1,240 @@ +// SPDX-FileCopyrightText: 2024 PNED G.I.E. +// +// SPDX-License-Identifier: Apache-2.0 + +package io.github.genomicdatainfrastructure.discovery.repositories; + +import static java.util.Optional.ofNullable; +import static java.util.stream.Collectors.toCollection; +import static org.apache.commons.lang3.StringUtils.isNotBlank; +import static org.apache.commons.lang3.ObjectUtils.isNotEmpty; +import static java.util.stream.Collectors.toMap; +import static io.github.genomicdatainfrastructure.discovery.utils.PackagesSearchResponseMapper.CKAN_FACET_GROUP; +import static io.github.genomicdatainfrastructure.discovery.services.BeaconFilteringTermsService.BEACON_FACET_GROUP; + +import io.github.genomicdatainfrastructure.discovery.model.*; +import io.github.genomicdatainfrastructure.discovery.remote.ckan.api.CkanQueryApi; +import io.github.genomicdatainfrastructure.discovery.services.*; +import io.github.genomicdatainfrastructure.discovery.utils.BeaconIndividualsRequestMapper; +import io.github.genomicdatainfrastructure.discovery.utils.CkanFacetsQueryBuilder; +import io.github.genomicdatainfrastructure.discovery.utils.PackagesSearchResponseMapper; +import io.quarkus.arc.lookup.LookupIfProperty; +import lombok.extern.java.Log; +import org.apache.commons.lang3.ObjectUtils; +import org.eclipse.microprofile.config.inject.ConfigProperty; +import org.eclipse.microprofile.rest.client.inject.RestClient; +import io.github.genomicdatainfrastructure.discovery.remote.beacon.api.BeaconQueryApi; +import io.github.genomicdatainfrastructure.discovery.remote.beacon.model.BeaconIndividualsResponse; +import io.github.genomicdatainfrastructure.discovery.remote.beacon.model.BeaconIndividualsResponseContent; +import io.github.genomicdatainfrastructure.discovery.remote.beacon.model.BeaconResultSet; +import io.github.genomicdatainfrastructure.discovery.remote.keycloak.api.KeycloakQueryApi; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.ws.rs.WebApplicationException; + +import java.util.ArrayList; +import java.util.Objects; +import java.util.HashMap; +import java.util.List; +import java.util.Set; +import java.util.logging.Level; + +@Log +@LookupIfProperty(name = "sources.beacon", stringValue = "true") +@ApplicationScoped +public class BeaconDatasetsRepository implements DatasetsRepository { + + private static final String SELECTED_FACETS_PATTERN = "[\"%s\"]"; + private static final Set SKIP_BEACON_QUERY_STATUS = Set.of(400, 401, 403); + private static final String BEACON_ACCESS_TOKEN_INFO = "Skipping beacon search, user is not authorized or the token is invalid."; + private static final String BEARER_PATTERN = "Bearer %s"; + private static final String BEACON_DATASET_TYPE = "dataset"; + private static final String CKAN_IDENTIFIER_FIELD = "identifier"; + + private final CkanQueryApi ckanQueryApi; + private final BeaconQueryApi beaconQueryApi; + private final KeycloakQueryApi keycloakQueryApi; + private final BeaconFilteringTermsService beaconFilteringTermsService; + + private final String beaconIdpAlias; + private final String selectedFacets; + + @Inject + public BeaconDatasetsRepository( + @RestClient CkanQueryApi ckanQueryApi, + @RestClient BeaconQueryApi beaconQueryApi, + @RestClient KeycloakQueryApi keycloakQueryApi, + BeaconFilteringTermsService beaconFilteringTermsService, + @ConfigProperty(name = "quarkus.rest-client.keycloak_yaml.beacon_idp_alias") String beaconIdpAlias, + @ConfigProperty(name = "datasets.filters") String datasetFiltersAsString + ) { + this.ckanQueryApi = ckanQueryApi; + this.beaconQueryApi = beaconQueryApi; + this.keycloakQueryApi = keycloakQueryApi; + this.beaconFilteringTermsService = beaconFilteringTermsService; + this.beaconIdpAlias = beaconIdpAlias; + this.selectedFacets = SELECTED_FACETS_PATTERN.formatted( + String.join("\",\"", datasetFiltersAsString.split(",")) + ); + } + + @Override + public DatasetsSearchResponse search(DatasetSearchQuery query, String accessToken) { + var beaconAuthorization = retrieveBeaconAuthorization(accessToken); + + if (beaconAuthorization == null) { + return searchCkan(query, accessToken); + } + + var resultSets = queryOnBeaconIfThereAreBeaconFilters(beaconAuthorization, query); + + var datasetsSearchResponse = queryOnCkanIfThereIsNoBeaconFilterOrResultsetsIsNotEmpty( + accessToken, + query, + resultSets + ); + + return enhanceDatasetsResponse(beaconAuthorization, datasetsSearchResponse, resultSets); + } + + private String retrieveBeaconAuthorization(String accessToken) { + if (accessToken == null) { + return null; + } + + var keycloakAuthorization = BEARER_PATTERN.formatted(accessToken); + try { + var response = keycloakQueryApi.retriveIdpTokens(beaconIdpAlias, keycloakAuthorization); + return BEARER_PATTERN.formatted(response.getAccessToken()); + } catch (WebApplicationException exception) { + if (SKIP_BEACON_QUERY_STATUS.contains(exception.getResponse().getStatus())) { + log.log(Level.INFO, BEACON_ACCESS_TOKEN_INFO); + log.log(Level.WARNING, exception, exception::getMessage); + return null; + } + throw exception; + } + } + + private List queryOnBeaconIfThereAreBeaconFilters( + String beaconAuthorization, + DatasetSearchQuery query + ) { + var beaconQuery = BeaconIndividualsRequestMapper.from(query); + if (beaconQuery.getQuery().getFilters().isEmpty()) { + return List.of(); + } + + var response = beaconQueryApi.listIndividuals(beaconAuthorization, beaconQuery); + + var nonNullResultSets = ofNullable(response) + .map(BeaconIndividualsResponse::getResponse) + .map(BeaconIndividualsResponseContent::getResultSets) + .filter(ObjectUtils::isNotEmpty) + .orElseGet(List::of); + + return nonNullResultSets.stream() + .filter(Objects::nonNull) + .filter(it -> BEACON_DATASET_TYPE.equals(it.getSetType())) + .filter(it -> isNotBlank(it.getId())) + .filter(it -> it.getResultsCount() != null && it.getResultsCount() > 0) + .toList(); + } + + private DatasetsSearchResponse queryOnCkanIfThereIsNoBeaconFilterOrResultsetsIsNotEmpty( + String ckanAuthorization, + DatasetSearchQuery query, + List resultSets + ) { + var nonNullFacets = ofNullable(query.getFacets()).orElseGet(List::of); + var thereIsAtLeastOneBeaconFilter = nonNullFacets.stream() + .anyMatch(it -> BEACON_FACET_GROUP.equals(it.getFacetGroup())); + + if (thereIsAtLeastOneBeaconFilter && resultSets.isEmpty()) { + return DatasetsSearchResponse.builder() + .count(0) + .build(); + } + + var enhancedQuery = enhanceQueryFacets(query, resultSets); + return searchCkan(enhancedQuery, ckanAuthorization); + } + + private DatasetSearchQuery enhanceQueryFacets( + DatasetSearchQuery query, + List resultSets + ) { + var enhancedFacets = resultSets.stream() + .map(BeaconResultSet::getId) + .map(it -> DatasetSearchQueryFacet.builder() + .facetGroup(CKAN_FACET_GROUP) + .facet(CKAN_IDENTIFIER_FIELD) + .value(it) + .build()) + .collect(toCollection(ArrayList::new)); + + if (query.getFacets() != null) { + enhancedFacets.addAll(query.getFacets()); + } + + return query.toBuilder() + .facets(enhancedFacets) + .build(); + } + + private DatasetsSearchResponse enhanceDatasetsResponse( + String beaconAuthorization, + DatasetsSearchResponse datasetsSearchResponse, + List resultSets + ) { + var facetGroupCount = new HashMap(); + facetGroupCount.put(BEACON_FACET_GROUP, resultSets.size()); + if (isNotEmpty(datasetsSearchResponse.getFacetGroupCount())) { + facetGroupCount.putAll(datasetsSearchResponse.getFacetGroupCount()); + } + + var facetGroups = new ArrayList(); + facetGroups.add(beaconFilteringTermsService.listFilteringTerms(beaconAuthorization)); + if (isNotEmpty(datasetsSearchResponse.getFacetGroups())) { + facetGroups.addAll(datasetsSearchResponse.getFacetGroups()); + } + + var results = List.of(); + if (isNotEmpty(datasetsSearchResponse.getResults())) { + var recordCounts = resultSets.stream() + .collect(toMap( + BeaconResultSet::getId, + BeaconResultSet::getResultsCount + )); + + results = datasetsSearchResponse.getResults() + .stream() + .map(it -> it.toBuilder() + .recordsCount(recordCounts.get(it.getIdentifier())) + .build()) + .toList(); + } + + return datasetsSearchResponse.toBuilder() + .facetGroupCount(facetGroupCount) + .facetGroups(facetGroups) + .results(results) + .build(); + } + + private DatasetsSearchResponse searchCkan(DatasetSearchQuery query, String ckanAuthorization) { + var facetsQuery = CkanFacetsQueryBuilder.buildFacetQuery(query); + + var response = ckanQueryApi.packageSearch( + query.getQuery(), + facetsQuery, + query.getSort(), + query.getRows(), + query.getStart(), + selectedFacets, + ckanAuthorization + ); + + return PackagesSearchResponseMapper.from(response); + } +} diff --git a/src/main/java/io/github/genomicdatainfrastructure/discovery/repositories/CkanDatasetsRepository.java b/src/main/java/io/github/genomicdatainfrastructure/discovery/repositories/CkanDatasetsRepository.java new file mode 100644 index 0000000..b756512 --- /dev/null +++ b/src/main/java/io/github/genomicdatainfrastructure/discovery/repositories/CkanDatasetsRepository.java @@ -0,0 +1,47 @@ +// SPDX-FileCopyrightText: 2024 PNED G.I.E. +// +// SPDX-License-Identifier: Apache-2.0 + +package io.github.genomicdatainfrastructure.discovery.repositories; + +import io.github.genomicdatainfrastructure.discovery.model.DatasetSearchQuery; +import io.github.genomicdatainfrastructure.discovery.model.DatasetsSearchResponse; +import io.github.genomicdatainfrastructure.discovery.remote.ckan.api.CkanQueryApi; +import io.github.genomicdatainfrastructure.discovery.utils.CkanFacetsQueryBuilder; +import io.github.genomicdatainfrastructure.discovery.utils.PackagesSearchResponseMapper; +import io.quarkus.arc.lookup.LookupIfProperty; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import org.eclipse.microprofile.rest.client.inject.RestClient; + +@LookupIfProperty(name = "sources.ckan", stringValue = "true") +@ApplicationScoped +public class CkanDatasetsRepository implements DatasetsRepository { + + private static final String SELECTED_FACETS = "[\"access_rights\",\"theme\",\"tags\",\"spatial_uri\",\"organization\",\"publisher_name\",\"res_format\"]"; + private final CkanQueryApi ckanQueryApi; + + @Inject + public CkanDatasetsRepository( + @RestClient CkanQueryApi ckanQueryApi + ) { + this.ckanQueryApi = ckanQueryApi; + } + + @Override + public DatasetsSearchResponse search(DatasetSearchQuery query, String accessToken) { + var facetsQuery = CkanFacetsQueryBuilder.buildFacetQuery(query); + + var response = ckanQueryApi.packageSearch( + query.getQuery(), + facetsQuery, + query.getSort(), + query.getRows(), + query.getStart(), + SELECTED_FACETS, + accessToken + ); + + return PackagesSearchResponseMapper.from(response); + } +} diff --git a/src/main/java/io/github/genomicdatainfrastructure/discovery/repositories/DatasetsRepository.java b/src/main/java/io/github/genomicdatainfrastructure/discovery/repositories/DatasetsRepository.java new file mode 100644 index 0000000..d407a2d --- /dev/null +++ b/src/main/java/io/github/genomicdatainfrastructure/discovery/repositories/DatasetsRepository.java @@ -0,0 +1,13 @@ +// SPDX-FileCopyrightText: 2024 PNED G.I.E. +// +// SPDX-License-Identifier: Apache-2.0 + +package io.github.genomicdatainfrastructure.discovery.repositories; + +import io.github.genomicdatainfrastructure.discovery.model.DatasetSearchQuery; +import io.github.genomicdatainfrastructure.discovery.model.DatasetsSearchResponse; + +public interface DatasetsRepository { + + DatasetsSearchResponse search(DatasetSearchQuery query, String accessToken); +} diff --git a/src/main/java/io/github/genomicdatainfrastructure/discovery/services/BeaconFilteringTermsService.java b/src/main/java/io/github/genomicdatainfrastructure/discovery/services/BeaconFilteringTermsService.java index 2dc52d7..36a487d 100644 --- a/src/main/java/io/github/genomicdatainfrastructure/discovery/services/BeaconFilteringTermsService.java +++ b/src/main/java/io/github/genomicdatainfrastructure/discovery/services/BeaconFilteringTermsService.java @@ -46,7 +46,7 @@ public BeaconFilteringTermsService( @CacheResult(cacheName = "beacon-facet-group-cache") public FacetGroup listFilteringTerms(String authorization) { - var filteringTermsResponse = retrieveNonNullFilteringTermsResponse(authorization); + var filteringTermsResponse = retreiveNonNullFilteringTermsResponse(authorization); var valuesGroupedByFacetId = groupValuesByFacetId(filteringTermsResponse); @@ -61,7 +61,7 @@ public FacetGroup listFilteringTerms(String authorization) { .build(); } - private BeaconFilteringTermsResponseContent retrieveNonNullFilteringTermsResponse( + private BeaconFilteringTermsResponseContent retreiveNonNullFilteringTermsResponse( String authorization ) { var filteringTerms = beaconQueryApi.listFilteringTerms(authorization); diff --git a/src/main/java/io/github/genomicdatainfrastructure/discovery/services/SearchDatasetsService.java b/src/main/java/io/github/genomicdatainfrastructure/discovery/services/SearchDatasetsService.java new file mode 100644 index 0000000..f7403c4 --- /dev/null +++ b/src/main/java/io/github/genomicdatainfrastructure/discovery/services/SearchDatasetsService.java @@ -0,0 +1,23 @@ +// 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 io.github.genomicdatainfrastructure.discovery.model.DatasetsSearchResponse; +import io.github.genomicdatainfrastructure.discovery.repositories.DatasetsRepository; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.inject.Instance; +import jakarta.inject.Inject; + +@ApplicationScoped +public class SearchDatasetsService { + + @Inject + Instance datasetsRepository; + + public DatasetsSearchResponse search(DatasetSearchQuery query, String accessToken) { + return datasetsRepository.get().search(query, accessToken); + } +} diff --git a/src/main/java/io/github/genomicdatainfrastructure/discovery/utils/PackagesSearchResponseMapper.java b/src/main/java/io/github/genomicdatainfrastructure/discovery/utils/PackagesSearchResponseMapper.java new file mode 100644 index 0000000..4824b5a --- /dev/null +++ b/src/main/java/io/github/genomicdatainfrastructure/discovery/utils/PackagesSearchResponseMapper.java @@ -0,0 +1,144 @@ +// SPDX-FileCopyrightText: 2024 PNED G.I.E. +// +// SPDX-License-Identifier: Apache-2.0 + +package io.github.genomicdatainfrastructure.discovery.utils; + +import io.github.genomicdatainfrastructure.discovery.model.*; +import io.github.genomicdatainfrastructure.discovery.remote.ckan.model.*; +import lombok.experimental.UtilityClass; + +import java.util.List; +import java.util.Map; +import java.util.Objects; + +import org.apache.commons.lang3.ObjectUtils; + +import java.time.format.DateTimeFormatter; +import java.time.LocalDateTime; + +import static java.util.Optional.ofNullable; + +@UtilityClass +public class PackagesSearchResponseMapper { + + public static final String CKAN_FACET_GROUP = "ckan"; + + private final DateTimeFormatter DATE_FORMATTER = DateTimeFormatter.ofPattern( + "yyyy-MM-dd'T'HH:mm:ss.SSSSSS" + ); + + public DatasetsSearchResponse from(PackagesSearchResponse response) { + var count = count(response.getResult()); + var facetGroupCount = Map.of(); + + if (count != null) { + facetGroupCount = Map.of(CKAN_FACET_GROUP, count); + } + + return DatasetsSearchResponse.builder() + .count(count) + .facetGroups(facetGroups(response.getResult())) + .results(results(response.getResult())) + .facetGroupCount(facetGroupCount) + .build(); + } + + private Integer count(PackagesSearchResult result) { + return ofNullable(result) + .map(PackagesSearchResult::getCount) + .orElse(null); + } + + private List facetGroups(PackagesSearchResult result) { + var nonNullSearchFacets = ofNullable(result) + .map(PackagesSearchResult::getSearchFacets) + .orElseGet(Map::of); + + return List.of(facetGroup(nonNullSearchFacets)); + } + + private FacetGroup facetGroup(Map facets) { + return FacetGroup.builder() + .key(CKAN_FACET_GROUP) + .label("DCAT-AP") + .facets(facets.entrySet().stream() + .map(PackagesSearchResponseMapper::facet) + .toList()) + .build(); + } + + private Facet facet(Map.Entry entry) { + var key = entry.getKey(); + var facet = entry.getValue(); + var values = ofNullable(facet.getItems()) + .orElseGet(List::of) + .stream() + .map(value -> ValueLabel.builder() + .value(value.getName()) + .label(value.getDisplayName()) + .build() + ) + .toList(); + + return Facet.builder() + .key(key) + .label(facet.getTitle()) + .values(values) + .build(); + } + + private List results(PackagesSearchResult result) { + var nonNullPackages = ofNullable(result) + .map(PackagesSearchResult::getResults) + .filter(ObjectUtils::isNotEmpty) + .orElseGet(List::of); + + return nonNullPackages.stream() + .map(PackagesSearchResponseMapper::result) + .toList(); + } + + private SearchedDataset result(CkanPackage dataset) { + var catalogue = ofNullable(dataset.getOrganization()) + .map(CkanOrganization::getTitle) + .orElse(null); + + return SearchedDataset.builder() + .id(dataset.getId()) + .identifier(dataset.getIdentifier()) + .title(dataset.getTitle()) + .description(dataset.getNotes()) + .themes(values(dataset.getTheme())) + .catalogue(catalogue) + .organization(DatasetOrganizationMapper.from(dataset.getOrganization())) + .modifiedAt(parse(dataset.getMetadataModified())) + .createdAt(parse(dataset.getMetadataCreated())) + .build(); + } + + private LocalDateTime parse(String date) { + return ofNullable(date) + .map(it -> LocalDateTime.parse(it, DATE_FORMATTER)) + .orElse(null); + } + + private List values(List values) { + return ofNullable(values) + .orElseGet(List::of) + .stream() + .map(PackagesSearchResponseMapper::value) + .filter(Objects::nonNull) + .toList(); + } + + private ValueLabel value(CkanValueLabel value) { + return ofNullable(value) + .filter(Objects::nonNull) + .map(it -> ValueLabel.builder() + .value(it.getName()) + .label(it.getDisplayName()) + .build()) + .orElse(null); + } +} diff --git a/src/main/openapi/ckan.yaml b/src/main/openapi/ckan.yaml index 05ebc73..a87f02a 100644 --- a/src/main/openapi/ckan.yaml +++ b/src/main/openapi/ckan.yaml @@ -30,12 +30,6 @@ paths: required: false schema: type: string - - name: fl - in: query - description: dataset fields to be returned - required: false - schema: - type: string - name: sort in: query description: Sorting of search results diff --git a/src/main/openapi/discovery.yaml b/src/main/openapi/discovery.yaml index 5573ba1..ac20160 100644 --- a/src/main/openapi/discovery.yaml +++ b/src/main/openapi/discovery.yaml @@ -165,10 +165,6 @@ components: title: Facets items: $ref: "#/components/schemas/DatasetSearchQueryFacet" - returnFields: - type: string - title: dataset fields to return - default: "*" sort: type: string title: Sorting of search results @@ -252,6 +248,10 @@ components: count: type: integer description: The number of results found + facetGroupCount: + type: object + additionalProperties: + type: integer results: type: array items: diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index af870b7..56225ec 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -40,10 +40,8 @@ quarkus.http.port=8080 quarkus.http.cors.headers=accept, authorization, content-type, x-requested-with quarkus.http.cors.methods=POST, OPTIONS, GET -quarkus.cache.caffeine.default.maximum-size=1000 -quarkus.cache.caffeine.default.expire-after-write=30M - sources.beacon=true +sources.ckan=false datasets.filters=access_rights,theme,tags,organization,res_format @@ -55,4 +53,4 @@ datasets.filters=access_rights,theme,tags,organization,res_format %dev.quarkus.rest-client.beacon_yaml.url=https://beacon-network-backend-demo.ega-archive.org/beacon-network %dev.quarkus.rest-client.logging.body-limit=10000 %dev.quarkus.rest-client.logging.scope=request-response -%dev.quarkus.log.category."org.jboss.resteasy.reactive.client.logging".level=DEBUG \ No newline at end of file +%dev.quarkus.log.category."org.jboss.resteasy.reactive.client.logging".level=DEBUG diff --git a/src/test/java/io/github/genomicdatainfrastructure/discovery/api/DatasetSearchTest.java b/src/test/java/io/github/genomicdatainfrastructure/discovery/api/DatasetSearchTest.java index 87c1e08..f8bb06f 100644 --- a/src/test/java/io/github/genomicdatainfrastructure/discovery/api/DatasetSearchTest.java +++ b/src/test/java/io/github/genomicdatainfrastructure/discovery/api/DatasetSearchTest.java @@ -36,17 +36,13 @@ void can_anonymously_search_datasets() { .post("/api/v1/datasets/search") .then() .statusCode(200) - .body("count", equalTo(3)) - .body("results[0].identifier", equalTo("27866022694497975")) - .body("results[1].identifier", equalTo("euc_kauno_uc6")) - .body("results[2].identifier", equalTo("cp-tavi")); + .body("count", equalTo(1167)); } @Test void can_search_datasets_without_beacon_filters() { var query = DatasetSearchQuery.builder() .build(); - given() .auth() .oauth2(getAccessToken("alice")) @@ -56,10 +52,7 @@ void can_search_datasets_without_beacon_filters() { .post("/api/v1/datasets/search") .then() .statusCode(200) - .body("count", equalTo(3)) - .body("results[0].identifier", equalTo("27866022694497975")) - .body("results[1].identifier", equalTo("euc_kauno_uc6")) - .body("results[2].identifier", equalTo("cp-tavi")); + .body("count", equalTo(1167)); } @Test @@ -73,7 +66,6 @@ void can_search_datasets_with_beacon_filters() { .build() )) .build(); - given() .auth() .oauth2(getAccessToken("alice")) @@ -83,8 +75,7 @@ void can_search_datasets_with_beacon_filters() { .post("/api/v1/datasets/search") .then() .statusCode(200) - .body("count", equalTo(1)) - .body("results[0].identifier", equalTo("27866022694497975")) + .body("count", equalTo(1167)) .body("results[0].recordsCount", equalTo(64)); } diff --git a/src/test/java/io/github/genomicdatainfrastructure/discovery/services/BeaconDatasetRepositoryTest.java b/src/test/java/io/github/genomicdatainfrastructure/discovery/services/BeaconDatasetRepositoryTest.java new file mode 100644 index 0000000..9f28073 --- /dev/null +++ b/src/test/java/io/github/genomicdatainfrastructure/discovery/services/BeaconDatasetRepositoryTest.java @@ -0,0 +1,447 @@ +// SPDX-FileCopyrightText: 2024 PNED G.I.E. +// +// SPDX-License-Identifier: Apache-2.0 + +package io.github.genomicdatainfrastructure.discovery.services; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import java.util.List; +import java.util.Map; +import java.util.stream.Stream; + +import io.github.genomicdatainfrastructure.discovery.model.*; +import io.github.genomicdatainfrastructure.discovery.remote.ckan.api.CkanQueryApi; +import io.github.genomicdatainfrastructure.discovery.remote.ckan.model.*; +import io.github.genomicdatainfrastructure.discovery.repositories.BeaconDatasetsRepository; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import org.junit.jupiter.params.provider.NullSource; +import org.junit.jupiter.params.provider.ValueSource; + +import io.github.genomicdatainfrastructure.discovery.remote.beacon.api.BeaconQueryApi; +import io.github.genomicdatainfrastructure.discovery.remote.beacon.model.BeaconIndividualsResponse; +import io.github.genomicdatainfrastructure.discovery.remote.beacon.model.BeaconIndividualsResponseContent; +import io.github.genomicdatainfrastructure.discovery.remote.beacon.model.BeaconResultSet; +import io.github.genomicdatainfrastructure.discovery.remote.keycloak.api.KeycloakQueryApi; +import io.github.genomicdatainfrastructure.discovery.remote.keycloak.model.KeycloakTokenResponse; +import jakarta.ws.rs.WebApplicationException; + +import javax.xml.crypto.Data; + +class BeaconDatasetsRepositoryTest { + + private BeaconDatasetsRepository underTest; + private BeaconQueryApi beaconQueryApi; + private KeycloakQueryApi keycloakQueryApi; + private BeaconFilteringTermsService beaconFilteringTermsService; + private CkanQueryApi ckanQueryApi; + + @BeforeEach + void setUp() { + beaconQueryApi = mock(BeaconQueryApi.class); + keycloakQueryApi = mock(KeycloakQueryApi.class); + ckanQueryApi = mock(CkanQueryApi.class); + beaconFilteringTermsService = mock(BeaconFilteringTermsService.class); + + underTest = new BeaconDatasetsRepository( + ckanQueryApi, + beaconQueryApi, + keycloakQueryApi, + beaconFilteringTermsService, + "beaconIdpAlias", + "access_rights,theme,tags,organization,res_format" + ); + } + + @Test + void doesnt_call_beacon_if_access_token_is_null() { + when(ckanQueryApi.packageSearch(any(), any(), any(), any(), any(), any(), any())) + .thenReturn(PackagesSearchResponse.builder() + .result(PackagesSearchResult.builder() + .count(1) + .results(List.of(CkanPackage.builder() + .id("id") + .title("title") + .build()) + ) + .build()) + + .build()); + + var query = DatasetSearchQuery.builder() + .build(); + var actual = underTest.search(query, null); + + verify(keycloakQueryApi, never()).retriveIdpTokens(any(), any()); + verify(beaconFilteringTermsService, never()).listFilteringTerms(any()); + verify(beaconQueryApi, never()).listIndividuals(any(), any()); + + assertThat(actual) + .usingRecursiveComparison() + .isEqualTo(DatasetsSearchResponse.builder() + .count(1) + .facetGroupCount(Map.of("ckan", 1)) + .facetGroups(List.of(FacetGroup.builder().key("ckan").label("DCAT-AP") + .facets(List.of()).build())) + .results(List.of( + SearchedDataset.builder() + .id("id") + .title("title") + .themes(List.of()) + .build() + )) + .build()); + } + + @ParameterizedTest + @ValueSource(ints = {400, 401, 403}) + void doesnt_call_beacon_if_keycloak_throws_expected_4xx_errors(Integer statusCode) { + when(ckanQueryApi.packageSearch(any(), any(), any(), any(), any(), any(), any())) + .thenReturn(PackagesSearchResponse.builder() + .result(PackagesSearchResult.builder() + .count(1) + .results(List.of(CkanPackage.builder() + .id("id") + .title("title") + .build()) + ) + .build()) + + .build()); + + when(keycloakQueryApi.retriveIdpTokens("beaconIdpAlias", "Bearer dummy")) + .thenThrow(new WebApplicationException(statusCode)); + + var query = DatasetSearchQuery.builder() + .build(); + var actual = underTest.search(query, "dummy"); + + verify(keycloakQueryApi).retriveIdpTokens(any(), any()); + verify(ckanQueryApi).packageSearch(any(), any(), any(), any(), any(), any(), any()); + verify(beaconFilteringTermsService, never()).listFilteringTerms(any()); + verify(beaconQueryApi, never()).listIndividuals(any(), any()); + + assertThat(actual) + .usingRecursiveComparison() + .isEqualTo(DatasetsSearchResponse.builder() + .count(1) + .facetGroupCount(Map.of("ckan", 1)) + .facetGroups(List.of(FacetGroup.builder().key("ckan").label("DCAT-AP") + .facets(List.of()).build())) + .results(List.of( + SearchedDataset.builder() + .id("id") + .title("title") + .themes(List.of()) + .build() + )) + .build()); + } + + @Test + void doesnt_call_beacon_if_there_are_no_beacon_filters() { + when(ckanQueryApi.packageSearch(any(), any(), any(), any(), any(), any(), any())) + .thenReturn(PackagesSearchResponse.builder() + .result(PackagesSearchResult.builder() + .count(1) + .results(List.of(CkanPackage.builder() + .id("id") + .title("title") + .build()) + ) + .build()) + .build()); + + when(beaconFilteringTermsService.listFilteringTerms(any())) + .thenReturn(FacetGroup.builder() + .key("beacon") + .label("label") + .facets(List.of( + Facet.builder() + .key("key") + .label("label") + .build() + )) + .build()); + + when(keycloakQueryApi.retriveIdpTokens("beaconIdpAlias", "Bearer dummy")) + .thenReturn(KeycloakTokenResponse.builder() + .accessToken("beaconAccessToken") + .build()); + + var query = DatasetSearchQuery.builder() + .build(); + var actual = underTest.search(query, "dummy"); + + verify(keycloakQueryApi).retriveIdpTokens(any(), any()); + verify(beaconQueryApi, never()).listIndividuals(any(), any()); + verify(ckanQueryApi).packageSearch(any(), any(), any(), any(), any(), any(), any()); + verify(beaconFilteringTermsService).listFilteringTerms(any()); + + assertThat(actual) + .usingRecursiveComparison() + .isEqualTo(DatasetsSearchResponse.builder() + .count(1) + .facetGroupCount(Map.of( + "ckan", 1, + "beacon", 0 + )) + .results(List.of( + SearchedDataset.builder() + .id("id") + .title("title") + .themes(List.of()) + .build() + )) + .facetGroups(List.of(FacetGroup.builder().key("ckan").label("DCAT-AP") + .facets(List.of()).build())) + .facetGroups(List.of( + FacetGroup.builder() + .key("beacon") + .label("label") + .facets(List.of( + Facet.builder() + .key("key") + .label("label") + .build() + )) + .build(), + FacetGroup.builder() + .key("ckan") + .label("DCAT-AP") + .facets(List.of()) + .build() + )) + .build()); + } + + private static Stream emptyBeaconResultsets() { + return Stream.of( + BeaconIndividualsResponse.builder() + .response(null) + .build(), + BeaconIndividualsResponse.builder() + .response(BeaconIndividualsResponseContent.builder() + .resultSets(List.of()) + .build()) + .build(), + BeaconIndividualsResponse.builder() + .response(BeaconIndividualsResponseContent.builder() + .resultSets(List.of( + BeaconResultSet.builder() + .id(null) + .resultsCount(1) + .setType("dataset") + .build() + )) + .build()) + .build(), + BeaconIndividualsResponse.builder() + .response(BeaconIndividualsResponseContent.builder() + .resultSets(List.of( + BeaconResultSet.builder() + .id("id") + .resultsCount(null) + .setType("dataset") + .build() + )) + .build()) + .build(), + BeaconIndividualsResponse.builder() + .response(BeaconIndividualsResponseContent.builder() + .resultSets(List.of( + BeaconResultSet.builder() + .id("id") + .resultsCount(1) + .setType(null) + .build() + )) + .build()) + .build() + ); + } + + @ParameterizedTest + @NullSource + @MethodSource("emptyBeaconResultsets") + void doesnt_call_ckan_if_there_are_no_beacon_resultsets( + BeaconIndividualsResponse beaconResponse + ) { + when(beaconQueryApi.listIndividuals(any(), any())) + .thenReturn(beaconResponse); + + when(beaconFilteringTermsService.listFilteringTerms(any())) + .thenReturn(FacetGroup.builder() + .key("beacon") + .label("label") + .facets(List.of( + Facet.builder() + .key("key") + .label("label") + .build() + )) + .build()); + + when(keycloakQueryApi.retriveIdpTokens("beaconIdpAlias", "Bearer dummy")) + .thenReturn(KeycloakTokenResponse.builder() + .accessToken("beaconAccessToken") + .build()); + + var query = DatasetSearchQuery.builder() + .facets(List.of( + DatasetSearchQueryFacet.builder() + .facetGroup("beacon") + .facet("key") + .value("value") + .build( + ))) + .build(); + var actual = underTest.search(query, "dummy"); + + verify(keycloakQueryApi).retriveIdpTokens(any(), any()); + verify(beaconQueryApi).listIndividuals(any(), any()); + verify(beaconFilteringTermsService).listFilteringTerms(any()); + + assertThat(actual) + .usingRecursiveComparison() + .isEqualTo(DatasetsSearchResponse.builder() + .count(0) + .facetGroupCount(Map.of( + "beacon", 0 + )) + .results(List.of()) + .facetGroups(List.of( + FacetGroup.builder() + .key("beacon") + .label("label") + .facets(List.of( + Facet.builder() + .key("key") + .label("label") + .build() + )) + .build() + )) + .build()); + } + + @Test + void calls_ckan_and_beacon() { + when(beaconQueryApi.listIndividuals(any(), any())) + .thenReturn(BeaconIndividualsResponse.builder() + .response(BeaconIndividualsResponseContent.builder() + .resultSets(List.of( + BeaconResultSet.builder() + .id("id") + .resultsCount(1) + .setType("dataset") + .build() + )) + .build()) + .build()); + + when(ckanQueryApi.packageSearch(any(), any(), any(), any(), any(), any(), any())) + .thenReturn(PackagesSearchResponse.builder() + .result(PackagesSearchResult.builder() + .count(1) + .results(List.of(CkanPackage.builder() + .id("id") + .title("title") + .build()) + ) + .build()) + + .build()); + + when(beaconFilteringTermsService.listFilteringTerms(any())) + .thenReturn(FacetGroup.builder() + .key("beacon") + .label("label") + .facets(List.of( + Facet.builder() + .key("key") + .label("label") + .build() + )) + .build()); + + when(keycloakQueryApi.retriveIdpTokens("beaconIdpAlias", "Bearer dummy")) + .thenReturn(KeycloakTokenResponse.builder() + .accessToken("beaconAccessToken") + .build()); + when(beaconFilteringTermsService.listFilteringTerms(any())) + .thenReturn(FacetGroup.builder() + .key("beacon") + .label("label") + .facets(List.of( + Facet.builder() + .key("key") + .label("label") + .build() + )) + .build()); + + when(keycloakQueryApi.retriveIdpTokens("beaconIdpAlias", "Bearer dummy")) + .thenReturn(KeycloakTokenResponse.builder() + .accessToken("beaconAccessToken") + .build()); + + var query = DatasetSearchQuery.builder() + .facets(List.of( + DatasetSearchQueryFacet.builder() + .facetGroup("beacon") + .facet("key") + .value("value") + .build( + ))) + .build(); + var actual = underTest.search(query, "dummy"); + + verify(keycloakQueryApi).retriveIdpTokens(any(), any()); + verify(beaconQueryApi).listIndividuals(any(), any()); + verify(ckanQueryApi).packageSearch(any(), any(), any(), any(), any(), any(), any()); + verify(beaconFilteringTermsService).listFilteringTerms(any()); + + assertThat(actual) + .usingRecursiveComparison() + .isEqualTo(DatasetsSearchResponse.builder() + .count(1) + .facetGroupCount(Map.of( + "ckan", 1, + "beacon", 1 + )) + .results(List.of( + SearchedDataset.builder() + .id("id") + .title("title") + .themes(List.of()) + .build() + )) + .facetGroups(List.of( + FacetGroup.builder() + .key("beacon") + .label("label") + .facets(List.of( + Facet.builder() + .key("key") + .label("label") + .build() + )) + .build(), + FacetGroup.builder() + .key("ckan") + .label("DCAT-AP") + .facets(List.of()) + .build() + )) + .build()); + } +} diff --git a/src/test/java/io/github/genomicdatainfrastructure/discovery/services/PackagesSearchResponseMapperTest.java b/src/test/java/io/github/genomicdatainfrastructure/discovery/services/PackagesSearchResponseMapperTest.java new file mode 100644 index 0000000..f1f659d --- /dev/null +++ b/src/test/java/io/github/genomicdatainfrastructure/discovery/services/PackagesSearchResponseMapperTest.java @@ -0,0 +1,305 @@ +// SPDX-FileCopyrightText: 2024 PNED G.I.E. +// +// SPDX-License-Identifier: Apache-2.0 + +package io.github.genomicdatainfrastructure.discovery.services; + +import static java.time.LocalDateTime.parse; +import static org.assertj.core.api.Assertions.assertThat; + +import java.util.List; +import java.util.Map; + +import io.github.genomicdatainfrastructure.discovery.model.*; +import io.github.genomicdatainfrastructure.discovery.remote.ckan.model.*; +import io.github.genomicdatainfrastructure.discovery.utils.PackagesSearchResponseMapper; +import org.junit.jupiter.api.Test; + +import java.time.format.DateTimeFormatter; + +class PackagesSearchResponseMapperTest { + + private static final DateTimeFormatter DATE_FORMATTER = DateTimeFormatter.ofPattern( + "yyyy-MM-dd'T'HH:mm:ss.SSSSSS" + ); + + @Test + void accepts_null_result() { + var packagesSearchResponse = PackagesSearchResponse.builder() + .result(null) + .build(); + + var actual = PackagesSearchResponseMapper.from( + packagesSearchResponse + ); + var expected = DatasetsSearchResponse.builder() + .results(List.of()) + .facetGroupCount(Map.of()) + .facetGroups(List.of( + FacetGroup.builder() + .key("ckan") + .label("DCAT-AP") + .facets(List.of()) + .build() + )) + .build(); + + assertThat(actual) + .usingRecursiveComparison() + .isEqualTo(expected); + } + + @Test + void accepts_empty_result() { + var packagesSearchResponse = PackagesSearchResponse.builder() + .result(PackagesSearchResult.builder() + .searchFacets(null) + .count(null) + .results(null) + .build()) + .build(); + + var actual = PackagesSearchResponseMapper.from( + packagesSearchResponse + ); + var expected = DatasetsSearchResponse.builder() + .results(List.of()) + .facetGroupCount(Map.of()) + .facetGroups(List.of( + FacetGroup.builder() + .key("ckan") + .label("DCAT-AP") + .facets(List.of()) + .build() + )) + .build(); + + assertThat(actual) + .usingRecursiveComparison() + .isEqualTo(expected); + } + + @Test + void accepts_empty_result_results() { + var packagesSearchResponse = PackagesSearchResponse.builder() + .result(PackagesSearchResult.builder() + .searchFacets(null) + .count(1) + .results(List.of()) + .build()) + .build(); + var actual = PackagesSearchResponseMapper.from( + packagesSearchResponse + ); + var expected = DatasetsSearchResponse.builder() + .count(1) + .facetGroupCount(Map.of("ckan", 1)) + .results(List.of()) + .facetGroups(List.of( + FacetGroup.builder() + .key("ckan") + .label("DCAT-AP") + .facets(List.of()) + .build() + )) + .build(); + + assertThat(actual) + .usingRecursiveComparison() + .isEqualTo(expected); + } + + @Test + void accepts_empty_result_search_facets() { + var packagesSearchResponse = PackagesSearchResponse.builder() + .result(PackagesSearchResult.builder() + .searchFacets(Map.of()) + .count(1) + .results(List.of()) + .build()) + .build(); + var actual = PackagesSearchResponseMapper.from( + packagesSearchResponse + ); + var expected = DatasetsSearchResponse.builder() + .count(1) + .facetGroupCount(Map.of("ckan", 1)) + .results(List.of()) + .facetGroups(List.of( + FacetGroup.builder() + .key("ckan") + .label("DCAT-AP") + .facets(List.of()) + .build() + )) + .build(); + + assertThat(actual) + .usingRecursiveComparison() + .isEqualTo(expected); + } + + @Test + void accepts_null_result_search_facets_values() { + var packagesSearchResponse = PackagesSearchResponse.builder() + .result(PackagesSearchResult.builder() + .searchFacets(Map.of("dummy", CkanFacet.builder() + .items(null) + .build())) + .count(1) + .results(List.of()) + .build()) + .build(); + var actual = PackagesSearchResponseMapper.from( + packagesSearchResponse + ); + var expected = DatasetsSearchResponse.builder() + .count(1) + .facetGroupCount(Map.of("ckan", 1)) + .results(List.of()) + .facetGroups(List.of( + FacetGroup.builder() + .key("ckan") + .label("DCAT-AP") + .facets(List.of(Facet.builder() + .key("dummy") + .label(null) + .values(List.of()) + .build())) + .build() + )) + .build(); + + assertThat(actual) + .usingRecursiveComparison() + .isEqualTo(expected); + } + + @Test + void accepts_empty_result_search_facets_values() { + var packagesSearchResponse = PackagesSearchResponse.builder() + .result(PackagesSearchResult.builder() + .searchFacets(Map.of("dummy", CkanFacet.builder() + .items(List.of()) + .build())) + .count(1) + .results(List.of()) + .build()) + .build(); + var actual = PackagesSearchResponseMapper.from( + packagesSearchResponse + ); + var expected = DatasetsSearchResponse.builder() + .count(1) + .facetGroupCount(Map.of("ckan", 1)) + .results(List.of()) + .facetGroups(List.of( + FacetGroup.builder() + .key("ckan") + .label("DCAT-AP") + .facets(List.of(Facet.builder() + .key("dummy") + .label(null) + .values(List.of()) + .build())) + .build() + )) + .build(); + + assertThat(actual) + .usingRecursiveComparison() + .isEqualTo(expected); + } + + @Test + void can_parse() { + var packagesSearchResponse = PackagesSearchResponse.builder() + .result(PackagesSearchResult.builder() + .searchFacets(Map.of( + "dummy", + CkanFacet.builder() + .title("dummy label") + .items(List.of( + CkanValueLabel.builder() + .name("value") + .displayName("label") + .build() + )) + .build())) + .count(1) + .results(List.of( + CkanPackage.builder() + .id("id") + .identifier("identifier") + .title("title") + .notes("notes") + .organization(CkanOrganization + .builder() + .title("organization") + .imageUrl("image.com") + .description("desc") + .name("org") + .build()) + .theme(List.of( + CkanValueLabel.builder() + .displayName("theme") + .name("theme") + .build())) + .publisherName("publisherName") + .metadataModified("2024-03-19T13:37:05.472970") + .build() + )) + .build()) + .build(); + var actual = PackagesSearchResponseMapper.from( + packagesSearchResponse + ); + var expected = DatasetsSearchResponse.builder() + .count(1) + .facetGroupCount(Map.of("ckan", 1)) + .results(List.of( + SearchedDataset.builder() + .id("id") + .identifier("identifier") + .title("title") + .description("notes") + .organization(DatasetOrganization + .builder() + .title("organization") + .imageUrl("image.com") + .description("desc") + .name("org") + .build()) + .themes(List.of( + ValueLabel.builder() + .value("theme") + .label("theme") + .build() + )) + .catalogue("organization") + .modifiedAt(parse("2024-03-19T13:37:05.472970", DATE_FORMATTER)) + .build() + )) + .facetGroups(List.of( + FacetGroup.builder() + .key("ckan") + .label("DCAT-AP") + .facets(List.of(Facet.builder() + .key("dummy") + .label("dummy label") + .values(List.of( + ValueLabel.builder() + .value("value") + .label("label") + .build() + )) + .build())) + .build() + )) + .build(); + + assertThat(actual) + .usingRecursiveComparison() + .isEqualTo(expected); + } +} diff --git a/src/test/resources/mappings/package_search.json b/src/test/resources/mappings/package_search.json new file mode 100644 index 0000000..2879c04 --- /dev/null +++ b/src/test/resources/mappings/package_search.json @@ -0,0 +1,2321 @@ +{ + "priority": 2, + "request": { + "method": "GET", + "urlPattern": "/api/3/action/enhanced_package_search.*" + }, + "response": { + "status": 200, + "headers": { + "Content-Type": "application/json" + }, + "jsonBody": { + "help": "https://ckan-test.healthdata.nl/api/3/action/help_show?name=package_search", + "success": true, + "result": { + "count": 1167, + "facets": { + "organization": { + "lumc": 907, + "eu": 253, + "umcg": 6, + "test": 1 + }, + "theme": { + "http://publications.europa.eu/resource/authority/data-theme/HEAL": 253, + "http://purl.obolibrary.org/obo/NCIT_C21007": 33, + "https://www.wikidata.org/wiki/Q12131": 33, + "http://purl.obolibrary.org/obo/OMIT_0010070": 30, + "http://www.ebi.ac.uk/efo/EFO_0004352": 30, + "http://purl.obolibrary.org/obo/NCIT_C16669": 29, + "http://purl.obolibrary.org/obo/OMIT_0007476": 29, + "http://purl.obolibrary.org/obo/SCDO_0000494": 29, + "https://www.wikidata.org/wiki/Q11000047": 29, + "https://www.wikidata.org/wiki/Q66982216": 29, + "http://purl.obolibrary.org/obo/NCIT_C16877": 25, + "http://purl.obolibrary.org/obo/OMIT_0010062": 25, + "https://www.wikidata.org/wiki/Q1367554": 25, + "http://purl.obolibrary.org/obo/NCIT_C16495": 22, + "http://purl.obolibrary.org/obo/DOID_162": 19, + "http://purl.obolibrary.org/obo/MONDO_0004992": 19, + "http://purl.obolibrary.org/obo/OBI_1110053": 19, + "http://purl.obolibrary.org/obo/SCDO_0000493": 19, + "https://www.wikidata.org/wiki/Q12078": 19, + "http://purl.obolibrary.org/obo/NCIT_C17468": 18, + "http://purl.obolibrary.org/obo/OMIT_0013846": 18, + "http://purl.obolibrary.org/obo/SCDO_0001090": 18, + "https://www.wikidata.org/wiki/Q7981051": 18, + "http://purl.obolibrary.org/obo/NCIT_C16729": 15, + "http://purl.obolibrary.org/obo/OMIT_0008353": 15, + "https://www.wikidata.org/wiki/Q835884": 15, + "http://purl.obolibrary.org/obo/SCDO_0000897": 14, + "http://purl.obolibrary.org/obo/CHEBI_52217": 13, + "http://purl.obolibrary.org/obo/GSSO_007925": 13, + "http://purl.obolibrary.org/obo/NCIT_C111860": 13, + "http://purl.obolibrary.org/obo/NCIT_C16205": 13, + "http://purl.obolibrary.org/obo/OMIT_0007467": 13, + "https://www.wikidata.org/wiki/Q12140": 13, + "https://www.wikidata.org/wiki/Q1339474": 13, + "https://www.wikidata.org/wiki/Q28885102": 13, + "https://www.wikidata.org/wiki/Q42138532": 13, + "https://www.wikidata.org/wiki/Q70364280": 13, + "http://purl.obolibrary.org/obo/DOID_9351": 12, + "http://purl.obolibrary.org/obo/GSSO_000498": 12, + "http://purl.obolibrary.org/obo/MFOMD_0000001": 12, + "http://purl.obolibrary.org/obo/MFOMD_0000004": 12, + "http://purl.obolibrary.org/obo/MONDO_0004995": 12, + "http://purl.obolibrary.org/obo/MONDO_0005015": 12, + "http://purl.obolibrary.org/obo/MONDO_0005084": 12, + "http://purl.obolibrary.org/obo/NCIT_C157935": 12, + "http://purl.obolibrary.org/obo/NCIT_C18059": 12, + "http://purl.obolibrary.org/obo/NCIT_C2893": 12, + "http://purl.obolibrary.org/obo/NCIT_C2985": 12, + "http://purl.obolibrary.org/obo/OMIT_0013818": 12, + "http://purl.obolibrary.org/obo/SCDO_0001082": 12 + }, + "conforms_to": { + "https://health-ri.sandbox.semlab-leiden.nl/profile/2f08228e-1789-40f8-84cd-28e3288c3604": 898, + "https://fair.healthinformationportal.eu/profile/2f08228e-1789-40f8-84cd-28e3288c3604": 253, + "https://health-ri.sandbox.semlab-leiden.nl/profile/a0949e72-4466-4d53-8900-9436d1049a4b": 9, + "http://localhost:5000/CONFORMS1": 1, + "http://localhost:5000/CONFORMS2": 1 + }, + "has_version": { + "1.0": 253, + "http://purl.org/zonmw/covid19": 3, + "1": 1, + "https://repo.metadatacenter.org/template-instances/1f435bdb-f389-4025-ba67-08538084d982": 1, + "https://repo.metadatacenter.org/template-instances/25a1ad5a-39c1-47f1-8891-a42a439b8ea8": 1, + "https://repo.metadatacenter.org/template-instances/2836bf1c-76e9-44e7-a65e-80e9ca63025a": 1, + "https://repo.metadatacenter.org/template-instances/92948e21-4361-406b-adc0-bb83f39ecca6": 1, + "https://repo.metadatacenter.org/template-instances/99dec270-9739-4241-9a1b-717914edabbb": 1, + "https://repo.metadatacenter.org/template-instances/9c56220f-e1c0-45a0-b71f-ca9e2e1e050d": 1, + "https://repo.metadatacenter.org/template-instances/a11bcf2a-923b-44ee-88bc-2e1636aeaa88": 1, + "https://repo.metadatacenter.org/template-instances/b0ea0249-25a9-430f-9a7b-cb9ae568e932": 1, + "https://repo.metadatacenter.org/template-instances/c0a2b460-e46b-4ccf-8c9a-3ebdd2a0d6ae": 1 + }, + "access_rights": { + "http://localhost:5000/RIGHTS": 1, + "https://fair.healthinformationportal.eu/dataset/0292881e-8dc4-43f7-aab6-a19892fbffd7#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/0328cde1-62b6-4e6e-ba03-1d8a56082f4d#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/04bc47b1-a4d0-46f7-8bf4-fe86781c1870#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/0591dcf1-c381-4693-99b9-2bde0ce5e91e#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/07444256-82e5-426d-8128-3c1f3153191e#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/075a376f-1c4a-4b27-b3cc-cf5d1b6b7457#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/07fef66f-e8a8-4d7f-8325-eb3113831671#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/08616dcf-cef0-45a3-acb4-f4452c95c5ef#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/087b6cf9-a934-439d-bdc0-12c8e813fded#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/0942648a-421e-461d-ba89-e7ecc1b01303#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/099f3174-a014-4bff-a9b7-1b72cdfcda6c#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/0b47a2fe-c247-4c0f-8636-7417080a911d#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/0b9c953e-9c77-47be-9b7f-73d819eab83a#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/0c7df010-2002-44e3-8f6f-050469274330#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/0c98e26c-c439-48b4-9028-0a9294d1d587#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/0cf2889e-f55a-4627-94c2-3951a13e1628#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/0d6129de-6f31-4b57-bb12-49825db425a1#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/0d8f2284-23f2-467e-a854-2822a013c28e#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/0df57b20-acc7-4bfc-bc41-b689207f6634#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/0e269275-75c4-4c1b-9477-69ba2988ea3b#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/10afd66c-fef8-448b-ad7e-85dd1d6c4314#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/11f7d3de-6e13-4009-b18c-4966cbc01e87#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/12494b46-3ce8-4a19-a447-a2adef7e6c79#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/126eb303-5d37-4dfb-a586-04a405248914#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/130509f1-9201-4844-a5ee-008104d1d5cb#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/145b1567-dd2b-499b-b143-34237ddd839b#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/14e9891e-37d1-44e2-afeb-8a866743c491#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/15242e2d-642d-46c2-a901-f1ddcd778046#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/15517633-8e5d-4b14-8708-87503fde0587#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/16172992-e987-4021-8e8e-92820c9bc4f2#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/164648a8-26af-4d28-b568-e0d4931482ec#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/1869f535-3d7a-4f0a-80b1-21b62c8d7ff7#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/18b12b45-3787-4aab-aa1e-1bcf9b0bdeac#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/190a78a9-0444-4c54-a3df-658e8dfa97f4#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/19ba73da-cd36-4629-9cce-2b4fee9e2755#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/1a62e0ba-a464-4fe1-ae4c-63b9d336ecef#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/1a6e7903-b34e-41a5-92ce-c71f12006a46#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/1ab1c9ca-aca1-4dbb-a291-118a53587b48#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/1cb1bec1-548c-483f-8dc2-6ec416a08ea3#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/1d07bc2b-2786-40cd-b97e-ec5e41d0cd27#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/1e3777f7-150c-42aa-9c43-0158708399ad#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/1e3860c3-7ea3-4047-a090-7ff22e26d4fd#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/1f410b8b-8300-4da2-8ca4-9baa9931508e#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/21cad28d-da68-48c5-915e-e7caecb0d22d#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/227cc6b4-0e41-4dd2-96bc-25bd740ecb78#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/2703449c-3219-4e66-87f3-e7dac7dc878e#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/2742dbf5-e252-4210-8cd0-77fb8cfa4307#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/27c93de2-fb2b-4fd8-b780-5cc90fbe8c00#accessRights": 1, + "https://fair.healthinformationportal.eu/dataset/27e89146-e3d2-4b10-a9cd-78a426ae88e1#accessRights": 1 + }, + "language": { + "http://id.loc.gov/vocabulary/iso639-1/en": 906, + "https://publications.europa.eu/resource/authority/language/ENG": 78, + "https://publications.europa.eu/resource/authority/language/DEU": 39, + "https://publications.europa.eu/resource/authority/language/NNO": 36, + "https://publications.europa.eu/resource/authority/language/NLD": 34, + "https://publications.europa.eu/resource/authority/language/FRA": 21, + "https://publications.europa.eu/resource/authority/language/HRV": 17, + "https://publications.europa.eu/resource/authority/language/EST": 14, + "https://publications.europa.eu/resource/authority/language/CES": 11, + "https://publications.europa.eu/resource/authority/language/ITA": 11, + "https://publications.europa.eu/resource/authority/language/SWE": 10, + "https://publications.europa.eu/resource/authority/language/SPA": 8, + "https://publications.europa.eu/resource/authority/language/LAV": 7, + "https://publications.europa.eu/resource/authority/language/SRP": 7, + "https://publications.europa.eu/resource/authority/language/POL": 6, + "https://publications.europa.eu/resource/authority/language/ROM": 6, + "https://publications.europa.eu/resource/authority/language/SLV": 6, + "https://publications.europa.eu/resource/authority/language/HUN": 5, + "https://publications.europa.eu/resource/authority/language/FIN": 3, + "https://publications.europa.eu/resource/authority/language/LIT": 2, + "https://publications.europa.eu/resource/authority/language/POR": 2, + "http://lexvo.org/id/iso639-3/eng": 1, + "http://publications.europa.eu/resource/authority/languageENG": 1, + "https://publications.europa.eu/resource/authority/language/BOS": 1, + "https://publications.europa.eu/resource/authority/language/HYE": 1, + "https://publications.europa.eu/resource/authority/language/MLT": 1, + "https://publications.europa.eu/resource/authority/language/RUS": 1 + }, + "publisher_name": { + "None": 46, + "Switchboard": 25, + "Statistics Austria": 8, + "Sciensano": 5, + "Centrul National de Statistica si Informatica in Sanatatea Publica (CNSISP)": 4, + "Janis Misins": 4, + "Centrum e-Zdrowia": 3, + "Gordana Bjelobrk": 3, + "Instituto de Salud Carlos III": 3, + "Metka Zaletel": 3, + "\u200b\u200b\u200b\u200b\u200b\u200b\u200bDachverband der Sozialversicherungstr\u00e4ger": 3, + "Aleksandar Medarevi\u0107": 2, + "Division for Epidemiology of communicable diseases, Croatian Institute of Public Health": 2, + "Domenica Taruscio": 2, + "Dr Miriam Azzopardi\u200b": 2, + "Federal Ministry of Social Affairs, Health, Care and Consumer Protection": 2, + "ISTAT": 2, + "Julian Strizek": 2, + "Maja Silobr\u010di\u0107 Radi\u0107": 2, + "Ministerio de Sanidad ": 2, + "info": 2, + "AUSSDA - The Austrian Social Science Data Archive": 1, + "Afdeling NKR-analyse": 1, + "Ana Ivi\u010devi\u0107 Uhernik": 1, + "Andreas Sandgren": 1, + "Anka Bolka": 1, + "Anke Macdonald": 1, + "Anna Teresa Palamara": 1, + "Annette Peters": 1, + "BIGAN Generic ": 1, + "Belgian Cancer Registry": 1, + "Bert Vaes": 1, + "Bj\u00f8rg Tilde Svanes": 1, + "Boudewijn CATRY": 1, + "Cancer Network Information System": 1, + "Carlos Luis Parra Calder\u00f3n": 1, + "Centro Nacional de Epidemiolog\u00eda": 1, + "DI Dr. Gerhard F\u00fcl\u00f6p": 1, + "DICA": 1, + "Daiga Gr\u012bnberga": 1, + "Data and Policy Information Service": 1, + "Dr Kathleen England": 1, + "Dr Kathleen England ": 1, + "Dr Miriam Gatt": 1, + "Dr Miriam Gatt ": 1, + "Dr Miriam Gatt and Dr Stephen Attard ": 1, + "Dr Sandra Distefano": 1, + "Dr. Dominique Van Beckhoven MD": 1, + "Elve Kaur": 1, + "Estonian Medical Birth Registry and Estonian Abortion Registry": 1 + }, + "res_format": { + "CSV": 2, + "JSON": 1, + "XLS": 1, + "ZIP": 1, + "fastq": 1, + "graphql": 1, + "http://publications.europa.eu/resource/authority/file-typeCSV": 1, + "http://publications.europa.eu/resource/authority/file-typeSPSS": 1, + "http://publications.europa.eu/resource/authority/file-typeSQL": 1, + "jsonld": 1, + "ped": 1, + "rdf-jsonld": 1, + "rdf-n3": 1, + "rdf-nquads": 1, + "rdf-ntriples": 1, + "rdf-trig": 1, + "rdf-ttl": 1, + "rdf-xml": 1, + "ttl": 1, + "vcf": 1 + }, + "provenance": { + "Registry data": 106, + "Survey/interview data": 42, + "Administrative data": 22, + "Multiple sources": 22, + "Population data": 13, + "Data from other records": 9, + "Hospital resources & Healthcare administrative area resources": 9, + "Hospital resources & Healthcare resources": 9, + "Surveillance data of infectious diseases": 6, + "Hospitalization statistics of the hospitals of the National Health System": 4, + "Outpatient utilisation data": 4, + "Biobank/sample/specimen data": 2, + "Calculation": 2, + "Observational study data": 2, + "Social Health Insurance Data": 1, + "https://www.health-ri.nl/Example_of_BBMRI-catalogue_metadata_for_AAA": 1 + } + }, + "results": [ + { + "access_rights": { + "name": "https://health-ri.sandbox.semlab-leiden.nl/dataset/d73d04ba-23f7-429f-8506-3aa9dccb0435#accessRights", + "display_name": "Access Rights" + }, + "conforms_to": [ + { + "display_name": "Conforms to", + "name": "https://health-ri.sandbox.semlab-leiden.nl/profile/2f08228e-1789-40f8-84cd-28e3288c3604" + } + ], + "creator_user_id": "f2687934-1127-4c61-ab21-982cb91d7c80", + "id": "0ddd7a13-ee11-4e5d-bbff-34e04a6a7949", + "identifier": "27866022694497975", + "isopen": false, + "language": [ + { + "display_name": "English", + "name": "http://id.loc.gov/vocabulary/iso639-1/en" + } + ], + "license_id": "", + "license_title": "", + "metadata_created": "2024-02-22T20:22:34.959037", + "metadata_modified": "2024-03-19T13:37:10.885817", + "name": "brain_mri_wml_vumcadc3", + "notes": "This collection will include brain MRI scans on which the amount of white matter lesions (WML) will be quantified. ", + "num_resources": 0, + "num_tags": 0, + "organization": { + "id": "60d8106a-4066-454a-bd19-3d6dbf7d9c99", + "name": "lumc", + "title": "LUMC", + "type": "organization", + "description": "", + "image_url": "", + "created": "2024-01-25T15:51:27.993020", + "is_organization": true, + "approval_status": "approved", + "state": "active" + }, + "owner_org": "60d8106a-4066-454a-bd19-3d6dbf7d9c99", + "private": false, + "state": "active", + "title": "Brain_MRI_WML_VUMCADC", + "type": "dataset", + "extras": [ + { + "key": "uri", + "value": "https://health-ri.sandbox.semlab-leiden.nl/dataset/d73d04ba-23f7-429f-8506-3aa9dccb0435" + }, + { + "key": "harvest_object_id", + "value": "b72fadd3-6251-48ba-956f-0f5b26f886bc" + }, + { + "key": "harvest_source_id", + "value": "8d25f73c-c3e4-4e82-b098-edfc28fa95b5" + }, + { + "key": "harvest_source_title", + "value": "LUMC-semlab" + } + ], + "resources": [], + "tags": [], + "groups": [], + "relationships_as_subject": [], + "relationships_as_object": [] + }, + { + "access_rights": { + "display_name": "Access Rights", + "name": "https://health-ri.sandbox.semlab-leiden.nl/dataset/e1c89dfd-d7b2-4fb0-960f-75d4cc3104bb#accessRights" + }, + "conforms_to": [ + { + "display_name": "Conforms to", + "name": "https://health-ri.sandbox.semlab-leiden.nl/profile/2f08228e-1789-40f8-84cd-28e3288c3604" + } + ], + "creator_user_id": "f2687934-1127-4c61-ab21-982cb91d7c80", + "id": "e2fc35e2-0a09-42d7-b2e7-2324758f89f1", + "identifier": "euc_kauno_uc6", + "isopen": false, + "language": [ + { + "display_name": "English", + "name": "http://id.loc.gov/vocabulary/iso639-1/en" + } + ], + "license_id": "", + "license_title": "", + "metadata_created": "2024-02-22T20:25:10.662935", + "metadata_modified": "2024-03-19T13:37:08.812120", + "name": "eucanimage_kauno_uc61", + "notes": "Within the EuCanImage project (https://eucanimage.eu/), imaging datasets are collected from multiple sites to facilitate the use of AI for cancer research. The BMIA XNAT will be used as main image data storage platform for centralized storage. As first usecase, breast cancer was identified, for which the first datasets will be collected from the University of Barcelona. The data will first be available to partners within the consortium, but will potentially be publicly released", + "num_resources": 0, + "num_tags": 0, + "organization": { + "id": "60d8106a-4066-454a-bd19-3d6dbf7d9c99", + "name": "lumc", + "title": "LUMC", + "type": "organization", + "description": "", + "image_url": "", + "created": "2024-01-25T15:51:27.993020", + "is_organization": true, + "approval_status": "approved", + "state": "active" + }, + "owner_org": "60d8106a-4066-454a-bd19-3d6dbf7d9c99", + "private": false, + "state": "active", + "title": "EuCanImage_KAUNO_UC6", + "type": "dataset", + "extras": [ + { + "key": "uri", + "value": "https://health-ri.sandbox.semlab-leiden.nl/dataset/e1c89dfd-d7b2-4fb0-960f-75d4cc3104bb" + }, + { + "key": "harvest_object_id", + "value": "779eae83-551c-4f4d-952e-728cd89350a2" + }, + { + "key": "harvest_source_id", + "value": "8d25f73c-c3e4-4e82-b098-edfc28fa95b5" + }, + { + "key": "harvest_source_title", + "value": "LUMC-semlab" + } + ], + "resources": [], + "tags": [], + "groups": [], + "relationships_as_subject": [], + "relationships_as_object": [] + }, + { + "access_rights": { + "display_name": "Access Rights", + "name": "https://health-ri.sandbox.semlab-leiden.nl/dataset/63cc8a90-91c2-47f0-9053-a1e6e5b7d88a#accessRights" + }, + "conforms_to": [ + { + "display_name": "Conforms to", + "name": "https://health-ri.sandbox.semlab-leiden.nl/profile/2f08228e-1789-40f8-84cd-28e3288c3604" + } + ], + "creator_user_id": "f2687934-1127-4c61-ab21-982cb91d7c80", + "id": "128bc39c-8a56-4b07-969d-3cdc2d0bff10", + "identifier": "cp-tavi", + "isopen": false, + "language": [ + { + "display_name": "English", + "name": "http://id.loc.gov/vocabulary/iso639-1/en" + } + ], + "license_id": "", + "license_title": "", + "metadata_created": "2024-02-22T20:22:48.028994", + "metadata_modified": "2024-03-19T13:37:07.090046", + "name": "cp-tavi5", + "notes": "Cerebral perfusion in patients with severe aortic valve stenosis undergoing transcatheter aortic valve implantation", + "num_resources": 0, + "num_tags": 0, + "organization": { + "id": "60d8106a-4066-454a-bd19-3d6dbf7d9c99", + "name": "lumc", + "title": "LUMC", + "type": "organization", + "description": "", + "image_url": "", + "created": "2024-01-25T15:51:27.993020", + "is_organization": true, + "approval_status": "approved", + "state": "active" + }, + "owner_org": "60d8106a-4066-454a-bd19-3d6dbf7d9c99", + "private": false, + "state": "active", + "title": "CP-TAVI", + "type": "dataset", + "extras": [ + { + "key": "uri", + "value": "https://health-ri.sandbox.semlab-leiden.nl/dataset/63cc8a90-91c2-47f0-9053-a1e6e5b7d88a" + }, + { + "key": "harvest_object_id", + "value": "fe83df92-0b02-481a-bb9e-157fde93b36b" + }, + { + "key": "harvest_source_id", + "value": "8d25f73c-c3e4-4e82-b098-edfc28fa95b5" + }, + { + "key": "harvest_source_title", + "value": "LUMC-semlab" + } + ], + "resources": [], + "tags": [], + "groups": [], + "relationships_as_subject": [], + "relationships_as_object": [] + }, + { + "access_rights": { + "display_name": "Access Rights", + "name": "https://health-ri.sandbox.semlab-leiden.nl/dataset/4a9094ae-b986-4624-a1b8-659dbbe89f75#accessRights" + }, + "conforms_to": [ + { + "display_name": "Conforms to", + "name": "https://health-ri.sandbox.semlab-leiden.nl/profile/2f08228e-1789-40f8-84cd-28e3288c3604" + } + ], + "creator_user_id": "f2687934-1127-4c61-ab21-982cb91d7c80", + "id": "28267a33-70c5-4827-b431-9d80e9e9327a", + "identifier": "C14GIST_NKI", + "isopen": false, + "language": [ + { + "display_name": "English", + "name": "http://id.loc.gov/vocabulary/iso639-1/en" + } + ], + "license_id": "", + "license_title": "", + "metadata_created": "2024-02-22T20:18:37.557184", + "metadata_modified": "2024-03-19T13:37:05.472970", + "name": "gist-imaging-database-nki", + "notes": "In 2014 the Dutch GIST Consortium (DGC), consisting of the five leading GIST centers in the Netherlands, has initiated the Dutch GIST Registry (DGR). The GIST registry includes a retrospective dataset as well as a prospective dataset. The goal is to couple clinical data to a GIST imaging database using XNAT. This information could be used by investigators from the 5 GIST centers to answer research questions.", + "num_resources": 0, + "num_tags": 0, + "organization": { + "id": "60d8106a-4066-454a-bd19-3d6dbf7d9c99", + "name": "lumc", + "title": "LUMC", + "type": "organization", + "description": "", + "image_url": "", + "created": "2024-01-25T15:51:27.993020", + "is_organization": true, + "approval_status": "approved", + "state": "active" + }, + "owner_org": "60d8106a-4066-454a-bd19-3d6dbf7d9c99", + "private": false, + "state": "active", + "title": "GIST imaging database NKI", + "type": "dataset", + "extras": [ + { + "key": "uri", + "value": "https://health-ri.sandbox.semlab-leiden.nl/dataset/4a9094ae-b986-4624-a1b8-659dbbe89f75" + }, + { + "key": "harvest_object_id", + "value": "ea7e7d55-f92f-4b1a-980d-8ce12438e50c" + }, + { + "key": "harvest_source_id", + "value": "8d25f73c-c3e4-4e82-b098-edfc28fa95b5" + }, + { + "key": "harvest_source_title", + "value": "LUMC-semlab" + } + ], + "resources": [], + "tags": [], + "groups": [], + "relationships_as_subject": [], + "relationships_as_object": [] + }, + { + "access_rights": { + "name": "https://health-ri.sandbox.semlab-leiden.nl/dataset/c8412677-d3a3-4960-ba39-a912c0ea3603#accessRights", + "display_name": "Access Rights" + }, + "conforms_to": [ + { + "display_name": "Conforms to", + "name": "https://health-ri.sandbox.semlab-leiden.nl/profile/2f08228e-1789-40f8-84cd-28e3288c3604" + } + ], + "creator_user_id": "f2687934-1127-4c61-ab21-982cb91d7c80", + "id": "f3ea26b6-2737-4f31-8df0-5373b8972c0b", + "identifier": "hebon", + "isopen": false, + "language": [ + { + "display_name": "English", + "name": "http://id.loc.gov/vocabulary/iso639-1/en" + } + ], + "license_id": "", + "license_title": "", + "metadata_created": "2024-02-22T20:32:40.679006", + "metadata_modified": "2024-03-19T13:37:04.028977", + "name": "hebon4", + "notes": "As part of the HEBON Infrastructure project, members of the HEBON consortium (the NKI-AVL, Erasmus MC, and the other university medical centers in the Netherlands) are collecting mammograms from participants in order to incorporate imaging markers for improved individual risk prediction modeling and other research. The imaging database XNAT will host the anonymized mammograms of HEBON participants from the various study sites.", + "num_resources": 0, + "num_tags": 0, + "organization": { + "id": "60d8106a-4066-454a-bd19-3d6dbf7d9c99", + "name": "lumc", + "title": "LUMC", + "type": "organization", + "description": "", + "image_url": "", + "created": "2024-01-25T15:51:27.993020", + "is_organization": true, + "approval_status": "approved", + "state": "active" + }, + "owner_org": "60d8106a-4066-454a-bd19-3d6dbf7d9c99", + "private": false, + "state": "active", + "title": "HEBON", + "type": "dataset", + "extras": [ + { + "key": "uri", + "value": "https://health-ri.sandbox.semlab-leiden.nl/dataset/c8412677-d3a3-4960-ba39-a912c0ea3603" + }, + { + "key": "harvest_object_id", + "value": "82a33812-299d-48e7-8681-e040f3677acd" + }, + { + "key": "harvest_source_id", + "value": "8d25f73c-c3e4-4e82-b098-edfc28fa95b5" + }, + { + "key": "harvest_source_title", + "value": "LUMC-semlab" + } + ], + "resources": [], + "tags": [], + "groups": [], + "relationships_as_subject": [], + "relationships_as_object": [] + }, + { + "access_rights": { + "name": "https://health-ri.sandbox.semlab-leiden.nl/dataset/bdd43c94-2620-457e-aa4b-7139620ef911#accessRights", + "display_name": "Access Rights" + }, + "conforms_to": [ + { + "display_name": "Conforms to", + "name": "https://health-ri.sandbox.semlab-leiden.nl/profile/2f08228e-1789-40f8-84cd-28e3288c3604" + } + ], + "creator_user_id": "f2687934-1127-4c61-ab21-982cb91d7c80", + "id": "67987f8e-4429-48e3-bb4c-627ee180339b", + "identifier": "euc_unipi_uc1", + "isopen": false, + "language": [ + { + "display_name": "English", + "name": "http://id.loc.gov/vocabulary/iso639-1/en" + } + ], + "license_id": "", + "license_title": "", + "metadata_created": "2024-02-22T20:11:41.424211", + "metadata_modified": "2024-03-19T13:37:02.461548", + "name": "eucanimage_unipi_uc11", + "notes": "Within the EuCanImage project (https://eucanimage.eu/), imaging datasets are collected from multiple sites to facilitate the use of AI for cancer research. The BMIA XNAT will be used as main image data storage platform for centralized storage. As first usecase, breast cancer was identified, for which the first datasets will be collected from the University of Barcelona. The data will first be available to partners within the consortium, but will potentially be publicly released", + "num_resources": 0, + "num_tags": 0, + "organization": { + "id": "60d8106a-4066-454a-bd19-3d6dbf7d9c99", + "name": "lumc", + "title": "LUMC", + "type": "organization", + "description": "", + "image_url": "", + "created": "2024-01-25T15:51:27.993020", + "is_organization": true, + "approval_status": "approved", + "state": "active" + }, + "owner_org": "60d8106a-4066-454a-bd19-3d6dbf7d9c99", + "private": false, + "state": "active", + "title": "EuCanImage_UNIPI_UC1", + "type": "dataset", + "extras": [ + { + "key": "uri", + "value": "https://health-ri.sandbox.semlab-leiden.nl/dataset/bdd43c94-2620-457e-aa4b-7139620ef911" + }, + { + "key": "harvest_object_id", + "value": "7c34b4e8-89ec-4681-bb5f-150a8e03ad2d" + }, + { + "key": "harvest_source_id", + "value": "8d25f73c-c3e4-4e82-b098-edfc28fa95b5" + }, + { + "key": "harvest_source_title", + "value": "LUMC-semlab" + } + ], + "resources": [], + "tags": [], + "groups": [], + "relationships_as_subject": [], + "relationships_as_object": [] + }, + { + "access_rights": { + "name": "https://health-ri.sandbox.semlab-leiden.nl/dataset/25959b82-d81e-4721-9aaf-ca4a33756210#accessRights", + "display_name": "Access Rights" + }, + "conforms_to": [ + { + "display_name": "Conforms to", + "name": "https://health-ri.sandbox.semlab-leiden.nl/profile/2f08228e-1789-40f8-84cd-28e3288c3604" + } + ], + "creator_user_id": "f2687934-1127-4c61-ab21-982cb91d7c80", + "id": "887d67e1-39ee-43fc-bbb2-03f2e83ac477", + "identifier": "merlin", + "isopen": false, + "language": [ + { + "display_name": "English", + "name": "http://id.loc.gov/vocabulary/iso639-1/en" + } + ], + "license_id": "", + "license_title": "", + "metadata_created": "2024-02-22T20:29:09.930222", + "metadata_modified": "2024-03-19T13:37:00.423053", + "name": "merlin1", + "notes": "The ambition of the MERLIN project is to improve in-depth diagnosis and therapeutic follow-up of diseases that impact the\r\neye’s retina. To do so, the MERLIN partners will deliver a novel medical imaging device able to detect pathological alterations in the retina with highly enhanced sensitivity and specificity.\r\n\r\nThe medical applications of this device encompass a wide range of retinal pathologies, including age-related macular degeneration (AMD), as well as chronic vascular conditions, including diabetes. AMD and diabetic retinopathy (DR) are the leading cause of blindness worldwide in people over 55 years of age. Such diseases slowly develop at the microscopic scale in the retina. Using current imaging techniques, it is difficult to detect them at early stage, and it often takes months to assess the effects of treatments. These limitations hinders both the clinical management of patients and the investigation of new therapies.\r\n\r\nIn order to overcome these issues, the device developed in MERLIN will for the first time enable doctors to examine the retina with multiple imaging modalities at both the macroscopic and microscopic scales. Modalities will include ultrafast scanning laser ophthalmoscopy (SLO), optical coherence tomography (OCT) and OCT angiography (OCT-A), while ultrahigh resolution will be provided by adaptive optics technology. This unique combination will reveal previously invisible cellular and microvascular retinal detail in 3 dimensions. The project partners will also develop advanced image processing software for the visualization and quantitative analysis of microscopic structures, and conduct experimentations to optimize and validate performance in AMD and DR patients.\r\n\r\nAs the feasibility of this diagnostic approach has previously been demonstrated in another European R&D project (FP7 FAMOS, 2012-2017), MERLIN will translate the technology from a preexisting laboratory prototype to a nearly commercial device usable in clinical trials.", + "num_resources": 0, + "num_tags": 18, + "organization": { + "id": "60d8106a-4066-454a-bd19-3d6dbf7d9c99", + "name": "lumc", + "title": "LUMC", + "type": "organization", + "description": "", + "image_url": "", + "created": "2024-01-25T15:51:27.993020", + "is_organization": true, + "approval_status": "approved", + "state": "active" + }, + "owner_org": "60d8106a-4066-454a-bd19-3d6dbf7d9c99", + "private": false, + "state": "active", + "title": "merlin", + "type": "dataset", + "extras": [ + { + "key": "uri", + "value": "https://health-ri.sandbox.semlab-leiden.nl/dataset/25959b82-d81e-4721-9aaf-ca4a33756210" + }, + { + "key": "harvest_object_id", + "value": "8f246d9d-bfbc-4ec3-ab88-f95fa436edca" + }, + { + "key": "harvest_source_id", + "value": "8d25f73c-c3e4-4e82-b098-edfc28fa95b5" + }, + { + "key": "harvest_source_title", + "value": "LUMC-semlab" + } + ], + "tags": [ + { + "display_name": "Coherence", + "id": "04735aa2-8a63-407f-be2c-c794249017eb", + "name": "Coherence", + "state": "active", + "vocabulary_id": null + }, + { + "display_name": "Laser", + "id": "fe2508c5-8d50-4115-b5d4-d2f738f6330c", + "name": "Laser", + "state": "active", + "vocabulary_id": null + }, + { + "display_name": "Ophthalmoscope", + "id": "5c347ecd-8e96-4d4a-a065-db56cd8b579a", + "name": "Ophthalmoscope", + "state": "active", + "vocabulary_id": null + }, + { + "display_name": "Optical", + "id": "82e6d12c-bd39-44d6-8c79-42721dad7489", + "name": "Optical", + "state": "active", + "vocabulary_id": null + }, + { + "display_name": "Scanning", + "id": "99a686a8-515d-413d-a3f6-52a7c5e9611c", + "name": "Scanning", + "state": "active", + "vocabulary_id": null + }, + { + "display_name": "Tomography", + "id": "78e143ad-de05-4d24-9f18-a1364185d334", + "name": "Tomography", + "state": "active", + "vocabulary_id": null + }, + { + "display_name": "adaptive", + "id": "e994a759-16a1-4ab0-a220-911fcc3b9e9d", + "name": "adaptive", + "state": "active", + "vocabulary_id": null + }, + { + "display_name": "age", + "id": "e40c1047-8e77-409b-84dc-2fbce82a3b85", + "name": "age", + "state": "active", + "vocabulary_id": null + }, + { + "display_name": "camera", + "id": "3683d219-ad9b-4992-974d-152c9797c47d", + "name": "camera", + "state": "active", + "vocabulary_id": null + }, + { + "display_name": "degeneration", + "id": "36b41b65-e0a9-457e-8112-faad6568ed4b", + "name": "degeneration", + "state": "active", + "vocabulary_id": null + }, + { + "display_name": "diabetic", + "id": "4f5c80ef-148c-4c80-bfd5-42d92e38719c", + "name": "diabetic", + "state": "active", + "vocabulary_id": null + }, + { + "display_name": "diagnosis", + "id": "751f3bb4-75f7-4794-8817-7e9ed0ff26c2", + "name": "diagnosis", + "state": "active", + "vocabulary_id": null + }, + { + "display_name": "early", + "id": "d014f5dd-6faf-481b-8594-ff28d8fdd9a1", + "name": "early", + "state": "active", + "vocabulary_id": null + }, + { + "display_name": "macular", + "id": "493b3099-dcdd-4184-b04d-7ed44097bea2", + "name": "macular", + "state": "active", + "vocabulary_id": null + }, + { + "display_name": "optics", + "id": "633a2538-0095-4526-bde9-b309f79481a1", + "name": "optics", + "state": "active", + "vocabulary_id": null + }, + { + "display_name": "related", + "id": "8e1e9fb4-936c-4031-bf25-a66ab2584957", + "name": "related", + "state": "active", + "vocabulary_id": null + }, + { + "display_name": "retinal", + "id": "db8774b5-8a23-498d-81b6-4f51beeafcd8", + "name": "retinal", + "state": "active", + "vocabulary_id": null + }, + { + "display_name": "retinopathie", + "id": "279b7552-f7d6-4848-bbea-6f4756bc6fd4", + "name": "retinopathie", + "state": "active", + "vocabulary_id": null + } + ], + "resources": [], + "groups": [], + "relationships_as_subject": [], + "relationships_as_object": [] + }, + { + "access_rights": { + "name": "https://health-ri.sandbox.semlab-leiden.nl/dataset/f4c505c5-bd39-44dc-91f0-b862a7dde813#accessRights", + "display_name": "Access Rights" + }, + "conforms_to": [ + { + "display_name": "Conforms to", + "name": "https://health-ri.sandbox.semlab-leiden.nl/profile/2f08228e-1789-40f8-84cd-28e3288c3604" + } + ], + "creator_user_id": "f2687934-1127-4c61-ab21-982cb91d7c80", + "id": "37293eac-b160-4513-aef0-490c5198b0dc", + "identifier": "parelsnoer-ndz", + "isopen": false, + "language": [ + { + "display_name": "English", + "name": "http://id.loc.gov/vocabulary/iso639-1/en" + } + ], + "license_id": "", + "license_title": "", + "metadata_created": "2024-01-25T16:26:42.553187", + "metadata_modified": "2024-03-19T13:36:58.628049", + "name": "parelsnoer-ndz4", + "notes": "MRI scan collected in patients with neurodegenerative disease in 8 University Medical Centers in the Netherlands. ", + "num_resources": 0, + "num_tags": 0, + "organization": { + "id": "60d8106a-4066-454a-bd19-3d6dbf7d9c99", + "name": "lumc", + "title": "LUMC", + "type": "organization", + "description": "", + "image_url": "", + "created": "2024-01-25T15:51:27.993020", + "is_organization": true, + "approval_status": "approved", + "state": "active" + }, + "owner_org": "60d8106a-4066-454a-bd19-3d6dbf7d9c99", + "private": false, + "state": "active", + "title": "Parelsnoer-NDZ", + "type": "dataset", + "extras": [ + { + "key": "uri", + "value": "https://health-ri.sandbox.semlab-leiden.nl/dataset/f4c505c5-bd39-44dc-91f0-b862a7dde813" + }, + { + "key": "harvest_object_id", + "value": "f38e08b6-979e-4cba-bd2c-d05e1cdba5ec" + }, + { + "key": "harvest_source_id", + "value": "8d25f73c-c3e4-4e82-b098-edfc28fa95b5" + }, + { + "key": "harvest_source_title", + "value": "LUMC-semlab" + } + ], + "resources": [], + "tags": [], + "groups": [], + "relationships_as_subject": [], + "relationships_as_object": [] + }, + { + "access_rights": { + "name": "https://health-ri.sandbox.semlab-leiden.nl/dataset/dd8482c7-bfe9-49d5-9b91-efd091cfa864#accessRights", + "display_name": "Access Rights" + }, + "conforms_to": [ + { + "display_name": "Conforms to", + "name": "https://health-ri.sandbox.semlab-leiden.nl/profile/2f08228e-1789-40f8-84cd-28e3288c3604" + } + ], + "creator_user_id": "f2687934-1127-4c61-ab21-982cb91d7c80", + "id": "04f4908d-5a9d-46fd-a4b3-d9732775a74a", + "identifier": "euc_fcrb_uc7", + "isopen": false, + "language": [ + { + "display_name": "English", + "name": "http://id.loc.gov/vocabulary/iso639-1/en" + } + ], + "license_id": "", + "license_title": "", + "metadata_created": "2024-02-22T20:05:24.287471", + "metadata_modified": "2024-03-19T13:36:56.893014", + "name": "eucanimage_fcrb_uc74", + "notes": "Within the EuCanImage project (https://eucanimage.eu/), imaging datasets are collected from multiple sites to facilitate the use of AI for cancer research. The BMIA XNAT will be used as main image data storage platform for centralized storage. As first usecase, breast cancer was identified, for which the first datasets will be collected from the University of Barcelona. The data will first be available to partners within the consortium, but will potentially be publicly released", + "num_resources": 0, + "num_tags": 0, + "organization": { + "id": "60d8106a-4066-454a-bd19-3d6dbf7d9c99", + "name": "lumc", + "title": "LUMC", + "type": "organization", + "description": "", + "image_url": "", + "created": "2024-01-25T15:51:27.993020", + "is_organization": true, + "approval_status": "approved", + "state": "active" + }, + "owner_org": "60d8106a-4066-454a-bd19-3d6dbf7d9c99", + "private": false, + "state": "active", + "title": "EuCanImage_FCRB_UC7", + "type": "dataset", + "extras": [ + { + "key": "uri", + "value": "https://health-ri.sandbox.semlab-leiden.nl/dataset/dd8482c7-bfe9-49d5-9b91-efd091cfa864" + }, + { + "key": "harvest_object_id", + "value": "498b705e-27df-4e4c-aba8-4a5aef48d821" + }, + { + "key": "harvest_source_id", + "value": "8d25f73c-c3e4-4e82-b098-edfc28fa95b5" + }, + { + "key": "harvest_source_title", + "value": "LUMC-semlab" + } + ], + "resources": [], + "tags": [], + "groups": [], + "relationships_as_subject": [], + "relationships_as_object": [] + }, + { + "access_rights": { + "name": "https://health-ri.sandbox.semlab-leiden.nl/dataset/4e681eb3-e87c-4771-b1ad-c6af707e8c13#accessRights", + "display_name": "Access Rights" + }, + "conforms_to": [ + { + "display_name": "Conforms to", + "name": "https://health-ri.sandbox.semlab-leiden.nl/profile/2f08228e-1789-40f8-84cd-28e3288c3604" + } + ], + "creator_user_id": "f2687934-1127-4c61-ab21-982cb91d7c80", + "id": "cebe6bb9-1194-4379-bd04-c86dfd80ec50", + "identifier": "brainmriwml_ne", + "isopen": false, + "language": [ + { + "display_name": "English", + "name": "http://id.loc.gov/vocabulary/iso639-1/en" + } + ], + "license_id": "", + "license_title": "", + "metadata_created": "2024-02-22T20:34:11.903531", + "metadata_modified": "2024-03-19T13:36:55.069230", + "name": "brain_mri_wml_nesda4", + "notes": "This collection will include brain MRI scans on which the amount of white matter lesions (WML) will be quantified. ", + "num_resources": 0, + "num_tags": 0, + "organization": { + "id": "60d8106a-4066-454a-bd19-3d6dbf7d9c99", + "name": "lumc", + "title": "LUMC", + "type": "organization", + "description": "", + "image_url": "", + "created": "2024-01-25T15:51:27.993020", + "is_organization": true, + "approval_status": "approved", + "state": "active" + }, + "owner_org": "60d8106a-4066-454a-bd19-3d6dbf7d9c99", + "private": false, + "state": "active", + "title": "Brain_MRI_WML_NESDA", + "type": "dataset", + "extras": [ + { + "key": "uri", + "value": "https://health-ri.sandbox.semlab-leiden.nl/dataset/4e681eb3-e87c-4771-b1ad-c6af707e8c13" + }, + { + "key": "harvest_object_id", + "value": "661475d4-e365-4661-92ab-218acd17039e" + }, + { + "key": "harvest_source_id", + "value": "8d25f73c-c3e4-4e82-b098-edfc28fa95b5" + }, + { + "key": "harvest_source_title", + "value": "LUMC-semlab" + } + ], + "resources": [], + "tags": [], + "groups": [], + "relationships_as_subject": [], + "relationships_as_object": [] + } + ], + "sort": "score desc, metadata_modified desc", + "search_facets": { + "organization": { + "title": "organization", + "items": [ + { + "name": "test", + "display_name": "test", + "count": 1 + }, + { + "name": "umcg", + "display_name": "UMCG", + "count": 6 + }, + { + "name": "lumc", + "display_name": "LUMC", + "count": 907 + }, + { + "name": "eu", + "display_name": "EU", + "count": 253 + } + ] + }, + "theme": { + "title": "theme", + "items": [ + { + "name": "https://www.wikidata.org/wiki/Q835884", + "display_name": "https://www.wikidata.org/wiki/Q835884", + "count": 15 + }, + { + "name": "https://www.wikidata.org/wiki/Q7981051", + "display_name": "https://www.wikidata.org/wiki/Q7981051", + "count": 18 + }, + { + "name": "https://www.wikidata.org/wiki/Q70364280", + "display_name": "https://www.wikidata.org/wiki/Q70364280", + "count": 13 + }, + { + "name": "https://www.wikidata.org/wiki/Q66982216", + "display_name": "https://www.wikidata.org/wiki/Q66982216", + "count": 29 + }, + { + "name": "https://www.wikidata.org/wiki/Q42138532", + "display_name": "https://www.wikidata.org/wiki/Q42138532", + "count": 13 + }, + { + "name": "https://www.wikidata.org/wiki/Q28885102", + "display_name": "https://www.wikidata.org/wiki/Q28885102", + "count": 13 + }, + { + "name": "https://www.wikidata.org/wiki/Q1367554", + "display_name": "https://www.wikidata.org/wiki/Q1367554", + "count": 25 + }, + { + "name": "https://www.wikidata.org/wiki/Q1339474", + "display_name": "https://www.wikidata.org/wiki/Q1339474", + "count": 13 + }, + { + "name": "https://www.wikidata.org/wiki/Q12140", + "display_name": "https://www.wikidata.org/wiki/Q12140", + "count": 13 + }, + { + "name": "https://www.wikidata.org/wiki/Q12131", + "display_name": "https://www.wikidata.org/wiki/Q12131", + "count": 33 + }, + { + "name": "https://www.wikidata.org/wiki/Q12078", + "display_name": "https://www.wikidata.org/wiki/Q12078", + "count": 19 + }, + { + "name": "https://www.wikidata.org/wiki/Q11000047", + "display_name": "https://www.wikidata.org/wiki/Q11000047", + "count": 29 + }, + { + "name": "http://www.ebi.ac.uk/efo/EFO_0004352", + "display_name": "http://www.ebi.ac.uk/efo/EFO_0004352", + "count": 30 + }, + { + "name": "http://purl.obolibrary.org/obo/SCDO_0001090", + "display_name": "http://purl.obolibrary.org/obo/SCDO_0001090", + "count": 18 + }, + { + "name": "http://purl.obolibrary.org/obo/SCDO_0001082", + "display_name": "http://purl.obolibrary.org/obo/SCDO_0001082", + "count": 12 + }, + { + "name": "http://purl.obolibrary.org/obo/SCDO_0000897", + "display_name": "http://purl.obolibrary.org/obo/SCDO_0000897", + "count": 14 + }, + { + "name": "http://purl.obolibrary.org/obo/SCDO_0000494", + "display_name": "http://purl.obolibrary.org/obo/SCDO_0000494", + "count": 29 + }, + { + "name": "http://purl.obolibrary.org/obo/SCDO_0000493", + "display_name": "http://purl.obolibrary.org/obo/SCDO_0000493", + "count": 19 + }, + { + "name": "http://purl.obolibrary.org/obo/OMIT_0013846", + "display_name": "http://purl.obolibrary.org/obo/OMIT_0013846", + "count": 18 + }, + { + "name": "http://purl.obolibrary.org/obo/OMIT_0013818", + "display_name": "http://purl.obolibrary.org/obo/OMIT_0013818", + "count": 12 + }, + { + "name": "http://purl.obolibrary.org/obo/OMIT_0010070", + "display_name": "http://purl.obolibrary.org/obo/OMIT_0010070", + "count": 30 + }, + { + "name": "http://purl.obolibrary.org/obo/OMIT_0010062", + "display_name": "http://purl.obolibrary.org/obo/OMIT_0010062", + "count": 25 + }, + { + "name": "http://purl.obolibrary.org/obo/OMIT_0008353", + "display_name": "http://purl.obolibrary.org/obo/OMIT_0008353", + "count": 15 + }, + { + "name": "http://purl.obolibrary.org/obo/OMIT_0007476", + "display_name": "http://purl.obolibrary.org/obo/OMIT_0007476", + "count": 29 + }, + { + "name": "http://purl.obolibrary.org/obo/OMIT_0007467", + "display_name": "http://purl.obolibrary.org/obo/OMIT_0007467", + "count": 13 + }, + { + "name": "http://purl.obolibrary.org/obo/OBI_1110053", + "display_name": "http://purl.obolibrary.org/obo/OBI_1110053", + "count": 19 + }, + { + "name": "http://purl.obolibrary.org/obo/NCIT_C2985", + "display_name": "http://purl.obolibrary.org/obo/NCIT_C2985", + "count": 12 + }, + { + "name": "http://purl.obolibrary.org/obo/NCIT_C2893", + "display_name": "http://purl.obolibrary.org/obo/NCIT_C2893", + "count": 12 + }, + { + "name": "http://purl.obolibrary.org/obo/NCIT_C21007", + "display_name": "http://purl.obolibrary.org/obo/NCIT_C21007", + "count": 33 + }, + { + "name": "http://purl.obolibrary.org/obo/NCIT_C18059", + "display_name": "http://purl.obolibrary.org/obo/NCIT_C18059", + "count": 12 + }, + { + "name": "http://purl.obolibrary.org/obo/NCIT_C17468", + "display_name": "http://purl.obolibrary.org/obo/NCIT_C17468", + "count": 18 + }, + { + "name": "http://purl.obolibrary.org/obo/NCIT_C16877", + "display_name": "http://purl.obolibrary.org/obo/NCIT_C16877", + "count": 25 + }, + { + "name": "http://purl.obolibrary.org/obo/NCIT_C16729", + "display_name": "http://purl.obolibrary.org/obo/NCIT_C16729", + "count": 15 + }, + { + "name": "http://purl.obolibrary.org/obo/NCIT_C16669", + "display_name": "http://purl.obolibrary.org/obo/NCIT_C16669", + "count": 29 + }, + { + "name": "http://purl.obolibrary.org/obo/NCIT_C16495", + "display_name": "http://purl.obolibrary.org/obo/NCIT_C16495", + "count": 22 + }, + { + "name": "http://purl.obolibrary.org/obo/NCIT_C16205", + "display_name": "http://purl.obolibrary.org/obo/NCIT_C16205", + "count": 13 + }, + { + "name": "http://purl.obolibrary.org/obo/NCIT_C157935", + "display_name": "http://purl.obolibrary.org/obo/NCIT_C157935", + "count": 12 + }, + { + "name": "http://purl.obolibrary.org/obo/NCIT_C111860", + "display_name": "http://purl.obolibrary.org/obo/NCIT_C111860", + "count": 13 + }, + { + "name": "http://purl.obolibrary.org/obo/MONDO_0005084", + "display_name": "http://purl.obolibrary.org/obo/MONDO_0005084", + "count": 12 + }, + { + "name": "http://purl.obolibrary.org/obo/MONDO_0005015", + "display_name": "http://purl.obolibrary.org/obo/MONDO_0005015", + "count": 12 + }, + { + "name": "http://purl.obolibrary.org/obo/MONDO_0004995", + "display_name": "http://purl.obolibrary.org/obo/MONDO_0004995", + "count": 12 + }, + { + "name": "http://purl.obolibrary.org/obo/MONDO_0004992", + "display_name": "http://purl.obolibrary.org/obo/MONDO_0004992", + "count": 19 + }, + { + "name": "http://purl.obolibrary.org/obo/MFOMD_0000004", + "display_name": "http://purl.obolibrary.org/obo/MFOMD_0000004", + "count": 12 + }, + { + "name": "http://purl.obolibrary.org/obo/MFOMD_0000001", + "display_name": "http://purl.obolibrary.org/obo/MFOMD_0000001", + "count": 12 + }, + { + "name": "http://purl.obolibrary.org/obo/GSSO_007925", + "display_name": "http://purl.obolibrary.org/obo/GSSO_007925", + "count": 13 + }, + { + "name": "http://purl.obolibrary.org/obo/GSSO_000498", + "display_name": "http://purl.obolibrary.org/obo/GSSO_000498", + "count": 12 + }, + { + "name": "http://purl.obolibrary.org/obo/DOID_9351", + "display_name": "http://purl.obolibrary.org/obo/DOID_9351", + "count": 12 + }, + { + "name": "http://purl.obolibrary.org/obo/DOID_162", + "display_name": "http://purl.obolibrary.org/obo/DOID_162", + "count": 19 + }, + { + "name": "http://purl.obolibrary.org/obo/CHEBI_52217", + "display_name": "http://purl.obolibrary.org/obo/CHEBI_52217", + "count": 13 + }, + { + "name": "http://publications.europa.eu/resource/authority/data-theme/HEAL", + "display_name": "http://publications.europa.eu/resource/authority/data-theme/HEAL", + "count": 253 + } + ] + }, + "conforms_to": { + "title": "conforms_to", + "items": [ + { + "name": "https://health-ri.sandbox.semlab-leiden.nl/profile/a0949e72-4466-4d53-8900-9436d1049a4b", + "display_name": "https://health-ri.sandbox.semlab-leiden.nl/profile/a0949e72-4466-4d53-8900-9436d1049a4b", + "count": 9 + }, + { + "name": "https://health-ri.sandbox.semlab-leiden.nl/profile/2f08228e-1789-40f8-84cd-28e3288c3604", + "display_name": "https://health-ri.sandbox.semlab-leiden.nl/profile/2f08228e-1789-40f8-84cd-28e3288c3604", + "count": 898 + }, + { + "name": "https://fair.healthinformationportal.eu/profile/2f08228e-1789-40f8-84cd-28e3288c3604", + "display_name": "https://fair.healthinformationportal.eu/profile/2f08228e-1789-40f8-84cd-28e3288c3604", + "count": 253 + }, + { + "name": "http://localhost:5000/CONFORMS2", + "display_name": "http://localhost:5000/CONFORMS2", + "count": 1 + }, + { + "name": "http://localhost:5000/CONFORMS1", + "display_name": "http://localhost:5000/CONFORMS1", + "count": 1 + } + ] + }, + "has_version": { + "title": "has_version", + "items": [ + { + "name": "https://repo.metadatacenter.org/template-instances/c0a2b460-e46b-4ccf-8c9a-3ebdd2a0d6ae", + "display_name": "https://repo.metadatacenter.org/template-instances/c0a2b460-e46b-4ccf-8c9a-3ebdd2a0d6ae", + "count": 1 + }, + { + "name": "https://repo.metadatacenter.org/template-instances/b0ea0249-25a9-430f-9a7b-cb9ae568e932", + "display_name": "https://repo.metadatacenter.org/template-instances/b0ea0249-25a9-430f-9a7b-cb9ae568e932", + "count": 1 + }, + { + "name": "https://repo.metadatacenter.org/template-instances/a11bcf2a-923b-44ee-88bc-2e1636aeaa88", + "display_name": "https://repo.metadatacenter.org/template-instances/a11bcf2a-923b-44ee-88bc-2e1636aeaa88", + "count": 1 + }, + { + "name": "https://repo.metadatacenter.org/template-instances/9c56220f-e1c0-45a0-b71f-ca9e2e1e050d", + "display_name": "https://repo.metadatacenter.org/template-instances/9c56220f-e1c0-45a0-b71f-ca9e2e1e050d", + "count": 1 + }, + { + "name": "https://repo.metadatacenter.org/template-instances/99dec270-9739-4241-9a1b-717914edabbb", + "display_name": "https://repo.metadatacenter.org/template-instances/99dec270-9739-4241-9a1b-717914edabbb", + "count": 1 + }, + { + "name": "https://repo.metadatacenter.org/template-instances/92948e21-4361-406b-adc0-bb83f39ecca6", + "display_name": "https://repo.metadatacenter.org/template-instances/92948e21-4361-406b-adc0-bb83f39ecca6", + "count": 1 + }, + { + "name": "https://repo.metadatacenter.org/template-instances/2836bf1c-76e9-44e7-a65e-80e9ca63025a", + "display_name": "https://repo.metadatacenter.org/template-instances/2836bf1c-76e9-44e7-a65e-80e9ca63025a", + "count": 1 + }, + { + "name": "https://repo.metadatacenter.org/template-instances/25a1ad5a-39c1-47f1-8891-a42a439b8ea8", + "display_name": "https://repo.metadatacenter.org/template-instances/25a1ad5a-39c1-47f1-8891-a42a439b8ea8", + "count": 1 + }, + { + "name": "https://repo.metadatacenter.org/template-instances/1f435bdb-f389-4025-ba67-08538084d982", + "display_name": "https://repo.metadatacenter.org/template-instances/1f435bdb-f389-4025-ba67-08538084d982", + "count": 1 + }, + { + "name": "http://purl.org/zonmw/covid19", + "display_name": "http://purl.org/zonmw/covid19", + "count": 3 + }, + { + "name": "1.0", + "display_name": "1.0", + "count": 253 + }, + { + "name": "1", + "display_name": "1", + "count": 1 + } + ] + }, + "access_rights": { + "title": "access_rights", + "items": [ + { + "name": "https://fair.healthinformationportal.eu/dataset/27e89146-e3d2-4b10-a9cd-78a426ae88e1#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/27e89146-e3d2-4b10-a9cd-78a426ae88e1#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/27c93de2-fb2b-4fd8-b780-5cc90fbe8c00#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/27c93de2-fb2b-4fd8-b780-5cc90fbe8c00#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/2742dbf5-e252-4210-8cd0-77fb8cfa4307#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/2742dbf5-e252-4210-8cd0-77fb8cfa4307#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/2703449c-3219-4e66-87f3-e7dac7dc878e#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/2703449c-3219-4e66-87f3-e7dac7dc878e#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/227cc6b4-0e41-4dd2-96bc-25bd740ecb78#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/227cc6b4-0e41-4dd2-96bc-25bd740ecb78#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/21cad28d-da68-48c5-915e-e7caecb0d22d#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/21cad28d-da68-48c5-915e-e7caecb0d22d#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/1f410b8b-8300-4da2-8ca4-9baa9931508e#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/1f410b8b-8300-4da2-8ca4-9baa9931508e#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/1e3860c3-7ea3-4047-a090-7ff22e26d4fd#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/1e3860c3-7ea3-4047-a090-7ff22e26d4fd#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/1e3777f7-150c-42aa-9c43-0158708399ad#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/1e3777f7-150c-42aa-9c43-0158708399ad#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/1d07bc2b-2786-40cd-b97e-ec5e41d0cd27#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/1d07bc2b-2786-40cd-b97e-ec5e41d0cd27#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/1cb1bec1-548c-483f-8dc2-6ec416a08ea3#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/1cb1bec1-548c-483f-8dc2-6ec416a08ea3#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/1ab1c9ca-aca1-4dbb-a291-118a53587b48#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/1ab1c9ca-aca1-4dbb-a291-118a53587b48#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/1a6e7903-b34e-41a5-92ce-c71f12006a46#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/1a6e7903-b34e-41a5-92ce-c71f12006a46#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/1a62e0ba-a464-4fe1-ae4c-63b9d336ecef#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/1a62e0ba-a464-4fe1-ae4c-63b9d336ecef#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/19ba73da-cd36-4629-9cce-2b4fee9e2755#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/19ba73da-cd36-4629-9cce-2b4fee9e2755#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/190a78a9-0444-4c54-a3df-658e8dfa97f4#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/190a78a9-0444-4c54-a3df-658e8dfa97f4#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/18b12b45-3787-4aab-aa1e-1bcf9b0bdeac#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/18b12b45-3787-4aab-aa1e-1bcf9b0bdeac#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/1869f535-3d7a-4f0a-80b1-21b62c8d7ff7#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/1869f535-3d7a-4f0a-80b1-21b62c8d7ff7#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/164648a8-26af-4d28-b568-e0d4931482ec#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/164648a8-26af-4d28-b568-e0d4931482ec#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/16172992-e987-4021-8e8e-92820c9bc4f2#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/16172992-e987-4021-8e8e-92820c9bc4f2#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/15517633-8e5d-4b14-8708-87503fde0587#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/15517633-8e5d-4b14-8708-87503fde0587#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/15242e2d-642d-46c2-a901-f1ddcd778046#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/15242e2d-642d-46c2-a901-f1ddcd778046#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/14e9891e-37d1-44e2-afeb-8a866743c491#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/14e9891e-37d1-44e2-afeb-8a866743c491#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/145b1567-dd2b-499b-b143-34237ddd839b#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/145b1567-dd2b-499b-b143-34237ddd839b#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/130509f1-9201-4844-a5ee-008104d1d5cb#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/130509f1-9201-4844-a5ee-008104d1d5cb#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/126eb303-5d37-4dfb-a586-04a405248914#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/126eb303-5d37-4dfb-a586-04a405248914#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/12494b46-3ce8-4a19-a447-a2adef7e6c79#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/12494b46-3ce8-4a19-a447-a2adef7e6c79#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/11f7d3de-6e13-4009-b18c-4966cbc01e87#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/11f7d3de-6e13-4009-b18c-4966cbc01e87#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/10afd66c-fef8-448b-ad7e-85dd1d6c4314#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/10afd66c-fef8-448b-ad7e-85dd1d6c4314#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/0e269275-75c4-4c1b-9477-69ba2988ea3b#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/0e269275-75c4-4c1b-9477-69ba2988ea3b#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/0df57b20-acc7-4bfc-bc41-b689207f6634#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/0df57b20-acc7-4bfc-bc41-b689207f6634#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/0d8f2284-23f2-467e-a854-2822a013c28e#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/0d8f2284-23f2-467e-a854-2822a013c28e#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/0d6129de-6f31-4b57-bb12-49825db425a1#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/0d6129de-6f31-4b57-bb12-49825db425a1#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/0cf2889e-f55a-4627-94c2-3951a13e1628#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/0cf2889e-f55a-4627-94c2-3951a13e1628#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/0c98e26c-c439-48b4-9028-0a9294d1d587#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/0c98e26c-c439-48b4-9028-0a9294d1d587#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/0c7df010-2002-44e3-8f6f-050469274330#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/0c7df010-2002-44e3-8f6f-050469274330#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/0b9c953e-9c77-47be-9b7f-73d819eab83a#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/0b9c953e-9c77-47be-9b7f-73d819eab83a#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/0b47a2fe-c247-4c0f-8636-7417080a911d#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/0b47a2fe-c247-4c0f-8636-7417080a911d#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/099f3174-a014-4bff-a9b7-1b72cdfcda6c#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/099f3174-a014-4bff-a9b7-1b72cdfcda6c#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/0942648a-421e-461d-ba89-e7ecc1b01303#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/0942648a-421e-461d-ba89-e7ecc1b01303#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/087b6cf9-a934-439d-bdc0-12c8e813fded#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/087b6cf9-a934-439d-bdc0-12c8e813fded#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/08616dcf-cef0-45a3-acb4-f4452c95c5ef#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/08616dcf-cef0-45a3-acb4-f4452c95c5ef#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/07fef66f-e8a8-4d7f-8325-eb3113831671#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/07fef66f-e8a8-4d7f-8325-eb3113831671#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/075a376f-1c4a-4b27-b3cc-cf5d1b6b7457#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/075a376f-1c4a-4b27-b3cc-cf5d1b6b7457#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/07444256-82e5-426d-8128-3c1f3153191e#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/07444256-82e5-426d-8128-3c1f3153191e#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/0591dcf1-c381-4693-99b9-2bde0ce5e91e#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/0591dcf1-c381-4693-99b9-2bde0ce5e91e#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/04bc47b1-a4d0-46f7-8bf4-fe86781c1870#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/04bc47b1-a4d0-46f7-8bf4-fe86781c1870#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/0328cde1-62b6-4e6e-ba03-1d8a56082f4d#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/0328cde1-62b6-4e6e-ba03-1d8a56082f4d#accessRights", + "count": 1 + }, + { + "name": "https://fair.healthinformationportal.eu/dataset/0292881e-8dc4-43f7-aab6-a19892fbffd7#accessRights", + "display_name": "https://fair.healthinformationportal.eu/dataset/0292881e-8dc4-43f7-aab6-a19892fbffd7#accessRights", + "count": 1 + }, + { + "name": "http://localhost:5000/RIGHTS", + "display_name": "http://localhost:5000/RIGHTS", + "count": 1 + } + ] + }, + "language": { + "title": "language", + "items": [ + { + "name": "https://publications.europa.eu/resource/authority/language/SWE", + "display_name": "https://publications.europa.eu/resource/authority/language/SWE", + "count": 10 + }, + { + "name": "https://publications.europa.eu/resource/authority/language/SRP", + "display_name": "https://publications.europa.eu/resource/authority/language/SRP", + "count": 7 + }, + { + "name": "https://publications.europa.eu/resource/authority/language/SPA", + "display_name": "https://publications.europa.eu/resource/authority/language/SPA", + "count": 8 + }, + { + "name": "https://publications.europa.eu/resource/authority/language/SLV", + "display_name": "https://publications.europa.eu/resource/authority/language/SLV", + "count": 6 + }, + { + "name": "https://publications.europa.eu/resource/authority/language/RUS", + "display_name": "https://publications.europa.eu/resource/authority/language/RUS", + "count": 1 + }, + { + "name": "https://publications.europa.eu/resource/authority/language/ROM", + "display_name": "https://publications.europa.eu/resource/authority/language/ROM", + "count": 6 + }, + { + "name": "https://publications.europa.eu/resource/authority/language/POR", + "display_name": "https://publications.europa.eu/resource/authority/language/POR", + "count": 2 + }, + { + "name": "https://publications.europa.eu/resource/authority/language/POL", + "display_name": "https://publications.europa.eu/resource/authority/language/POL", + "count": 6 + }, + { + "name": "https://publications.europa.eu/resource/authority/language/NNO", + "display_name": "https://publications.europa.eu/resource/authority/language/NNO", + "count": 36 + }, + { + "name": "https://publications.europa.eu/resource/authority/language/NLD", + "display_name": "https://publications.europa.eu/resource/authority/language/NLD", + "count": 34 + }, + { + "name": "https://publications.europa.eu/resource/authority/language/MLT", + "display_name": "https://publications.europa.eu/resource/authority/language/MLT", + "count": 1 + }, + { + "name": "https://publications.europa.eu/resource/authority/language/LIT", + "display_name": "https://publications.europa.eu/resource/authority/language/LIT", + "count": 2 + }, + { + "name": "https://publications.europa.eu/resource/authority/language/LAV", + "display_name": "https://publications.europa.eu/resource/authority/language/LAV", + "count": 7 + }, + { + "name": "https://publications.europa.eu/resource/authority/language/ITA", + "display_name": "https://publications.europa.eu/resource/authority/language/ITA", + "count": 11 + }, + { + "name": "https://publications.europa.eu/resource/authority/language/HYE", + "display_name": "https://publications.europa.eu/resource/authority/language/HYE", + "count": 1 + }, + { + "name": "https://publications.europa.eu/resource/authority/language/HUN", + "display_name": "https://publications.europa.eu/resource/authority/language/HUN", + "count": 5 + }, + { + "name": "https://publications.europa.eu/resource/authority/language/HRV", + "display_name": "https://publications.europa.eu/resource/authority/language/HRV", + "count": 17 + }, + { + "name": "https://publications.europa.eu/resource/authority/language/FRA", + "display_name": "https://publications.europa.eu/resource/authority/language/FRA", + "count": 21 + }, + { + "name": "https://publications.europa.eu/resource/authority/language/FIN", + "display_name": "https://publications.europa.eu/resource/authority/language/FIN", + "count": 3 + }, + { + "name": "https://publications.europa.eu/resource/authority/language/EST", + "display_name": "https://publications.europa.eu/resource/authority/language/EST", + "count": 14 + }, + { + "name": "https://publications.europa.eu/resource/authority/language/ENG", + "display_name": "https://publications.europa.eu/resource/authority/language/ENG", + "count": 78 + }, + { + "name": "https://publications.europa.eu/resource/authority/language/DEU", + "display_name": "https://publications.europa.eu/resource/authority/language/DEU", + "count": 39 + }, + { + "name": "https://publications.europa.eu/resource/authority/language/CES", + "display_name": "https://publications.europa.eu/resource/authority/language/CES", + "count": 11 + }, + { + "name": "https://publications.europa.eu/resource/authority/language/BOS", + "display_name": "https://publications.europa.eu/resource/authority/language/BOS", + "count": 1 + }, + { + "name": "http://publications.europa.eu/resource/authority/languageENG", + "display_name": "http://publications.europa.eu/resource/authority/languageENG", + "count": 1 + }, + { + "name": "http://lexvo.org/id/iso639-3/eng", + "display_name": "http://lexvo.org/id/iso639-3/eng", + "count": 1 + }, + { + "name": "http://id.loc.gov/vocabulary/iso639-1/en", + "display_name": "http://id.loc.gov/vocabulary/iso639-1/en", + "count": 906 + } + ] + }, + "publisher_name": { + "title": "publisher_name", + "items": [ + { + "name": "\u200b\u200b\u200b\u200b\u200b\u200b\u200bDachverband der Sozialversicherungstr\u00e4ger", + "display_name": "\u200b\u200b\u200b\u200b\u200b\u200b\u200bDachverband der Sozialversicherungstr\u00e4ger", + "count": 3 + }, + { + "name": "info", + "display_name": "info", + "count": 2 + }, + { + "name": "Switchboard", + "display_name": "Switchboard", + "count": 25 + }, + { + "name": "Statistics Austria", + "display_name": "Statistics Austria", + "count": 8 + }, + { + "name": "Sciensano", + "display_name": "Sciensano", + "count": 5 + }, + { + "name": "None", + "display_name": "None", + "count": 46 + }, + { + "name": "Ministerio de Sanidad ", + "display_name": "Ministerio de Sanidad ", + "count": 2 + }, + { + "name": "Metka Zaletel", + "display_name": "Metka Zaletel", + "count": 3 + }, + { + "name": "Maja Silobr\u010di\u0107 Radi\u0107", + "display_name": "Maja Silobr\u010di\u0107 Radi\u0107", + "count": 2 + }, + { + "name": "Julian Strizek", + "display_name": "Julian Strizek", + "count": 2 + }, + { + "name": "Janis Misins", + "display_name": "Janis Misins", + "count": 4 + }, + { + "name": "Instituto de Salud Carlos III", + "display_name": "Instituto de Salud Carlos III", + "count": 3 + }, + { + "name": "ISTAT", + "display_name": "ISTAT", + "count": 2 + }, + { + "name": "Gordana Bjelobrk", + "display_name": "Gordana Bjelobrk", + "count": 3 + }, + { + "name": "Federal Ministry of Social Affairs, Health, Care and Consumer Protection", + "display_name": "Federal Ministry of Social Affairs, Health, Care and Consumer Protection", + "count": 2 + }, + { + "name": "Estonian Medical Birth Registry and Estonian Abortion Registry", + "display_name": "Estonian Medical Birth Registry and Estonian Abortion Registry", + "count": 1 + }, + { + "name": "Elve Kaur", + "display_name": "Elve Kaur", + "count": 1 + }, + { + "name": "Dr. Dominique Van Beckhoven MD", + "display_name": "Dr. Dominique Van Beckhoven MD", + "count": 1 + }, + { + "name": "Dr Sandra Distefano", + "display_name": "Dr Sandra Distefano", + "count": 1 + }, + { + "name": "Dr Miriam Gatt and Dr Stephen Attard ", + "display_name": "Dr Miriam Gatt and Dr Stephen Attard ", + "count": 1 + }, + { + "name": "Dr Miriam Gatt ", + "display_name": "Dr Miriam Gatt ", + "count": 1 + }, + { + "name": "Dr Miriam Gatt", + "display_name": "Dr Miriam Gatt", + "count": 1 + }, + { + "name": "Dr Miriam Azzopardi\u200b", + "display_name": "Dr Miriam Azzopardi\u200b", + "count": 2 + }, + { + "name": "Dr Kathleen England ", + "display_name": "Dr Kathleen England ", + "count": 1 + }, + { + "name": "Dr Kathleen England", + "display_name": "Dr Kathleen England", + "count": 1 + }, + { + "name": "Domenica Taruscio", + "display_name": "Domenica Taruscio", + "count": 2 + }, + { + "name": "Division for Epidemiology of communicable diseases, Croatian Institute of Public Health", + "display_name": "Division for Epidemiology of communicable diseases, Croatian Institute of Public Health", + "count": 2 + }, + { + "name": "Data and Policy Information Service", + "display_name": "Data and Policy Information Service", + "count": 1 + }, + { + "name": "Daiga Gr\u012bnberga", + "display_name": "Daiga Gr\u012bnberga", + "count": 1 + }, + { + "name": "DICA", + "display_name": "DICA", + "count": 1 + }, + { + "name": "DI Dr. Gerhard F\u00fcl\u00f6p", + "display_name": "DI Dr. Gerhard F\u00fcl\u00f6p", + "count": 1 + }, + { + "name": "Centrum e-Zdrowia", + "display_name": "Centrum e-Zdrowia", + "count": 3 + }, + { + "name": "Centrul National de Statistica si Informatica in Sanatatea Publica (CNSISP)", + "display_name": "Centrul National de Statistica si Informatica in Sanatatea Publica (CNSISP)", + "count": 4 + }, + { + "name": "Centro Nacional de Epidemiolog\u00eda", + "display_name": "Centro Nacional de Epidemiolog\u00eda", + "count": 1 + }, + { + "name": "Carlos Luis Parra Calder\u00f3n", + "display_name": "Carlos Luis Parra Calder\u00f3n", + "count": 1 + }, + { + "name": "Cancer Network Information System", + "display_name": "Cancer Network Information System", + "count": 1 + }, + { + "name": "Boudewijn CATRY", + "display_name": "Boudewijn CATRY", + "count": 1 + }, + { + "name": "Bj\u00f8rg Tilde Svanes", + "display_name": "Bj\u00f8rg Tilde Svanes", + "count": 1 + }, + { + "name": "Bert Vaes", + "display_name": "Bert Vaes", + "count": 1 + }, + { + "name": "Belgian Cancer Registry", + "display_name": "Belgian Cancer Registry", + "count": 1 + }, + { + "name": "BIGAN Generic ", + "display_name": "BIGAN Generic ", + "count": 1 + }, + { + "name": "Annette Peters", + "display_name": "Annette Peters", + "count": 1 + }, + { + "name": "Anna Teresa Palamara", + "display_name": "Anna Teresa Palamara", + "count": 1 + }, + { + "name": "Anke Macdonald", + "display_name": "Anke Macdonald", + "count": 1 + }, + { + "name": "Anka Bolka", + "display_name": "Anka Bolka", + "count": 1 + }, + { + "name": "Andreas Sandgren", + "display_name": "Andreas Sandgren", + "count": 1 + }, + { + "name": "Ana Ivi\u010devi\u0107 Uhernik", + "display_name": "Ana Ivi\u010devi\u0107 Uhernik", + "count": 1 + }, + { + "name": "Aleksandar Medarevi\u0107", + "display_name": "Aleksandar Medarevi\u0107", + "count": 2 + }, + { + "name": "Afdeling NKR-analyse", + "display_name": "Afdeling NKR-analyse", + "count": 1 + }, + { + "name": "AUSSDA - The Austrian Social Science Data Archive", + "display_name": "AUSSDA - The Austrian Social Science Data Archive", + "count": 1 + } + ] + }, + "res_format": { + "title": "res_format", + "items": [ + { + "name": "vcf", + "display_name": "vcf", + "count": 1 + }, + { + "name": "ttl", + "display_name": "ttl", + "count": 1 + }, + { + "name": "rdf-xml", + "display_name": "rdf-xml", + "count": 1 + }, + { + "name": "rdf-ttl", + "display_name": "rdf-ttl", + "count": 1 + }, + { + "name": "rdf-trig", + "display_name": "rdf-trig", + "count": 1 + }, + { + "name": "rdf-ntriples", + "display_name": "rdf-ntriples", + "count": 1 + }, + { + "name": "rdf-nquads", + "display_name": "rdf-nquads", + "count": 1 + }, + { + "name": "rdf-n3", + "display_name": "rdf-n3", + "count": 1 + }, + { + "name": "rdf-jsonld", + "display_name": "rdf-jsonld", + "count": 1 + }, + { + "name": "ped", + "display_name": "ped", + "count": 1 + }, + { + "name": "jsonld", + "display_name": "jsonld", + "count": 1 + }, + { + "name": "http://publications.europa.eu/resource/authority/file-typeSQL", + "display_name": "http://publications.europa.eu/resource/authority/file-typeSQL", + "count": 1 + }, + { + "name": "http://publications.europa.eu/resource/authority/file-typeSPSS", + "display_name": "http://publications.europa.eu/resource/authority/file-typeSPSS", + "count": 1 + }, + { + "name": "http://publications.europa.eu/resource/authority/file-typeCSV", + "display_name": "http://publications.europa.eu/resource/authority/file-typeCSV", + "count": 1 + }, + { + "name": "graphql", + "display_name": "graphql", + "count": 1 + }, + { + "name": "fastq", + "display_name": "fastq", + "count": 1 + }, + { + "name": "ZIP", + "display_name": "ZIP", + "count": 1 + }, + { + "name": "XLS", + "display_name": "XLS", + "count": 1 + }, + { + "name": "JSON", + "display_name": "JSON", + "count": 1 + }, + { + "name": "CSV", + "display_name": "CSV", + "count": 2 + } + ] + }, + "provenance": { + "title": "provenance", + "items": [ + { + "name": "https://www.health-ri.nl/Example_of_BBMRI-catalogue_metadata_for_AAA", + "display_name": "https://www.health-ri.nl/Example_of_BBMRI-catalogue_metadata_for_AAA", + "count": 1 + }, + { + "name": "Survey/interview data", + "display_name": "Survey/interview data", + "count": 42 + }, + { + "name": "Surveillance data of infectious diseases", + "display_name": "Surveillance data of infectious diseases", + "count": 6 + }, + { + "name": "Social Health Insurance Data", + "display_name": "Social Health Insurance Data", + "count": 1 + }, + { + "name": "Registry data", + "display_name": "Registry data", + "count": 106 + }, + { + "name": "Population data", + "display_name": "Population data", + "count": 13 + }, + { + "name": "Outpatient utilisation data", + "display_name": "Outpatient utilisation data", + "count": 4 + }, + { + "name": "Observational study data", + "display_name": "Observational study data", + "count": 2 + }, + { + "name": "Multiple sources", + "display_name": "Multiple sources", + "count": 22 + }, + { + "name": "Hospitalization statistics of the hospitals of the National Health System", + "display_name": "Hospitalization statistics of the hospitals of the National Health System", + "count": 4 + }, + { + "name": "Hospital resources & Healthcare resources", + "display_name": "Hospital resources & Healthcare resources", + "count": 9 + }, + { + "name": "Hospital resources & Healthcare administrative area resources", + "display_name": "Hospital resources & Healthcare administrative area resources", + "count": 9 + }, + { + "name": "Data from other records", + "display_name": "Data from other records", + "count": 9 + }, + { + "name": "Calculation", + "display_name": "Calculation", + "count": 2 + }, + { + "name": "Biobank/sample/specimen data", + "display_name": "Biobank/sample/specimen data", + "count": 2 + }, + { + "name": "Administrative data", + "display_name": "Administrative data", + "count": 22 + } + ] + } + } + } + } + } +} \ No newline at end of file diff --git a/src/test/resources/mappings/package_search_datasets_when_query_ckan_and_beacon.json.license b/src/test/resources/mappings/package_search.json.license similarity index 100% rename from src/test/resources/mappings/package_search_datasets_when_query_ckan_and_beacon.json.license rename to src/test/resources/mappings/package_search.json.license diff --git a/src/test/resources/mappings/package_search_datasets_when_query_ckan_and_beacon.json b/src/test/resources/mappings/package_search_datasets_when_query_ckan_and_beacon.json deleted file mode 100644 index d2001e2..0000000 --- a/src/test/resources/mappings/package_search_datasets_when_query_ckan_and_beacon.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "priority": 3, - "request": { - "method": "GET", - "urlPattern": "/api/3/action/enhanced_package_search.*fq=identifier:27866022694497975.*" - }, - "response": { - "status": 200, - "headers": { - "Content-Type": "application/json" - }, - "jsonBody": { - "help": "https://ckan-test.healthdata.nl/api/3/action/help_show?name=package_search", - "success": true, - "result": { - "count": 1, - "facets": {}, - "results": [ - { - "access_rights": { - "name": "https://health-ri.sandbox.semlab-leiden.nl/dataset/d73d04ba-23f7-429f-8506-3aa9dccb0435#accessRights", - "display_name": "Access Rights" - }, - "conforms_to": [ - { - "display_name": "Conforms to", - "name": "https://health-ri.sandbox.semlab-leiden.nl/profile/2f08228e-1789-40f8-84cd-28e3288c3604" - } - ], "creator_user_id": "f2687934-1127-4c61-ab21-982cb91d7c80", - "id": "0ddd7a13-ee11-4e5d-bbff-34e04a6a7949", - "identifier": "27866022694497975", - "isopen": false, - "language": [ - { - "display_name": "English", - "name": "http://id.loc.gov/vocabulary/iso639-1/en" - } - ], - "license_id": "", - "license_title": "", - "metadata_created": "2024-02-22T20:22:34.959037", - "metadata_modified": "2024-03-19T13:37:10.885817", - "name": "brain_mri_wml_vumcadc3", - "notes": "This collection will include brain MRI scans on which the amount of white matter lesions (WML) will be quantified. ", - "num_resources": 0, - "num_tags": 0, - "organization": { - "id": "60d8106a-4066-454a-bd19-3d6dbf7d9c99", - "name": "lumc", - "title": "LUMC", - "type": "organization", - "description": "", - "image_url": "", - "created": "2024-01-25T15:51:27.993020", - "is_organization": true, - "approval_status": "approved", - "state": "active" - }, - "owner_org": "60d8106a-4066-454a-bd19-3d6dbf7d9c99", - "private": false, - "state": "active", - "title": "Brain_MRI_WML_VUMCADC", - "type": "dataset", - "extras": [ - { - "key": "uri", - "value": "https://health-ri.sandbox.semlab-leiden.nl/dataset/d73d04ba-23f7-429f-8506-3aa9dccb0435" - }, - { - "key": "harvest_object_id", - "value": "b72fadd3-6251-48ba-956f-0f5b26f886bc" - }, - { - "key": "harvest_source_id", - "value": "8d25f73c-c3e4-4e82-b098-edfc28fa95b5" - }, - { - "key": "harvest_source_title", - "value": "LUMC-semlab" - } - ], - "resources": [], - "tags": [], - "groups": [], - "relationships_as_subject": [], - "relationships_as_object": [] - } - ] - } - } - } -} \ No newline at end of file diff --git a/src/test/resources/mappings/package_search_datasets_when_query_ckan_only.json b/src/test/resources/mappings/package_search_datasets_when_query_ckan_only.json deleted file mode 100644 index f81e4ea..0000000 --- a/src/test/resources/mappings/package_search_datasets_when_query_ckan_only.json +++ /dev/null @@ -1,233 +0,0 @@ -{ - "priority": 3, - "request": { - "method": "GET", - "urlPattern": "/api/3/action/enhanced_package_search.*fq=identifier.*" - }, - "response": { - "status": 200, - "headers": { - "Content-Type": "application/json" - }, - "jsonBody": { - "help": "https://ckan-test.healthdata.nl/api/3/action/help_show?name=package_search", - "success": true, - "result": { - "count": 3, - "facets": {}, - "results": [ - { - "access_rights": { - "name": "https://health-ri.sandbox.semlab-leiden.nl/dataset/d73d04ba-23f7-429f-8506-3aa9dccb0435#accessRights", - "display_name": "Access Rights" - }, - "conforms_to": [ - { - "display_name": "Conforms to", - "name": "https://health-ri.sandbox.semlab-leiden.nl/profile/2f08228e-1789-40f8-84cd-28e3288c3604" - } - ], - "creator_user_id": "f2687934-1127-4c61-ab21-982cb91d7c80", - "id": "0ddd7a13-ee11-4e5d-bbff-34e04a6a7949", - "identifier": "27866022694497975", - "isopen": false, - "language": [ - { - "display_name": "English", - "name": "http://id.loc.gov/vocabulary/iso639-1/en" - } - ], - "license_id": "", - "license_title": "", - "metadata_created": "2024-02-22T20:22:34.959037", - "metadata_modified": "2024-03-19T13:37:10.885817", - "name": "brain_mri_wml_vumcadc3", - "notes": "This collection will include brain MRI scans on which the amount of white matter lesions (WML) will be quantified. ", - "num_resources": 0, - "num_tags": 0, - "organization": { - "id": "60d8106a-4066-454a-bd19-3d6dbf7d9c99", - "name": "lumc", - "title": "LUMC", - "type": "organization", - "description": "", - "image_url": "", - "created": "2024-01-25T15:51:27.993020", - "is_organization": true, - "approval_status": "approved", - "state": "active" - }, - "owner_org": "60d8106a-4066-454a-bd19-3d6dbf7d9c99", - "private": false, - "state": "active", - "title": "Brain_MRI_WML_VUMCADC", - "type": "dataset", - "extras": [ - { - "key": "uri", - "value": "https://health-ri.sandbox.semlab-leiden.nl/dataset/d73d04ba-23f7-429f-8506-3aa9dccb0435" - }, - { - "key": "harvest_object_id", - "value": "b72fadd3-6251-48ba-956f-0f5b26f886bc" - }, - { - "key": "harvest_source_id", - "value": "8d25f73c-c3e4-4e82-b098-edfc28fa95b5" - }, - { - "key": "harvest_source_title", - "value": "LUMC-semlab" - } - ], - "resources": [], - "tags": [], - "groups": [], - "relationships_as_subject": [], - "relationships_as_object": [] - }, - { - "access_rights": { - "display_name": "Access Rights", - "name": "https://health-ri.sandbox.semlab-leiden.nl/dataset/e1c89dfd-d7b2-4fb0-960f-75d4cc3104bb#accessRights" - }, - "conforms_to": [ - { - "display_name": "Conforms to", - "name": "https://health-ri.sandbox.semlab-leiden.nl/profile/2f08228e-1789-40f8-84cd-28e3288c3604" - } - ], - "creator_user_id": "f2687934-1127-4c61-ab21-982cb91d7c80", - "id": "e2fc35e2-0a09-42d7-b2e7-2324758f89f1", - "identifier": "euc_kauno_uc6", - "isopen": false, - "language": [ - { - "display_name": "English", - "name": "http://id.loc.gov/vocabulary/iso639-1/en" - } - ], - "license_id": "", - "license_title": "", - "metadata_created": "2024-02-22T20:25:10.662935", - "metadata_modified": "2024-03-19T13:37:08.812120", - "name": "eucanimage_kauno_uc61", - "notes": "Within the EuCanImage project (https://eucanimage.eu/), imaging datasets are collected from multiple sites to facilitate the use of AI for cancer research. The BMIA XNAT will be used as main image data storage platform for centralized storage. As first usecase, breast cancer was identified, for which the first datasets will be collected from the University of Barcelona. The data will first be available to partners within the consortium, but will potentially be publicly released", - "num_resources": 0, - "num_tags": 0, - "organization": { - "id": "60d8106a-4066-454a-bd19-3d6dbf7d9c99", - "name": "lumc", - "title": "LUMC", - "type": "organization", - "description": "", - "image_url": "", - "created": "2024-01-25T15:51:27.993020", - "is_organization": true, - "approval_status": "approved", - "state": "active" - }, - "owner_org": "60d8106a-4066-454a-bd19-3d6dbf7d9c99", - "private": false, - "state": "active", - "title": "EuCanImage_KAUNO_UC6", - "type": "dataset", - "extras": [ - { - "key": "uri", - "value": "https://health-ri.sandbox.semlab-leiden.nl/dataset/e1c89dfd-d7b2-4fb0-960f-75d4cc3104bb" - }, - { - "key": "harvest_object_id", - "value": "779eae83-551c-4f4d-952e-728cd89350a2" - }, - { - "key": "harvest_source_id", - "value": "8d25f73c-c3e4-4e82-b098-edfc28fa95b5" - }, - { - "key": "harvest_source_title", - "value": "LUMC-semlab" - } - ], - "resources": [], - "tags": [], - "groups": [], - "relationships_as_subject": [], - "relationships_as_object": [] - }, - { - "access_rights": { - "display_name": "Access Rights", - "name": "https://health-ri.sandbox.semlab-leiden.nl/dataset/63cc8a90-91c2-47f0-9053-a1e6e5b7d88a#accessRights" - }, - "conforms_to": [ - { - "display_name": "Conforms to", - "name": "https://health-ri.sandbox.semlab-leiden.nl/profile/2f08228e-1789-40f8-84cd-28e3288c3604" - } - ], - "creator_user_id": "f2687934-1127-4c61-ab21-982cb91d7c80", - "id": "128bc39c-8a56-4b07-969d-3cdc2d0bff10", - "identifier": "cp-tavi", - "isopen": false, - "language": [ - { - "display_name": "English", - "name": "http://id.loc.gov/vocabulary/iso639-1/en" - } - ], - "license_id": "", - "license_title": "", - "metadata_created": "2024-02-22T20:22:48.028994", - "metadata_modified": "2024-03-19T13:37:07.090046", - "name": "cp-tavi5", - "notes": "Cerebral perfusion in patients with severe aortic valve stenosis undergoing transcatheter aortic valve implantation", - "num_resources": 0, - "num_tags": 0, - "organization": { - "id": "60d8106a-4066-454a-bd19-3d6dbf7d9c99", - "name": "lumc", - "title": "LUMC", - "type": "organization", - "description": "", - "image_url": "", - "created": "2024-01-25T15:51:27.993020", - "is_organization": true, - "approval_status": "approved", - "state": "active" - }, - "owner_org": "60d8106a-4066-454a-bd19-3d6dbf7d9c99", - "private": false, - "state": "active", - "title": "CP-TAVI", - "type": "dataset", - "extras": [ - { - "key": "uri", - "value": "https://health-ri.sandbox.semlab-leiden.nl/dataset/63cc8a90-91c2-47f0-9053-a1e6e5b7d88a" - }, - { - "key": "harvest_object_id", - "value": "fe83df92-0b02-481a-bb9e-157fde93b36b" - }, - { - "key": "harvest_source_id", - "value": "8d25f73c-c3e4-4e82-b098-edfc28fa95b5" - }, - { - "key": "harvest_source_title", - "value": "LUMC-semlab" - } - ], - "resources": [], - "tags": [], - "groups": [], - "relationships_as_subject": [], - "relationships_as_object": [] - } - ] - } - } - } -} \ No newline at end of file diff --git a/src/test/resources/mappings/package_search_datasets_when_query_ckan_only.json.license b/src/test/resources/mappings/package_search_datasets_when_query_ckan_only.json.license deleted file mode 100644 index c8d4da6..0000000 --- a/src/test/resources/mappings/package_search_datasets_when_query_ckan_only.json.license +++ /dev/null @@ -1,3 +0,0 @@ -SPDX-FileCopyrightText: 2024 PNED G.I.E. - -SPDX-License-Identifier: Apache-2.0 \ No newline at end of file diff --git a/src/test/resources/mappings/package_search_facets.json b/src/test/resources/mappings/package_search_facets.json deleted file mode 100644 index e3c5c24..0000000 --- a/src/test/resources/mappings/package_search_facets.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "priority": 3, - "request": { - "method": "GET", - "urlPattern": "/api/3/action/enhanced_package_search.*rows=0.*" - }, - "response": { - "status": 200, - "headers": { - "Content-Type": "application/json" - }, - "jsonBody": { - "help": "https://ckan-test.healthdata.nl/api/3/action/help_show?name=package_search", - "success": true, - "result": { - "count": 3, - "facets": { - "organization": { - "lumc": 3 - }, - "theme": { - "https://publications.europa.eu/resource/authority/data-theme/HEAL": 3 - }, - "conforms_to": { - "https://health-ri.sandbox.semlab-leiden.nl/profile/2f08228e-1789-40f8-84cd-28e3288c3604": 3 - }, - "access_rights": { - "https://health-ri.sandbox.semlab-leiden.nl/dataset/d73d04ba-23f7-429f-8506-3aa9dccb0435#accessRights": 3 - }, - "language": { - "https://publications.europa.eu/resource/authority/language/ENG": 3 - - }, - "publisher_name": { - "lumc": 3 - }, - "res_format": { - }, - "provenance": { - } - } - } - } - } -} \ No newline at end of file diff --git a/src/test/resources/mappings/package_search_facets.json.license b/src/test/resources/mappings/package_search_facets.json.license deleted file mode 100644 index c8d4da6..0000000 --- a/src/test/resources/mappings/package_search_facets.json.license +++ /dev/null @@ -1,3 +0,0 @@ -SPDX-FileCopyrightText: 2024 PNED G.I.E. - -SPDX-License-Identifier: Apache-2.0 \ No newline at end of file diff --git a/src/test/resources/mappings/package_search_ids.json b/src/test/resources/mappings/package_search_ids.json deleted file mode 100644 index c8aeb2c..0000000 --- a/src/test/resources/mappings/package_search_ids.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "priority": 3, - "request": { - "method": "GET", - "urlPattern": "/api/3/action/enhanced_package_search.*fl=identifier.*" - }, - "response": { - "status": 200, - "headers": { - "Content-Type": "application/json" - }, - "jsonBody": { - "help": "https://ckan-test.healthdata.nl/api/3/action/help_show?name=package_search", - "success": true, - "result": { - "count": 3, - "facets": {}, - "results": [ - { - "identifier": "27866022694497975" - }, - { - "identifier": "euc_kauno_uc6" - }, - { - "identifier": "cp-tavi" - } - ] - } - } - } -} \ No newline at end of file diff --git a/src/test/resources/mappings/package_search_ids.json.license b/src/test/resources/mappings/package_search_ids.json.license deleted file mode 100644 index c8d4da6..0000000 --- a/src/test/resources/mappings/package_search_ids.json.license +++ /dev/null @@ -1,3 +0,0 @@ -SPDX-FileCopyrightText: 2024 PNED G.I.E. - -SPDX-License-Identifier: Apache-2.0 \ No newline at end of file