From 9dfdfd7afea7016ab4cb21c9259e68730e6443a8 Mon Sep 17 00:00:00 2001 From: Enrico Risa Date: Thu, 17 Oct 2024 10:26:39 +0200 Subject: [PATCH] chore: fixes after upstream changes on catalog transformers --- core/federated-catalog-core/build.gradle.kts | 2 ++ .../edc/catalog/transform/JsonObjectToCatalogTransformer.java | 4 ++-- extensions/api/federated-catalog-api/build.gradle.kts | 1 + gradle/libs.versions.toml | 1 + system-tests/end2end-test/e2e-junit-runner/build.gradle.kts | 1 + 5 files changed, 7 insertions(+), 2 deletions(-) diff --git a/core/federated-catalog-core/build.gradle.kts b/core/federated-catalog-core/build.gradle.kts index 9f628107..84b20b68 100644 --- a/core/federated-catalog-core/build.gradle.kts +++ b/core/federated-catalog-core/build.gradle.kts @@ -30,6 +30,7 @@ dependencies { implementation(libs.edc.core.connector) implementation(libs.edc.lib.query) implementation(libs.edc.dsp.transform.catalog) + implementation(libs.edc.dsp.transform.catalog.lib) implementation(libs.edc.controlplane.transform) implementation(libs.edc.lib.transform) implementation(libs.edc.dsp.api.configuration) @@ -47,6 +48,7 @@ dependencies { // required for integration test testFixturesImplementation(libs.edc.core.connector) testFixturesImplementation(libs.edc.dsp.transform.catalog) + testFixturesImplementation(libs.edc.dsp.transform.catalog.lib) testFixturesImplementation(libs.edc.json.ld.lib) testFixturesImplementation(libs.edc.controlplane.transform) } diff --git a/core/federated-catalog-core/src/main/java/org/eclipse/edc/catalog/transform/JsonObjectToCatalogTransformer.java b/core/federated-catalog-core/src/main/java/org/eclipse/edc/catalog/transform/JsonObjectToCatalogTransformer.java index 45fdac7a..b6e76013 100644 --- a/core/federated-catalog-core/src/main/java/org/eclipse/edc/catalog/transform/JsonObjectToCatalogTransformer.java +++ b/core/federated-catalog-core/src/main/java/org/eclipse/edc/catalog/transform/JsonObjectToCatalogTransformer.java @@ -29,7 +29,7 @@ import static org.eclipse.edc.jsonld.spi.PropertyAndTypeNames.DCAT_DATASET_ATTRIBUTE; import static org.eclipse.edc.jsonld.spi.PropertyAndTypeNames.DCAT_DATA_SERVICE_ATTRIBUTE; import static org.eclipse.edc.jsonld.spi.PropertyAndTypeNames.DCAT_DISTRIBUTION_TYPE; -import static org.eclipse.edc.jsonld.spi.PropertyAndTypeNames.DSPACE_PROPERTY_PARTICIPANT_ID; +import static org.eclipse.edc.jsonld.spi.PropertyAndTypeNames.DSPACE_PROPERTY_PARTICIPANT_ID_IRI; import static org.eclipse.edc.jsonld.spi.TypeUtil.nodeType; /** @@ -67,7 +67,7 @@ private void transformProperties(String key, JsonValue value, Catalog.Builder bu } } else if (DCAT_DATA_SERVICE_ATTRIBUTE.equalsIgnoreCase(key)) { transformArrayOrObject(value, DataService.class, builder::dataService, context); - } else if (DSPACE_PROPERTY_PARTICIPANT_ID.equalsIgnoreCase(key)) { + } else if (DSPACE_PROPERTY_PARTICIPANT_ID_IRI.equalsIgnoreCase(key)) { builder.participantId(transformString(value, context)); } else if (DCAT_DISTRIBUTION_TYPE.equalsIgnoreCase(key)) { transformArrayOrObject(value, Distribution.class, builder::distribution, context); diff --git a/extensions/api/federated-catalog-api/build.gradle.kts b/extensions/api/federated-catalog-api/build.gradle.kts index b6d68e3f..4c08db2d 100644 --- a/extensions/api/federated-catalog-api/build.gradle.kts +++ b/extensions/api/federated-catalog-api/build.gradle.kts @@ -41,6 +41,7 @@ dependencies { testImplementation(libs.edc.iam.mock) testImplementation(libs.edc.json.ld.lib) testImplementation(libs.edc.dsp.transform.catalog) + testImplementation(libs.edc.dsp.transform.catalog.lib) testImplementation(testFixtures(libs.edc.core.jersey)) testImplementation(libs.edc.lib.transform) testImplementation(libs.edc.lib.query) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 3856ec29..9cfb3bc4 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -76,6 +76,7 @@ edc-lib-jerseyproviders = { module = "org.eclipse.edc:jersey-providers-lib", ver edc-dsp-api-configuration = { module = "org.eclipse.edc:dsp-http-api-configuration", version.ref = "edc" } edc-dsp-all = { module = "org.eclipse.edc:dsp", version.ref = "edc" } edc-dsp-transform-catalog = { module = "org.eclipse.edc:dsp-catalog-transform", version.ref = "edc" } +edc-dsp-transform-catalog-lib = { module = "org.eclipse.edc:dsp-catalog-transform-lib", version.ref = "edc" } edc-controlplane-transform = { module = "org.eclipse.edc:control-plane-transform", version.ref = "edc" } # third-party desp diff --git a/system-tests/end2end-test/e2e-junit-runner/build.gradle.kts b/system-tests/end2end-test/e2e-junit-runner/build.gradle.kts index 2f0909c8..66ce22c4 100644 --- a/system-tests/end2end-test/e2e-junit-runner/build.gradle.kts +++ b/system-tests/end2end-test/e2e-junit-runner/build.gradle.kts @@ -26,6 +26,7 @@ dependencies { testImplementation(libs.awaitility) testImplementation(libs.edc.api.management) testImplementation(libs.edc.dsp.transform.catalog) + testImplementation(libs.edc.dsp.transform.catalog.lib) testImplementation(libs.edc.junit) testImplementation(libs.edc.json.ld.lib) testImplementation(libs.jackson.jsr310)