Skip to content

Commit

Permalink
feat(edc-client):[#616] fix namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
ds-jhartmann committed May 16, 2024
1 parent dfc3e9c commit 819667e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ public class JsonLdConfiguration {
public static final String NAMESPACE_TRACTUSX = "https://w3id.org/tractusx/v0.0.1/ns/";
public static final String NAMESPACE_DCT = "http://purl.org/dc/terms/";
public static final String JSON_LD_OBJECT_MAPPER = "jsonLdObjectMapper";
public static final String NAMESPACE_CATENAX_ONTOLOGY_COMMON = "https://w3id.org/catenax/ontology/common#";
public static final String NAMESPACE_CATENAX_TAXONOMY = "https://w3id.org/catenax/taxonomy#";
public static final String NAMESPACE_CATENAX_POLICY = "https://w3id.org/catenax/policy/";

@Bean /* package */ TitaniumJsonLd titaniumJsonLd(final Monitor monitor) {
final TitaniumJsonLd titaniumJsonLd = new TitaniumJsonLd(monitor);
Expand All @@ -64,8 +63,7 @@ public class JsonLdConfiguration {
titaniumJsonLd.registerNamespace("edc", NAMESPACE_EDC);
titaniumJsonLd.registerNamespace("dcat", JsonLdConfiguration.NAMESPACE_DCAT);
titaniumJsonLd.registerNamespace("dspace", NAMESPACE_DSPACE);
titaniumJsonLd.registerNamespace("cx-common", NAMESPACE_CATENAX_ONTOLOGY_COMMON);
titaniumJsonLd.registerNamespace("cx-taxo", NAMESPACE_CATENAX_TAXONOMY);
titaniumJsonLd.registerNamespace("cx-policy", NAMESPACE_CATENAX_POLICY);
return titaniumJsonLd;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void setUp() {
jsonLd.registerNamespace("edc", "https://w3id.org/edc/v0.0.1/ns/");
jsonLd.registerNamespace("dcat", "https://www.w3.org/ns/dcat/");
jsonLd.registerNamespace("dspace", "https://w3id.org/dspace/v0.8/");
jsonLd.registerNamespace("cx-common", "https://w3id.org/catenax/ontology/common#");
jsonLd.registerNamespace("cx-policy", "https://w3id.org/catenax/policy/");

this.edcTransformer = new EdcTransformer(objectMapper(), jsonLd, new TypeTransformerRegistryImpl());
this.service = new EdcAssetService(edcTransformer, edcConfiguration, restTemplate);
Expand Down Expand Up @@ -187,7 +187,7 @@ void testRegistryAssetCreateRequestStructure() throws JSONException {
"dct:type": {
"@id": "https://w3id.org/catenax/taxonomy#DigitalTwinRegistry"
},
"cx-common:version": "3.0",
"https://w3id.org/catenax/ontology/common#version": "3.0",
"edc:type": "data.core.digitalTwinRegistry",
"edc:id": "Asset1",
"edc:contenttype": "Asset"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
********************************************************************************/
package org.eclipse.tractusx.irs.edc.client.testutil;

import static org.eclipse.tractusx.irs.edc.client.configuration.JsonLdConfiguration.NAMESPACE_CATENAX_POLICY;
import static org.eclipse.tractusx.irs.edc.client.configuration.JsonLdConfiguration.NAMESPACE_DCAT;
import static org.eclipse.tractusx.irs.edc.client.configuration.JsonLdConfiguration.NAMESPACE_DCT;
import static org.eclipse.tractusx.irs.edc.client.configuration.JsonLdConfiguration.NAMESPACE_DSPACE;
Expand Down Expand Up @@ -79,6 +80,7 @@ public static EdcTransformer createEdcTransformer() {
titaniumJsonLd.registerNamespace("edc", NAMESPACE_EDC);
titaniumJsonLd.registerNamespace("dcat", NAMESPACE_DCAT);
titaniumJsonLd.registerNamespace("dspace", NAMESPACE_DSPACE);
titaniumJsonLd.registerNamespace("cx-policy", NAMESPACE_CATENAX_POLICY);
return new EdcTransformer(objectMapper(), titaniumJsonLd, new TypeTransformerRegistryImpl());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,7 @@ void setUp() {
jsonLd.registerNamespace("edc", "https://w3id.org/edc/v0.0.1/ns/");
jsonLd.registerNamespace("dcat", "https://www.w3.org/ns/dcat/");
jsonLd.registerNamespace("dspace", "https://w3id.org/dspace/v0.8/");
jsonLd.registerNamespace("cx-common", "https://w3id.org/catenax/ontology/common#");
jsonLd.registerNamespace("cx-taxo", "https://w3id.org/catenax/taxonomy#");
jsonLd.registerNamespace("cx-policy", "https://w3id.org/catenax/policy/");

ObjectMapper objectMapper = objectMapper();
edcTransformer = new EdcTransformer(objectMapper, jsonLd, new TypeTransformerRegistryImpl());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ void setUp() {
jsonLd.registerNamespace("edc", "https://w3id.org/edc/v0.0.1/ns/");
jsonLd.registerNamespace("dcat", "https://www.w3.org/ns/dcat/");
jsonLd.registerNamespace("dspace", "https://w3id.org/dspace/v0.8/");
jsonLd.registerNamespace("cx-policy", "https://w3id.org/catenax/policy/");

ObjectMapper objectMapper = objectMapper();
edcTransformer = new EdcTransformer(objectMapper, jsonLd, new TypeTransformerRegistryImpl());
Expand Down

0 comments on commit 819667e

Please sign in to comment.