From 3c34841d699becc989246107d6073af10ef32388 Mon Sep 17 00:00:00 2001 From: jhartmann Date: Wed, 22 May 2024 18:03:21 +0200 Subject: [PATCH 01/15] feat(irs-api):[#470] Add support for SingleLevelUsageAsPlanned --- .../job/delegate/RelationshipDelegate.java | 2 +- .../services/IrsItemGraphQueryService.java | 4 +- .../irs/IrsWireMockIntegrationTest.java | 8 +- .../eclipse/tractusx/irs/WiremockSupport.java | 6 +- .../delegate/RelationshipDelegateTest.java | 161 +- .../job/delegate/SubmodelDelegateTest.java | 28 +- ...ssetAdministrationShellDescriptorTest.java | 23 +- ...rsItemGraphQueryServiceSpringBootTest.java | 36 +- .../eclipse/tractusx/irs/util/TestMother.java | 64 +- .../singleLevelBomAsBuilt-3.1.0.json | 17 + .../singleLevelBomAsPlanned-3.1.0.json | 20 + .../singleLevelBomAsSpecified-1.1.0.json | 29 + .../singleLevelBomAsSpecified-2.1.0.json | 31 + .../singleLevelUsageAsBuilt-3.1.0.json | 20 + .../singleLevelUsageAsPlanned-2.1.0.json | 23 + .../singleLevelBomAsBuilt-3.0.0.json | 16 + .../singleLevelBomAsPlanned-3.0.0.json | 19 + .../singleLevelBomAsSpecified-1.0.0.json | 28 + .../singleLevelBomAsSpecified-2.0.0.json | 30 + .../singleLevelUsageAsBuilt-3.0.0.json | 19 + .../singleLevelUsageAsPlanned-2.0.0.json | 22 + .../client/EdcSubmodelClientLocalStub.java | 1 + .../edc/client/SingleLevelUsageAsBuilt.java | 124 - .../edc/client/relationships/ParentItem.java | 98 + .../RelationshipAspect.java | 16 +- .../SingleLevelBomAsBuilt.java | 7 +- .../SingleLevelBomAsPlanned.java | 3 +- .../SingleLevelBomAsSpecified.java | 5 +- .../SingleLevelUsageAsBuilt.java | 65 + .../SingleLevelUsageAsPlanned.java | 60 + .../SubmodelTestdataCreator.java | 4 +- .../edc/client/CxTestDataAnalyzerTest.java | 5 +- .../irs/edc/client/EdcSubmodelClientTest.java | 2 + .../RelationshipAspectTest.java | 2 +- .../SubmodelTestdataCreatorTest.java | 2 +- .../irs/component/enums/AspectType.java | 4 +- .../irs/data/CxTestDataContainer.java | 11 +- .../main/resources/test_data/CX_Testdata.json | 2705 +++++++++-------- ...setAdministrationShellTestdataCreator.java | 16 +- 39 files changed, 2216 insertions(+), 1520 deletions(-) create mode 100644 irs-api/src/test/resources/relationships/futureVersions/singleLevelBomAsBuilt-3.1.0.json create mode 100644 irs-api/src/test/resources/relationships/futureVersions/singleLevelBomAsPlanned-3.1.0.json create mode 100644 irs-api/src/test/resources/relationships/futureVersions/singleLevelBomAsSpecified-1.1.0.json create mode 100644 irs-api/src/test/resources/relationships/futureVersions/singleLevelBomAsSpecified-2.1.0.json create mode 100644 irs-api/src/test/resources/relationships/futureVersions/singleLevelUsageAsBuilt-3.1.0.json create mode 100644 irs-api/src/test/resources/relationships/futureVersions/singleLevelUsageAsPlanned-2.1.0.json create mode 100644 irs-api/src/test/resources/relationships/singleLevelBomAsBuilt-3.0.0.json create mode 100644 irs-api/src/test/resources/relationships/singleLevelBomAsPlanned-3.0.0.json create mode 100644 irs-api/src/test/resources/relationships/singleLevelBomAsSpecified-1.0.0.json create mode 100644 irs-api/src/test/resources/relationships/singleLevelBomAsSpecified-2.0.0.json create mode 100644 irs-api/src/test/resources/relationships/singleLevelUsageAsBuilt-3.0.0.json create mode 100644 irs-api/src/test/resources/relationships/singleLevelUsageAsPlanned-2.0.0.json delete mode 100644 irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/SingleLevelUsageAsBuilt.java create mode 100644 irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/ParentItem.java rename irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/{ => relationships}/RelationshipAspect.java (83%) rename irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/{ => relationships}/SingleLevelBomAsBuilt.java (97%) rename irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/{ => relationships}/SingleLevelBomAsPlanned.java (97%) rename irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/{ => relationships}/SingleLevelBomAsSpecified.java (96%) create mode 100644 irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SingleLevelUsageAsBuilt.java create mode 100644 irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SingleLevelUsageAsPlanned.java rename irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/{ => relationships}/SubmodelTestdataCreator.java (94%) rename irs-edc-client/src/test/java/org/eclipse/tractusx/irs/edc/client/{ => relationships}/RelationshipAspectTest.java (97%) rename irs-edc-client/src/test/java/org/eclipse/tractusx/irs/edc/client/{ => relationships}/SubmodelTestdataCreatorTest.java (97%) diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/RelationshipDelegate.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/RelationshipDelegate.java index c3f15222ea..28c1703aa5 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/RelationshipDelegate.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/RelationshipDelegate.java @@ -40,9 +40,9 @@ import org.eclipse.tractusx.irs.component.enums.ProcessStep; import org.eclipse.tractusx.irs.data.JsonParseException; import org.eclipse.tractusx.irs.edc.client.EdcSubmodelFacade; -import org.eclipse.tractusx.irs.edc.client.RelationshipAspect; import org.eclipse.tractusx.irs.edc.client.exceptions.EdcClientException; import org.eclipse.tractusx.irs.edc.client.exceptions.UsagePolicyException; +import org.eclipse.tractusx.irs.edc.client.relationships.RelationshipAspect; import org.eclipse.tractusx.irs.registryclient.discovery.ConnectorEndpointsService; import org.eclipse.tractusx.irs.util.JsonUtil; diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/services/IrsItemGraphQueryService.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/services/IrsItemGraphQueryService.java index e3e6a13e93..0029b0827e 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/services/IrsItemGraphQueryService.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/services/IrsItemGraphQueryService.java @@ -163,10 +163,10 @@ public JobHandle registerItemJob(final @NonNull RegisterJob request) { public JobHandle registerItemJob(final @NonNull RegisterJob request, final UUID batchId) { final var params = JobParameter.create(request); - if (params.getDirection().equals(Direction.UPWARD) && !params.getBomLifecycle().equals(BomLifecycle.AS_BUILT)) { + if (params.getDirection().equals(Direction.UPWARD) && params.getBomLifecycle().equals(BomLifecycle.AS_SPECIFIED)) { // Currently not supported variant throw new IllegalArgumentException( - "Upward direction is supported only for asBuilt bomLifecycle parameter!"); + "Upward direction is not supported for asSpecified bomLifecycle parameter!"); } validateAspectTypeValues(params.getAspects()); diff --git a/irs-api/src/test/java/org/eclipse/tractusx/irs/IrsWireMockIntegrationTest.java b/irs-api/src/test/java/org/eclipse/tractusx/irs/IrsWireMockIntegrationTest.java index 562083bfac..9342bf3610 100644 --- a/irs-api/src/test/java/org/eclipse/tractusx/irs/IrsWireMockIntegrationTest.java +++ b/irs-api/src/test/java/org/eclipse/tractusx/irs/IrsWireMockIntegrationTest.java @@ -47,8 +47,8 @@ import static org.eclipse.tractusx.irs.testing.wiremock.SubmodelFacadeWiremockSupport.PATH_NEGOTIATE; import static org.eclipse.tractusx.irs.testing.wiremock.SubmodelFacadeWiremockSupport.PATH_STATE; import static org.eclipse.tractusx.irs.testing.wiremock.SubmodelFacadeWiremockSupport.PATH_TRANSFER; -import static org.eclipse.tractusx.irs.util.TestMother.batchAspectName; -import static org.eclipse.tractusx.irs.util.TestMother.singleLevelBomAsBuiltAspectName; +import static org.eclipse.tractusx.irs.util.TestMother.BATCH_3_0_0; +import static org.eclipse.tractusx.irs.util.TestMother.SINGLE_LEVEL_BOM_AS_BUILT_3_0_0; import java.time.Duration; import java.util.List; @@ -280,10 +280,10 @@ private void successfulRegistryAndDataRequest(final String globalAssetId, final final String batchFileName, final String sbomFileName) { final String edcAssetId = WiremockSupport.randomUUIDwithPrefix(); - final String batch = WiremockSupport.submodelRequest(edcAssetId, BATCH, batchAspectName, batchFileName); + final String batch = WiremockSupport.submodelRequest(edcAssetId, BATCH, BATCH_3_0_0, batchFileName); final String singleLevelBomAsBuilt = WiremockSupport.submodelRequest(edcAssetId, SINGLE_LEVEL_BOM_AS_BUILT, - singleLevelBomAsBuiltAspectName, sbomFileName); + SINGLE_LEVEL_BOM_AS_BUILT_3_0_0, sbomFileName); final List submodelDescriptors = List.of(batch, singleLevelBomAsBuilt); diff --git a/irs-api/src/test/java/org/eclipse/tractusx/irs/WiremockSupport.java b/irs-api/src/test/java/org/eclipse/tractusx/irs/WiremockSupport.java index 47ce8f4fa1..c756d2ead1 100644 --- a/irs-api/src/test/java/org/eclipse/tractusx/irs/WiremockSupport.java +++ b/irs-api/src/test/java/org/eclipse/tractusx/irs/WiremockSupport.java @@ -31,8 +31,8 @@ import static org.eclipse.tractusx.irs.testing.wiremock.DtrWiremockSupport.DATAPLANE_PUBLIC_URL; import static org.eclipse.tractusx.irs.testing.wiremock.DtrWiremockSupport.submodelDescriptor; import static org.eclipse.tractusx.irs.testing.wiremock.WireMockConfig.responseWithStatus; -import static org.eclipse.tractusx.irs.util.TestMother.batchAspectName; -import static org.eclipse.tractusx.irs.util.TestMother.singleLevelBomAsBuiltAspectName; +import static org.eclipse.tractusx.irs.util.TestMother.BATCH_3_0_0; +import static org.eclipse.tractusx.irs.util.TestMother.SINGLE_LEVEL_BOM_AS_BUILT_3_0_0; import java.nio.charset.StandardCharsets; import java.util.Base64; @@ -85,7 +85,7 @@ static RegisterJob jobRequest(final String globalAssetId, final String bpn, fina return RegisterJob.builder() .key(PartChainIdentificationKey.builder().bpn(bpn).globalAssetId(globalAssetId).build()) .depth(depth) - .aspects(List.of(batchAspectName, singleLevelBomAsBuiltAspectName)) + .aspects(List.of(BATCH_3_0_0, SINGLE_LEVEL_BOM_AS_BUILT_3_0_0)) .collectAspects(true) .direction(Direction.DOWNWARD) .build(); diff --git a/irs-api/src/test/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/RelationshipDelegateTest.java b/irs-api/src/test/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/RelationshipDelegateTest.java index fc82ff803c..91e106a96a 100644 --- a/irs-api/src/test/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/RelationshipDelegateTest.java +++ b/irs-api/src/test/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/RelationshipDelegateTest.java @@ -24,12 +24,20 @@ package org.eclipse.tractusx.irs.aaswrapper.job.delegate; import static org.assertj.core.api.Assertions.assertThat; +import static org.eclipse.tractusx.irs.util.TestMother.SINGLE_LEVEL_BOM_AS_BUILT_3_0_0; +import static org.eclipse.tractusx.irs.util.TestMother.SINGLE_LEVEL_BOM_AS_BUILT_3_1_0; +import static org.eclipse.tractusx.irs.util.TestMother.SINGLE_LEVEL_BOM_AS_PLANNED_3_0_0; +import static org.eclipse.tractusx.irs.util.TestMother.SINGLE_LEVEL_BOM_AS_PLANNED_3_1_0; +import static org.eclipse.tractusx.irs.util.TestMother.SINGLE_LEVEL_USAGE_AS_BUILT_2_0_0; +import static org.eclipse.tractusx.irs.util.TestMother.SINGLE_LEVEL_USAGE_AS_BUILT_2_1_0; +import static org.eclipse.tractusx.irs.util.TestMother.SINGLE_LEVEL_USAGE_AS_PLANNED_2_0_0; +import static org.eclipse.tractusx.irs.util.TestMother.SINGLE_LEVEL_USAGE_AS_PLANNED_2_1_0; import static org.eclipse.tractusx.irs.util.TestMother.jobParameter; +import static org.eclipse.tractusx.irs.util.TestMother.jobParameterDownwardAsPlanned; import static org.eclipse.tractusx.irs.util.TestMother.jobParameterUpward; +import static org.eclipse.tractusx.irs.util.TestMother.jobParameterUpwardAsPlanned; import static org.eclipse.tractusx.irs.util.TestMother.shell; import static org.eclipse.tractusx.irs.util.TestMother.shellDescriptor; -import static org.eclipse.tractusx.irs.util.TestMother.singleLevelBomAsBuiltAspectName; -import static org.eclipse.tractusx.irs.util.TestMother.singleLevelUsageAsBuiltAspectName; import static org.eclipse.tractusx.irs.util.TestMother.submodelDescriptorWithDspEndpoint; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyString; @@ -42,9 +50,11 @@ import java.nio.file.Paths; import java.util.List; import java.util.Objects; +import java.util.stream.Stream; import org.eclipse.tractusx.irs.aaswrapper.job.AASTransferProcess; import org.eclipse.tractusx.irs.aaswrapper.job.ItemContainer; +import org.eclipse.tractusx.irs.component.JobParameter; import org.eclipse.tractusx.irs.component.PartChainIdentificationKey; import org.eclipse.tractusx.irs.component.enums.ProcessStep; import org.eclipse.tractusx.irs.edc.client.EdcSubmodelFacade; @@ -54,6 +64,9 @@ import org.eclipse.tractusx.irs.registryclient.discovery.ConnectorEndpointsService; import org.eclipse.tractusx.irs.util.JsonUtil; import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; class RelationshipDelegateTest { @@ -69,13 +82,14 @@ void shouldFillItemContainerWithRelationshipAndAddChildIdsToProcess() // given final String payload = Files.readString( Paths.get(Objects.requireNonNull(getClass().getResource("/singleLevelBomAsBuilt.json")).toURI())); - when(submodelFacade.getSubmodelPayload(anyString(), anyString(), anyString(), any())).thenReturn(new SubmodelDescriptor("cid", payload)); + when(submodelFacade.getSubmodelPayload(anyString(), anyString(), anyString(), any())).thenReturn( + new SubmodelDescriptor("cid", payload)); when(connectorEndpointsService.fetchConnectorEndpoints(any())).thenReturn(List.of("http://localhost")); final ItemContainer.ItemContainerBuilder itemContainerWithShell = ItemContainer.builder() .shell(shell("", shellDescriptor( List.of(submodelDescriptorWithDspEndpoint( - singleLevelBomAsBuiltAspectName, + SINGLE_LEVEL_BOM_AS_BUILT_3_0_0, "address"))))); final AASTransferProcess aasTransferProcess = new AASTransferProcess(); @@ -96,13 +110,14 @@ void shouldFillItemContainerWithUpwardRelationshipAndAddChildIdsToProcess() // given final String payload = Files.readString( Paths.get(Objects.requireNonNull(getClass().getResource("/singleLevelUsageAsBuilt.json")).toURI())); - when(submodelFacade.getSubmodelPayload(anyString(), anyString(), anyString(), any())).thenReturn(new SubmodelDescriptor("cid", payload)); + when(submodelFacade.getSubmodelPayload(anyString(), anyString(), anyString(), any())).thenReturn( + new SubmodelDescriptor("cid", payload)); when(connectorEndpointsService.fetchConnectorEndpoints(any())).thenReturn(List.of("http://localhost")); final ItemContainer.ItemContainerBuilder itemContainerWithShell = ItemContainer.builder() .shell(shell("", shellDescriptor( List.of(submodelDescriptorWithDspEndpoint( - singleLevelUsageAsBuiltAspectName, + SINGLE_LEVEL_USAGE_AS_BUILT_2_0_0, "address"))))); final AASTransferProcess aasTransferProcess = new AASTransferProcess(); @@ -118,12 +133,135 @@ void shouldFillItemContainerWithUpwardRelationshipAndAddChildIdsToProcess() assertThat(aasTransferProcess.getIdsToProcess().get(0).getBpn()).isNotEmpty(); } + @Test + void shouldFillItemContainerWithUpwardAsPlannedRelationshipAndAddChildIdsToProcess() + throws EdcClientException, URISyntaxException, IOException { + // given + final String payload = Files.readString(Paths.get( + Objects.requireNonNull(getClass().getResource("/relationships/singleLevelUsageAsPlanned-2.0.0.json")) + .toURI())); + when(submodelFacade.getSubmodelPayload(anyString(), anyString(), anyString(), any())).thenReturn( + new SubmodelDescriptor("cid", payload)); + when(connectorEndpointsService.fetchConnectorEndpoints(any())).thenReturn(List.of("http://localhost")); + + final ItemContainer.ItemContainerBuilder itemContainerWithShell = ItemContainer.builder() + .shell(shell("", shellDescriptor( + List.of(submodelDescriptorWithDspEndpoint( + SINGLE_LEVEL_USAGE_AS_PLANNED_2_0_0, + "address"))))); + final AASTransferProcess aasTransferProcess = new AASTransferProcess(); + + // when + final ItemContainer result = relationshipDelegate.process(itemContainerWithShell, jobParameterUpwardAsPlanned(), + aasTransferProcess, createKey()); + + // then + assertThat(result).isNotNull(); + assertThat(result.getRelationships()).isNotEmpty(); + assertThat(aasTransferProcess.getIdsToProcess()).isNotEmpty(); + assertThat(aasTransferProcess.getIdsToProcess().get(0).getGlobalAssetId()).isNotEmpty(); + assertThat(aasTransferProcess.getIdsToProcess().get(0).getBpn()).isNotEmpty(); + } + + @ParameterizedTest + @MethodSource("relationshipParameters") + void shouldFillItemContainerWithSupportedRelationshipAndAddChildIdsToProcess(final String relationshipFile, + final String aspectName, final JobParameter jobParameter) throws Exception { + // given + final String payload = Files.readString(Paths.get( + Objects.requireNonNull(getClass().getResource("/relationships/" + relationshipFile)).toURI())); + when(submodelFacade.getSubmodelPayload(anyString(), anyString(), anyString(), any())).thenReturn( + new SubmodelDescriptor("cid", payload)); + when(connectorEndpointsService.fetchConnectorEndpoints(any())).thenReturn(List.of("http://localhost")); + + final ItemContainer.ItemContainerBuilder itemContainerWithShell = ItemContainer.builder() + .shell(shell("", shellDescriptor( + List.of(submodelDescriptorWithDspEndpoint( + aspectName, + "address"))))); + final AASTransferProcess aasTransferProcess = new AASTransferProcess(); + + // when + final ItemContainer result = relationshipDelegate.process(itemContainerWithShell, jobParameter, + aasTransferProcess, createKey()); + + // then + assertThat(result).isNotNull(); + assertThat(result.getRelationships()).isNotEmpty(); + assertThat(aasTransferProcess.getIdsToProcess()).isNotEmpty(); + assertThat(aasTransferProcess.getIdsToProcess().get(0).getGlobalAssetId()).isNotEmpty(); + assertThat(aasTransferProcess.getIdsToProcess().get(0).getBpn()).isNotEmpty(); + } + + private static Stream relationshipParameters() { + return Stream.of(Arguments.of("singleLevelUsageAsPlanned-2.0.0.json", SINGLE_LEVEL_USAGE_AS_PLANNED_2_0_0, + jobParameterUpwardAsPlanned()), + Arguments.of("singleLevelUsageAsBuilt-3.0.0.json", SINGLE_LEVEL_USAGE_AS_BUILT_2_0_0, + jobParameterUpward()), + Arguments.of("singleLevelBomAsBuilt-3.0.0.json", SINGLE_LEVEL_BOM_AS_BUILT_3_0_0, jobParameter()), + Arguments.of("singleLevelBomAsPlanned-3.0.0.json", SINGLE_LEVEL_BOM_AS_PLANNED_3_0_0, + jobParameterDownwardAsPlanned()) + // asSpecified currently has no field for BPN of the child part + // Arguments.of("singleLevelBomAsSpecified-2.0.0.json", SINGLE_LEVEL_BOM_AS_SPECIFIED_2_0_0, + // jobParameterDownwardAsSpecified()), + // Arguments.of("singleLevelBomAsSpecified-1.0.0.json", SINGLE_LEVEL_BOM_AS_SPECIFIED_1_0_0, + // jobParameterDownwardAsSpecified()) + ); + } + + @ParameterizedTest + @MethodSource("relationshipParametersFutureVersions") + void shouldFillItemContainerWithPotentialFutureMinorVersions(final String relationshipFile, final String aspectName, + final JobParameter jobParameter) throws Exception { + // given + final String payload = Files.readString(Paths.get( + Objects.requireNonNull(getClass().getResource("/relationships/futureVersions/" + relationshipFile)) + .toURI())); + when(submodelFacade.getSubmodelPayload(anyString(), anyString(), anyString(), any())).thenReturn( + new SubmodelDescriptor("cid", payload)); + when(connectorEndpointsService.fetchConnectorEndpoints(any())).thenReturn(List.of("http://localhost")); + + final ItemContainer.ItemContainerBuilder itemContainerWithShell = ItemContainer.builder() + .shell(shell("", shellDescriptor( + List.of(submodelDescriptorWithDspEndpoint( + aspectName, + "address"))))); + final AASTransferProcess aasTransferProcess = new AASTransferProcess(); + + // when + final ItemContainer result = relationshipDelegate.process(itemContainerWithShell, jobParameter, + aasTransferProcess, createKey()); + + // then + assertThat(result).isNotNull(); + assertThat(result.getRelationships()).isNotEmpty(); + assertThat(aasTransferProcess.getIdsToProcess()).isNotEmpty(); + assertThat(aasTransferProcess.getIdsToProcess().get(0).getGlobalAssetId()).isNotEmpty(); + assertThat(aasTransferProcess.getIdsToProcess().get(0).getBpn()).isNotEmpty(); + } + + public static Stream relationshipParametersFutureVersions() { + return Stream.of(Arguments.of("singleLevelUsageAsPlanned-2.1.0.json", SINGLE_LEVEL_USAGE_AS_PLANNED_2_1_0, + jobParameterUpwardAsPlanned()), + Arguments.of("singleLevelUsageAsBuilt-3.1.0.json", SINGLE_LEVEL_USAGE_AS_BUILT_2_1_0, + jobParameterUpward()), + Arguments.of("singleLevelBomAsBuilt-3.1.0.json", SINGLE_LEVEL_BOM_AS_BUILT_3_1_0, jobParameter()), + Arguments.of("singleLevelBomAsPlanned-3.1.0.json", SINGLE_LEVEL_BOM_AS_PLANNED_3_1_0, + jobParameterDownwardAsPlanned()) + // asSpecified currently has no field for BPN of the child part + // Arguments.of("singleLevelBomAsSpecified-2.1.0.json", SINGLE_LEVEL_BOM_AS_SPECIFIED_2_1_0, + // jobParameterDownwardAsSpecified()), + // Arguments.of("singleLevelBomAsSpecified-1.1.0.json", SINGLE_LEVEL_BOM_AS_SPECIFIED_1_1_0, + // jobParameterDownwardAsSpecified()) + ); + } + @Test void shouldPutTombstoneForMissingBpn() { final ItemContainer.ItemContainerBuilder itemContainerWithShell = ItemContainer.builder() .shell(shell("", shellDescriptor( List.of(submodelDescriptorWithDspEndpoint( - singleLevelBomAsBuiltAspectName, + SINGLE_LEVEL_BOM_AS_BUILT_3_0_0, "address"))))); // when final ItemContainer result = relationshipDelegate.process(itemContainerWithShell, jobParameter(), @@ -147,7 +285,7 @@ void shouldCatchRestClientExceptionAndPutTombstone() throws EdcClientException { final ItemContainer.ItemContainerBuilder itemContainerWithShell = ItemContainer.builder() .shell(shell("", shellDescriptor( List.of(submodelDescriptorWithDspEndpoint( - singleLevelBomAsBuiltAspectName, + SINGLE_LEVEL_BOM_AS_BUILT_3_0_0, "address"))))); // when @@ -171,7 +309,7 @@ void shouldCatchJsonParseExceptionAndPutTombstone() throws EdcClientException { final ItemContainer.ItemContainerBuilder itemContainerWithShell = ItemContainer.builder() .shell(shell("", shellDescriptor( List.of(submodelDescriptorWithDspEndpoint( - singleLevelBomAsBuiltAspectName, + SINGLE_LEVEL_BOM_AS_BUILT_3_0_0, "address"))))); // when @@ -193,11 +331,12 @@ void shouldCatchUsagePolicyExceptionAndPutTombstone() throws EdcClientException final ItemContainer.ItemContainerBuilder itemContainerWithShell = ItemContainer.builder() .shell(shell("", shellDescriptor( List.of(submodelDescriptorWithDspEndpoint( - singleLevelBomAsBuiltAspectName, + SINGLE_LEVEL_BOM_AS_BUILT_3_0_0, "address"))))); // when - when(submodelFacade.getSubmodelPayload(any(), any(), any(), any())).thenThrow(new UsagePolicyException("itemId", null, businessPartnerNumber)); + when(submodelFacade.getSubmodelPayload(any(), any(), any(), any())).thenThrow( + new UsagePolicyException("itemId", null, businessPartnerNumber)); when(connectorEndpointsService.fetchConnectorEndpoints(any())).thenReturn(List.of("connector.endpoint.nl")); final ItemContainer result = relationshipDelegate.process(itemContainerWithShell, jobParameter(), new AASTransferProcess(), createKey()); diff --git a/irs-api/src/test/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/SubmodelDelegateTest.java b/irs-api/src/test/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/SubmodelDelegateTest.java index b54b746d96..7db0d61905 100644 --- a/irs-api/src/test/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/SubmodelDelegateTest.java +++ b/irs-api/src/test/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/SubmodelDelegateTest.java @@ -26,10 +26,10 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.eclipse.tractusx.irs.util.TestMother.jobParameterCollectAspects; import static org.eclipse.tractusx.irs.util.TestMother.jobParameterFilter; -import static org.eclipse.tractusx.irs.util.TestMother.serialPartAspectName; +import static org.eclipse.tractusx.irs.util.TestMother.SERIAL_PART_3_0_0; import static org.eclipse.tractusx.irs.util.TestMother.shell; import static org.eclipse.tractusx.irs.util.TestMother.shellDescriptor; -import static org.eclipse.tractusx.irs.util.TestMother.singleLevelBomAsBuiltAspectName; +import static org.eclipse.tractusx.irs.util.TestMother.SINGLE_LEVEL_BOM_AS_BUILT_3_0_0; import static org.eclipse.tractusx.irs.util.TestMother.submodelDescriptor; import static org.eclipse.tractusx.irs.util.TestMother.submodelDescriptorWithDspEndpoint; import static org.mockito.ArgumentMatchers.any; @@ -73,10 +73,10 @@ void shouldNotFilterSubmodelDescriptorsByAspectTypeFilter() { final ItemContainer.ItemContainerBuilder itemContainerShellWithTwoSubmodels = ItemContainer.builder() .shell(shell("", shellDescriptor( List.of(submodelDescriptorWithDspEndpoint( - serialPartAspectName, + SERIAL_PART_3_0_0, "testSerialPartTypizationEndpoint"), submodelDescriptorWithDspEndpoint( - singleLevelBomAsBuiltAspectName, + SINGLE_LEVEL_BOM_AS_BUILT_3_0_0, "testAssemblyPartRelationshipEndpoint"))))); // when @@ -94,10 +94,10 @@ void shouldCatchJsonParseExceptionAndPutTombstone() throws SchemaNotFoundExcepti final ItemContainer.ItemContainerBuilder itemContainerShellWithTwoSubmodels = ItemContainer.builder() .shell(shell("", shellDescriptor( List.of(submodelDescriptorWithDspEndpoint( - serialPartAspectName, + SERIAL_PART_3_0_0, "testSerialPartEndpoint"), submodelDescriptorWithDspEndpoint( - singleLevelBomAsBuiltAspectName, + SINGLE_LEVEL_BOM_AS_BUILT_3_0_0, "testSingleLevelBomAsBuiltEndpoint"))))); // when @@ -119,10 +119,10 @@ void shouldPutTombstoneForMissingBpn() { final ItemContainer.ItemContainerBuilder itemContainerShellWithTwoSubmodels = ItemContainer.builder() .shell(shell("", shellDescriptor( List.of(submodelDescriptorWithDspEndpoint( - serialPartAspectName, + SERIAL_PART_3_0_0, "testSerialPartEndpoint"), submodelDescriptorWithDspEndpoint( - singleLevelBomAsBuiltAspectName, + SINGLE_LEVEL_BOM_AS_BUILT_3_0_0, "testSingleLevelBomAsBuiltEndpoint"))))); // when @@ -145,10 +145,10 @@ void shouldCatchUsagePolicyExceptionAndPutTombstone() throws EdcClientException final ItemContainer.ItemContainerBuilder itemContainerShellWithTwoSubmodels = ItemContainer.builder() .shell(shell("", shellDescriptor( List.of(submodelDescriptorWithDspEndpoint( - serialPartAspectName, + SERIAL_PART_3_0_0, "testSerialPartEndpoint"), submodelDescriptorWithDspEndpoint( - singleLevelBomAsBuiltAspectName, + SINGLE_LEVEL_BOM_AS_BUILT_3_0_0, "testSingleLevelBomAsBuiltEndpoint"))))); // when @@ -172,7 +172,7 @@ void shouldRequestForAllEndpoints() throws EdcClientException, InvalidSchemaExce final ItemContainer.ItemContainerBuilder itemContainerShellWithOneSubmodel = ItemContainer.builder() .shell(shell("", shellDescriptor( List.of(submodelDescriptor( - serialPartAspectName, + SERIAL_PART_3_0_0, "testSerialPartEndpoint", ""))))); @@ -190,7 +190,7 @@ void shouldRequestForAllEndpoints() throws EdcClientException, InvalidSchemaExce // then assertThat(result).isNotNull(); assertThat(result.getSubmodels()).hasSize(1); - assertThat(result.getSubmodels().get(0).getAspectType()).isEqualTo(serialPartAspectName); + assertThat(result.getSubmodels().get(0).getAspectType()).isEqualTo(SERIAL_PART_3_0_0); assertThat(result.getSubmodels().get(0).getContractAgreementId()).isNull(); assertThat(result.getTombstones()).isEmpty(); } @@ -201,10 +201,10 @@ void shouldCatchRestClientExceptionAndPutTombstone() throws SchemaNotFoundExcept final ItemContainer.ItemContainerBuilder itemContainerShellWithTwoSubmodels = ItemContainer.builder() .shell(shell("", shellDescriptor( List.of(submodelDescriptorWithDspEndpoint( - serialPartAspectName, + SERIAL_PART_3_0_0, "testSerialPartEndpoint"), submodelDescriptorWithDspEndpoint( - singleLevelBomAsBuiltAspectName, + SINGLE_LEVEL_BOM_AS_BUILT_3_0_0, "testSingleLevelBomAsBuiltEndpoint"))))); // when diff --git a/irs-api/src/test/java/org/eclipse/tractusx/irs/component/assetadministrationshell/AssetAdministrationShellDescriptorTest.java b/irs-api/src/test/java/org/eclipse/tractusx/irs/component/assetadministrationshell/AssetAdministrationShellDescriptorTest.java index 668cce01e4..d20aa6a568 100644 --- a/irs-api/src/test/java/org/eclipse/tractusx/irs/component/assetadministrationshell/AssetAdministrationShellDescriptorTest.java +++ b/irs-api/src/test/java/org/eclipse/tractusx/irs/component/assetadministrationshell/AssetAdministrationShellDescriptorTest.java @@ -24,9 +24,9 @@ package org.eclipse.tractusx.irs.component.assetadministrationshell; import static org.assertj.core.api.Assertions.assertThat; -import static org.eclipse.tractusx.irs.util.TestMother.serialPartAspectName; +import static org.eclipse.tractusx.irs.util.TestMother.SERIAL_PART_3_0_0; import static org.eclipse.tractusx.irs.util.TestMother.shellDescriptor; -import static org.eclipse.tractusx.irs.util.TestMother.singleLevelBomAsBuiltAspectName; +import static org.eclipse.tractusx.irs.util.TestMother.SINGLE_LEVEL_BOM_AS_BUILT_3_0_0; import static org.eclipse.tractusx.irs.util.TestMother.submodelDescriptorWithoutHref; import java.util.List; @@ -42,7 +42,7 @@ class AssetAdministrationShellDescriptorTest { void shouldFilterByAspectTypeWhenEndingWithAspectName() { // Arrange final AssetAdministrationShellDescriptor shellDescriptor = shellDescriptor( - List.of(submodelDescriptorWithoutHref(singleLevelBomAsBuiltAspectName))); + List.of(submodelDescriptorWithoutHref(SINGLE_LEVEL_BOM_AS_BUILT_3_0_0))); final List aspectTypeFilter = List.of("SingleLevelBomAsBuilt"); // Act @@ -50,7 +50,7 @@ void shouldFilterByAspectTypeWhenEndingWithAspectName() { // Assert assertThat(result).hasSize(1); - assertThat(result.get(0).getSemanticId().getKeys().get(0).getValue()).isEqualTo(singleLevelBomAsBuiltAspectName); + assertThat(result.get(0).getSemanticId().getKeys().get(0).getValue()).isEqualTo(SINGLE_LEVEL_BOM_AS_BUILT_3_0_0); } @Test @@ -72,7 +72,7 @@ void shouldFilterByAspectTypeWhenNotEndingWithAspectName() { void shouldFilterByAspectTypeWhenWithDifferentAspects() { // Arrange final AssetAdministrationShellDescriptor shellDescriptor = shellDescriptor( - List.of(submodelDescriptorWithoutHref(serialPartAspectName), + List.of(submodelDescriptorWithoutHref(SERIAL_PART_3_0_0), submodelDescriptorWithoutHref(singleLevelBomAsBuiltId))); final List aspectTypeFilter = List.of("SerialPart"); @@ -82,26 +82,25 @@ void shouldFilterByAspectTypeWhenWithDifferentAspects() { // Assert assertThat(result).hasSize(1); - assertThat(result.get(0).getSemanticId().getKeys().get(0).getValue()).isEqualTo(serialPartAspectName); + assertThat(result.get(0).getSemanticId().getKeys().get(0).getValue()).isEqualTo(SERIAL_PART_3_0_0); } @Test void shouldFilterByAspectTypeForUrnFormat() { // Arrange final AssetAdministrationShellDescriptor shellDescriptor = shellDescriptor( - List.of(submodelDescriptorWithoutHref(serialPartAspectName), - submodelDescriptorWithoutHref(singleLevelBomAsBuiltAspectName))); + List.of(submodelDescriptorWithoutHref(SERIAL_PART_3_0_0), + submodelDescriptorWithoutHref(SINGLE_LEVEL_BOM_AS_BUILT_3_0_0))); - final List aspectTypeFilter = List.of(serialPartAspectName, - singleLevelBomAsBuiltAspectName); + final List aspectTypeFilter = List.of(SERIAL_PART_3_0_0, SINGLE_LEVEL_BOM_AS_BUILT_3_0_0); // Act final List result = shellDescriptor.filterDescriptorsByAspectTypes(aspectTypeFilter); // Assert assertThat(result).hasSize(2); - assertThat(result.get(0).getSemanticId().getKeys().get(0).getValue()).isEqualTo(serialPartAspectName); - assertThat(result.get(1).getSemanticId().getKeys().get(0).getValue()).isEqualTo(singleLevelBomAsBuiltAspectName); + assertThat(result.get(0).getSemanticId().getKeys().get(0).getValue()).isEqualTo(SERIAL_PART_3_0_0); + assertThat(result.get(1).getSemanticId().getKeys().get(0).getValue()).isEqualTo(SINGLE_LEVEL_BOM_AS_BUILT_3_0_0); } } \ No newline at end of file diff --git a/irs-api/src/test/java/org/eclipse/tractusx/irs/services/IrsItemGraphQueryServiceSpringBootTest.java b/irs-api/src/test/java/org/eclipse/tractusx/irs/services/IrsItemGraphQueryServiceSpringBootTest.java index 7bff9ff55f..23ceeec89c 100644 --- a/irs-api/src/test/java/org/eclipse/tractusx/irs/services/IrsItemGraphQueryServiceSpringBootTest.java +++ b/irs-api/src/test/java/org/eclipse/tractusx/irs/services/IrsItemGraphQueryServiceSpringBootTest.java @@ -26,14 +26,14 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.awaitility.Awaitility.given; import static org.eclipse.tractusx.irs.util.TestMother.EXISTING_GLOBAL_ASSET_ID; -import static org.eclipse.tractusx.irs.util.TestMother.productDescriptionAspectName; +import static org.eclipse.tractusx.irs.util.TestMother.PRODUCT_DESCRIPTION_1_0_1; import static org.eclipse.tractusx.irs.util.TestMother.registerJob; import static org.eclipse.tractusx.irs.util.TestMother.registerJobWithDepthAndAspect; import static org.eclipse.tractusx.irs.util.TestMother.registerJobWithDepthAndAspectAndCollectAspects; import static org.eclipse.tractusx.irs.util.TestMother.registerJobWithDirection; import static org.eclipse.tractusx.irs.util.TestMother.registerJobWithoutDepth; -import static org.eclipse.tractusx.irs.util.TestMother.serialPartAspectName; -import static org.eclipse.tractusx.irs.util.TestMother.singleLevelBomAsBuiltAspectName; +import static org.eclipse.tractusx.irs.util.TestMother.SERIAL_PART_3_0_0; +import static org.eclipse.tractusx.irs.util.TestMother.SINGLE_LEVEL_BOM_AS_BUILT_3_0_0; import static org.hamcrest.Matchers.greaterThan; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.ArgumentMatchers.any; @@ -105,9 +105,9 @@ class IrsItemGraphQueryServiceSpringBootTest { @BeforeEach void setUp() throws SchemaNotFoundException { final List models = List.of( - getAspectModel(AspectType.SERIAL_PART.toString(), serialPartAspectName), - getAspectModel(AspectType.PRODUCT_DESCRIPTION.toString(), productDescriptionAspectName), - getAspectModel(AspectType.SINGLE_LEVEL_BOM_AS_BUILT.toString(), singleLevelBomAsBuiltAspectName)); + getAspectModel(AspectType.SERIAL_PART.toString(), SERIAL_PART_3_0_0), + getAspectModel(AspectType.PRODUCT_DESCRIPTION.toString(), PRODUCT_DESCRIPTION_1_0_1), + getAspectModel(AspectType.SINGLE_LEVEL_BOM_AS_BUILT.toString(), SINGLE_LEVEL_BOM_AS_BUILT_3_0_0)); final AspectModels aspectModels = new AspectModels(models, "2023-02-13T08:18:11.990659500Z"); when(semanticsHubFacade.getAllAspectModels()).thenReturn(aspectModels); } @@ -136,7 +136,7 @@ void registerJobWithCollectAspectsShouldIncludeSubmodels() throws InvalidSchemaE when(connectorEndpointsService.fetchConnectorEndpoints(any())).thenReturn( List.of("https://connector.endpoint.nl")); final RegisterJob registerJob = registerJob(EXISTING_GLOBAL_ASSET_ID, 100, - List.of(serialPartAspectName, productDescriptionAspectName, singleLevelBomAsBuiltAspectName), + List.of(SERIAL_PART_3_0_0, PRODUCT_DESCRIPTION_1_0_1, SINGLE_LEVEL_BOM_AS_BUILT_3_0_0), true, false, Direction.DOWNWARD); when(connectorEndpointsService.fetchConnectorEndpoints(registerJob.getKey().getBpn())).thenReturn( List.of("singleLevelBomAsBuilt")); @@ -159,7 +159,7 @@ void registerJobShouldCreateTombstonesWhenNotPassingJsonSchemaValidation() throw List.of("https://connector.endpoint.nl")); final RegisterJob registerJob = registerJobWithDepthAndAspectAndCollectAspects(3, - List.of(singleLevelBomAsBuiltAspectName)); + List.of(SINGLE_LEVEL_BOM_AS_BUILT_3_0_0)); when(connectorEndpointsService.fetchConnectorEndpoints(registerJob.getKey().getBpn())).thenReturn( List.of("singleLevelBomAsBuilt")); @@ -260,13 +260,23 @@ void registerJobWithoutAspectsShouldUseDefault() { } @Test - void shouldThrowIllegalArgumentExceptionForLifecycleAsPlannedAndDirectionUpward() { - final RegisterJob registerJob = new RegisterJob(); - registerJob.setKey(PartChainIdentificationKey.builder().globalAssetId(UUID.randomUUID().toString()).build()); - registerJob.setDirection(Direction.UPWARD); + void registerJobWithUpwardDirectionAsPlannedShouldBuildRelationships() { + // given + final RegisterJob registerJob = registerJobWithDirection("urn:uuid:e5c96ab5-896a-482c-8761-efd74777ca97", + Direction.UPWARD); registerJob.setBomLifecycle(BomLifecycle.AS_PLANNED); - assertThrows(IllegalArgumentException.class, () -> service.registerItemJob(registerJob)); + when(connectorEndpointsService.fetchConnectorEndpoints(any())).thenReturn( + List.of("http://localhost/discovery")); + + // when + final JobHandle registeredJob = service.registerItemJob(registerJob); + + // then + given().ignoreException(ResponseStatusException.class) + .await() + .atMost(5, TimeUnit.SECONDS) + .until(() -> getRelationshipsSize(registeredJob.getId()), greaterThan(0)); } @Test diff --git a/irs-api/src/test/java/org/eclipse/tractusx/irs/util/TestMother.java b/irs-api/src/test/java/org/eclipse/tractusx/irs/util/TestMother.java index 179e8b2d31..4d15d933a6 100644 --- a/irs-api/src/test/java/org/eclipse/tractusx/irs/util/TestMother.java +++ b/irs-api/src/test/java/org/eclipse/tractusx/irs/util/TestMother.java @@ -60,7 +60,7 @@ import org.eclipse.tractusx.irs.connector.job.ResponseStatus; import org.eclipse.tractusx.irs.connector.job.TransferInitiateResponse; import org.eclipse.tractusx.irs.connector.job.TransferProcess; -import org.eclipse.tractusx.irs.edc.client.RelationshipAspect; +import org.eclipse.tractusx.irs.edc.client.relationships.RelationshipAspect; import org.eclipse.tractusx.irs.services.MeterRegistryService; /** @@ -71,12 +71,23 @@ */ public class TestMother { - public static final String singleLevelBomAsBuiltAspectName = "urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt"; - public static final String singleLevelUsageAsBuiltAspectName = "urn:samm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt"; - public static final String serialPartAspectName = "urn:samm:io.catenax.serial_part:3.0.0#SerialPart"; - public static final String batchAspectName = "urn:samm:io.catenax.batch:3.0.0#Batch"; - public static final String materialForRecyclingAspectName = "urn:samm:io.catenax.material_for_recycling:1.1.0#MaterialForRecycling"; - public static final String productDescriptionAspectName = "urn:samm:io.catenax.battery.product_description:1.0.1#ProductDescription"; + public static final String SINGLE_LEVEL_BOM_AS_BUILT_3_0_0 = "urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt"; + public static final String SINGLE_LEVEL_USAGE_AS_BUILT_2_0_0 = "urn:samm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt"; + public static final String SERIAL_PART_3_0_0 = "urn:samm:io.catenax.serial_part:3.0.0#SerialPart"; + public static final String PART_AS_SPECIFIED_3_0_0 = "urn:samm:io.catenax.part_as_specified:3.0.0#PartAsSpecified"; + public static final String BATCH_3_0_0 = "urn:samm:io.catenax.batch:3.0.0#Batch"; + public static final String MATERIAL_FOR_RECYCLING_1_1_0 = "urn:samm:io.catenax.material_for_recycling:1.1.0#MaterialForRecycling"; + public static final String PRODUCT_DESCRIPTION_1_0_1 = "urn:samm:io.catenax.battery.product_description:1.0.1#ProductDescription"; + public static final String SINGLE_LEVEL_USAGE_AS_PLANNED_2_0_0 = "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned"; + public static final String SINGLE_LEVEL_BOM_AS_PLANNED_3_0_0 = "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsPlanned"; + public static final String SINGLE_LEVEL_BOM_AS_SPECIFIED_2_0_0 = "urn:samm:io.catenax.single_level_bom_as_specified:2.0.0#SingleLevelBomAsSpecified"; + public static final String SINGLE_LEVEL_BOM_AS_SPECIFIED_1_0_0 = "urn:samm:io.catenax.single_level_bom_as_specified:1.0.0#SingleLevelBomAsSpecified"; + public static final String SINGLE_LEVEL_USAGE_AS_PLANNED_2_1_0 = "urn:samm:io.catenax.single_level_usage_as_planned:2.1.0#SingleLevelUsageAsPlanned"; + public static final String SINGLE_LEVEL_BOM_AS_PLANNED_3_1_0 = "urn:samm:io.catenax.single_level_bom_as_planned:3.1.0#SingleLevelBomAsPlanned"; + public static final String SINGLE_LEVEL_BOM_AS_SPECIFIED_2_1_0 = "urn:samm:io.catenax.single_level_bom_as_specified:2.1.0#SingleLevelBomAsSpecified"; + public static final String SINGLE_LEVEL_BOM_AS_SPECIFIED_1_1_0 = "urn:samm:io.catenax.single_level_bom_as_specified:1.1.0#SingleLevelBomAsSpecified"; + public static final String SINGLE_LEVEL_BOM_AS_BUILT_3_1_0 = "urn:samm:io.catenax.single_level_bom_as_built:3.1.0#SingleLevelBomAsBuilt"; + public static final String SINGLE_LEVEL_USAGE_AS_BUILT_2_1_0 = "urn:samm:io.catenax.single_level_usage_as_built:2.1.0#SingleLevelUsageAsBuilt"; public static final String EXISTING_GLOBAL_ASSET_ID = "urn:uuid:5e1908ed-e176-4f57-9616-1415097d0fdf"; @@ -87,7 +98,7 @@ public static RegisterJob registerJobWithoutDepthAndAspect() { } public static RegisterJob registerJobWithoutDepth() { - return registerJobWithDepthAndAspect(null, List.of(singleLevelBomAsBuiltAspectName)); + return registerJobWithDepthAndAspect(null, List.of(SINGLE_LEVEL_BOM_AS_BUILT_3_0_0)); } public static RegisterJob registerJobWithDepthAndAspect(final Integer depth, final List aspectTypes) { @@ -156,7 +167,7 @@ public static JobParameter jobParameter() { .depth(5) .bomLifecycle(BomLifecycle.AS_BUILT) .direction(Direction.DOWNWARD) - .aspects(List.of(serialPartAspectName, singleLevelBomAsBuiltAspectName)) + .aspects(List.of(SERIAL_PART_3_0_0, SINGLE_LEVEL_BOM_AS_BUILT_3_0_0)) .auditContractNegotiation(false) .build(); } @@ -166,7 +177,34 @@ public static JobParameter jobParameterUpward() { .depth(0) .bomLifecycle(BomLifecycle.AS_BUILT) .direction(Direction.UPWARD) - .aspects(List.of(serialPartAspectName, singleLevelBomAsBuiltAspectName)) + .aspects(List.of(SERIAL_PART_3_0_0, SINGLE_LEVEL_USAGE_AS_BUILT_2_0_0)) + .build(); + } + + public static JobParameter jobParameterUpwardAsPlanned() { + return JobParameter.builder() + .depth(0) + .bomLifecycle(BomLifecycle.AS_PLANNED) + .direction(Direction.UPWARD) + .aspects(List.of(SERIAL_PART_3_0_0, SINGLE_LEVEL_USAGE_AS_PLANNED_2_0_0)) + .build(); + } + + public static JobParameter jobParameterDownwardAsPlanned() { + return JobParameter.builder() + .depth(0) + .bomLifecycle(BomLifecycle.AS_PLANNED) + .direction(Direction.DOWNWARD) + .aspects(List.of(SERIAL_PART_3_0_0, SINGLE_LEVEL_BOM_AS_PLANNED_3_0_0)) + .build(); + } + + public static JobParameter jobParameterDownwardAsSpecified() { + return JobParameter.builder() + .depth(0) + .bomLifecycle(BomLifecycle.AS_SPECIFIED) + .direction(Direction.DOWNWARD) + .aspects(List.of(PART_AS_SPECIFIED_3_0_0, SINGLE_LEVEL_BOM_AS_SPECIFIED_2_0_0)) .build(); } @@ -174,7 +212,7 @@ public static JobParameter jobParameterCollectAspects() { return JobParameter.builder() .depth(0) .bomLifecycle(BomLifecycle.AS_BUILT) - .aspects(List.of(serialPartAspectName, singleLevelBomAsBuiltAspectName)) + .aspects(List.of(SERIAL_PART_3_0_0, SINGLE_LEVEL_BOM_AS_BUILT_3_0_0)) .collectAspects(true) .build(); } @@ -183,7 +221,7 @@ public static JobParameter jobParameterFilter() { return JobParameter.builder() .depth(0) .bomLifecycle(BomLifecycle.AS_BUILT) - .aspects(List.of(materialForRecyclingAspectName)) + .aspects(List.of(MATERIAL_FOR_RECYCLING_1_1_0)) .build(); } @@ -192,7 +230,7 @@ public static JobParameter jobParameterAuditContractNegotiation() { .depth(5) .bomLifecycle(BomLifecycle.AS_BUILT) .direction(Direction.DOWNWARD) - .aspects(List.of(serialPartAspectName, singleLevelBomAsBuiltAspectName)) + .aspects(List.of(SERIAL_PART_3_0_0, SINGLE_LEVEL_BOM_AS_BUILT_3_0_0)) .auditContractNegotiation(true) .build(); } diff --git a/irs-api/src/test/resources/relationships/futureVersions/singleLevelBomAsBuilt-3.1.0.json b/irs-api/src/test/resources/relationships/futureVersions/singleLevelBomAsBuilt-3.1.0.json new file mode 100644 index 0000000000..4864119838 --- /dev/null +++ b/irs-api/src/test/resources/relationships/futureVersions/singleLevelBomAsBuilt-3.1.0.json @@ -0,0 +1,17 @@ +{ + "catenaXId": "urn:uuid:055c1128-0375-47c8-98de-7cf802c3241d", + "childItems": [ + { + "catenaXId": "urn:uuid:cc6a703e-ab0e-417c-9605-c9c70e33a47c", + "quantity": { + "value": 20.0, + "unit": "unit:piece" + }, + "hasAlternatives": false, + "createdOn": "2022-02-03T14:48:54.709Z", + "businessPartner": "BPNL50096894aNXY", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "futureAddedField": "test" + } + ] +} \ No newline at end of file diff --git a/irs-api/src/test/resources/relationships/futureVersions/singleLevelBomAsPlanned-3.1.0.json b/irs-api/src/test/resources/relationships/futureVersions/singleLevelBomAsPlanned-3.1.0.json new file mode 100644 index 0000000000..5863ce4bc8 --- /dev/null +++ b/irs-api/src/test/resources/relationships/futureVersions/singleLevelBomAsPlanned-3.1.0.json @@ -0,0 +1,20 @@ +{ + "catenaXId": "urn:uuid:055c1128-0375-47c8-98de-7cf802c3241d", + "childItems": [ + { + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId": "urn:uuid:cc6a703e-ab0e-417c-9605-c9c70e33a47c", + "quantity": { + "value": 20.0, + "unit": "unit:piece" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "businessPartner": "BPNL50096894aNXY", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "futureAddedField": "test" + } + ] +} \ No newline at end of file diff --git a/irs-api/src/test/resources/relationships/futureVersions/singleLevelBomAsSpecified-1.1.0.json b/irs-api/src/test/resources/relationships/futureVersions/singleLevelBomAsSpecified-1.1.0.json new file mode 100644 index 0000000000..21f9353986 --- /dev/null +++ b/irs-api/src/test/resources/relationships/futureVersions/singleLevelBomAsSpecified-1.1.0.json @@ -0,0 +1,29 @@ +{ + "catenaXId": "urn:uuid:055c1128-0375-47c8-98de-7cf802c3241d", + "childParts": [ + { + "childPartsCategory": "e.g. vehicle, winter wheels, bicycle rack", + "part": [ + { + "ownerPartId": "uuid!", + "partVersion": "05", + "partQuantity": { + "quantityNumber": 350.0, + "measurementUnit": "kW" + }, + "partDescription": "The steering wheel is nice and round", + "partClassification": [ + { + "value": "STEEWHL", + "key": "BMW:PartFamily" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "childCatenaXId": "urn:uuid:218b26f4-4a0b-4a7f-b2c1-d248927718bf", + "futureAddedField": "test" + } + ] +} \ No newline at end of file diff --git a/irs-api/src/test/resources/relationships/futureVersions/singleLevelBomAsSpecified-2.1.0.json b/irs-api/src/test/resources/relationships/futureVersions/singleLevelBomAsSpecified-2.1.0.json new file mode 100644 index 0000000000..4dabc16c6e --- /dev/null +++ b/irs-api/src/test/resources/relationships/futureVersions/singleLevelBomAsSpecified-2.1.0.json @@ -0,0 +1,31 @@ +{ + "manufacturerId": "BPNL1234567890LR", + "assetId": "urn:uuid:055c1128-0375-47c8-98de-7cf802c3241d", + "childItems": [ + { + "childItemCategory": "e.g. vehicle, winter wheels, bicycle rack", + "item": [ + { + "itemClassification": [ + { + "value": "STEEWHL", + "key": "BMW:PartFamily" + } + ], + "itemQuantity": { + "quantityNumber": 350.0, + "measurementUnit": "unit:kW" + }, + "ownerItemId": "urn:uuid:b4741433-92bb-4027-9a02-bbc64a58d193", + "itemVersion": "05", + "itemDescription": "The steering wheel is nice and round", + "createdOn": "2022-02-03T14:48:54.709Z", + "itemPositioning": "left", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "childassetId": "urn:uuid:218b26f4-4a0b-4a7f-b2c1-d248927718bf", + "futureAddedField": "test" + } + ] +} \ No newline at end of file diff --git a/irs-api/src/test/resources/relationships/futureVersions/singleLevelUsageAsBuilt-3.1.0.json b/irs-api/src/test/resources/relationships/futureVersions/singleLevelUsageAsBuilt-3.1.0.json new file mode 100644 index 0000000000..5ecf3b10f5 --- /dev/null +++ b/irs-api/src/test/resources/relationships/futureVersions/singleLevelUsageAsBuilt-3.1.0.json @@ -0,0 +1,20 @@ +{ + "catenaXId": "urn:uuid:055c1128-0375-47c8-98de-7cf802c3241d", + "parentItems": [ + { + "catenaXId": "urn:uuid:cc6a703e-ab0e-417c-9605-c9c70e33a47c", + "isOnlyPotentialParent": false, + "quantity": { + "value": 20.0, + "unit": "unit:piece" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "businessPartner": "BPNL50096894aNXY", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "futureAddedField": "test" + } + ], + "customers": [ + "BPNL50096894aNXY" + ] +} \ No newline at end of file diff --git a/irs-api/src/test/resources/relationships/futureVersions/singleLevelUsageAsPlanned-2.1.0.json b/irs-api/src/test/resources/relationships/futureVersions/singleLevelUsageAsPlanned-2.1.0.json new file mode 100644 index 0000000000..ec3c3e8045 --- /dev/null +++ b/irs-api/src/test/resources/relationships/futureVersions/singleLevelUsageAsPlanned-2.1.0.json @@ -0,0 +1,23 @@ +{ + "catenaXId": "urn:uuid:055c1128-0375-47c8-98de-7cf802c3241d", + "parentItems": [ + { + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId": "urn:uuid:56319907-28dc-440e-afcc-72d67ad343e7", + "quantity": { + "value": 20.0, + "unit": "unit:piece" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "businessPartner": "BPNL50096894aNXY", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "futureAddedField": "test" + } + ], + "customers": [ + "BPNL50096894aNXY" + ] +} \ No newline at end of file diff --git a/irs-api/src/test/resources/relationships/singleLevelBomAsBuilt-3.0.0.json b/irs-api/src/test/resources/relationships/singleLevelBomAsBuilt-3.0.0.json new file mode 100644 index 0000000000..2669eedaa6 --- /dev/null +++ b/irs-api/src/test/resources/relationships/singleLevelBomAsBuilt-3.0.0.json @@ -0,0 +1,16 @@ +{ + "catenaXId": "urn:uuid:055c1128-0375-47c8-98de-7cf802c3241d", + "childItems": [ + { + "catenaXId": "urn:uuid:cc6a703e-ab0e-417c-9605-c9c70e33a47c", + "quantity": { + "value": 20.0, + "unit": "unit:piece" + }, + "hasAlternatives": false, + "createdOn": "2022-02-03T14:48:54.709Z", + "businessPartner": "BPNL50096894aNXY", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] +} \ No newline at end of file diff --git a/irs-api/src/test/resources/relationships/singleLevelBomAsPlanned-3.0.0.json b/irs-api/src/test/resources/relationships/singleLevelBomAsPlanned-3.0.0.json new file mode 100644 index 0000000000..56a32ba21e --- /dev/null +++ b/irs-api/src/test/resources/relationships/singleLevelBomAsPlanned-3.0.0.json @@ -0,0 +1,19 @@ +{ + "catenaXId": "urn:uuid:055c1128-0375-47c8-98de-7cf802c3241d", + "childItems": [ + { + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId": "urn:uuid:cc6a703e-ab0e-417c-9605-c9c70e33a47c", + "quantity": { + "value": 20.0, + "unit": "unit:piece" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "businessPartner": "BPNL50096894aNXY", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] +} \ No newline at end of file diff --git a/irs-api/src/test/resources/relationships/singleLevelBomAsSpecified-1.0.0.json b/irs-api/src/test/resources/relationships/singleLevelBomAsSpecified-1.0.0.json new file mode 100644 index 0000000000..72d0a3872d --- /dev/null +++ b/irs-api/src/test/resources/relationships/singleLevelBomAsSpecified-1.0.0.json @@ -0,0 +1,28 @@ +{ + "catenaXId": "urn:uuid:055c1128-0375-47c8-98de-7cf802c3241d", + "childParts": [ + { + "childPartsCategory": "e.g. vehicle, winter wheels, bicycle rack", + "part": [ + { + "ownerPartId": "uuid!", + "partVersion": "05", + "partQuantity": { + "quantityNumber": 350.0, + "measurementUnit": "kW" + }, + "partDescription": "The steering wheel is nice and round", + "partClassification": [ + { + "value": "STEEWHL", + "key": "BMW:PartFamily" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "childCatenaXId": "urn:uuid:218b26f4-4a0b-4a7f-b2c1-d248927718bf " + } + ] +} \ No newline at end of file diff --git a/irs-api/src/test/resources/relationships/singleLevelBomAsSpecified-2.0.0.json b/irs-api/src/test/resources/relationships/singleLevelBomAsSpecified-2.0.0.json new file mode 100644 index 0000000000..4b0d4f0bce --- /dev/null +++ b/irs-api/src/test/resources/relationships/singleLevelBomAsSpecified-2.0.0.json @@ -0,0 +1,30 @@ +{ + "manufacturerId": "BPNL1234567890LR", + "assetId": "urn:uuid:055c1128-0375-47c8-98de-7cf802c3241d", + "childItems": [ + { + "childItemCategory": "e.g. vehicle, winter wheels, bicycle rack", + "item": [ + { + "itemClassification": [ + { + "value": "STEEWHL", + "key": "BMW:PartFamily" + } + ], + "itemQuantity": { + "quantityNumber": 350.0, + "measurementUnit": "unit:kW" + }, + "ownerItemId": "urn:uuid:b4741433-92bb-4027-9a02-bbc64a58d193", + "itemVersion": "05", + "itemDescription": "The steering wheel is nice and round", + "createdOn": "2022-02-03T14:48:54.709Z", + "itemPositioning": "left", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "childassetId": "urn:uuid:218b26f4-4a0b-4a7f-b2c1-d248927718bf " + } + ] +} \ No newline at end of file diff --git a/irs-api/src/test/resources/relationships/singleLevelUsageAsBuilt-3.0.0.json b/irs-api/src/test/resources/relationships/singleLevelUsageAsBuilt-3.0.0.json new file mode 100644 index 0000000000..8111efc79e --- /dev/null +++ b/irs-api/src/test/resources/relationships/singleLevelUsageAsBuilt-3.0.0.json @@ -0,0 +1,19 @@ +{ + "catenaXId": "urn:uuid:055c1128-0375-47c8-98de-7cf802c3241d", + "parentItems": [ + { + "catenaXId": "urn:uuid:cc6a703e-ab0e-417c-9605-c9c70e33a47c", + "isOnlyPotentialParent": false, + "quantity": { + "value": 20.0, + "unit": "unit:piece" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "businessPartner": "BPNL50096894aNXY", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "customers": [ + "BPNL50096894aNXY" + ] +} \ No newline at end of file diff --git a/irs-api/src/test/resources/relationships/singleLevelUsageAsPlanned-2.0.0.json b/irs-api/src/test/resources/relationships/singleLevelUsageAsPlanned-2.0.0.json new file mode 100644 index 0000000000..7c390c9269 --- /dev/null +++ b/irs-api/src/test/resources/relationships/singleLevelUsageAsPlanned-2.0.0.json @@ -0,0 +1,22 @@ +{ + "catenaXId": "urn:uuid:055c1128-0375-47c8-98de-7cf802c3241d", + "parentItems": [ + { + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId": "urn:uuid:56319907-28dc-440e-afcc-72d67ad343e7", + "quantity": { + "value": 20.0, + "unit": "unit:piece" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "businessPartner": "BPNL50096894aNXY", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "customers": [ + "BPNL50096894aNXY" + ] +} \ No newline at end of file diff --git a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/EdcSubmodelClientLocalStub.java b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/EdcSubmodelClientLocalStub.java index 9df5ed79fd..0f11ad86ee 100644 --- a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/EdcSubmodelClientLocalStub.java +++ b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/EdcSubmodelClientLocalStub.java @@ -37,6 +37,7 @@ import org.eclipse.tractusx.irs.edc.client.model.notification.EdcNotification; import org.eclipse.tractusx.irs.edc.client.model.notification.EdcNotificationResponse; import org.eclipse.tractusx.irs.edc.client.model.notification.NotificationContent; +import org.eclipse.tractusx.irs.edc.client.relationships.SubmodelTestdataCreator; /** * Submodel facade stub used in local environment diff --git a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/SingleLevelUsageAsBuilt.java b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/SingleLevelUsageAsBuilt.java deleted file mode 100644 index 3fa88b3e53..0000000000 --- a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/SingleLevelUsageAsBuilt.java +++ /dev/null @@ -1,124 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2022,2024 - * 2022: ZF Friedrichshafen AG - * 2022: ISTOS GmbH - * 2022,2024: Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * 2022,2023: BOSCH AG - * Copyright (c) 2021,2024 Contributors to the Eclipse Foundation - * - * See the NOTICE file(s) distributed with this work for additional - * information regarding copyright ownership. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ********************************************************************************/ -package org.eclipse.tractusx.irs.edc.client; - -import java.time.ZonedDateTime; -import java.util.Collection; -import java.util.List; -import java.util.Optional; -import java.util.Set; - -import com.fasterxml.jackson.annotation.JsonAlias; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; -import lombok.extern.jackson.Jacksonized; -import org.eclipse.tractusx.irs.component.GlobalAssetIdentification; -import org.eclipse.tractusx.irs.component.LinkedItem; -import org.eclipse.tractusx.irs.component.MeasurementUnit; -import org.eclipse.tractusx.irs.component.Relationship; -import org.eclipse.tractusx.irs.component.enums.AspectType; -import org.eclipse.tractusx.irs.component.enums.BomLifecycle; - -/** - * SingleLevelUsageAsBuilt - */ -@Data -@Builder -@Jacksonized -@AllArgsConstructor -@NoArgsConstructor -class SingleLevelUsageAsBuilt implements RelationshipSubmodel { - - private String catenaXId; - private Set parentItems; - private Set customers; - - @Override - public List asRelationships() { - return Optional.ofNullable(this.parentItems).stream().flatMap(Collection::stream) - .map(parentItem -> parentItem.toRelationship(this.catenaXId)) - .toList(); - } - - /** - * Customer - */ - @Data - @AllArgsConstructor - @NoArgsConstructor - /* package */ static class ParentItem { - - private String catenaXId; - private boolean isOnlyPotentialParent; - private Quantity quantity; - private String businessPartner; - private ZonedDateTime createdOn; - private ZonedDateTime lastModifiedOn; - - public Relationship toRelationship(final String catenaXId) { - final LinkedItem.LinkedItemBuilder linkedItem = LinkedItem.builder() - .childCatenaXId(GlobalAssetIdentification.of(catenaXId)) - .lifecycleContext(BomLifecycle.AS_BUILT) - .hasAlternatives(Boolean.FALSE) - .assembledOn(this.createdOn) - .lastModifiedOn(this.lastModifiedOn); - - if (thereIsQuantity()) { - linkedItem.quantity(org.eclipse.tractusx.irs.component.Quantity.builder() - .quantityNumber(this.quantity.getQuantityNumber()) - .measurementUnit(MeasurementUnit.builder() - .lexicalValue(this.quantity.getMeasurementUnit()) - .build()) - .build()); - } - - return Relationship.builder() - .catenaXId(GlobalAssetIdentification.of(this.catenaXId)) - .linkedItem(linkedItem.build()) - .bpn(businessPartner) - .aspectType(AspectType.SINGLE_LEVEL_USAGE_AS_BUILT.toString()) - .build(); - } - - private boolean thereIsQuantity() { - return this.quantity != null; - } - - /** - * Quantity - */ - @Data - @Jacksonized - /* package */ static class Quantity { - - @JsonAlias({ "quantityNumber", "value" }) - private Double quantityNumber; - @JsonAlias({ "measurementUnit", "unit" }) - private String measurementUnit; - - } - } -} diff --git a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/ParentItem.java b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/ParentItem.java new file mode 100644 index 0000000000..36f5fd102e --- /dev/null +++ b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/ParentItem.java @@ -0,0 +1,98 @@ +/******************************************************************************** + * Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * Copyright (c) 2021,2024 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ +package org.eclipse.tractusx.irs.edc.client.relationships; + +import java.time.ZonedDateTime; + +import com.fasterxml.jackson.annotation.JsonAlias; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.eclipse.tractusx.irs.component.GlobalAssetIdentification; +import org.eclipse.tractusx.irs.component.LinkedItem; +import org.eclipse.tractusx.irs.component.MeasurementUnit; +import org.eclipse.tractusx.irs.component.Relationship; +import org.eclipse.tractusx.irs.component.enums.AspectType; +import org.eclipse.tractusx.irs.component.enums.BomLifecycle; + +/** + * Customer + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +class ParentItem { + + private String catenaXId; + private Quantity quantity; + private String businessPartner; + private ZonedDateTime createdOn; + private ZonedDateTime lastModifiedOn; + + public Relationship toRelationship(final String catenaXId, final BomLifecycle bomLifecycle, + final AspectType aspectType) { + final LinkedItem.LinkedItemBuilder linkedItem = LinkedItem.builder() + .childCatenaXId( + GlobalAssetIdentification.of(catenaXId)) + .lifecycleContext(bomLifecycle) + .hasAlternatives(Boolean.FALSE) + .assembledOn(this.createdOn) + .lastModifiedOn(this.lastModifiedOn); + + if (thereIsQuantity()) { + linkedItem.quantity(org.eclipse.tractusx.irs.component.Quantity.builder() + .quantityNumber( + this.quantity.getQuantityNumber()) + .measurementUnit(MeasurementUnit.builder() + .lexicalValue( + this.quantity.getMeasurementUnit()) + .build()) + .build()); + } + + return Relationship.builder() + .catenaXId(GlobalAssetIdentification.of(this.catenaXId)) + .linkedItem(linkedItem.build()) + .bpn(businessPartner) + .aspectType(aspectType.toString()) + .build(); + } + + private boolean thereIsQuantity() { + return this.quantity != null; + } + + /** + * Quantity + */ + @Data + /* package */ static class Quantity { + + @JsonAlias({ "quantityNumber", + "value" + }) + private Double quantityNumber; + @JsonAlias({ "measurementUnit", + "unit" + }) + private String measurementUnit; + + } +} diff --git a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/RelationshipAspect.java b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/RelationshipAspect.java similarity index 83% rename from irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/RelationshipAspect.java rename to irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/RelationshipAspect.java index 04d793895c..8e5045542a 100644 --- a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/RelationshipAspect.java +++ b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/RelationshipAspect.java @@ -21,7 +21,7 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.irs.edc.client; +package org.eclipse.tractusx.irs.edc.client.relationships; import java.util.NoSuchElementException; import java.util.stream.Stream; @@ -31,6 +31,7 @@ import lombok.RequiredArgsConstructor; import org.eclipse.tractusx.irs.component.enums.BomLifecycle; import org.eclipse.tractusx.irs.component.enums.Direction; +import org.eclipse.tractusx.irs.edc.client.RelationshipSubmodel; /** * Relationship aspect types @@ -46,6 +47,8 @@ public enum RelationshipAspect { SINGLE_LEVEL_BOM_AS_SPECIFIED("SingleLevelBomAsSpecified", SingleLevelBomAsSpecified.class, BomLifecycle.AS_SPECIFIED, Direction.DOWNWARD), SINGLE_LEVEL_USAGE_AS_BUILT("SingleLevelUsageAsBuilt", SingleLevelUsageAsBuilt.class, BomLifecycle.AS_BUILT, + Direction.UPWARD), + SINGLE_LEVEL_USAGE_AS_PLANNED("SingleLevelUsageAsPlanned", SingleLevelUsageAsPlanned.class, BomLifecycle.AS_PLANNED, Direction.UPWARD); private final String name; @@ -54,14 +57,15 @@ public enum RelationshipAspect { private final Direction direction; /** + * asBuilt + downward => SingleLevelBomAsBuilt
+ * asPlanned + downward => SingleLevelBomAsPlanned
+ * asSpecified + downward => SingleLevelBomAsSpecified
+ * asBuilt + upward => SingleLevelUsageAsBuilt
+ * asPlanned + upward => SingleLevelUsageAsPlanned + * * @param bomLifecycle lifecycle * @param direction direction * @return Returns traversal aspect type - * asBuilt + downward => SingleLevelBomAsBuilt - * asPlanned + downward => SingleLevelBomAsPlanned - * asSpecified + downward => SingleLevelBomAsSpecified - * asBuilt + upward => SingleLevelUsageAsBuilt - * asPlanned + upward => SingleLevelXXXAsPlanned */ public static RelationshipAspect from(final BomLifecycle bomLifecycle, final Direction direction) { return Stream.of(RelationshipAspect.values()) diff --git a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/SingleLevelBomAsBuilt.java b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SingleLevelBomAsBuilt.java similarity index 97% rename from irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/SingleLevelBomAsBuilt.java rename to irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SingleLevelBomAsBuilt.java index ff0f2c07b4..215c19ef6d 100644 --- a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/SingleLevelBomAsBuilt.java +++ b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SingleLevelBomAsBuilt.java @@ -21,7 +21,7 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.irs.edc.client; +package org.eclipse.tractusx.irs.edc.client.relationships; import java.time.ZonedDateTime; import java.util.Collection; @@ -34,19 +34,18 @@ import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -import lombok.extern.jackson.Jacksonized; import org.eclipse.tractusx.irs.component.GlobalAssetIdentification; import org.eclipse.tractusx.irs.component.LinkedItem; import org.eclipse.tractusx.irs.component.MeasurementUnit; import org.eclipse.tractusx.irs.component.Relationship; import org.eclipse.tractusx.irs.component.enums.AspectType; import org.eclipse.tractusx.irs.component.enums.BomLifecycle; +import org.eclipse.tractusx.irs.edc.client.RelationshipSubmodel; /** * SingleLevelBomAsBuilt */ @Data -@Jacksonized @AllArgsConstructor @NoArgsConstructor class SingleLevelBomAsBuilt implements RelationshipSubmodel { @@ -120,7 +119,6 @@ private boolean thereIsQuantity() { * Quantity */ @Data - @Jacksonized /* package */ static class Quantity { @JsonAlias({ "quantityNumber", "value" }) @@ -132,7 +130,6 @@ private boolean thereIsQuantity() { * MeasurementUnit */ @Data - @Jacksonized /* package */ static class MeasurementUnit { private String lexicalValue; private String datatypeURI; diff --git a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/SingleLevelBomAsPlanned.java b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SingleLevelBomAsPlanned.java similarity index 97% rename from irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/SingleLevelBomAsPlanned.java rename to irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SingleLevelBomAsPlanned.java index cc270d2d19..fc52430e2b 100644 --- a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/SingleLevelBomAsPlanned.java +++ b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SingleLevelBomAsPlanned.java @@ -21,7 +21,7 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.irs.edc.client; +package org.eclipse.tractusx.irs.edc.client.relationships; import java.time.ZonedDateTime; import java.util.Collection; @@ -40,6 +40,7 @@ import org.eclipse.tractusx.irs.component.Relationship; import org.eclipse.tractusx.irs.component.enums.AspectType; import org.eclipse.tractusx.irs.component.enums.BomLifecycle; +import org.eclipse.tractusx.irs.edc.client.RelationshipSubmodel; /** * SingleLevelBomAsPlanned diff --git a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/SingleLevelBomAsSpecified.java b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SingleLevelBomAsSpecified.java similarity index 96% rename from irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/SingleLevelBomAsSpecified.java rename to irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SingleLevelBomAsSpecified.java index 15292df84c..89a39697f3 100644 --- a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/SingleLevelBomAsSpecified.java +++ b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SingleLevelBomAsSpecified.java @@ -21,7 +21,7 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.irs.edc.client; +package org.eclipse.tractusx.irs.edc.client.relationships; import java.time.ZonedDateTime; import java.util.Collection; @@ -42,6 +42,7 @@ import org.eclipse.tractusx.irs.component.Relationship; import org.eclipse.tractusx.irs.component.enums.AspectType; import org.eclipse.tractusx.irs.component.enums.BomLifecycle; +import org.eclipse.tractusx.irs.edc.client.RelationshipSubmodel; /** * SingleLevelBomAsSpecified @@ -54,7 +55,7 @@ public class SingleLevelBomAsSpecified implements RelationshipSubmodel { private String catenaXId; - private Set childParts; + private Set childParts; @Override public List asRelationships() { diff --git a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SingleLevelUsageAsBuilt.java b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SingleLevelUsageAsBuilt.java new file mode 100644 index 0000000000..1b57cda41d --- /dev/null +++ b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SingleLevelUsageAsBuilt.java @@ -0,0 +1,65 @@ +/******************************************************************************** + * Copyright (c) 2022,2024 + * 2022: ZF Friedrichshafen AG + * 2022: ISTOS GmbH + * 2022,2024: Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * 2022,2023: BOSCH AG + * Copyright (c) 2021,2024 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ +package org.eclipse.tractusx.irs.edc.client.relationships; + +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import java.util.Set; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.extern.jackson.Jacksonized; +import org.eclipse.tractusx.irs.component.Relationship; +import org.eclipse.tractusx.irs.component.enums.AspectType; +import org.eclipse.tractusx.irs.component.enums.BomLifecycle; +import org.eclipse.tractusx.irs.edc.client.RelationshipSubmodel; + +/** + * SingleLevelUsageAsBuilt + */ +@Data +@Builder +@Jacksonized +@AllArgsConstructor +@NoArgsConstructor +class SingleLevelUsageAsBuilt implements RelationshipSubmodel { + + private String catenaXId; + private Set parentItems; + private Set customers; + + @Override + public List asRelationships() { + return Optional.ofNullable(this.parentItems) + .stream() + .flatMap(Collection::stream) + .map(parentItem -> parentItem.toRelationship(this.catenaXId, BomLifecycle.AS_BUILT, + AspectType.SINGLE_LEVEL_USAGE_AS_BUILT)) + .toList(); + } + +} diff --git a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SingleLevelUsageAsPlanned.java b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SingleLevelUsageAsPlanned.java new file mode 100644 index 0000000000..e3cd24061b --- /dev/null +++ b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SingleLevelUsageAsPlanned.java @@ -0,0 +1,60 @@ +/******************************************************************************** + * Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * Copyright (c) 2021,2024 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ +package org.eclipse.tractusx.irs.edc.client.relationships; + +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import java.util.Set; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.extern.jackson.Jacksonized; +import org.eclipse.tractusx.irs.component.Relationship; +import org.eclipse.tractusx.irs.component.enums.AspectType; +import org.eclipse.tractusx.irs.component.enums.BomLifecycle; +import org.eclipse.tractusx.irs.edc.client.RelationshipSubmodel; + +/** + * SingleLevelUsageAsBuilt + */ +@Data +@Builder +@Jacksonized +@AllArgsConstructor +@NoArgsConstructor +class SingleLevelUsageAsPlanned implements RelationshipSubmodel { + + private String catenaXId; + private Set parentItems; + private Set customers; + + @Override + public List asRelationships() { + return Optional.ofNullable(this.parentItems) + .stream() + .flatMap(Collection::stream) + .map(parentItem -> parentItem.toRelationship(this.catenaXId, BomLifecycle.AS_PLANNED, + AspectType.SINGLE_LEVEL_USAGE_AS_PLANNED)) + .toList(); + } +} diff --git a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/SubmodelTestdataCreator.java b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SubmodelTestdataCreator.java similarity index 94% rename from irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/SubmodelTestdataCreator.java rename to irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SubmodelTestdataCreator.java index 5ece97d157..713c7d8876 100644 --- a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/SubmodelTestdataCreator.java +++ b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SubmodelTestdataCreator.java @@ -21,7 +21,7 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.irs.edc.client; +package org.eclipse.tractusx.irs.edc.client.relationships; import java.util.Map; @@ -66,6 +66,8 @@ public Map createSubmodelForId(final String endpointAddress) { return this.cxTestDataContainer.getByCatenaXId(catenaXId).flatMap(CxTestDataContainer.CxTestData::getSerialPart).orElse(Map.of()); } else if (endpointAddress.contains("singleLevelBomAsPlanned")) { return this.cxTestDataContainer.getByCatenaXId(catenaXId).flatMap(CxTestDataContainer.CxTestData::getSingleLevelBomAsPlanned).orElse(Map.of()); + } else if (endpointAddress.contains("singleLevelUsageAsPlanned")) { + return this.cxTestDataContainer.getByCatenaXId(catenaXId).flatMap(CxTestDataContainer.CxTestData::getSingleLevelUsageAsPlanned).orElse(Map.of()); } else if (endpointAddress.contains("partAsPlanned")) { return this.cxTestDataContainer.getByCatenaXId(catenaXId).flatMap(CxTestDataContainer.CxTestData::getPartAsPlanned).orElse(Map.of()); } else if (endpointAddress.contains("batch")) { diff --git a/irs-edc-client/src/test/java/org/eclipse/tractusx/irs/edc/client/CxTestDataAnalyzerTest.java b/irs-edc-client/src/test/java/org/eclipse/tractusx/irs/edc/client/CxTestDataAnalyzerTest.java index c6ec277d58..a04c951337 100644 --- a/irs-edc-client/src/test/java/org/eclipse/tractusx/irs/edc/client/CxTestDataAnalyzerTest.java +++ b/irs-edc-client/src/test/java/org/eclipse/tractusx/irs/edc/client/CxTestDataAnalyzerTest.java @@ -32,7 +32,7 @@ import static org.eclipse.tractusx.irs.data.CxTestDataContainer.CxTestData.SERIAL_PART_ASPECT_TYPE; import static org.eclipse.tractusx.irs.data.CxTestDataContainer.CxTestData.SINGLE_LEVEL_BOM_AS_BUILT_ASPECT_TYPE; import static org.eclipse.tractusx.irs.data.CxTestDataContainer.CxTestData.SINGLE_LEVEL_BOM_AS_PLANNED_ASPECT_TYPE; -import static org.eclipse.tractusx.irs.data.CxTestDataContainer.CxTestData.SINGLE_LEVEL_USAGE_BUILT_ASPECT_TYPE; +import static org.eclipse.tractusx.irs.data.CxTestDataContainer.CxTestData.SINGLE_LEVEL_USAGE_AS_BUILT_ASPECT_TYPE; import java.io.File; import java.io.IOException; @@ -50,6 +50,7 @@ import org.eclipse.tractusx.irs.component.enums.BomLifecycle; import org.eclipse.tractusx.irs.component.enums.Direction; import org.eclipse.tractusx.irs.data.CxTestDataContainer; +import org.eclipse.tractusx.irs.edc.client.relationships.RelationshipAspect; import org.eclipse.tractusx.irs.testing.containers.LocalTestDataConfigurationAware; import org.junit.jupiter.api.Test; @@ -303,7 +304,7 @@ private List getSubmodelsFor(final String catenaXId, final TestParamet SERIAL_PART_ASPECT_TYPE); checkAndAddSubmodel(testParameters.shouldCountSingleLevelUsageAsBuilt, cxTestData.flatMap(CxTestDataContainer.CxTestData::getSingleLevelBomAsPlanned), submodels, - SINGLE_LEVEL_USAGE_BUILT_ASPECT_TYPE); + SINGLE_LEVEL_USAGE_AS_BUILT_ASPECT_TYPE); checkAndAddSubmodel(testParameters.shouldCountBatch, cxTestData.flatMap(CxTestDataContainer.CxTestData::getBatch), submodels, BATCH_ASPECT_TYPE); checkAndAddSubmodel(testParameters.shouldCountMaterialForRecycling, diff --git a/irs-edc-client/src/test/java/org/eclipse/tractusx/irs/edc/client/EdcSubmodelClientTest.java b/irs-edc-client/src/test/java/org/eclipse/tractusx/irs/edc/client/EdcSubmodelClientTest.java index f9625f6858..7bc2c5b22a 100644 --- a/irs-edc-client/src/test/java/org/eclipse/tractusx/irs/edc/client/EdcSubmodelClientTest.java +++ b/irs-edc-client/src/test/java/org/eclipse/tractusx/irs/edc/client/EdcSubmodelClientTest.java @@ -77,6 +77,8 @@ import org.eclipse.tractusx.irs.edc.client.model.notification.EdcNotification; import org.eclipse.tractusx.irs.edc.client.model.notification.EdcNotificationResponse; import org.eclipse.tractusx.irs.edc.client.model.notification.NotificationContent; +import org.eclipse.tractusx.irs.edc.client.relationships.RelationshipAspect; +import org.eclipse.tractusx.irs.edc.client.relationships.SubmodelTestdataCreator; import org.eclipse.tractusx.irs.edc.client.testutil.TestMother; import org.eclipse.tractusx.irs.testing.containers.LocalTestDataConfigurationAware; import org.jetbrains.annotations.NotNull; diff --git a/irs-edc-client/src/test/java/org/eclipse/tractusx/irs/edc/client/RelationshipAspectTest.java b/irs-edc-client/src/test/java/org/eclipse/tractusx/irs/edc/client/relationships/RelationshipAspectTest.java similarity index 97% rename from irs-edc-client/src/test/java/org/eclipse/tractusx/irs/edc/client/RelationshipAspectTest.java rename to irs-edc-client/src/test/java/org/eclipse/tractusx/irs/edc/client/relationships/RelationshipAspectTest.java index 2b329cc354..8751119e1a 100644 --- a/irs-edc-client/src/test/java/org/eclipse/tractusx/irs/edc/client/RelationshipAspectTest.java +++ b/irs-edc-client/src/test/java/org/eclipse/tractusx/irs/edc/client/relationships/RelationshipAspectTest.java @@ -21,7 +21,7 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.irs.edc.client; +package org.eclipse.tractusx.irs.edc.client.relationships; import static org.assertj.core.api.Assertions.assertThat; diff --git a/irs-edc-client/src/test/java/org/eclipse/tractusx/irs/edc/client/SubmodelTestdataCreatorTest.java b/irs-edc-client/src/test/java/org/eclipse/tractusx/irs/edc/client/relationships/SubmodelTestdataCreatorTest.java similarity index 97% rename from irs-edc-client/src/test/java/org/eclipse/tractusx/irs/edc/client/SubmodelTestdataCreatorTest.java rename to irs-edc-client/src/test/java/org/eclipse/tractusx/irs/edc/client/relationships/SubmodelTestdataCreatorTest.java index 43c62f4f72..695cfa4516 100644 --- a/irs-edc-client/src/test/java/org/eclipse/tractusx/irs/edc/client/SubmodelTestdataCreatorTest.java +++ b/irs-edc-client/src/test/java/org/eclipse/tractusx/irs/edc/client/relationships/SubmodelTestdataCreatorTest.java @@ -21,7 +21,7 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.irs.edc.client; +package org.eclipse.tractusx.irs.edc.client.relationships; import static org.assertj.core.api.Assertions.assertThat; diff --git a/irs-models/src/main/java/org/eclipse/tractusx/irs/component/enums/AspectType.java b/irs-models/src/main/java/org/eclipse/tractusx/irs/component/enums/AspectType.java index c0d0b6227d..29ea6595f5 100644 --- a/irs-models/src/main/java/org/eclipse/tractusx/irs/component/enums/AspectType.java +++ b/irs-models/src/main/java/org/eclipse/tractusx/irs/component/enums/AspectType.java @@ -64,7 +64,8 @@ public enum AspectType { SINGLE_LEVEL_BOM_AS_BUILT(AspectTypesConstants.SINGLE_LEVEL_BOM_AS_BUILT), SINGLE_LEVEL_BOM_AS_PLANNED(AspectTypesConstants.SINGLE_LEVEL_BOM_AS_PLANNED), SINGLE_LEVEL_BOM_AS_SPECIFIED(AspectTypesConstants.SINGLE_LEVEL_BOM_AS_SPECIFIED), - SINGLE_LEVEL_USAGE_AS_BUILT(AspectTypesConstants.SINGLE_LEVEL_USAGE_AS_BUILT); + SINGLE_LEVEL_USAGE_AS_BUILT(AspectTypesConstants.SINGLE_LEVEL_USAGE_AS_BUILT), + SINGLE_LEVEL_USAGE_AS_PLANNED(AspectTypesConstants.SINGLE_LEVEL_USAGE_AS_PLANNED); private final String name; @@ -134,5 +135,6 @@ public static final class AspectTypesConstants { public static final String SINGLE_LEVEL_BOM_AS_PLANNED = "SingleLevelBomAsPlanned"; public static final String SINGLE_LEVEL_BOM_AS_SPECIFIED = "SingleLevelBomAsSpecified"; public static final String SINGLE_LEVEL_USAGE_AS_BUILT = "SingleLevelUsageAsBuilt"; + public static final String SINGLE_LEVEL_USAGE_AS_PLANNED = "SingleLevelUsageAsPlanned"; } } diff --git a/irs-models/src/main/java/org/eclipse/tractusx/irs/data/CxTestDataContainer.java b/irs-models/src/main/java/org/eclipse/tractusx/irs/data/CxTestDataContainer.java index 955a5e9b07..41f9fe6ad0 100644 --- a/irs-models/src/main/java/org/eclipse/tractusx/irs/data/CxTestDataContainer.java +++ b/irs-models/src/main/java/org/eclipse/tractusx/irs/data/CxTestDataContainer.java @@ -56,10 +56,11 @@ public static class CxTestData { public static final String SERIAL_PART_ASPECT_TYPE = "urn:samm:io.catenax.serial_part:3.0.0#SerialPart"; public static final String SINGLE_LEVEL_BOM_AS_BUILT_ASPECT_TYPE = "urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt"; - public static final String SINGLE_LEVEL_USAGE_BUILT_ASPECT_TYPE = "urn:samm:io.catenax.single_level_usage_as_built:3.0.0#SingleLevelUsageAsBuilt"; + public static final String SINGLE_LEVEL_USAGE_AS_BUILT_ASPECT_TYPE = "urn:samm:io.catenax.single_level_usage_as_built:3.0.0#SingleLevelUsageAsBuilt"; public static final String SINGLE_LEVEL_BOM_AS_SPECIFIED_ASPECT_TYPE = "urn:samm:io.catenax.single_level_bom_as_specified:2.0.0#SingleLevelBomAsSpecified"; public static final String PART_AS_PLANNED_ASPECT_TYPE = "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned"; public static final String SINGLE_LEVEL_BOM_AS_PLANNED_ASPECT_TYPE = "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsPlanned"; + public static final String SINGLE_LEVEL_USAGE_AS_PLANNED_ASPECT_TYPE = "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned"; public static final String BATCH_ASPECT_TYPE = "urn:samm:io.catenax.batch:3.0.0#Batch"; public static final String MATERIAL_FOR_RECYCLING_ASPECT_TYPE = "urn:samm:io.catenax.material_for_recycling:1.1.0#MaterialForRecycling"; public static final String PRODUCT_DESCRIPTION_ASPECT_TYPE = "urn:samm:io.catenax.battery.product_description:1.0.1#ProductDescription"; @@ -71,7 +72,7 @@ public static class CxTestData { private List> serialPart; @JsonProperty(SINGLE_LEVEL_BOM_AS_BUILT_ASPECT_TYPE) private List> singleLevelBomAsBuilt; - @JsonProperty(SINGLE_LEVEL_USAGE_BUILT_ASPECT_TYPE) + @JsonProperty(SINGLE_LEVEL_USAGE_AS_BUILT_ASPECT_TYPE) private List> singleLevelUsageAsBuilt; @JsonProperty(SINGLE_LEVEL_BOM_AS_SPECIFIED_ASPECT_TYPE) private List> singleLevelBomAsSpecified; @@ -79,6 +80,8 @@ public static class CxTestData { private List> partAsPlanned; @JsonProperty(SINGLE_LEVEL_BOM_AS_PLANNED_ASPECT_TYPE) private List> singleLevelBomAsPlanned; + @JsonProperty(SINGLE_LEVEL_USAGE_AS_PLANNED_ASPECT_TYPE) + private List> singleLevelUsageAsPlanned; @JsonProperty(BATCH_ASPECT_TYPE) private List> batch; @JsonProperty(MATERIAL_FOR_RECYCLING_ASPECT_TYPE) @@ -114,6 +117,10 @@ public Optional> getSingleLevelBomAsPlanned() { return singleLevelBomAsPlanned != null ? singleLevelBomAsPlanned.stream().findFirst() : Optional.empty(); } + public Optional> getSingleLevelUsageAsPlanned() { + return singleLevelUsageAsPlanned != null ? singleLevelUsageAsPlanned.stream().findFirst() : Optional.empty(); + } + public Optional> getBatch() { return batch != null ? batch.stream().findFirst() : Optional.empty(); } diff --git a/irs-models/src/main/resources/test_data/CX_Testdata.json b/irs-models/src/main/resources/test_data/CX_Testdata.json index dfe34e8703..19aea69ed8 100644 --- a/irs-models/src/main/resources/test_data/CX_Testdata.json +++ b/irs-models/src/main/resources/test_data/CX_Testdata.json @@ -175912,8 +175912,8 @@ } ], "customers" : [ "BPNL00000003AVTH" ] } ] - } - , { + }, +{ "catenaXId" : "urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4c79e", "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsPlanned" : [ { "catenaXId" : "urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4c79e", @@ -175960,6 +175960,10 @@ } ], "bpnl" : "BPNL00000003AYRE", "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003AYRE", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4c79e", "partTypeInformation" : { "manufacturerPartId" : "ZX-55", @@ -175976,10 +175980,10 @@ "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4c79e", "sites" : [ { - "functionValidUntil" : "2032-08-09T02:11:44.000Z", + "functionValidUntil" : "2031-08-19T18:23:46.000Z", "catenaXsiteId" : "BPNS000004711DMY", "function" : "production", - "functionValidFrom" : "2014-05-02T12:21:56.000Z" + "functionValidFrom" : "2014-09-22T10:40:06.000Z" } ] } ] }, { @@ -176002,7 +176006,29 @@ } ] } ], "bpnl" : "BPNL00000003AYRE", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:aad27ddb-43aa-4e42-98c2-01e529ef127c", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4c79e", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000003AYRE", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000003AYRE" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003AYRE", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:aad27ddb-43aa-4e42-98c2-01e529ef127c", "partTypeInformation" : { "manufacturerPartId" : "38049661-08", @@ -176016,58 +176042,42 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4c79e", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:aad27ddb-43aa-4e42-98c2-01e529ef127c" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:aad27ddb-43aa-4e42-98c2-01e529ef127c", "sites" : [ { - "functionValidUntil" : "2030-09-23T02:17:24.000Z", + "functionValidUntil" : "2030-10-04T15:38:48.000Z", "catenaXsiteId" : "BPNS000004711DMY", "function" : "production", - "functionValidFrom" : "2018-11-03T14:27:17.000Z" + "functionValidFrom" : "2019-02-12T17:58:25.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "964704", + "orderNumber" : "522176", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { "percentageOfMaterialWeight" : 12 }, - "bioBasedClass" : "gen2", + "bioBasedClass" : "gen3", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 15 + "percentageOfMaterialWeight" : 17 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", - "materialClass" : "3.1", + "materialClass" : "4.2", "unitOfMeasure" : { "unitOfMeasureKey" : "unit:decigram", "grossMaterialInputMass" : 3500, "materialNetMass" : 3000 }, "certificate" : [ { - "certificateName" : "Bluecert", + "certificateName" : "Yellowcert", "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "AISI", - "referencedStandardID" : "5936", + "referencedStandard" : "ASME", + "referencedStandardID" : "5388", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -176078,18 +176088,18 @@ "postConsumer" : { "isPreviousIndustryAutomotive" : true, "chemicalRecycling" : { - "isMassBalanced" : false, - "percentageOfMaterialWeight" : 11 + "isMassBalanced" : true, + "percentageOfMaterialWeight" : 10 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 11 + "percentageOfMaterialWeight" : 12 } }, "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 12 }, "mechanicalRecycling" : { "isMassBalanced" : true, @@ -176099,7 +176109,7 @@ "preConsumer" : { "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 12 } } } @@ -176139,7 +176149,29 @@ } ] } ], "bpnl" : "BPNL00000003AYRE", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:e5c96ab5-896a-482c-8761-efd74777ca97", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:aad27ddb-43aa-4e42-98c2-01e529ef127c", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000003AYRE", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000003AYRE" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003AYRE", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:e5c96ab5-896a-482c-8761-efd74777ca97", "partTypeInformation" : { "manufacturerPartId" : "8840838-04", @@ -176153,58 +176185,42 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:aad27ddb-43aa-4e42-98c2-01e529ef127c", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:e5c96ab5-896a-482c-8761-efd74777ca97" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:e5c96ab5-896a-482c-8761-efd74777ca97", "sites" : [ { - "functionValidUntil" : "2031-10-12T04:51:28.000Z", + "functionValidUntil" : "2031-09-08T04:22:10.000Z", "catenaXsiteId" : "BPNS000004711DMY", "function" : "production", - "functionValidFrom" : "2019-12-29T16:36:39.000Z" + "functionValidFrom" : "2012-12-02T14:34:01.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "44058", + "orderNumber" : "952033", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 13 }, - "bioBasedClass" : "gen1", + "bioBasedClass" : "gen2", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 14 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", - "materialClass" : "4.2", + "materialClass" : "1.1", "unitOfMeasure" : { - "unitOfMeasureKey" : "unit:centigram", + "unitOfMeasureKey" : "unit:decagram", "grossMaterialInputMass" : 3500, "materialNetMass" : 3000 }, "certificate" : [ { - "certificateName" : "Redcert", + "certificateName" : "Bluecert", "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "AISI", - "referencedStandardID" : "2920", + "referencedStandard" : "ASME", + "referencedStandardID" : "8399", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -176216,7 +176232,7 @@ "isPreviousIndustryAutomotive" : true, "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 10 }, "mechanicalRecycling" : { "isMassBalanced" : true, @@ -176226,17 +176242,17 @@ "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 12 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 11 } }, "preConsumer" : { "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 14 } } } @@ -176263,7 +176279,29 @@ } ] } ], "bpnl" : "BPNL00000003AYRE", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:c7a2b803-f8fe-4b79-b6fc-967ce847c9a9", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:e5c96ab5-896a-482c-8761-efd74777ca97", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000003AYRE", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000003AYRE" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003AYRE", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:c7a2b803-f8fe-4b79-b6fc-967ce847c9a9", "partTypeInformation" : { "manufacturerPartId" : "8840374-09", @@ -176277,33 +176315,17 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:e5c96ab5-896a-482c-8761-efd74777ca97", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:c7a2b803-f8fe-4b79-b6fc-967ce847c9a9" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:c7a2b803-f8fe-4b79-b6fc-967ce847c9a9", "sites" : [ { - "functionValidUntil" : "2031-03-17T07:19:55.000Z", + "functionValidUntil" : "2031-08-20T22:58:38.000Z", "catenaXsiteId" : "BPNS000004711DMY", "function" : "production", - "functionValidFrom" : "2016-03-08T11:56:01.000Z" + "functionValidFrom" : "2015-12-30T05:54:25.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "358677", + "orderNumber" : "535234", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { @@ -176312,23 +176334,23 @@ "bioBasedClass" : "gen2", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 15 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", - "materialClass" : "2.1", + "materialClass" : "3.1", "unitOfMeasure" : { - "unitOfMeasureKey" : "unit:gram", + "unitOfMeasureKey" : "unit:decigram", "grossMaterialInputMass" : 3500, "materialNetMass" : 3000 }, "certificate" : [ { - "certificateName" : "Yellowcert", + "certificateName" : "Greencert", "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "JASO", - "referencedStandardID" : "8149", + "referencedStandard" : "IS", + "referencedStandardID" : "9286", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -176337,10 +176359,10 @@ }, "secondaryInorganic" : { "postConsumer" : { - "isPreviousIndustryAutomotive" : false, + "isPreviousIndustryAutomotive" : true, "chemicalRecycling" : { - "isMassBalanced" : true, - "percentageOfMaterialWeight" : 11 + "isMassBalanced" : false, + "percentageOfMaterialWeight" : 10 }, "mechanicalRecycling" : { "isMassBalanced" : true, @@ -176354,13 +176376,13 @@ }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 11 } }, "preConsumer" : { "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 11 + "percentageOfMaterialWeight" : 10 } } } @@ -176374,7 +176396,29 @@ "childItems" : [ ] } ], "bpnl" : "BPNL00000003B0Q0", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:4f7b1cf2-a598-4027-bc78-63f6d8e55699", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:c7a2b803-f8fe-4b79-b6fc-967ce847c9a9", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000003B0Q0", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000003B0Q0" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003B0Q0", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:4f7b1cf2-a598-4027-bc78-63f6d8e55699", "partTypeInformation" : { "manufacturerPartId" : "7A047C7-01", @@ -176388,58 +176432,42 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:c7a2b803-f8fe-4b79-b6fc-967ce847c9a9", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:4f7b1cf2-a598-4027-bc78-63f6d8e55699" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:4f7b1cf2-a598-4027-bc78-63f6d8e55699", "sites" : [ { - "functionValidUntil" : "2028-09-25T14:38:07.000Z", + "functionValidUntil" : "2029-08-15T22:27:59.000Z", "catenaXsiteId" : "BPNS00000003B0Q0", "function" : "production", - "functionValidFrom" : "2013-01-13T21:53:56.000Z" + "functionValidFrom" : "2015-08-03T06:07:39.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "189071", + "orderNumber" : "60275", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 13 }, - "bioBasedClass" : "gen1", + "bioBasedClass" : "gen3", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 13 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", - "materialClass" : "2.1", + "materialClass" : "4.2", "unitOfMeasure" : { "unitOfMeasureKey" : "unit:centigram", "grossMaterialInputMass" : 3500, "materialNetMass" : 3000 }, "certificate" : [ { - "certificateName" : "Yellowcert", + "certificateName" : "Bluecert", "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "JIS", - "referencedStandardID" : "9597", + "referencedStandard" : "JASO", + "referencedStandardID" : "3576", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -176448,30 +176476,30 @@ }, "secondaryInorganic" : { "postConsumer" : { - "isPreviousIndustryAutomotive" : true, + "isPreviousIndustryAutomotive" : false, "chemicalRecycling" : { "isMassBalanced" : false, - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 14 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 11 + "percentageOfMaterialWeight" : 13 } }, "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 12 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 13 } }, "preConsumer" : { "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 10 } } } @@ -176485,7 +176513,29 @@ "childItems" : [ ] } ], "bpnl" : "BPNL00000003AXS3", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:15d2fcc8-6439-4d1e-904b-e62b4d3bf323", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:e5c96ab5-896a-482c-8761-efd74777ca97", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000003AXS3", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000003AXS3" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003AXS3", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:15d2fcc8-6439-4d1e-904b-e62b4d3bf323", "partTypeInformation" : { "manufacturerPartId" : "9A047C7-01", @@ -176499,58 +176549,42 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:e5c96ab5-896a-482c-8761-efd74777ca97", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:15d2fcc8-6439-4d1e-904b-e62b4d3bf323" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:15d2fcc8-6439-4d1e-904b-e62b4d3bf323", "sites" : [ { - "functionValidUntil" : "2028-11-24T09:15:39.000Z", + "functionValidUntil" : "2025-12-20T07:38:58.000Z", "catenaXsiteId" : "BPNS00000003AXS3", "function" : "production", - "functionValidFrom" : "2020-02-27T23:48:03.000Z" + "functionValidFrom" : "2019-01-29T13:34:13.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "256763", + "orderNumber" : "325746", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 14 }, - "bioBasedClass" : "gen3", + "bioBasedClass" : "gen1", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 17 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", - "materialClass" : "1.1", + "materialClass" : "3.1", "unitOfMeasure" : { - "unitOfMeasureKey" : "unit:gram", + "unitOfMeasureKey" : "unit:decagram", "grossMaterialInputMass" : 3500, "materialNetMass" : 3000 }, "certificate" : [ { - "certificateName" : "Bluecert", + "certificateName" : "Yellowcert", "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "JIS", - "referencedStandardID" : "5169", + "referencedStandard" : "IS", + "referencedStandardID" : "9901", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -176561,28 +176595,28 @@ "postConsumer" : { "isPreviousIndustryAutomotive" : false, "chemicalRecycling" : { - "isMassBalanced" : false, - "percentageOfMaterialWeight" : 14 + "isMassBalanced" : true, + "percentageOfMaterialWeight" : 11 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 10 } }, "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 13 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 13 } }, "preConsumer" : { "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 10 } } } @@ -176622,7 +176656,29 @@ } ] } ], "bpnl" : "BPNL00000003B2OM", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:2c57b0e9-a653-411d-bdcd-64787e9fd3a7", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:68904173-ad59-4a77-8412-3e73fcafbd8b", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000003B2OM", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000003B2OM" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003B2OM", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:2c57b0e9-a653-411d-bdcd-64787e9fd3a7", "partTypeInformation" : { "manufacturerPartId" : "32494586-73", @@ -176636,70 +176692,42 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4c79e", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - }, { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:68904173-ad59-4a77-8412-3e73fcafbd8b", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:2c57b0e9-a653-411d-bdcd-64787e9fd3a7" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:2c57b0e9-a653-411d-bdcd-64787e9fd3a7", "sites" : [ { - "functionValidUntil" : "2024-11-10T09:37:04.000Z", + "functionValidUntil" : "2025-10-08T14:04:02.000Z", "catenaXsiteId" : "BPNS00000003B2OM", "function" : "production", - "functionValidFrom" : "2017-08-21T23:20:17.000Z" + "functionValidFrom" : "2020-09-28T04:49:29.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "969986", + "orderNumber" : "505223", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { "percentageOfMaterialWeight" : 13 }, - "bioBasedClass" : "gen3", + "bioBasedClass" : "gen1", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 9 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", - "materialClass" : "5.1", + "materialClass" : "2.1", "unitOfMeasure" : { "unitOfMeasureKey" : "unit:gram", "grossMaterialInputMass" : 3500, "materialNetMass" : 3000 }, "certificate" : [ { - "certificateName" : "Greencert", + "certificateName" : "Bluecert", "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "JIS", - "referencedStandardID" : "3760", + "referencedStandard" : "EN", + "referencedStandardID" : "7304", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -176708,30 +176736,30 @@ }, "secondaryInorganic" : { "postConsumer" : { - "isPreviousIndustryAutomotive" : false, + "isPreviousIndustryAutomotive" : true, "chemicalRecycling" : { - "isMassBalanced" : true, - "percentageOfMaterialWeight" : 11 + "isMassBalanced" : false, + "percentageOfMaterialWeight" : 14 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 11 + "percentageOfMaterialWeight" : 14 } }, "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 14 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 12 } }, "preConsumer" : { "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 12 } } } @@ -176759,6 +176787,10 @@ } ], "bpnl" : "BPNL00000003B3NX", "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003B3NX", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:bee5614f-9e46-4c98-9209-61a6f2b2a7fc", "partTypeInformation" : { "manufacturerPartId" : "6740244-02", @@ -176773,7 +176805,7 @@ } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "472610", + "orderNumber" : "243997", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { @@ -176782,13 +176814,13 @@ "bioBasedClass" : "gen2", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 12 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", "materialClass" : "2.1", "unitOfMeasure" : { - "unitOfMeasureKey" : "unit:centigram", + "unitOfMeasureKey" : "unit:decigram", "grossMaterialInputMass" : 3500, "materialNetMass" : 3000 }, @@ -176797,8 +176829,8 @@ "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "GB", - "referencedStandardID" : "9865", + "referencedStandard" : "AISI", + "referencedStandardID" : "5296", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -176820,7 +176852,7 @@ "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 14 }, "mechanicalRecycling" : { "isMassBalanced" : true, @@ -176830,7 +176862,7 @@ "preConsumer" : { "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 11 + "percentageOfMaterialWeight" : 10 } } } @@ -176844,7 +176876,29 @@ "childItems" : [ ] } ], "bpnl" : "BPNL00000003B0Q0", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:86f69643-3b90-4e34-90bf-789edcf40e7e", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:bee5614f-9e46-4c98-9209-61a6f2b2a7fc", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000003B0Q0", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000003B0Q0" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003B0Q0", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:86f69643-3b90-4e34-90bf-789edcf40e7e", "partTypeInformation" : { "manufacturerPartId" : "7A047KK-01", @@ -176858,48 +176912,32 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:bee5614f-9e46-4c98-9209-61a6f2b2a7fc", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:86f69643-3b90-4e34-90bf-789edcf40e7e" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:86f69643-3b90-4e34-90bf-789edcf40e7e", "sites" : [ { - "functionValidUntil" : "2029-12-12T20:52:56.000Z", + "functionValidUntil" : "2028-03-21T10:50:43.000Z", "catenaXsiteId" : "BPNS00000003B0Q0", "function" : "production", - "functionValidFrom" : "2013-02-12T16:37:07.000Z" + "functionValidFrom" : "2017-10-24T09:40:59.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "809218", + "orderNumber" : "642708", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 14 }, - "bioBasedClass" : "gen1", + "bioBasedClass" : "gen3", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 19 + "percentageOfMaterialWeight" : 11 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", "materialClass" : "4.2", "unitOfMeasure" : { - "unitOfMeasureKey" : "unit:decagram", + "unitOfMeasureKey" : "unit:centigram", "grossMaterialInputMass" : 3500, "materialNetMass" : 3000 }, @@ -176908,8 +176946,8 @@ "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "JASO", - "referencedStandardID" : "2931", + "referencedStandard" : "ISO", + "referencedStandardID" : "7789", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -176918,24 +176956,24 @@ }, "secondaryInorganic" : { "postConsumer" : { - "isPreviousIndustryAutomotive" : false, + "isPreviousIndustryAutomotive" : true, "chemicalRecycling" : { - "isMassBalanced" : true, - "percentageOfMaterialWeight" : 11 + "isMassBalanced" : false, + "percentageOfMaterialWeight" : 10 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 14 } }, "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 12 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 11 + "percentageOfMaterialWeight" : 14 } }, "preConsumer" : { @@ -176955,7 +176993,29 @@ "childItems" : [ ] } ], "bpnl" : "BPNL00000003B0Q0", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:4518c080-14fb-4252-b8de-4362d615868d", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:2c57b0e9-a653-411d-bdcd-64787e9fd3a7", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000003B0Q0", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000003B0Q0" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003B0Q0", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:4518c080-14fb-4252-b8de-4362d615868d", "partTypeInformation" : { "manufacturerPartId" : "7A987KK-04", @@ -176969,58 +177029,42 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:2c57b0e9-a653-411d-bdcd-64787e9fd3a7", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:4518c080-14fb-4252-b8de-4362d615868d" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:4518c080-14fb-4252-b8de-4362d615868d", "sites" : [ { - "functionValidUntil" : "2031-04-17T22:24:22.000Z", + "functionValidUntil" : "2028-03-01T10:08:44.000Z", "catenaXsiteId" : "BPNS00000003B0Q0", "function" : "production", - "functionValidFrom" : "2019-03-30T08:41:08.000Z" + "functionValidFrom" : "2020-10-16T23:14:22.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "736994", + "orderNumber" : "383548", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 10 }, - "bioBasedClass" : "gen1", + "bioBasedClass" : "gen3", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 18 + "percentageOfMaterialWeight" : 16 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", - "materialClass" : "1.1", + "materialClass" : "3.1", "unitOfMeasure" : { - "unitOfMeasureKey" : "unit:decigram", + "unitOfMeasureKey" : "unit:gram", "grossMaterialInputMass" : 3500, "materialNetMass" : 3000 }, "certificate" : [ { - "certificateName" : "Bluecert", + "certificateName" : "Greencert", "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "EN", - "referencedStandardID" : "4785", + "referencedStandard" : "ASME", + "referencedStandardID" : "6703", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -177029,30 +177073,30 @@ }, "secondaryInorganic" : { "postConsumer" : { - "isPreviousIndustryAutomotive" : false, + "isPreviousIndustryAutomotive" : true, "chemicalRecycling" : { "isMassBalanced" : true, "percentageOfMaterialWeight" : 11 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 14 } }, "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 11 + "percentageOfMaterialWeight" : 13 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 11 + "percentageOfMaterialWeight" : 12 } }, "preConsumer" : { "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 11 + "percentageOfMaterialWeight" : 12 } } } @@ -177092,7 +177136,29 @@ } ] } ], "bpnl" : "BPNL00000003B5MJ", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:07cb071f-8716-45fe-89f1-f2f77a1ce93b", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:68904173-ad59-4a77-8412-3e73fcafbd8b", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000003B5MJ", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000003B5MJ" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003B5MJ", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:07cb071f-8716-45fe-89f1-f2f77a1ce93b", "partTypeInformation" : { "manufacturerPartId" : "ZX-55", @@ -177106,70 +177172,42 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4c79e", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - }, { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:68904173-ad59-4a77-8412-3e73fcafbd8b", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:07cb071f-8716-45fe-89f1-f2f77a1ce93b" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:07cb071f-8716-45fe-89f1-f2f77a1ce93b", "sites" : [ { - "functionValidUntil" : "2031-07-14T14:36:49.000Z", + "functionValidUntil" : "2027-10-12T09:26:04.000Z", "catenaXsiteId" : "BPNS00000003B5MJ", "function" : "production", - "functionValidFrom" : "2018-02-07T04:54:43.000Z" + "functionValidFrom" : "2013-10-03T08:28:19.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "906993", + "orderNumber" : "808131", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { "percentageOfMaterialWeight" : 10 }, - "bioBasedClass" : "gen3", + "bioBasedClass" : "gen2", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 24 + "percentageOfMaterialWeight" : 19 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", - "materialClass" : "4.2", + "materialClass" : "5.1", "unitOfMeasure" : { - "unitOfMeasureKey" : "unit:decagram", + "unitOfMeasureKey" : "unit:gram", "grossMaterialInputMass" : 3500, "materialNetMass" : 3000 }, "certificate" : [ { - "certificateName" : "Yellowcert", + "certificateName" : "Greencert", "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "EN", - "referencedStandardID" : "1942", + "referencedStandard" : "JIS", + "referencedStandardID" : "9456", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -177178,30 +177216,30 @@ }, "secondaryInorganic" : { "postConsumer" : { - "isPreviousIndustryAutomotive" : true, + "isPreviousIndustryAutomotive" : false, "chemicalRecycling" : { - "isMassBalanced" : false, - "percentageOfMaterialWeight" : 10 + "isMassBalanced" : true, + "percentageOfMaterialWeight" : 12 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 10 } }, "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 12 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 11 } }, "preConsumer" : { "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 11 + "percentageOfMaterialWeight" : 14 } } } @@ -177215,84 +177253,78 @@ "childItems" : [ ] } ], "bpnl" : "BPNL00000003AXS3", - "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { "catenaXId" : "urn:uuid:3cdd2826-5df0-4c7b-b540-9eeccecb2301", - "partTypeInformation" : { - "manufacturerPartId" : "6775244-06", - "classification" : "product", - "nameAtManufacturer" : "Sub Tier B Glue" - }, - "partSitesInformationAsPlanned" : [ { - "functionValidUntil" : "2023-12-11T06:14:55.183Z", - "catenaXsiteId" : "BPNS1234567890ZZ", - "function" : "production", - "functionValidFrom" : "2023-12-11T06:14:55.181Z" - } ] - } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:07cb071f-8716-45fe-89f1-f2f77a1ce93b", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - }, { + "parentItems" : [ { "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" }, - "parentCatenaXId" : "urn:uuid:e3e2a4d8-58bc-4ae9-afa2-e8946fda1f77", + "catenaXId" : "urn:uuid:e3e2a4d8-58bc-4ae9-afa2-e8946fda1f77", "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" + "unit" : "unit:piece", + "value" : 20 }, + "businessPartner" : "BPNL00000003AXS3", "createdOn" : "2022-02-03T14:48:54.709Z", "lastModifiedOn" : "2022-02-03T14:48:54.709Z" } ], - "catenaXId" : "urn:uuid:3cdd2826-5df0-4c7b-b540-9eeccecb2301" + "customers" : [ "BPNL00000003AXS3" ] + } ], + "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003AXS3", + "key" : "manufacturerId" + } ], + "catenaXId" : "urn:uuid:3cdd2826-5df0-4c7b-b540-9eeccecb2301", + "partTypeInformation" : { + "manufacturerPartId" : "6775244-06", + "classification" : "product", + "nameAtManufacturer" : "Sub Tier B Glue" + }, + "partSitesInformationAsPlanned" : [ { + "functionValidUntil" : "2023-12-11T06:14:55.183Z", + "catenaXsiteId" : "BPNS1234567890ZZ", + "function" : "production", + "functionValidFrom" : "2023-12-11T06:14:55.181Z" + } ] } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:3cdd2826-5df0-4c7b-b540-9eeccecb2301", "sites" : [ { - "functionValidUntil" : "2029-07-21T18:50:17.000Z", + "functionValidUntil" : "2029-04-02T06:11:57.000Z", "catenaXsiteId" : "BPNS00000003AXS3", "function" : "production", - "functionValidFrom" : "2016-05-20T12:11:20.000Z" + "functionValidFrom" : "2015-01-08T04:19:59.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "748259", + "orderNumber" : "966999", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { "percentageOfMaterialWeight" : 13 }, - "bioBasedClass" : "gen3", + "bioBasedClass" : "gen1", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 20 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", - "materialClass" : "3.1", + "materialClass" : "1.1", "unitOfMeasure" : { - "unitOfMeasureKey" : "unit:gram", + "unitOfMeasureKey" : "unit:decagram", "grossMaterialInputMass" : 3500, "materialNetMass" : 3000 }, "certificate" : [ { - "certificateName" : "Yellowcert", + "certificateName" : "Bluecert", "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "EN", - "referencedStandardID" : "7650", + "referencedStandard" : "AS", + "referencedStandardID" : "1903", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -177301,24 +177333,24 @@ }, "secondaryInorganic" : { "postConsumer" : { - "isPreviousIndustryAutomotive" : false, + "isPreviousIndustryAutomotive" : true, "chemicalRecycling" : { - "isMassBalanced" : false, + "isMassBalanced" : true, "percentageOfMaterialWeight" : 11 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 12 } }, "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 11 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 10 } }, "preConsumer" : { @@ -177378,6 +177410,10 @@ } ], "bpnl" : "BPNL00000003AVTH", "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003AVTH", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:68904173-ad59-4a77-8412-3e73fcafbd8b", "partTypeInformation" : { "manufacturerPartId" : "FJ-87", @@ -177394,10 +177430,10 @@ "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:68904173-ad59-4a77-8412-3e73fcafbd8b", "sites" : [ { - "functionValidUntil" : "2028-09-29T16:06:36.000Z", + "functionValidUntil" : "2029-12-01T20:17:06.000Z", "catenaXsiteId" : "BPNS000000815DMY", "function" : "production", - "functionValidFrom" : "2018-01-28T10:00:57.000Z" + "functionValidFrom" : "2014-04-12T02:20:01.000Z" } ] } ] }, { @@ -177421,7 +177457,29 @@ } ] } ], "bpnl" : "BPNL00000003B2OM", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:e8c48a8e-d2d7-43d9-a867-65c70c85f5b8", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:65e1554e-e5cd-4560-bac1-1352582122fb", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000003B2OM", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000003B2OM" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003B2OM", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:e8c48a8e-d2d7-43d9-a867-65c70c85f5b8", "partTypeInformation" : { "manufacturerPartId" : "123564887-01", @@ -177435,60 +177493,32 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:68904173-ad59-4a77-8412-3e73fcafbd8b", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - }, { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:65e1554e-e5cd-4560-bac1-1352582122fb", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:e8c48a8e-d2d7-43d9-a867-65c70c85f5b8" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:e8c48a8e-d2d7-43d9-a867-65c70c85f5b8", "sites" : [ { - "functionValidUntil" : "2026-12-22T17:14:12.000Z", + "functionValidUntil" : "2026-02-11T05:43:44.000Z", "catenaXsiteId" : "BPNS00000003B2OM", "function" : "production", - "functionValidFrom" : "2015-01-20T06:24:12.000Z" + "functionValidFrom" : "2017-04-08T23:10:33.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "836794", + "orderNumber" : "954483", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 13 }, - "bioBasedClass" : "gen1", + "bioBasedClass" : "gen2", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 15 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", - "materialClass" : "3.1", + "materialClass" : "4.2", "unitOfMeasure" : { - "unitOfMeasureKey" : "unit:gram", + "unitOfMeasureKey" : "unit:decagram", "grossMaterialInputMass" : 3500, "materialNetMass" : 3000 }, @@ -177497,8 +177527,8 @@ "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "AS", - "referencedStandardID" : "9619", + "referencedStandard" : "EN", + "referencedStandardID" : "5853", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -177509,12 +177539,12 @@ "postConsumer" : { "isPreviousIndustryAutomotive" : false, "chemicalRecycling" : { - "isMassBalanced" : false, - "percentageOfMaterialWeight" : 13 + "isMassBalanced" : true, + "percentageOfMaterialWeight" : 12 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 11 + "percentageOfMaterialWeight" : 10 } }, "postConsumerAutomotive" : { @@ -177524,7 +177554,7 @@ }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 12 } }, "preConsumer" : { @@ -177557,7 +177587,29 @@ } ] } ], "bpnl" : "BPNL00000007OR16", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:94d086c6-0124-4f2c-86b2-1d419e47499d", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:e8c48a8e-d2d7-43d9-a867-65c70c85f5b8", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000007OR16", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000007OR16" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000007OR16", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:94d086c6-0124-4f2c-86b2-1d419e47499d", "partTypeInformation" : { "manufacturerPartId" : "9953421-03", @@ -177571,48 +177623,32 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:e8c48a8e-d2d7-43d9-a867-65c70c85f5b8", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:94d086c6-0124-4f2c-86b2-1d419e47499d" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:94d086c6-0124-4f2c-86b2-1d419e47499d", "sites" : [ { - "functionValidUntil" : "2024-07-24T09:37:51.000Z", + "functionValidUntil" : "2024-12-15T02:37:26.000Z", "catenaXsiteId" : "BPNS000000000001", "function" : "production", - "functionValidFrom" : "2018-12-11T18:43:32.000Z" + "functionValidFrom" : "2017-03-03T12:28:55.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "545187", + "orderNumber" : "542294", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 13 }, "bioBasedClass" : "gen3", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 16 + "percentageOfMaterialWeight" : 12 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", - "materialClass" : "4.2", + "materialClass" : "1.1", "unitOfMeasure" : { - "unitOfMeasureKey" : "unit:centigram", + "unitOfMeasureKey" : "unit:decigram", "grossMaterialInputMass" : 3500, "materialNetMass" : 3000 }, @@ -177621,8 +177657,8 @@ "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "GB", - "referencedStandardID" : "3409", + "referencedStandard" : "AS", + "referencedStandardID" : "3685", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -177634,27 +177670,27 @@ "isPreviousIndustryAutomotive" : true, "chemicalRecycling" : { "isMassBalanced" : false, - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 10 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 14 } }, "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 14 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 11 + "percentageOfMaterialWeight" : 12 } }, "preConsumer" : { "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 13 } } } @@ -177668,7 +177704,29 @@ "childItems" : [ ] } ], "bpnl" : "BPNL00000003CSGV", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:b0926d3c-6a8f-4fc7-81a4-88c50817358a", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:94d086c6-0124-4f2c-86b2-1d419e47499d", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000003CSGV", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000003CSGV" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003CSGV", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:b0926d3c-6a8f-4fc7-81a4-88c50817358a", "partTypeInformation" : { "manufacturerPartId" : "A26581-11", @@ -177682,58 +177740,42 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:94d086c6-0124-4f2c-86b2-1d419e47499d", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:b0926d3c-6a8f-4fc7-81a4-88c50817358a" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:b0926d3c-6a8f-4fc7-81a4-88c50817358a", "sites" : [ { - "functionValidUntil" : "2032-10-30T09:02:30.000Z", + "functionValidUntil" : "2032-05-28T20:52:43.000Z", "catenaXsiteId" : "BPNS000000000DQB", "function" : "production", - "functionValidFrom" : "2020-05-05T08:53:49.000Z" + "functionValidFrom" : "2014-01-01T01:02:59.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "942976", + "orderNumber" : "281403", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 14 }, "bioBasedClass" : "gen3", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 12 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", - "materialClass" : "2.1", + "materialClass" : "3.1", "unitOfMeasure" : { - "unitOfMeasureKey" : "unit:decigram", + "unitOfMeasureKey" : "unit:gram", "grossMaterialInputMass" : 3500, "materialNetMass" : 3000 }, "certificate" : [ { - "certificateName" : "Yellowcert", + "certificateName" : "Redcert", "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "JASO", - "referencedStandardID" : "3948", + "referencedStandard" : "IS", + "referencedStandardID" : "9009", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -177744,18 +177786,18 @@ "postConsumer" : { "isPreviousIndustryAutomotive" : true, "chemicalRecycling" : { - "isMassBalanced" : false, + "isMassBalanced" : true, "percentageOfMaterialWeight" : 11 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 11 } }, "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 12 }, "mechanicalRecycling" : { "isMassBalanced" : true, @@ -177765,7 +177807,7 @@ "preConsumer" : { "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 14 } } } @@ -177806,6 +177848,10 @@ } ], "bpnl" : "BPNL00000003AZQP", "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003AZQP", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:65e1554e-e5cd-4560-bac1-1352582122fb", "partTypeInformation" : { "manufacturerPartId" : "XK-34", @@ -177822,10 +177868,10 @@ "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:65e1554e-e5cd-4560-bac1-1352582122fb", "sites" : [ { - "functionValidUntil" : "2026-12-11T19:42:32.000Z", + "functionValidUntil" : "2026-05-31T06:57:45.000Z", "catenaXsiteId" : "BPNS000001111DMY", "function" : "production", - "functionValidFrom" : "2018-02-14T14:22:52.000Z" + "functionValidFrom" : "2016-01-27T17:06:59.000Z" } ] } ] }, { @@ -177848,7 +177894,29 @@ } ] } ], "bpnl" : "BPNL00000003B5MJ", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:e3e2a4d8-58bc-4ae9-afa2-e8946fda1f77", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:65e1554e-e5cd-4560-bac1-1352582122fb", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000003B5MJ", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000003B5MJ" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003B5MJ", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:e3e2a4d8-58bc-4ae9-afa2-e8946fda1f77", "partTypeInformation" : { "manufacturerPartId" : "39478586-36", @@ -177862,42 +177930,26 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:65e1554e-e5cd-4560-bac1-1352582122fb", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:e3e2a4d8-58bc-4ae9-afa2-e8946fda1f77" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:e3e2a4d8-58bc-4ae9-afa2-e8946fda1f77", "sites" : [ { - "functionValidUntil" : "2025-01-30T13:52:30.000Z", + "functionValidUntil" : "2031-08-11T06:26:59.000Z", "catenaXsiteId" : "BPNS00000003B5MJ", "function" : "production", - "functionValidFrom" : "2017-09-09T18:44:34.000Z" + "functionValidFrom" : "2018-05-06T18:35:06.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "951105", + "orderNumber" : "256208", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 13 }, "bioBasedClass" : "gen1", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 19 + "percentageOfMaterialWeight" : 16 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", @@ -177908,12 +177960,12 @@ "materialNetMass" : 3000 }, "certificate" : [ { - "certificateName" : "Redcert", + "certificateName" : "Bluecert", "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "AS", - "referencedStandardID" : "4288", + "referencedStandard" : "AISI", + "referencedStandardID" : "4433", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -177924,28 +177976,28 @@ "postConsumer" : { "isPreviousIndustryAutomotive" : true, "chemicalRecycling" : { - "isMassBalanced" : false, + "isMassBalanced" : true, "percentageOfMaterialWeight" : 10 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 11 } }, "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 12 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 14 } }, "preConsumer" : { "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 11 + "percentageOfMaterialWeight" : 12 } } } @@ -178025,6 +178077,10 @@ } ], "bpnl" : "BPNL00000003CML1", "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003CML1", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:8031a511-85d8-4568-97f3-9d155127430c", "partTypeInformation" : { "manufacturerPartId" : "ZZ-88", @@ -178041,10 +178097,10 @@ "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:8031a511-85d8-4568-97f3-9d155127430c", "sites" : [ { - "functionValidUntil" : "2024-11-16T00:28:19.000Z", + "functionValidUntil" : "2024-10-05T05:04:11.000Z", "catenaXsiteId" : "BPNS0000000008ZZ", "function" : "production", - "functionValidFrom" : "2018-12-24T11:07:15.000Z" + "functionValidFrom" : "2020-04-09T21:30:53.000Z" } ] } ] }, { @@ -178106,7 +178162,29 @@ } ] } ], "bpnl" : "BPNL00000003AZQP", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:b02700b1-c8a5-423c-83aa-0013fa0f8249", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:8031a511-85d8-4568-97f3-9d155127430c", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000003AZQP", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000003AZQP" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003AZQP", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:b02700b1-c8a5-423c-83aa-0013fa0f8249", "partTypeInformation" : { "manufacturerPartId" : "59878587-80", @@ -178120,58 +178198,42 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:8031a511-85d8-4568-97f3-9d155127430c", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:b02700b1-c8a5-423c-83aa-0013fa0f8249" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:b02700b1-c8a5-423c-83aa-0013fa0f8249", "sites" : [ { - "functionValidUntil" : "2032-03-19T20:02:16.000Z", + "functionValidUntil" : "2027-10-10T02:11:57.000Z", "catenaXsiteId" : "BPNS000001111DMY", "function" : "production", - "functionValidFrom" : "2015-04-23T09:07:11.000Z" + "functionValidFrom" : "2020-09-20T16:38:27.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "523960", + "orderNumber" : "552821", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 12 }, - "bioBasedClass" : "gen3", + "bioBasedClass" : "gen1", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 14 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", - "materialClass" : "5.1", + "materialClass" : "2.1", "unitOfMeasure" : { - "unitOfMeasureKey" : "unit:centigram", + "unitOfMeasureKey" : "unit:decigram", "grossMaterialInputMass" : 3500, "materialNetMass" : 3000 }, "certificate" : [ { - "certificateName" : "Yellowcert", + "certificateName" : "Redcert", "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "EN", - "referencedStandardID" : "3921", + "referencedStandard" : "AISI", + "referencedStandardID" : "3582", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -178183,7 +178245,7 @@ "isPreviousIndustryAutomotive" : false, "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 11 }, "mechanicalRecycling" : { "isMassBalanced" : true, @@ -178193,17 +178255,17 @@ "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 11 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 14 } }, "preConsumer" : { "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 13 } } } @@ -178256,7 +178318,29 @@ } ] } ], "bpnl" : "BPNL00000003CNKC", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:a420dfc5-af2d-4bbe-a31a-1a31ebe39b9f", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:b02700b1-c8a5-423c-83aa-0013fa0f8249", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000003CNKC", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000003CNKC" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003CNKC", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:a420dfc5-af2d-4bbe-a31a-1a31ebe39b9f", "partTypeInformation" : { "manufacturerPartId" : "9760254-64", @@ -178270,58 +178354,42 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:b02700b1-c8a5-423c-83aa-0013fa0f8249", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:a420dfc5-af2d-4bbe-a31a-1a31ebe39b9f" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:a420dfc5-af2d-4bbe-a31a-1a31ebe39b9f", "sites" : [ { - "functionValidUntil" : "2032-08-22T00:43:30.000Z", + "functionValidUntil" : "2032-06-18T06:20:16.000Z", "catenaXsiteId" : "BPNS00000008BDFH", "function" : "production", - "functionValidFrom" : "2014-12-08T13:54:47.000Z" + "functionValidFrom" : "2017-11-23T01:06:40.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "511024", + "orderNumber" : "384439", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 13 }, "bioBasedClass" : "gen2", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 19 + "percentageOfMaterialWeight" : 18 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", - "materialClass" : "3.1", + "materialClass" : "1.1", "unitOfMeasure" : { "unitOfMeasureKey" : "unit:decigram", "grossMaterialInputMass" : 3500, "materialNetMass" : 3000 }, "certificate" : [ { - "certificateName" : "Redcert", + "certificateName" : "Bluecert", "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "JIS", - "referencedStandardID" : "9500", + "referencedStandard" : "DIN EN", + "referencedStandardID" : "8289", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -178332,8 +178400,8 @@ "postConsumer" : { "isPreviousIndustryAutomotive" : false, "chemicalRecycling" : { - "isMassBalanced" : false, - "percentageOfMaterialWeight" : 11 + "isMassBalanced" : true, + "percentageOfMaterialWeight" : 10 }, "mechanicalRecycling" : { "isMassBalanced" : true, @@ -178343,17 +178411,17 @@ "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 11 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 11 } }, "preConsumer" : { "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 14 } } } @@ -178363,7 +178431,29 @@ }, { "catenaXId" : "urn:uuid:a432a8a6-af8f-4b7f-bb8a-7f287d86441f", "bpnl" : "BPNL00000003AZQP", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:a432a8a6-af8f-4b7f-bb8a-7f287d86441f", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:a420dfc5-af2d-4bbe-a31a-1a31ebe39b9f", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000003AZQP", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000003AZQP" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003AZQP", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:a432a8a6-af8f-4b7f-bb8a-7f287d86441f", "partTypeInformation" : { "manufacturerPartId" : "7B147D8-19", @@ -178377,70 +178467,42 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:0dbafb14-73fc-4899-a3d9-68bc79529bdf", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - }, { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:a420dfc5-af2d-4bbe-a31a-1a31ebe39b9f", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:a432a8a6-af8f-4b7f-bb8a-7f287d86441f" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:a432a8a6-af8f-4b7f-bb8a-7f287d86441f", "sites" : [ { - "functionValidUntil" : "2032-03-20T22:20:49.000Z", + "functionValidUntil" : "2029-11-14T00:14:46.000Z", "catenaXsiteId" : "BPNS000001111DMY", "function" : "production", - "functionValidFrom" : "2012-12-21T01:52:46.000Z" + "functionValidFrom" : "2019-11-04T23:53:24.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "404032", + "orderNumber" : "134901", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 13 }, "bioBasedClass" : "gen3", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 17 + "percentageOfMaterialWeight" : 19 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", "materialClass" : "4.2", "unitOfMeasure" : { - "unitOfMeasureKey" : "unit:gram", + "unitOfMeasureKey" : "unit:decigram", "grossMaterialInputMass" : 3500, "materialNetMass" : 3000 }, "certificate" : [ { - "certificateName" : "Greencert", + "certificateName" : "Yellowcert", "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "DIN", - "referencedStandardID" : "6573", + "referencedStandard" : "ASME", + "referencedStandardID" : "5172", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -178452,7 +178514,7 @@ "isPreviousIndustryAutomotive" : true, "chemicalRecycling" : { "isMassBalanced" : false, - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 10 }, "mechanicalRecycling" : { "isMassBalanced" : true, @@ -178462,7 +178524,7 @@ "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 10 }, "mechanicalRecycling" : { "isMassBalanced" : true, @@ -178472,7 +178534,7 @@ "preConsumer" : { "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 13 } } } @@ -178482,7 +178544,29 @@ }, { "catenaXId" : "urn:uuid:44805117-33b4-4293-a6f9-99316745e77d", "bpnl" : "BPNL00000003CSGV", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:44805117-33b4-4293-a6f9-99316745e77d", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:a420dfc5-af2d-4bbe-a31a-1a31ebe39b9f", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000003CSGV", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000003CSGV" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003CSGV", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:44805117-33b4-4293-a6f9-99316745e77d", "partTypeInformation" : { "manufacturerPartId" : "6X247E5-99", @@ -178496,58 +178580,30 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:0dbafb14-73fc-4899-a3d9-68bc79529bdf", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - }, { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:a420dfc5-af2d-4bbe-a31a-1a31ebe39b9f", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:44805117-33b4-4293-a6f9-99316745e77d" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:44805117-33b4-4293-a6f9-99316745e77d", "sites" : [ { - "functionValidUntil" : "2026-09-05T07:34:30.000Z", + "functionValidUntil" : "2029-01-19T02:42:16.000Z", "catenaXsiteId" : "BPNS00000003CSGV", "function" : "production", - "functionValidFrom" : "2017-11-16T10:02:29.000Z" + "functionValidFrom" : "2020-05-26T12:36:11.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "188306", + "orderNumber" : "794364", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 10 }, - "bioBasedClass" : "gen3", + "bioBasedClass" : "gen2", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 8 + "percentageOfMaterialWeight" : 21 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", - "materialClass" : "2.1", + "materialClass" : "3.1", "unitOfMeasure" : { "unitOfMeasureKey" : "unit:decigram", "grossMaterialInputMass" : 3500, @@ -178558,8 +178614,8 @@ "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "GB", - "referencedStandardID" : "2946", + "referencedStandard" : "ASME", + "referencedStandardID" : "8228", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -178571,27 +178627,27 @@ "isPreviousIndustryAutomotive" : false, "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 13 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 10 } }, "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 12 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 12 } }, "preConsumer" : { "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 11 + "percentageOfMaterialWeight" : 10 } } } @@ -178601,7 +178657,29 @@ }, { "catenaXId" : "urn:uuid:1c689a06-7f9d-42ca-9457-9104a4107d26", "bpnl" : "BPNL00000003CML1", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:1c689a06-7f9d-42ca-9457-9104a4107d26", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:a420dfc5-af2d-4bbe-a31a-1a31ebe39b9f", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000003CML1", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000003CML1" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003CML1", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:1c689a06-7f9d-42ca-9457-9104a4107d26", "partTypeInformation" : { "manufacturerPartId" : "2Z247F8-70", @@ -178615,45 +178693,17 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:0dbafb14-73fc-4899-a3d9-68bc79529bdf", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - }, { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:a420dfc5-af2d-4bbe-a31a-1a31ebe39b9f", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:1c689a06-7f9d-42ca-9457-9104a4107d26" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:1c689a06-7f9d-42ca-9457-9104a4107d26", "sites" : [ { - "functionValidUntil" : "2030-04-19T12:30:33.000Z", + "functionValidUntil" : "2030-09-07T00:42:54.000Z", "catenaXsiteId" : "BPNS0000000008ZZ", "function" : "production", - "functionValidFrom" : "2014-04-06T05:28:57.000Z" + "functionValidFrom" : "2017-11-09T08:19:46.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "295762", + "orderNumber" : "669265", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { @@ -178662,23 +178712,23 @@ "bioBasedClass" : "gen2", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 11 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", - "materialClass" : "3.1", + "materialClass" : "1.1", "unitOfMeasure" : { "unitOfMeasureKey" : "unit:centigram", "grossMaterialInputMass" : 3500, "materialNetMass" : 3000 }, "certificate" : [ { - "certificateName" : "Redcert", + "certificateName" : "Yellowcert", "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "EN", - "referencedStandardID" : "8628", + "referencedStandard" : "ISO", + "referencedStandardID" : "6237", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -178687,30 +178737,30 @@ }, "secondaryInorganic" : { "postConsumer" : { - "isPreviousIndustryAutomotive" : false, + "isPreviousIndustryAutomotive" : true, "chemicalRecycling" : { - "isMassBalanced" : false, - "percentageOfMaterialWeight" : 13 + "isMassBalanced" : true, + "percentageOfMaterialWeight" : 14 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 12 } }, "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 13 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 11 + "percentageOfMaterialWeight" : 10 } }, "preConsumer" : { "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 14 } } } @@ -178724,7 +178774,29 @@ "childItems" : [ ] } ], "bpnl" : "BPNL00000003B2OM", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:367348b3-7a6e-4708-8283-ed6ab132b79c", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:b02700b1-c8a5-423c-83aa-0013fa0f8249", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000003B2OM", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000003B2OM" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003B2OM", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:367348b3-7a6e-4708-8283-ed6ab132b79c", "partTypeInformation" : { "manufacturerPartId" : "6260254-43", @@ -178738,58 +178810,42 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:b02700b1-c8a5-423c-83aa-0013fa0f8249", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:367348b3-7a6e-4708-8283-ed6ab132b79c" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:367348b3-7a6e-4708-8283-ed6ab132b79c", "sites" : [ { - "functionValidUntil" : "2026-06-12T06:53:02.000Z", + "functionValidUntil" : "2026-09-07T20:28:15.000Z", "catenaXsiteId" : "BPNS00000003B2OM", "function" : "production", - "functionValidFrom" : "2020-12-17T08:49:16.000Z" + "functionValidFrom" : "2020-12-04T03:16:00.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "541348", + "orderNumber" : "475678", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 11 }, - "bioBasedClass" : "gen3", + "bioBasedClass" : "gen2", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 15 + "percentageOfMaterialWeight" : 18 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", - "materialClass" : "2.1", + "materialClass" : "1.1", "unitOfMeasure" : { "unitOfMeasureKey" : "unit:centigram", "grossMaterialInputMass" : 3500, "materialNetMass" : 3000 }, "certificate" : [ { - "certificateName" : "Greencert", + "certificateName" : "Bluecert", "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "EN", - "referencedStandardID" : "5011", + "referencedStandard" : "JIS", + "referencedStandardID" : "7180", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -178798,10 +178854,10 @@ }, "secondaryInorganic" : { "postConsumer" : { - "isPreviousIndustryAutomotive" : true, + "isPreviousIndustryAutomotive" : false, "chemicalRecycling" : { - "isMassBalanced" : true, - "percentageOfMaterialWeight" : 11 + "isMassBalanced" : false, + "percentageOfMaterialWeight" : 12 }, "mechanicalRecycling" : { "isMassBalanced" : true, @@ -178815,13 +178871,13 @@ }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 12 } }, "preConsumer" : { "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 10 } } } @@ -178835,7 +178891,29 @@ "childItems" : [ ] } ], "bpnl" : "BPNL00000003CSGV", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:f5efbf45-7d84-4442-b3b8-05cf1c5c5a0b", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:b02700b1-c8a5-423c-83aa-0013fa0f8249", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000003CSGV", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000003CSGV" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003CSGV", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:f5efbf45-7d84-4442-b3b8-05cf1c5c5a0b", "partTypeInformation" : { "manufacturerPartId" : "5760234-23", @@ -178849,59 +178927,43 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:b02700b1-c8a5-423c-83aa-0013fa0f8249", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:f5efbf45-7d84-4442-b3b8-05cf1c5c5a0b" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:f5efbf45-7d84-4442-b3b8-05cf1c5c5a0b", "sites" : [ { - "functionValidUntil" : "2032-12-24T15:41:32.000Z", + "functionValidUntil" : "2025-07-23T06:42:12.000Z", "catenaXsiteId" : "BPN", "function" : "production", - "functionValidFrom" : "2014-07-07T02:12:43.000Z", + "functionValidFrom" : "2017-09-09T20:44:29.000Z", "catenaXSiteId" : "BPNS00000003CSGV" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "182345", + "orderNumber" : "340209", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 11 }, - "bioBasedClass" : "gen1", + "bioBasedClass" : "gen2", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 19 + "percentageOfMaterialWeight" : 20 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", - "materialClass" : "2.1", + "materialClass" : "3.1", "unitOfMeasure" : { - "unitOfMeasureKey" : "unit:decagram", + "unitOfMeasureKey" : "unit:decigram", "grossMaterialInputMass" : 3500, "materialNetMass" : 3000 }, "certificate" : [ { - "certificateName" : "Yellowcert", + "certificateName" : "Bluecert", "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "DIN", - "referencedStandardID" : "9912", + "referencedStandard" : "EN", + "referencedStandardID" : "7223", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -178912,28 +178974,28 @@ "postConsumer" : { "isPreviousIndustryAutomotive" : true, "chemicalRecycling" : { - "isMassBalanced" : false, - "percentageOfMaterialWeight" : 13 + "isMassBalanced" : true, + "percentageOfMaterialWeight" : 11 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 14 } }, "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 11 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 11 } }, "preConsumer" : { "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 11 + "percentageOfMaterialWeight" : 10 } } } @@ -178973,7 +179035,29 @@ } ] } ], "bpnl" : "BPNL00000003CML1", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:21e1384d-ed81-48cf-a51b-e0a27a48741c", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:b02700b1-c8a5-423c-83aa-0013fa0f8249", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000003CML1", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000003CML1" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003CML1", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:21e1384d-ed81-48cf-a51b-e0a27a48741c", "partTypeInformation" : { "manufacturerPartId" : "8760254-76", @@ -178987,46 +179071,30 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:b02700b1-c8a5-423c-83aa-0013fa0f8249", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:21e1384d-ed81-48cf-a51b-e0a27a48741c" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:21e1384d-ed81-48cf-a51b-e0a27a48741c", "sites" : [ { - "functionValidUntil" : "2029-06-15T11:05:28.000Z", + "functionValidUntil" : "2028-08-10T18:10:21.000Z", "catenaXsiteId" : "BPNS0000000008ZZ", "function" : "production", - "functionValidFrom" : "2014-07-26T10:34:55.000Z" + "functionValidFrom" : "2019-08-15T11:00:16.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "931310", + "orderNumber" : "395794", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 12 }, - "bioBasedClass" : "gen1", + "bioBasedClass" : "gen3", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 16 + "percentageOfMaterialWeight" : 17 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", - "materialClass" : "1.1", + "materialClass" : "4.2", "unitOfMeasure" : { "unitOfMeasureKey" : "unit:gram", "grossMaterialInputMass" : 3500, @@ -179037,8 +179105,8 @@ "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "EN", - "referencedStandardID" : "7563", + "referencedStandard" : "DIN EN", + "referencedStandardID" : "1356", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -179049,8 +179117,8 @@ "postConsumer" : { "isPreviousIndustryAutomotive" : false, "chemicalRecycling" : { - "isMassBalanced" : false, - "percentageOfMaterialWeight" : 13 + "isMassBalanced" : true, + "percentageOfMaterialWeight" : 11 }, "mechanicalRecycling" : { "isMassBalanced" : true, @@ -179060,7 +179128,7 @@ "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 14 }, "mechanicalRecycling" : { "isMassBalanced" : true, @@ -179070,7 +179138,7 @@ "preConsumer" : { "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 12 } } } @@ -179080,7 +179148,29 @@ }, { "catenaXId" : "urn:uuid:6704474a-4aa5-4f91-acd5-dd24997c0023", "bpnl" : "BPNL00000003CNKC", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:6704474a-4aa5-4f91-acd5-dd24997c0023", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:21e1384d-ed81-48cf-a51b-e0a27a48741c", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000003CNKC", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000003CNKC" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003CNKC", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:6704474a-4aa5-4f91-acd5-dd24997c0023", "partTypeInformation" : { "manufacturerPartId" : "7C147E8-87", @@ -179094,58 +179184,42 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:21e1384d-ed81-48cf-a51b-e0a27a48741c", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:6704474a-4aa5-4f91-acd5-dd24997c0023" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:6704474a-4aa5-4f91-acd5-dd24997c0023", "sites" : [ { - "functionValidUntil" : "2028-04-23T15:09:08.000Z", + "functionValidUntil" : "2032-08-04T11:58:09.000Z", "catenaXsiteId" : "BPNS00000008BDFH", "function" : "production", - "functionValidFrom" : "2018-03-25T16:47:58.000Z" + "functionValidFrom" : "2014-11-04T06:19:51.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "863971", + "orderNumber" : "584319", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 10 }, - "bioBasedClass" : "gen2", + "bioBasedClass" : "gen1", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 19 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", - "materialClass" : "3.1", + "materialClass" : "4.2", "unitOfMeasure" : { "unitOfMeasureKey" : "unit:centigram", "grossMaterialInputMass" : 3500, "materialNetMass" : 3000 }, "certificate" : [ { - "certificateName" : "Redcert", + "certificateName" : "Greencert", "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "EN", - "referencedStandardID" : "2980", + "referencedStandard" : "AISI", + "referencedStandardID" : "2807", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -179154,20 +179228,20 @@ }, "secondaryInorganic" : { "postConsumer" : { - "isPreviousIndustryAutomotive" : true, + "isPreviousIndustryAutomotive" : false, "chemicalRecycling" : { - "isMassBalanced" : false, - "percentageOfMaterialWeight" : 10 + "isMassBalanced" : true, + "percentageOfMaterialWeight" : 12 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 11 } }, "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 11 }, "mechanicalRecycling" : { "isMassBalanced" : true, @@ -179177,7 +179251,7 @@ "preConsumer" : { "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 12 } } } @@ -179187,7 +179261,29 @@ }, { "catenaXId" : "urn:uuid:9aff47cb-882a-4470-a7bd-d87d87d51782", "bpnl" : "BPNL00000003AYRE", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:9aff47cb-882a-4470-a7bd-d87d87d51782", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:21e1384d-ed81-48cf-a51b-e0a27a48741c", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000003AYRE", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000003AYRE" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003AYRE", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:9aff47cb-882a-4470-a7bd-d87d87d51782", "partTypeInformation" : { "manufacturerPartId" : "9C147E8-67", @@ -179201,58 +179297,42 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:21e1384d-ed81-48cf-a51b-e0a27a48741c", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:9aff47cb-882a-4470-a7bd-d87d87d51782" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:9aff47cb-882a-4470-a7bd-d87d87d51782", "sites" : [ { - "functionValidUntil" : "2026-06-30T11:51:18.000Z", + "functionValidUntil" : "2027-03-24T22:57:44.000Z", "catenaXsiteId" : "BPNS000004711DMY", "function" : "production", - "functionValidFrom" : "2017-12-07T15:54:06.000Z" + "functionValidFrom" : "2017-09-30T16:30:45.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "13392", + "orderNumber" : "591379", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 13 }, "bioBasedClass" : "gen1", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 20 + "percentageOfMaterialWeight" : 16 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", - "materialClass" : "4.2", + "materialClass" : "5.1", "unitOfMeasure" : { - "unitOfMeasureKey" : "unit:decigram", + "unitOfMeasureKey" : "unit:decagram", "grossMaterialInputMass" : 3500, "materialNetMass" : 3000 }, "certificate" : [ { - "certificateName" : "Greencert", + "certificateName" : "Redcert", "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "GB", - "referencedStandardID" : "1262", + "referencedStandard" : "EN", + "referencedStandardID" : "9964", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -179263,28 +179343,28 @@ "postConsumer" : { "isPreviousIndustryAutomotive" : false, "chemicalRecycling" : { - "isMassBalanced" : true, - "percentageOfMaterialWeight" : 10 + "isMassBalanced" : false, + "percentageOfMaterialWeight" : 11 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 12 } }, "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 10 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 14 } }, "preConsumer" : { "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 11 + "percentageOfMaterialWeight" : 12 } } } @@ -179311,7 +179391,29 @@ } ] } ], "bpnl" : "BPNL00000003CNKC", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:5c082f9d-7f30-42ec-88f3-1ef97d01caa1", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:8031a511-85d8-4568-97f3-9d155127430c", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000003CNKC", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000003CNKC" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003CNKC", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:5c082f9d-7f30-42ec-88f3-1ef97d01caa1", "partTypeInformation" : { "manufacturerPartId" : "88878587-67", @@ -179325,58 +179427,42 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:8031a511-85d8-4568-97f3-9d155127430c", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:5c082f9d-7f30-42ec-88f3-1ef97d01caa1" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:5c082f9d-7f30-42ec-88f3-1ef97d01caa1", "sites" : [ { - "functionValidUntil" : "2032-11-30T20:57:28.000Z", + "functionValidUntil" : "2029-04-04T17:24:01.000Z", "catenaXsiteId" : "BPNS00000008BDFH", "function" : "production", - "functionValidFrom" : "2017-01-14T10:40:10.000Z" + "functionValidFrom" : "2014-05-16T17:52:23.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "990518", + "orderNumber" : "500876", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 10 }, - "bioBasedClass" : "gen3", + "bioBasedClass" : "gen1", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 15 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", - "materialClass" : "2.1", + "materialClass" : "1.1", "unitOfMeasure" : { "unitOfMeasureKey" : "unit:decigram", "grossMaterialInputMass" : 3500, "materialNetMass" : 3000 }, "certificate" : [ { - "certificateName" : "Yellowcert", + "certificateName" : "Greencert", "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "ASME", - "referencedStandardID" : "5183", + "referencedStandard" : "GB", + "referencedStandardID" : "9783", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -179385,30 +179471,30 @@ }, "secondaryInorganic" : { "postConsumer" : { - "isPreviousIndustryAutomotive" : false, + "isPreviousIndustryAutomotive" : true, "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 14 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 12 } }, "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 14 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 11 + "percentageOfMaterialWeight" : 13 } }, "preConsumer" : { "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 10 } } } @@ -179435,7 +179521,29 @@ } ] } ], "bpnl" : "BPNL00000003CML1", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:e1dbd194-ca84-4bb9-bcfc-0a9df065f118", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:5c082f9d-7f30-42ec-88f3-1ef97d01caa1", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000003CML1", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000003CML1" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003CML1", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:e1dbd194-ca84-4bb9-bcfc-0a9df065f118", "partTypeInformation" : { "manufacturerPartId" : "6760255-12", @@ -179449,58 +179557,42 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:5c082f9d-7f30-42ec-88f3-1ef97d01caa1", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:e1dbd194-ca84-4bb9-bcfc-0a9df065f118" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:e1dbd194-ca84-4bb9-bcfc-0a9df065f118", "sites" : [ { - "functionValidUntil" : "2025-02-05T21:31:27.000Z", + "functionValidUntil" : "2026-04-14T10:50:06.000Z", "catenaXsiteId" : "BPNS0000000008ZZ", "function" : "production", - "functionValidFrom" : "2014-06-17T22:00:03.000Z" + "functionValidFrom" : "2020-08-20T17:06:08.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "10835", + "orderNumber" : "245825", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { - "percentageOfMaterialWeight" : 11 + "percentageOfMaterialWeight" : 14 }, - "bioBasedClass" : "gen3", + "bioBasedClass" : "gen2", "secondaryBioBased" : { "isMassBalanced" : true, "percentageOfMaterialWeight" : 15 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", - "materialClass" : "1.1", + "materialClass" : "5.1", "unitOfMeasure" : { "unitOfMeasureKey" : "unit:gram", "grossMaterialInputMass" : 3500, "materialNetMass" : 3000 }, "certificate" : [ { - "certificateName" : "Redcert", + "certificateName" : "Bluecert", "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "JIS", - "referencedStandardID" : "3209", + "referencedStandard" : "DIN EN", + "referencedStandardID" : "3182", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -179509,10 +179601,10 @@ }, "secondaryInorganic" : { "postConsumer" : { - "isPreviousIndustryAutomotive" : false, + "isPreviousIndustryAutomotive" : true, "chemicalRecycling" : { - "isMassBalanced" : true, - "percentageOfMaterialWeight" : 13 + "isMassBalanced" : false, + "percentageOfMaterialWeight" : 11 }, "mechanicalRecycling" : { "isMassBalanced" : true, @@ -179522,7 +179614,7 @@ "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 12 }, "mechanicalRecycling" : { "isMassBalanced" : true, @@ -179532,7 +179624,7 @@ "preConsumer" : { "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 11 } } } @@ -179542,7 +179634,29 @@ }, { "catenaXId" : "urn:uuid:e099ab26-f5ef-466b-b9b9-0b14e5c3d8a4", "bpnl" : "BPNL00000003AZQP", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:e099ab26-f5ef-466b-b9b9-0b14e5c3d8a4", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:e1dbd194-ca84-4bb9-bcfc-0a9df065f118", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000003AZQP", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000003AZQP" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003AZQP", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:e099ab26-f5ef-466b-b9b9-0b14e5c3d8a4", "partTypeInformation" : { "manufacturerPartId" : "1D147E8-90", @@ -179556,48 +179670,32 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:e1dbd194-ca84-4bb9-bcfc-0a9df065f118", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:e099ab26-f5ef-466b-b9b9-0b14e5c3d8a4" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:e099ab26-f5ef-466b-b9b9-0b14e5c3d8a4", "sites" : [ { - "functionValidUntil" : "2027-02-21T14:43:07.000Z", + "functionValidUntil" : "2030-09-22T21:40:32.000Z", "catenaXsiteId" : "BPNS000001111DMY", "function" : "production", - "functionValidFrom" : "2020-05-27T01:03:26.000Z" + "functionValidFrom" : "2017-12-27T09:20:11.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "653046", + "orderNumber" : "63293", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { - "percentageOfMaterialWeight" : 11 + "percentageOfMaterialWeight" : 12 }, "bioBasedClass" : "gen3", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 20 + "percentageOfMaterialWeight" : 11 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", "materialClass" : "1.1", "unitOfMeasure" : { - "unitOfMeasureKey" : "unit:centigram", + "unitOfMeasureKey" : "unit:decigram", "grossMaterialInputMass" : 3500, "materialNetMass" : 3000 }, @@ -179606,8 +179704,8 @@ "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "EN", - "referencedStandardID" : "2502", + "referencedStandard" : "ASME", + "referencedStandardID" : "8731", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -179619,27 +179717,27 @@ "isPreviousIndustryAutomotive" : true, "chemicalRecycling" : { "isMassBalanced" : false, - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 14 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 11 } }, "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 11 + "percentageOfMaterialWeight" : 14 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 11 + "percentageOfMaterialWeight" : 12 } }, "preConsumer" : { "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 14 } } } @@ -179650,23 +179748,45 @@ "catenaXId" : "urn:uuid:a732f36e-be5a-49f0-9b83-08d4b1c203c6", "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsPlanned" : [ { "catenaXId" : "urn:uuid:a732f36e-be5a-49f0-9b83-08d4b1c203c6", - "childItems" : [ { + "childItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:72ec2897-4e20-475c-a28b-019cf5b42a18", + "quantity" : { + "unit" : "unit:piece", + "value" : 1 + }, + "businessPartner" : "BPNL00000003CNKC", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ] + } ], + "bpnl" : "BPNL00000003AYRE", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:a732f36e-be5a-49f0-9b83-08d4b1c203c6", + "parentItems" : [ { "validityPeriod" : { "validFrom" : "2023-03-21T08:17:29.187+01:00", "validTo" : "2024-07-01T16:10:00.000+01:00" }, - "catenaXId" : "urn:uuid:72ec2897-4e20-475c-a28b-019cf5b42a18", + "catenaXId" : "urn:uuid:8031a511-85d8-4568-97f3-9d155127430c", "quantity" : { "unit" : "unit:piece", - "value" : 1 + "value" : 20 }, - "businessPartner" : "BPNL00000003CNKC", + "businessPartner" : "BPNL00000003AYRE", "createdOn" : "2022-02-03T14:48:54.709Z", "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ] + } ], + "customers" : [ "BPNL00000003AYRE" ] } ], - "bpnl" : "BPNL00000003AYRE", "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003AYRE", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:a732f36e-be5a-49f0-9b83-08d4b1c203c6", "partTypeInformation" : { "manufacturerPartId" : "48878587-88", @@ -179680,58 +179800,42 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:8031a511-85d8-4568-97f3-9d155127430c", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:a732f36e-be5a-49f0-9b83-08d4b1c203c6" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:a732f36e-be5a-49f0-9b83-08d4b1c203c6", "sites" : [ { - "functionValidUntil" : "2025-10-09T22:37:59.000Z", + "functionValidUntil" : "2028-11-12T04:15:25.000Z", "catenaXsiteId" : "BPNS000004711DMY", "function" : "production", - "functionValidFrom" : "2020-05-03T10:51:28.000Z" + "functionValidFrom" : "2015-08-30T04:06:15.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "837438", + "orderNumber" : "199429", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 13 }, "bioBasedClass" : "gen3", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 23 + "percentageOfMaterialWeight" : 14 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", - "materialClass" : "4.2", + "materialClass" : "5.1", "unitOfMeasure" : { "unitOfMeasureKey" : "unit:decagram", "grossMaterialInputMass" : 3500, "materialNetMass" : 3000 }, "certificate" : [ { - "certificateName" : "Greencert", + "certificateName" : "Bluecert", "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { "referencedStandard" : "IS", - "referencedStandardID" : "4531", + "referencedStandardID" : "3768", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -179740,30 +179844,30 @@ }, "secondaryInorganic" : { "postConsumer" : { - "isPreviousIndustryAutomotive" : false, + "isPreviousIndustryAutomotive" : true, "chemicalRecycling" : { - "isMassBalanced" : false, - "percentageOfMaterialWeight" : 10 + "isMassBalanced" : true, + "percentageOfMaterialWeight" : 12 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 11 + "percentageOfMaterialWeight" : 12 } }, "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 12 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 11 } }, "preConsumer" : { "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 14 } } } @@ -179777,7 +179881,29 @@ "childItems" : [ ] } ], "bpnl" : "BPNL00000003CNKC", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:72ec2897-4e20-475c-a28b-019cf5b42a18", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:a732f36e-be5a-49f0-9b83-08d4b1c203c6", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000003CNKC", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000003CNKC" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003CNKC", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:72ec2897-4e20-475c-a28b-019cf5b42a18", "partTypeInformation" : { "manufacturerPartId" : "5760244-23", @@ -179791,58 +179917,42 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:a732f36e-be5a-49f0-9b83-08d4b1c203c6", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:72ec2897-4e20-475c-a28b-019cf5b42a18" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:72ec2897-4e20-475c-a28b-019cf5b42a18", "sites" : [ { - "functionValidUntil" : "2030-12-16T04:52:53.000Z", + "functionValidUntil" : "2028-04-24T18:13:21.000Z", "catenaXsiteId" : "BPNS00000008BDFH", "function" : "production", - "functionValidFrom" : "2019-08-29T08:31:58.000Z" + "functionValidFrom" : "2014-10-05T09:37:34.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "809053", + "orderNumber" : "525867", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { "percentageOfMaterialWeight" : 10 }, - "bioBasedClass" : "gen1", + "bioBasedClass" : "gen3", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 19 + "percentageOfMaterialWeight" : 14 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", - "materialClass" : "4.2", + "materialClass" : "1.1", "unitOfMeasure" : { - "unitOfMeasureKey" : "unit:gram", + "unitOfMeasureKey" : "unit:decagram", "grossMaterialInputMass" : 3500, "materialNetMass" : 3000 }, "certificate" : [ { - "certificateName" : "Redcert", + "certificateName" : "Yellowcert", "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "DIN EN", - "referencedStandardID" : "6521", + "referencedStandard" : "ASME", + "referencedStandardID" : "8135", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -179854,21 +179964,21 @@ "isPreviousIndustryAutomotive" : true, "chemicalRecycling" : { "isMassBalanced" : false, - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 14 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 14 } }, "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 11 + "percentageOfMaterialWeight" : 10 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 12 } }, "preConsumer" : { @@ -179888,7 +179998,29 @@ "childItems" : [ ] } ], "bpnl" : "BPNL00000003CSGV", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:b7289d8e-3f09-4052-80a7-436ad6a0486b", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:089aafa6-fde3-4f3a-a56c-7d44127f0b65", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000003CSGV", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000003CSGV" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003CSGV", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:b7289d8e-3f09-4052-80a7-436ad6a0486b", "partTypeInformation" : { "manufacturerPartId" : "9760254-64", @@ -179902,70 +180034,42 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:72ec2897-4e20-475c-a28b-019cf5b42a18", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - }, { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:089aafa6-fde3-4f3a-a56c-7d44127f0b65", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:b7289d8e-3f09-4052-80a7-436ad6a0486b" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:b7289d8e-3f09-4052-80a7-436ad6a0486b", "sites" : [ { - "functionValidUntil" : "2027-08-22T22:07:38.000Z", + "functionValidUntil" : "2026-08-03T13:19:28.000Z", "catenaXsiteId" : "BPNS00000003CSGV", "function" : "production", - "functionValidFrom" : "2018-05-14T11:22:56.000Z" + "functionValidFrom" : "2017-02-01T18:22:45.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "984441", + "orderNumber" : "847964", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { - "percentageOfMaterialWeight" : 11 + "percentageOfMaterialWeight" : 14 }, - "bioBasedClass" : "gen3", + "bioBasedClass" : "gen1", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 21 + "percentageOfMaterialWeight" : 10 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", - "materialClass" : "1.1", + "materialClass" : "4.2", "unitOfMeasure" : { - "unitOfMeasureKey" : "unit:decigram", + "unitOfMeasureKey" : "unit:decagram", "grossMaterialInputMass" : 3500, "materialNetMass" : 3000 }, "certificate" : [ { - "certificateName" : "Greencert", + "certificateName" : "Bluecert", "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "ISO", - "referencedStandardID" : "8760", + "referencedStandard" : "IS", + "referencedStandardID" : "1803", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -179974,30 +180078,30 @@ }, "secondaryInorganic" : { "postConsumer" : { - "isPreviousIndustryAutomotive" : true, + "isPreviousIndustryAutomotive" : false, "chemicalRecycling" : { "isMassBalanced" : false, - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 14 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 11 } }, "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 11 + "percentageOfMaterialWeight" : 13 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 13 } }, "preConsumer" : { "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 11 + "percentageOfMaterialWeight" : 13 } } } @@ -180102,7 +180206,29 @@ } ] } ], "bpnl" : "BPNL00000003CML1", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:089aafa6-fde3-4f3a-a56c-7d44127f0b65", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:a732f36e-be5a-49f0-9b83-08d4b1c203c6", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000003CML1", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000003CML1" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003CML1", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:089aafa6-fde3-4f3a-a56c-7d44127f0b65", "partTypeInformation" : { "manufacturerPartId" : "9760254-64", @@ -180116,58 +180242,42 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:a732f36e-be5a-49f0-9b83-08d4b1c203c6", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:089aafa6-fde3-4f3a-a56c-7d44127f0b65" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:089aafa6-fde3-4f3a-a56c-7d44127f0b65", "sites" : [ { - "functionValidUntil" : "2025-12-19T18:48:23.000Z", + "functionValidUntil" : "2024-04-03T06:31:04.000Z", "catenaXsiteId" : "BPNS0000000008ZZ", "function" : "production", - "functionValidFrom" : "2014-11-09T15:22:33.000Z" + "functionValidFrom" : "2014-02-16T19:21:30.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "698914", + "orderNumber" : "651490", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 11 }, "bioBasedClass" : "gen2", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 21 + "percentageOfMaterialWeight" : 18 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", - "materialClass" : "3.1", + "materialClass" : "4.2", "unitOfMeasure" : { - "unitOfMeasureKey" : "unit:gram", + "unitOfMeasureKey" : "unit:centigram", "grossMaterialInputMass" : 3500, "materialNetMass" : 3000 }, "certificate" : [ { - "certificateName" : "Yellowcert", + "certificateName" : "Bluecert", "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "EN", - "referencedStandardID" : "6680", + "referencedStandard" : "AS", + "referencedStandardID" : "2731", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -180176,20 +180286,20 @@ }, "secondaryInorganic" : { "postConsumer" : { - "isPreviousIndustryAutomotive" : false, + "isPreviousIndustryAutomotive" : true, "chemicalRecycling" : { - "isMassBalanced" : true, - "percentageOfMaterialWeight" : 14 + "isMassBalanced" : false, + "percentageOfMaterialWeight" : 11 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 14 } }, "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 14 }, "mechanicalRecycling" : { "isMassBalanced" : true, @@ -180199,7 +180309,7 @@ "preConsumer" : { "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 11 + "percentageOfMaterialWeight" : 10 } } } @@ -180213,7 +180323,29 @@ "childItems" : [ ] } ], "bpnl" : "BPNL00000003CML1", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:a87237ab-7597-4a75-8e4b-3ed7bff22dfa", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:b7289d8e-3f09-4052-80a7-436ad6a0486b", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000003CML1", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000003CML1" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003CML1", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:a87237ab-7597-4a75-8e4b-3ed7bff22dfa", "partTypeInformation" : { "manufacturerPartId" : "9760254-64", @@ -180227,70 +180359,42 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:589a103f-8c83-48ef-8d2c-d7ee8e93d667", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - }, { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:b7289d8e-3f09-4052-80a7-436ad6a0486b", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:a87237ab-7597-4a75-8e4b-3ed7bff22dfa" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:a87237ab-7597-4a75-8e4b-3ed7bff22dfa", "sites" : [ { - "functionValidUntil" : "2024-09-03T01:55:49.000Z", + "functionValidUntil" : "2032-03-20T18:29:04.000Z", "catenaXsiteId" : "BPNS0000000008ZZ", "function" : "production", - "functionValidFrom" : "2013-11-08T23:38:14.000Z" + "functionValidFrom" : "2016-07-31T22:46:31.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "835557", + "orderNumber" : "830881", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 13 }, - "bioBasedClass" : "gen2", + "bioBasedClass" : "gen1", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 10 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", - "materialClass" : "2.1", + "materialClass" : "5.1", "unitOfMeasure" : { "unitOfMeasureKey" : "unit:decagram", "grossMaterialInputMass" : 3500, "materialNetMass" : 3000 }, "certificate" : [ { - "certificateName" : "Redcert", + "certificateName" : "Yellowcert", "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "ISO", - "referencedStandardID" : "3560", + "referencedStandard" : "EN", + "referencedStandardID" : "6746", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -180302,7 +180406,7 @@ "isPreviousIndustryAutomotive" : false, "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 14 }, "mechanicalRecycling" : { "isMassBalanced" : true, @@ -180312,7 +180416,7 @@ "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 12 }, "mechanicalRecycling" : { "isMassBalanced" : true, @@ -180322,7 +180426,7 @@ "preConsumer" : { "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 12 } } } @@ -180336,7 +180440,29 @@ "childItems" : [ ] } ], "bpnl" : "BPNL00000003CNKC", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:920b628f-c418-4e96-a19f-289fce7851d8", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:b7289d8e-3f09-4052-80a7-436ad6a0486b", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000003CNKC", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000003CNKC" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003CNKC", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:920b628f-c418-4e96-a19f-289fce7851d8", "partTypeInformation" : { "manufacturerPartId" : "9760254-64", @@ -180350,54 +180476,26 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:589a103f-8c83-48ef-8d2c-d7ee8e93d667", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - }, { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:b7289d8e-3f09-4052-80a7-436ad6a0486b", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:920b628f-c418-4e96-a19f-289fce7851d8" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:920b628f-c418-4e96-a19f-289fce7851d8", "sites" : [ { - "functionValidUntil" : "2030-11-25T10:12:06.000Z", + "functionValidUntil" : "2031-05-17T06:57:52.000Z", "catenaXsiteId" : "BPNS00000008BDFH", "function" : "production", - "functionValidFrom" : "2014-12-31T23:26:03.000Z" + "functionValidFrom" : "2015-03-09T12:50:35.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "775890", + "orderNumber" : "169263", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 10 }, - "bioBasedClass" : "gen2", + "bioBasedClass" : "gen1", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 16 + "percentageOfMaterialWeight" : 10 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", @@ -180412,8 +180510,8 @@ "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "JIS", - "referencedStandardID" : "2009", + "referencedStandard" : "DIN EN", + "referencedStandardID" : "2084", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -180422,30 +180520,30 @@ }, "secondaryInorganic" : { "postConsumer" : { - "isPreviousIndustryAutomotive" : true, + "isPreviousIndustryAutomotive" : false, "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 13 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 14 } }, "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 14 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 14 } }, "preConsumer" : { "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 13 } } } @@ -180719,7 +180817,29 @@ } ] } ], "bpnl" : "BPNL00000003B2OM", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:589a103f-8c83-48ef-8d2c-d7ee8e93d667", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:089aafa6-fde3-4f3a-a56c-7d44127f0b65", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000003B2OM", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000003B2OM" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003B2OM", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:589a103f-8c83-48ef-8d2c-d7ee8e93d667", "partTypeInformation" : { "manufacturerPartId" : "9760254-64", @@ -180733,48 +180853,32 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:089aafa6-fde3-4f3a-a56c-7d44127f0b65", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:589a103f-8c83-48ef-8d2c-d7ee8e93d667" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:589a103f-8c83-48ef-8d2c-d7ee8e93d667", "sites" : [ { - "functionValidUntil" : "2026-11-19T21:40:46.000Z", + "functionValidUntil" : "2030-09-15T09:19:47.000Z", "catenaXsiteId" : "BPNS00000003B2OM", "function" : "production", - "functionValidFrom" : "2020-07-20T06:09:48.000Z" + "functionValidFrom" : "2012-12-18T15:31:13.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "827153", + "orderNumber" : "406597", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 11 }, "bioBasedClass" : "gen2", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 20 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", - "materialClass" : "1.1", + "materialClass" : "4.2", "unitOfMeasure" : { - "unitOfMeasureKey" : "unit:decigram", + "unitOfMeasureKey" : "unit:decagram", "grossMaterialInputMass" : 3500, "materialNetMass" : 3000 }, @@ -180783,8 +180887,8 @@ "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "DIN EN", - "referencedStandardID" : "2815", + "referencedStandard" : "GB", + "referencedStandardID" : "7969", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -180793,10 +180897,10 @@ }, "secondaryInorganic" : { "postConsumer" : { - "isPreviousIndustryAutomotive" : false, + "isPreviousIndustryAutomotive" : true, "chemicalRecycling" : { - "isMassBalanced" : true, - "percentageOfMaterialWeight" : 10 + "isMassBalanced" : false, + "percentageOfMaterialWeight" : 11 }, "mechanicalRecycling" : { "isMassBalanced" : true, @@ -180806,17 +180910,17 @@ "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 11 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 13 } }, "preConsumer" : { "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 11 } } } @@ -180830,7 +180934,29 @@ "childItems" : [ ] } ], "bpnl" : "BPNL00000003AYRE", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:e7622f69-d4ca-49c9-8bb9-95a135e418e4", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:4f73c61f-c956-4144-8e55-b53b6b61220e", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000003AYRE", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000003AYRE" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003AYRE", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:e7622f69-d4ca-49c9-8bb9-95a135e418e4", "partTypeInformation" : { "manufacturerPartId" : "9760254-64", @@ -180844,60 +180970,32 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:089aafa6-fde3-4f3a-a56c-7d44127f0b65", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - }, { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:4f73c61f-c956-4144-8e55-b53b6b61220e", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:e7622f69-d4ca-49c9-8bb9-95a135e418e4" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:e7622f69-d4ca-49c9-8bb9-95a135e418e4", "sites" : [ { - "functionValidUntil" : "2024-03-24T21:58:55.000Z", + "functionValidUntil" : "2027-03-03T09:22:10.000Z", "catenaXsiteId" : "BPNS000004711DMY", "function" : "production", - "functionValidFrom" : "2019-05-23T12:57:23.000Z" + "functionValidFrom" : "2020-05-04T22:14:53.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "721683", + "orderNumber" : "908106", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 11 }, "bioBasedClass" : "gen1", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 18 + "percentageOfMaterialWeight" : 14 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", "materialClass" : "4.2", "unitOfMeasure" : { - "unitOfMeasureKey" : "unit:decigram", + "unitOfMeasureKey" : "unit:centigram", "grossMaterialInputMass" : 3500, "materialNetMass" : 3000 }, @@ -180906,8 +181004,8 @@ "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "JIS", - "referencedStandardID" : "4782", + "referencedStandard" : "DIN", + "referencedStandardID" : "5837", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -180919,27 +181017,27 @@ "isPreviousIndustryAutomotive" : false, "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 14 + "percentageOfMaterialWeight" : 10 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 11 + "percentageOfMaterialWeight" : 12 } }, "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 14 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 13 } }, "preConsumer" : { "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 10 + "percentageOfMaterialWeight" : 14 } } } @@ -180992,7 +181090,29 @@ } ] } ], "bpnl" : "BPNL00000003CNKC", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:0dbafb14-73fc-4899-a3d9-68bc79529bdf", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:a732f36e-be5a-49f0-9b83-08d4b1c203c6", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000003CNKC", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000003CNKC" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003CNKC", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:0dbafb14-73fc-4899-a3d9-68bc79529bdf", "partTypeInformation" : { "manufacturerPartId" : "9760254-64", @@ -181006,58 +181126,42 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:a732f36e-be5a-49f0-9b83-08d4b1c203c6", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:0dbafb14-73fc-4899-a3d9-68bc79529bdf" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:0dbafb14-73fc-4899-a3d9-68bc79529bdf", "sites" : [ { - "functionValidUntil" : "2026-07-20T04:41:52.000Z", + "functionValidUntil" : "2027-01-24T06:34:06.000Z", "catenaXsiteId" : "BPNS00000008BDFH", "function" : "production", - "functionValidFrom" : "2019-12-23T20:38:53.000Z" + "functionValidFrom" : "2016-11-09T06:37:19.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "213452", + "orderNumber" : "396011", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 12 }, "bioBasedClass" : "gen3", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 18 + "percentageOfMaterialWeight" : 17 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", - "materialClass" : "2.1", + "materialClass" : "1.1", "unitOfMeasure" : { - "unitOfMeasureKey" : "unit:decagram", + "unitOfMeasureKey" : "unit:centigram", "grossMaterialInputMass" : 3500, "materialNetMass" : 3000 }, "certificate" : [ { - "certificateName" : "Yellowcert", + "certificateName" : "Redcert", "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "ASME", - "referencedStandardID" : "7632", + "referencedStandard" : "GB", + "referencedStandardID" : "6919", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -181068,8 +181172,8 @@ "postConsumer" : { "isPreviousIndustryAutomotive" : true, "chemicalRecycling" : { - "isMassBalanced" : true, - "percentageOfMaterialWeight" : 10 + "isMassBalanced" : false, + "percentageOfMaterialWeight" : 14 }, "mechanicalRecycling" : { "isMassBalanced" : true, @@ -181079,7 +181183,7 @@ "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 10 }, "mechanicalRecycling" : { "isMassBalanced" : true, @@ -181142,7 +181246,29 @@ } ] } ], "bpnl" : "BPNL00000003AZQP", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned" : [ { + "catenaXId" : "urn:uuid:4f73c61f-c956-4144-8e55-b53b6b61220e", + "parentItems" : [ { + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId" : "urn:uuid:a732f36e-be5a-49f0-9b83-08d4b1c203c6", + "quantity" : { + "unit" : "unit:piece", + "value" : 20 + }, + "businessPartner" : "BPNL00000003AZQP", + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ], + "customers" : [ "BPNL00000003AZQP" ] + } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned" : [ { + "localIdentifiers" : [ { + "value" : "BPNL00000003AZQP", + "key" : "manufacturerId" + } ], "catenaXId" : "urn:uuid:4f73c61f-c956-4144-8e55-b53b6b61220e", "partTypeInformation" : { "manufacturerPartId" : "9760254-64", @@ -181156,58 +181282,42 @@ "functionValidFrom" : "2023-12-11T06:14:55.181Z" } ] } ], - "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned" : [ { - "parentParts" : [ { - "validityPeriod" : { - "validFrom" : "2023-03-21T08:47:14.438+01:00", - "validTo" : "2024-08-02T09:00:00.000+01:00" - }, - "parentCatenaXId" : "urn:uuid:a732f36e-be5a-49f0-9b83-08d4b1c203c6", - "quantity" : { - "quantityNumber" : 2.5, - "measurementUnit" : "unit:litre" - }, - "createdOn" : "2022-02-03T14:48:54.709Z", - "lastModifiedOn" : "2022-02-03T14:48:54.709Z" - } ], - "catenaXId" : "urn:uuid:4f73c61f-c956-4144-8e55-b53b6b61220e" - } ], "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned" : [ { "catenaXId" : "urn:uuid:4f73c61f-c956-4144-8e55-b53b6b61220e", "sites" : [ { - "functionValidUntil" : "2029-11-11T19:43:53.000Z", + "functionValidUntil" : "2024-02-23T19:12:15.000Z", "catenaXsiteId" : "BPNS000001111DMY", "function" : "production", - "functionValidFrom" : "2017-09-12T19:59:16.000Z" + "functionValidFrom" : "2016-10-23T02:04:31.000Z" } ] } ], "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated" : [ { - "orderNumber" : "742897", + "orderNumber" : "908540", "secondaryMaterialContent" : [ { "bioBased" : { "primaryBioBased" : { - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 14 }, "bioBasedClass" : "gen2", "secondaryBioBased" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 14 } }, "additionalInformation" : "eOMtThyhVNLWUZNRcBaQKxI", - "materialClass" : "4.2", + "materialClass" : "2.1", "unitOfMeasure" : { "unitOfMeasureKey" : "unit:gram", "grossMaterialInputMass" : 3500, "materialNetMass" : 3000 }, "certificate" : [ { - "certificateName" : "Yellowcert", + "certificateName" : "Redcert", "certificateLink" : "telnet://192.0.2.16:80/" } ], "materialNameStandardized" : { - "referencedStandard" : "DIN EN", - "referencedStandardID" : "7229", + "referencedStandard" : "AS", + "referencedStandardID" : "5602", "materialNameStandardizedValue" : "PP-TD10" }, "inorganic" : { @@ -181219,7 +181329,7 @@ "isPreviousIndustryAutomotive" : false, "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 11 }, "mechanicalRecycling" : { "isMassBalanced" : true, @@ -181229,23 +181339,24 @@ "postConsumerAutomotive" : { "chemicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 11 }, "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 12 + "percentageOfMaterialWeight" : 11 } }, "preConsumer" : { "mechanicalRecycling" : { "isMassBalanced" : true, - "percentageOfMaterialWeight" : 13 + "percentageOfMaterialWeight" : 14 } } } } } ] } ] - } ] - + } + + ] } \ No newline at end of file diff --git a/irs-registry-client/src/main/java/org/eclipse/tractusx/irs/registryclient/central/AssetAdministrationShellTestdataCreator.java b/irs-registry-client/src/main/java/org/eclipse/tractusx/irs/registryclient/central/AssetAdministrationShellTestdataCreator.java index 4bd75fc24a..5c0ac84d71 100644 --- a/irs-registry-client/src/main/java/org/eclipse/tractusx/irs/registryclient/central/AssetAdministrationShellTestdataCreator.java +++ b/irs-registry-client/src/main/java/org/eclipse/tractusx/irs/registryclient/central/AssetAdministrationShellTestdataCreator.java @@ -79,6 +79,9 @@ public AssetAdministrationShellDescriptor createDummyAssetAdministrationShellDes .getSingleLevelBomAsPlanned() .ifPresent(submodel -> submodelDescriptors.add( createSingleLevelBomAsPlannedSubmodelDescriptor(catenaXId))); + cxTestData.get() + .getSingleLevelUsageAsPlanned() + .ifPresent(submodel -> submodelDescriptors.add(createSingleLevelUsageAsPlannedSubmodelDescriptor(catenaXId))); cxTestData.get() .getPartAsPlanned() .ifPresent(submodel -> submodelDescriptors.add(createPartAsPlannedSubmodelDescriptor(catenaXId))); @@ -118,8 +121,13 @@ private SubmodelDescriptor createSingleLevelBomAsBuiltSubmodelDescriptor(final S "singleLevelBomAsBuilt"); } + private SubmodelDescriptor createSingleLevelUsageAsPlannedSubmodelDescriptor(final String catenaXId) { + return createSubmodelDescriptor(catenaXId, "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned", + "singleLevelUsageAsPlanned"); + } + private SubmodelDescriptor createSingleLevelUsageAsBuiltSubmodelDescriptor(final String catenaXId) { - return createSubmodelDescriptor(catenaXId, "urn:samm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt", + return createSubmodelDescriptor(catenaXId, "urn:samm:io.catenax.single_level_usage_as_built:3.0.0#SingleLevelUsageAsBuilt", "singleLevelUsageAsBuilt"); } @@ -133,12 +141,12 @@ private SubmodelDescriptor createSerialPartSubmodelDescriptor(final String caten } private SubmodelDescriptor createSingleLevelBomAsPlannedSubmodelDescriptor(final String catenaXId) { - return createSubmodelDescriptor(catenaXId, "urn:bamm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned", + return createSubmodelDescriptor(catenaXId, "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsPlanned", "singleLevelBomAsPlanned"); } private SubmodelDescriptor createPartAsPlannedSubmodelDescriptor(final String catenaXId) { - return createSubmodelDescriptor(catenaXId, "urn:bamm:io.catenax.part_as_planned:1.0.1#PartAsPlanned", "partAsPlanned"); + return createSubmodelDescriptor(catenaXId, "urn:samm:io.catenax.part_as_planned:1.0.1#PartAsPlanned", "partAsPlanned"); } private SubmodelDescriptor createBatchSubmodelDescriptor(final String catenaXId) { @@ -160,7 +168,7 @@ private SubmodelDescriptor createPhysicalDimensionSubmodelDescriptor(final Strin } private SubmodelDescriptor createPartAsSpecifiedSubmodelDescriptor(final String catenaXId) { - return createSubmodelDescriptor(catenaXId, "urn:bamm:io.catenax.part_as_specified:2.0.0#PartAsSpecified", + return createSubmodelDescriptor(catenaXId, "urn:samm:io.catenax.part_as_specified:2.0.0#PartAsSpecified", "partAsSpecified"); } From f70f4347870a4ca1c2e7de8bf5b94aead11c9261 Mon Sep 17 00:00:00 2001 From: jhartmann Date: Tue, 28 May 2024 16:04:46 +0200 Subject: [PATCH 02/15] feat(irs-api):[#470] Unify all semantic model names in class SemanticModelNames --- docs/src/api/irs-api.yaml | 14 +++--- .../irs/configuration/OpenApiExamples.java | 5 ++- .../tractusx/irs/ess/service/EssService.java | 5 ++- .../irs/IrsWireMockIntegrationTest.java | 4 +- .../eclipse/tractusx/irs/WiremockSupport.java | 16 +++---- .../delegate/RelationshipDelegateTest.java | 23 +++++----- .../job/delegate/SubmodelDelegateTest.java | 4 +- ...ssetAdministrationShellDescriptorTest.java | 12 +++-- ...rsItemGraphQueryServiceSpringBootTest.java | 10 ++--- .../eclipse/tractusx/irs/util/TestMother.java | 44 +++++++------------ .../previous/singleLevelBomAsBuilt-2.0.0.json | 16 +++++++ .../singleLevelBomAsPlanned-2.0.0.json | 19 ++++++++ ...dministrationShellTestdataCreatorTest.java | 10 +++-- ...CentralDigitalTwinRegistryServiceTest.java | 11 ++--- 14 files changed, 117 insertions(+), 76 deletions(-) create mode 100644 irs-api/src/test/resources/relationships/previous/singleLevelBomAsBuilt-2.0.0.json create mode 100644 irs-api/src/test/resources/relationships/previous/singleLevelBomAsPlanned-2.0.0.json diff --git a/docs/src/api/irs-api.yaml b/docs/src/api/irs-api.yaml index 14f8be9325..15428e4823 100644 --- a/docs/src/api/irs-api.yaml +++ b/docs/src/api/irs-api.yaml @@ -1083,7 +1083,7 @@ components: - name: SerialPart status: RELEASED type: BAMM - urn: urn:bamm:io.catenax.serial_part:1.0.1#SerialPart + urn: urn:samm:io.catenax.serial_part:3.0.0#SerialPart version: 1.0.1 canceled-job-response: value: @@ -1109,7 +1109,7 @@ components: parameter: aspects: - urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt - - urn:bamm:io.catenax.serial_part:1.0.1#SerialPart + - urn:samm:io.catenax.serial_part:3.0.0#SerialPart auditContractNegotiation: false bomLifecycle: asBuilt collectAspects: false @@ -1160,7 +1160,7 @@ components: parameter: aspects: - urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt - - urn:bamm:io.catenax.serial_part:1.0.1#SerialPart + - urn:samm:io.catenax.serial_part:3.0.0#SerialPart auditContractNegotiation: false bomLifecycle: asBuilt collectAspects: false @@ -1283,7 +1283,7 @@ components: parameter: aspects: - urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt - - urn:bamm:io.catenax.serial_part:1.0.1#SerialPart + - urn:samm:io.catenax.serial_part:3.0.0#SerialPart auditContractNegotiation: false bomLifecycle: asBuilt collectAspects: false @@ -1443,7 +1443,7 @@ components: parameter: aspects: - urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt - - urn:bamm:io.catenax.serial_part:1.0.1#SerialPart + - urn:samm:io.catenax.serial_part:3.0.0#SerialPart auditContractNegotiation: false bomLifecycle: asBuilt collectAspects: false @@ -1481,7 +1481,7 @@ components: parameter: aspects: - urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt - - urn:bamm:io.catenax.serial_part:1.0.1#SerialPart + - urn:samm:io.catenax.serial_part:3.0.0#SerialPart auditContractNegotiation: false bomLifecycle: asBuilt collectAspects: false @@ -1601,7 +1601,7 @@ components: parameter: aspects: - urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt - - urn:bamm:io.catenax.serial_part:1.0.1#SerialPart + - urn:samm:io.catenax.serial_part:3.0.0#SerialPart auditContractNegotiation: false bomLifecycle: asBuilt collectAspects: false diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/configuration/OpenApiExamples.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/configuration/OpenApiExamples.java index ab7288c33b..c10d25e9fc 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/configuration/OpenApiExamples.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/configuration/OpenApiExamples.java @@ -30,6 +30,7 @@ import io.swagger.v3.oas.models.Components; import io.swagger.v3.oas.models.examples.Example; +import org.eclipse.tractusx.irs.SemanticModelNames; import org.eclipse.tractusx.irs.component.AsyncFetchedItems; import org.eclipse.tractusx.irs.component.BatchOrderResponse; import org.eclipse.tractusx.irs.component.BatchResponse; @@ -90,8 +91,8 @@ public class OpenApiExamples { private static final String SUPPLY_CHAIN_IMPACTED_ASPECT_TYPE = "supply_chain_impacted"; private static final String SUPPLY_CHAIN_IMPACTED_KEY = "supplyChainImpacted"; private static final String SUPPLY_CHAIN_IMPACTER_RESULT = "YES"; - private static final String SINGLE_LEVEL_BOM_AS_BUILT_ASPECT = "urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt"; - private static final String SERIAL_PART_ASPECT = "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart"; + private static final String SINGLE_LEVEL_BOM_AS_BUILT_ASPECT = SemanticModelNames.SINGLE_LEVEL_BOM_AS_BUILT_3_0_0; + private static final String SERIAL_PART_ASPECT = SemanticModelNames.SERIAL_PART_3_0_0; private static final int FETCHED_ITEMS_SIZE = 3; private static final int NO_RUNNING_OR_FAILED_ITEMS = 0; private static final int SENT_NOTIFICATIONS_SIZE = 6; diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/ess/service/EssService.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/ess/service/EssService.java index c6fb30d669..9f0934e4f5 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/ess/service/EssService.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/ess/service/EssService.java @@ -30,6 +30,7 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.eclipse.tractusx.irs.SemanticModelNames; import org.eclipse.tractusx.irs.component.JobHandle; import org.eclipse.tractusx.irs.component.Jobs; import org.eclipse.tractusx.irs.component.Notification; @@ -55,8 +56,8 @@ @Slf4j public class EssService { - private static final String PART_AS_PLANNED = "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned"; - private static final String PART_SITE_INFORMATION_AS_PLANNED = "urn:bamm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned"; + private static final String PART_AS_PLANNED = SemanticModelNames.PART_AS_PLANNED_2_0_0; + private static final String PART_SITE_INFORMATION_AS_PLANNED = SemanticModelNames.PART_SITE_INFORMATION_AS_PLANNED_1_0_0; private final IrsItemGraphQueryService irsItemGraphQueryService; private final BpnInvestigationJobCache bpnInvestigationJobCache; diff --git a/irs-api/src/test/java/org/eclipse/tractusx/irs/IrsWireMockIntegrationTest.java b/irs-api/src/test/java/org/eclipse/tractusx/irs/IrsWireMockIntegrationTest.java index 9342bf3610..6a3ae93082 100644 --- a/irs-api/src/test/java/org/eclipse/tractusx/irs/IrsWireMockIntegrationTest.java +++ b/irs-api/src/test/java/org/eclipse/tractusx/irs/IrsWireMockIntegrationTest.java @@ -25,6 +25,8 @@ import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo; import static com.github.tomakehurst.wiremock.client.WireMock.verify; import static org.assertj.core.api.Assertions.assertThat; +import static org.eclipse.tractusx.irs.SemanticModelNames.BATCH_3_0_0; +import static org.eclipse.tractusx.irs.SemanticModelNames.SINGLE_LEVEL_BOM_AS_BUILT_3_0_0; import static org.eclipse.tractusx.irs.WiremockSupport.createEndpointDataReference; import static org.eclipse.tractusx.irs.WiremockSupport.encodedAssetIds; import static org.eclipse.tractusx.irs.WiremockSupport.randomUUID; @@ -47,8 +49,6 @@ import static org.eclipse.tractusx.irs.testing.wiremock.SubmodelFacadeWiremockSupport.PATH_NEGOTIATE; import static org.eclipse.tractusx.irs.testing.wiremock.SubmodelFacadeWiremockSupport.PATH_STATE; import static org.eclipse.tractusx.irs.testing.wiremock.SubmodelFacadeWiremockSupport.PATH_TRANSFER; -import static org.eclipse.tractusx.irs.util.TestMother.BATCH_3_0_0; -import static org.eclipse.tractusx.irs.util.TestMother.SINGLE_LEVEL_BOM_AS_BUILT_3_0_0; import java.time.Duration; import java.util.List; diff --git a/irs-api/src/test/java/org/eclipse/tractusx/irs/WiremockSupport.java b/irs-api/src/test/java/org/eclipse/tractusx/irs/WiremockSupport.java index c4767781ac..ae50633ce3 100644 --- a/irs-api/src/test/java/org/eclipse/tractusx/irs/WiremockSupport.java +++ b/irs-api/src/test/java/org/eclipse/tractusx/irs/WiremockSupport.java @@ -27,12 +27,12 @@ import static com.github.tomakehurst.wiremock.client.WireMock.urlPathMatching; import static com.github.tomakehurst.wiremock.client.WireMock.verify; import static org.apache.commons.codec.binary.Base64.encodeBase64String; +import static org.eclipse.tractusx.irs.SemanticModelNames.BATCH_3_0_0; +import static org.eclipse.tractusx.irs.SemanticModelNames.SINGLE_LEVEL_BOM_AS_BUILT_3_0_0; import static org.eclipse.tractusx.irs.semanticshub.SemanticHubWireMockSupport.semanticHubWillReturnAllModels; import static org.eclipse.tractusx.irs.testing.wiremock.DtrWiremockSupport.DATAPLANE_PUBLIC_URL; import static org.eclipse.tractusx.irs.testing.wiremock.DtrWiremockSupport.submodelDescriptor; import static org.eclipse.tractusx.irs.testing.wiremock.WireMockConfig.responseWithStatus; -import static org.eclipse.tractusx.irs.util.TestMother.BATCH_3_0_0; -import static org.eclipse.tractusx.irs.util.TestMother.SINGLE_LEVEL_BOM_AS_BUILT_3_0_0; import java.nio.charset.StandardCharsets; import java.util.Base64; @@ -147,12 +147,12 @@ static String randomUUID() { return UUID.randomUUID().toString(); } - static String submodelRequest(final String edcAssetId, final String SingleLevelBomAsBuilt, final String semanticId, + static String submodelRequest(final String edcAssetId, final String idShort, final String semanticId, final String sbomFileName) { - final String sbomId = randomUUIDwithPrefix(); - final String submoodel = submodelDescriptor(DATAPLANE_PUBLIC_URL, edcAssetId, - DiscoveryServiceWiremockSupport.CONTROLPLANE_PUBLIC_URL, SingleLevelBomAsBuilt, sbomId, semanticId); - successfulDataRequests(sbomId, sbomFileName); - return submoodel; + final String submodelDescriptorId = randomUUIDwithPrefix(); + final String submodel = submodelDescriptor(DATAPLANE_PUBLIC_URL, edcAssetId, + DiscoveryServiceWiremockSupport.CONTROLPLANE_PUBLIC_URL, idShort, submodelDescriptorId, semanticId); + successfulDataRequests(submodelDescriptorId, sbomFileName); + return submodel; } } \ No newline at end of file diff --git a/irs-api/src/test/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/RelationshipDelegateTest.java b/irs-api/src/test/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/RelationshipDelegateTest.java index 91e106a96a..14b4063488 100644 --- a/irs-api/src/test/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/RelationshipDelegateTest.java +++ b/irs-api/src/test/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/RelationshipDelegateTest.java @@ -24,14 +24,17 @@ package org.eclipse.tractusx.irs.aaswrapper.job.delegate; import static org.assertj.core.api.Assertions.assertThat; -import static org.eclipse.tractusx.irs.util.TestMother.SINGLE_LEVEL_BOM_AS_BUILT_3_0_0; -import static org.eclipse.tractusx.irs.util.TestMother.SINGLE_LEVEL_BOM_AS_BUILT_3_1_0; -import static org.eclipse.tractusx.irs.util.TestMother.SINGLE_LEVEL_BOM_AS_PLANNED_3_0_0; -import static org.eclipse.tractusx.irs.util.TestMother.SINGLE_LEVEL_BOM_AS_PLANNED_3_1_0; -import static org.eclipse.tractusx.irs.util.TestMother.SINGLE_LEVEL_USAGE_AS_BUILT_2_0_0; -import static org.eclipse.tractusx.irs.util.TestMother.SINGLE_LEVEL_USAGE_AS_BUILT_2_1_0; -import static org.eclipse.tractusx.irs.util.TestMother.SINGLE_LEVEL_USAGE_AS_PLANNED_2_0_0; -import static org.eclipse.tractusx.irs.util.TestMother.SINGLE_LEVEL_USAGE_AS_PLANNED_2_1_0; +import static org.eclipse.tractusx.irs.SemanticModelNames.SINGLE_LEVEL_BOM_AS_BUILT_2_0_0; +import static org.eclipse.tractusx.irs.SemanticModelNames.SINGLE_LEVEL_BOM_AS_BUILT_3_0_0; +import static org.eclipse.tractusx.irs.SemanticModelNames.SINGLE_LEVEL_BOM_AS_BUILT_3_1_0; +import static org.eclipse.tractusx.irs.SemanticModelNames.SINGLE_LEVEL_BOM_AS_PLANNED_2_0_0; +import static org.eclipse.tractusx.irs.SemanticModelNames.SINGLE_LEVEL_BOM_AS_PLANNED_3_0_0; +import static org.eclipse.tractusx.irs.SemanticModelNames.SINGLE_LEVEL_BOM_AS_PLANNED_3_1_0; +import static org.eclipse.tractusx.irs.SemanticModelNames.SINGLE_LEVEL_USAGE_AS_BUILT_2_0_0; +import static org.eclipse.tractusx.irs.SemanticModelNames.SINGLE_LEVEL_USAGE_AS_BUILT_3_0_0; +import static org.eclipse.tractusx.irs.SemanticModelNames.SINGLE_LEVEL_USAGE_AS_BUILT_3_1_0; +import static org.eclipse.tractusx.irs.SemanticModelNames.SINGLE_LEVEL_USAGE_AS_PLANNED_2_0_0; +import static org.eclipse.tractusx.irs.SemanticModelNames.SINGLE_LEVEL_USAGE_AS_PLANNED_2_1_0; import static org.eclipse.tractusx.irs.util.TestMother.jobParameter; import static org.eclipse.tractusx.irs.util.TestMother.jobParameterDownwardAsPlanned; import static org.eclipse.tractusx.irs.util.TestMother.jobParameterUpward; @@ -196,7 +199,7 @@ void shouldFillItemContainerWithSupportedRelationshipAndAddChildIdsToProcess(fin private static Stream relationshipParameters() { return Stream.of(Arguments.of("singleLevelUsageAsPlanned-2.0.0.json", SINGLE_LEVEL_USAGE_AS_PLANNED_2_0_0, jobParameterUpwardAsPlanned()), - Arguments.of("singleLevelUsageAsBuilt-3.0.0.json", SINGLE_LEVEL_USAGE_AS_BUILT_2_0_0, + Arguments.of("singleLevelUsageAsBuilt-3.0.0.json", SINGLE_LEVEL_USAGE_AS_BUILT_3_0_0, jobParameterUpward()), Arguments.of("singleLevelBomAsBuilt-3.0.0.json", SINGLE_LEVEL_BOM_AS_BUILT_3_0_0, jobParameter()), Arguments.of("singleLevelBomAsPlanned-3.0.0.json", SINGLE_LEVEL_BOM_AS_PLANNED_3_0_0, @@ -243,7 +246,7 @@ void shouldFillItemContainerWithPotentialFutureMinorVersions(final String relati public static Stream relationshipParametersFutureVersions() { return Stream.of(Arguments.of("singleLevelUsageAsPlanned-2.1.0.json", SINGLE_LEVEL_USAGE_AS_PLANNED_2_1_0, jobParameterUpwardAsPlanned()), - Arguments.of("singleLevelUsageAsBuilt-3.1.0.json", SINGLE_LEVEL_USAGE_AS_BUILT_2_1_0, + Arguments.of("singleLevelUsageAsBuilt-3.1.0.json", SINGLE_LEVEL_USAGE_AS_BUILT_3_1_0, jobParameterUpward()), Arguments.of("singleLevelBomAsBuilt-3.1.0.json", SINGLE_LEVEL_BOM_AS_BUILT_3_1_0, jobParameter()), Arguments.of("singleLevelBomAsPlanned-3.1.0.json", SINGLE_LEVEL_BOM_AS_PLANNED_3_1_0, diff --git a/irs-api/src/test/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/SubmodelDelegateTest.java b/irs-api/src/test/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/SubmodelDelegateTest.java index 7db0d61905..b5567f3aa3 100644 --- a/irs-api/src/test/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/SubmodelDelegateTest.java +++ b/irs-api/src/test/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/SubmodelDelegateTest.java @@ -26,10 +26,10 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.eclipse.tractusx.irs.util.TestMother.jobParameterCollectAspects; import static org.eclipse.tractusx.irs.util.TestMother.jobParameterFilter; -import static org.eclipse.tractusx.irs.util.TestMother.SERIAL_PART_3_0_0; +import static org.eclipse.tractusx.irs.SemanticModelNames.SERIAL_PART_3_0_0; import static org.eclipse.tractusx.irs.util.TestMother.shell; import static org.eclipse.tractusx.irs.util.TestMother.shellDescriptor; -import static org.eclipse.tractusx.irs.util.TestMother.SINGLE_LEVEL_BOM_AS_BUILT_3_0_0; +import static org.eclipse.tractusx.irs.SemanticModelNames.SINGLE_LEVEL_BOM_AS_BUILT_3_0_0; import static org.eclipse.tractusx.irs.util.TestMother.submodelDescriptor; import static org.eclipse.tractusx.irs.util.TestMother.submodelDescriptorWithDspEndpoint; import static org.mockito.ArgumentMatchers.any; diff --git a/irs-api/src/test/java/org/eclipse/tractusx/irs/component/assetadministrationshell/AssetAdministrationShellDescriptorTest.java b/irs-api/src/test/java/org/eclipse/tractusx/irs/component/assetadministrationshell/AssetAdministrationShellDescriptorTest.java index d20aa6a568..f2245e771e 100644 --- a/irs-api/src/test/java/org/eclipse/tractusx/irs/component/assetadministrationshell/AssetAdministrationShellDescriptorTest.java +++ b/irs-api/src/test/java/org/eclipse/tractusx/irs/component/assetadministrationshell/AssetAdministrationShellDescriptorTest.java @@ -24,13 +24,18 @@ package org.eclipse.tractusx.irs.component.assetadministrationshell; import static org.assertj.core.api.Assertions.assertThat; -import static org.eclipse.tractusx.irs.util.TestMother.SERIAL_PART_3_0_0; +import static org.eclipse.tractusx.irs.SemanticModelNames.SERIAL_PART_3_0_0; +import static org.eclipse.tractusx.irs.SemanticModelNames.SINGLE_LEVEL_BOM_AS_BUILT_2_0_0; +import static org.eclipse.tractusx.irs.SemanticModelNames.SINGLE_LEVEL_BOM_AS_BUILT_3_0_0; +import static org.eclipse.tractusx.irs.SemanticModelNames.SINGLE_LEVEL_BOM_AS_BUILT_3_1_0; +import static org.eclipse.tractusx.irs.SemanticModelNames.SINGLE_LEVEL_BOM_AS_PLANNED_3_0_0; import static org.eclipse.tractusx.irs.util.TestMother.shellDescriptor; -import static org.eclipse.tractusx.irs.util.TestMother.SINGLE_LEVEL_BOM_AS_BUILT_3_0_0; +import static org.eclipse.tractusx.irs.util.TestMother.submodelDescriptorWithDspEndpoint; import static org.eclipse.tractusx.irs.util.TestMother.submodelDescriptorWithoutHref; import java.util.List; +import org.eclipse.tractusx.irs.component.enums.AspectType; import org.junit.jupiter.api.Test; class AssetAdministrationShellDescriptorTest { @@ -50,7 +55,8 @@ void shouldFilterByAspectTypeWhenEndingWithAspectName() { // Assert assertThat(result).hasSize(1); - assertThat(result.get(0).getSemanticId().getKeys().get(0).getValue()).isEqualTo(SINGLE_LEVEL_BOM_AS_BUILT_3_0_0); + assertThat(result.get(0).getSemanticId().getKeys().get(0).getValue()).isEqualTo( + SINGLE_LEVEL_BOM_AS_BUILT_3_0_0); } @Test diff --git a/irs-api/src/test/java/org/eclipse/tractusx/irs/services/IrsItemGraphQueryServiceSpringBootTest.java b/irs-api/src/test/java/org/eclipse/tractusx/irs/services/IrsItemGraphQueryServiceSpringBootTest.java index 23ceeec89c..087c83e13c 100644 --- a/irs-api/src/test/java/org/eclipse/tractusx/irs/services/IrsItemGraphQueryServiceSpringBootTest.java +++ b/irs-api/src/test/java/org/eclipse/tractusx/irs/services/IrsItemGraphQueryServiceSpringBootTest.java @@ -26,14 +26,14 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.awaitility.Awaitility.given; import static org.eclipse.tractusx.irs.util.TestMother.EXISTING_GLOBAL_ASSET_ID; -import static org.eclipse.tractusx.irs.util.TestMother.PRODUCT_DESCRIPTION_1_0_1; +import static org.eclipse.tractusx.irs.SemanticModelNames.BATTERY_PRODUCT_DESCRIPTION_1_0_1; import static org.eclipse.tractusx.irs.util.TestMother.registerJob; import static org.eclipse.tractusx.irs.util.TestMother.registerJobWithDepthAndAspect; import static org.eclipse.tractusx.irs.util.TestMother.registerJobWithDepthAndAspectAndCollectAspects; import static org.eclipse.tractusx.irs.util.TestMother.registerJobWithDirection; import static org.eclipse.tractusx.irs.util.TestMother.registerJobWithoutDepth; -import static org.eclipse.tractusx.irs.util.TestMother.SERIAL_PART_3_0_0; -import static org.eclipse.tractusx.irs.util.TestMother.SINGLE_LEVEL_BOM_AS_BUILT_3_0_0; +import static org.eclipse.tractusx.irs.SemanticModelNames.SERIAL_PART_3_0_0; +import static org.eclipse.tractusx.irs.SemanticModelNames.SINGLE_LEVEL_BOM_AS_BUILT_3_0_0; import static org.hamcrest.Matchers.greaterThan; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.ArgumentMatchers.any; @@ -106,7 +106,7 @@ class IrsItemGraphQueryServiceSpringBootTest { void setUp() throws SchemaNotFoundException { final List models = List.of( getAspectModel(AspectType.SERIAL_PART.toString(), SERIAL_PART_3_0_0), - getAspectModel(AspectType.PRODUCT_DESCRIPTION.toString(), PRODUCT_DESCRIPTION_1_0_1), + getAspectModel(AspectType.PRODUCT_DESCRIPTION.toString(), BATTERY_PRODUCT_DESCRIPTION_1_0_1), getAspectModel(AspectType.SINGLE_LEVEL_BOM_AS_BUILT.toString(), SINGLE_LEVEL_BOM_AS_BUILT_3_0_0)); final AspectModels aspectModels = new AspectModels(models, "2023-02-13T08:18:11.990659500Z"); when(semanticsHubFacade.getAllAspectModels()).thenReturn(aspectModels); @@ -136,7 +136,7 @@ void registerJobWithCollectAspectsShouldIncludeSubmodels() throws InvalidSchemaE when(connectorEndpointsService.fetchConnectorEndpoints(any())).thenReturn( List.of("https://connector.endpoint.nl")); final RegisterJob registerJob = registerJob(EXISTING_GLOBAL_ASSET_ID, 100, - List.of(SERIAL_PART_3_0_0, PRODUCT_DESCRIPTION_1_0_1, SINGLE_LEVEL_BOM_AS_BUILT_3_0_0), + List.of(SERIAL_PART_3_0_0, BATTERY_PRODUCT_DESCRIPTION_1_0_1, SINGLE_LEVEL_BOM_AS_BUILT_3_0_0), true, false, Direction.DOWNWARD); when(connectorEndpointsService.fetchConnectorEndpoints(registerJob.getKey().getBpn())).thenReturn( List.of("singleLevelBomAsBuilt")); diff --git a/irs-api/src/test/java/org/eclipse/tractusx/irs/util/TestMother.java b/irs-api/src/test/java/org/eclipse/tractusx/irs/util/TestMother.java index 4d15d933a6..26a3f16a05 100644 --- a/irs-api/src/test/java/org/eclipse/tractusx/irs/util/TestMother.java +++ b/irs-api/src/test/java/org/eclipse/tractusx/irs/util/TestMother.java @@ -34,6 +34,7 @@ import io.micrometer.core.instrument.simple.SimpleMeterRegistry; import net.datafaker.Faker; +import org.eclipse.tractusx.irs.SemanticModelNames; import org.eclipse.tractusx.irs.aaswrapper.job.AASTransferProcess; import org.eclipse.tractusx.irs.component.GlobalAssetIdentification; import org.eclipse.tractusx.irs.component.Job; @@ -71,24 +72,6 @@ */ public class TestMother { - public static final String SINGLE_LEVEL_BOM_AS_BUILT_3_0_0 = "urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt"; - public static final String SINGLE_LEVEL_USAGE_AS_BUILT_2_0_0 = "urn:samm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt"; - public static final String SERIAL_PART_3_0_0 = "urn:samm:io.catenax.serial_part:3.0.0#SerialPart"; - public static final String PART_AS_SPECIFIED_3_0_0 = "urn:samm:io.catenax.part_as_specified:3.0.0#PartAsSpecified"; - public static final String BATCH_3_0_0 = "urn:samm:io.catenax.batch:3.0.0#Batch"; - public static final String MATERIAL_FOR_RECYCLING_1_1_0 = "urn:samm:io.catenax.material_for_recycling:1.1.0#MaterialForRecycling"; - public static final String PRODUCT_DESCRIPTION_1_0_1 = "urn:samm:io.catenax.battery.product_description:1.0.1#ProductDescription"; - public static final String SINGLE_LEVEL_USAGE_AS_PLANNED_2_0_0 = "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned"; - public static final String SINGLE_LEVEL_BOM_AS_PLANNED_3_0_0 = "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsPlanned"; - public static final String SINGLE_LEVEL_BOM_AS_SPECIFIED_2_0_0 = "urn:samm:io.catenax.single_level_bom_as_specified:2.0.0#SingleLevelBomAsSpecified"; - public static final String SINGLE_LEVEL_BOM_AS_SPECIFIED_1_0_0 = "urn:samm:io.catenax.single_level_bom_as_specified:1.0.0#SingleLevelBomAsSpecified"; - public static final String SINGLE_LEVEL_USAGE_AS_PLANNED_2_1_0 = "urn:samm:io.catenax.single_level_usage_as_planned:2.1.0#SingleLevelUsageAsPlanned"; - public static final String SINGLE_LEVEL_BOM_AS_PLANNED_3_1_0 = "urn:samm:io.catenax.single_level_bom_as_planned:3.1.0#SingleLevelBomAsPlanned"; - public static final String SINGLE_LEVEL_BOM_AS_SPECIFIED_2_1_0 = "urn:samm:io.catenax.single_level_bom_as_specified:2.1.0#SingleLevelBomAsSpecified"; - public static final String SINGLE_LEVEL_BOM_AS_SPECIFIED_1_1_0 = "urn:samm:io.catenax.single_level_bom_as_specified:1.1.0#SingleLevelBomAsSpecified"; - public static final String SINGLE_LEVEL_BOM_AS_BUILT_3_1_0 = "urn:samm:io.catenax.single_level_bom_as_built:3.1.0#SingleLevelBomAsBuilt"; - public static final String SINGLE_LEVEL_USAGE_AS_BUILT_2_1_0 = "urn:samm:io.catenax.single_level_usage_as_built:2.1.0#SingleLevelUsageAsBuilt"; - public static final String EXISTING_GLOBAL_ASSET_ID = "urn:uuid:5e1908ed-e176-4f57-9616-1415097d0fdf"; Faker faker = new Faker(); @@ -98,7 +81,7 @@ public static RegisterJob registerJobWithoutDepthAndAspect() { } public static RegisterJob registerJobWithoutDepth() { - return registerJobWithDepthAndAspect(null, List.of(SINGLE_LEVEL_BOM_AS_BUILT_3_0_0)); + return registerJobWithDepthAndAspect(null, List.of(SemanticModelNames.SINGLE_LEVEL_BOM_AS_BUILT_3_0_0)); } public static RegisterJob registerJobWithDepthAndAspect(final Integer depth, final List aspectTypes) { @@ -167,7 +150,8 @@ public static JobParameter jobParameter() { .depth(5) .bomLifecycle(BomLifecycle.AS_BUILT) .direction(Direction.DOWNWARD) - .aspects(List.of(SERIAL_PART_3_0_0, SINGLE_LEVEL_BOM_AS_BUILT_3_0_0)) + .aspects(List.of(SemanticModelNames.SERIAL_PART_3_0_0, + SemanticModelNames.SINGLE_LEVEL_BOM_AS_BUILT_3_0_0)) .auditContractNegotiation(false) .build(); } @@ -177,7 +161,8 @@ public static JobParameter jobParameterUpward() { .depth(0) .bomLifecycle(BomLifecycle.AS_BUILT) .direction(Direction.UPWARD) - .aspects(List.of(SERIAL_PART_3_0_0, SINGLE_LEVEL_USAGE_AS_BUILT_2_0_0)) + .aspects(List.of(SemanticModelNames.SERIAL_PART_3_0_0, + SemanticModelNames.SINGLE_LEVEL_USAGE_AS_BUILT_2_0_0)) .build(); } @@ -186,7 +171,8 @@ public static JobParameter jobParameterUpwardAsPlanned() { .depth(0) .bomLifecycle(BomLifecycle.AS_PLANNED) .direction(Direction.UPWARD) - .aspects(List.of(SERIAL_PART_3_0_0, SINGLE_LEVEL_USAGE_AS_PLANNED_2_0_0)) + .aspects(List.of(SemanticModelNames.SERIAL_PART_3_0_0, + SemanticModelNames.SINGLE_LEVEL_USAGE_AS_PLANNED_2_0_0)) .build(); } @@ -195,7 +181,8 @@ public static JobParameter jobParameterDownwardAsPlanned() { .depth(0) .bomLifecycle(BomLifecycle.AS_PLANNED) .direction(Direction.DOWNWARD) - .aspects(List.of(SERIAL_PART_3_0_0, SINGLE_LEVEL_BOM_AS_PLANNED_3_0_0)) + .aspects(List.of(SemanticModelNames.SERIAL_PART_3_0_0, + SemanticModelNames.SINGLE_LEVEL_BOM_AS_PLANNED_3_0_0)) .build(); } @@ -204,7 +191,8 @@ public static JobParameter jobParameterDownwardAsSpecified() { .depth(0) .bomLifecycle(BomLifecycle.AS_SPECIFIED) .direction(Direction.DOWNWARD) - .aspects(List.of(PART_AS_SPECIFIED_3_0_0, SINGLE_LEVEL_BOM_AS_SPECIFIED_2_0_0)) + .aspects(List.of(SemanticModelNames.PART_AS_SPECIFIED_3_0_0, + SemanticModelNames.SINGLE_LEVEL_BOM_AS_SPECIFIED_2_0_0)) .build(); } @@ -212,7 +200,8 @@ public static JobParameter jobParameterCollectAspects() { return JobParameter.builder() .depth(0) .bomLifecycle(BomLifecycle.AS_BUILT) - .aspects(List.of(SERIAL_PART_3_0_0, SINGLE_LEVEL_BOM_AS_BUILT_3_0_0)) + .aspects(List.of(SemanticModelNames.SERIAL_PART_3_0_0, + SemanticModelNames.SINGLE_LEVEL_BOM_AS_BUILT_3_0_0)) .collectAspects(true) .build(); } @@ -221,7 +210,7 @@ public static JobParameter jobParameterFilter() { return JobParameter.builder() .depth(0) .bomLifecycle(BomLifecycle.AS_BUILT) - .aspects(List.of(MATERIAL_FOR_RECYCLING_1_1_0)) + .aspects(List.of(SemanticModelNames.MATERIAL_FOR_RECYCLING_1_1_0)) .build(); } @@ -230,7 +219,8 @@ public static JobParameter jobParameterAuditContractNegotiation() { .depth(5) .bomLifecycle(BomLifecycle.AS_BUILT) .direction(Direction.DOWNWARD) - .aspects(List.of(SERIAL_PART_3_0_0, SINGLE_LEVEL_BOM_AS_BUILT_3_0_0)) + .aspects(List.of(SemanticModelNames.SERIAL_PART_3_0_0, + SemanticModelNames.SINGLE_LEVEL_BOM_AS_BUILT_3_0_0)) .auditContractNegotiation(true) .build(); } diff --git a/irs-api/src/test/resources/relationships/previous/singleLevelBomAsBuilt-2.0.0.json b/irs-api/src/test/resources/relationships/previous/singleLevelBomAsBuilt-2.0.0.json new file mode 100644 index 0000000000..dfbfa8a040 --- /dev/null +++ b/irs-api/src/test/resources/relationships/previous/singleLevelBomAsBuilt-2.0.0.json @@ -0,0 +1,16 @@ +{ + "catenaXId": "urn:uuid:055c1128-0375-47c8-98de-7cf802c3241d", + "childItems": [ + { + "catenaXId": "urn:uuid:cc6a703e-ab0e-417c-9605-c9c70e33a47c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "createdOn": "2022-02-03T14:48:54.709Z", + "businessPartner": "BPNL50096894aNXY", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] +} \ No newline at end of file diff --git a/irs-api/src/test/resources/relationships/previous/singleLevelBomAsPlanned-2.0.0.json b/irs-api/src/test/resources/relationships/previous/singleLevelBomAsPlanned-2.0.0.json new file mode 100644 index 0000000000..5cd59f6f3a --- /dev/null +++ b/irs-api/src/test/resources/relationships/previous/singleLevelBomAsPlanned-2.0.0.json @@ -0,0 +1,19 @@ +{ + "catenaXId": "urn:uuid:055c1128-0375-47c8-98de-7cf802c3241d", + "childItems": [ + { + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId": "urn:uuid:cc6a703e-ab0e-417c-9605-c9c70e33a47c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "businessPartner": "BPNL50096894aNXY", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] +} \ No newline at end of file diff --git a/irs-registry-client/src/test/java/org/eclipse/tractusx/irs/registryclient/central/AssetAdministrationShellTestdataCreatorTest.java b/irs-registry-client/src/test/java/org/eclipse/tractusx/irs/registryclient/central/AssetAdministrationShellTestdataCreatorTest.java index d031e2dc89..3096bd1c2f 100644 --- a/irs-registry-client/src/test/java/org/eclipse/tractusx/irs/registryclient/central/AssetAdministrationShellTestdataCreatorTest.java +++ b/irs-registry-client/src/test/java/org/eclipse/tractusx/irs/registryclient/central/AssetAdministrationShellTestdataCreatorTest.java @@ -31,6 +31,7 @@ import java.nio.file.Path; import com.fasterxml.jackson.databind.ObjectMapper; +import org.eclipse.tractusx.irs.SemanticModelNames; import org.eclipse.tractusx.irs.component.assetadministrationshell.AssetAdministrationShellDescriptor; import org.eclipse.tractusx.irs.testing.containers.LocalTestDataConfigurationAware; import org.junit.jupiter.api.Test; @@ -42,7 +43,8 @@ class AssetAdministrationShellTestdataCreatorTest extends LocalTestDataConfigura AssetAdministrationShellTestdataCreatorTest() throws IOException { super(); - assetAdministrationShellTestdataCreator = new AssetAdministrationShellTestdataCreator(localTestDataConfiguration.cxTestDataContainer()); + assetAdministrationShellTestdataCreator = new AssetAdministrationShellTestdataCreator( + localTestDataConfiguration.cxTestDataContainer()); } @Test @@ -64,8 +66,10 @@ void shouldReturnAssetAdministrationShellDescriptorWhenRequestingWithCatenaXId() assertThat(endpointAddress).isEqualTo("singleLevelBomAsBuilt"); assertThat(aasDescriptor.getSubmodelDescriptors().get(0).getEndpoints().get(0).getProtocolInformation().getSubprotocolBody()).contains(catenaXId); - assertThat(aasDescriptor.getSubmodelDescriptors().get(0).getSemanticId().getKeys().get(0).getValue()).isEqualTo("urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt"); - assertThat(aasDescriptor.getSubmodelDescriptors().get(1).getSemanticId().getKeys().get(0).getValue()).isEqualTo("urn:samm:io.catenax.serial_part:3.0.0#SerialPart"); + assertThat(aasDescriptor.getSubmodelDescriptors().get(0).getSemanticId().getKeys().get(0).getValue()).isEqualTo( + SemanticModelNames.SINGLE_LEVEL_BOM_AS_BUILT_3_0_0); + assertThat(aasDescriptor.getSubmodelDescriptors().get(1).getSemanticId().getKeys().get(0).getValue()).isEqualTo( + SemanticModelNames.SERIAL_PART_3_0_0); } @Test diff --git a/irs-registry-client/src/test/java/org/eclipse/tractusx/irs/registryclient/central/CentralDigitalTwinRegistryServiceTest.java b/irs-registry-client/src/test/java/org/eclipse/tractusx/irs/registryclient/central/CentralDigitalTwinRegistryServiceTest.java index 38439f67bc..4964d32587 100644 --- a/irs-registry-client/src/test/java/org/eclipse/tractusx/irs/registryclient/central/CentralDigitalTwinRegistryServiceTest.java +++ b/irs-registry-client/src/test/java/org/eclipse/tractusx/irs/registryclient/central/CentralDigitalTwinRegistryServiceTest.java @@ -37,6 +37,7 @@ import java.util.Collections; import java.util.List; +import org.eclipse.tractusx.irs.SemanticModelNames; import org.eclipse.tractusx.irs.component.Shell; import org.eclipse.tractusx.irs.component.assetadministrationshell.AssetAdministrationShellDescriptor; import org.eclipse.tractusx.irs.component.assetadministrationshell.Endpoint; @@ -57,8 +58,6 @@ @ExtendWith(MockitoExtension.class) class CentralDigitalTwinRegistryServiceTest extends LocalTestDataConfigurationAware { - private final String singleLevelBomAsBuiltURN = "urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt"; - private final String serialPartURN = "urn:samm:io.catenax.serial_part:3.0.0#SerialPart"; private DigitalTwinRegistryService digitalTwinRegistryService; @Mock private DigitalTwinRegistryClient dtRegistryClientMock; @@ -92,8 +91,9 @@ void shouldReturnSubmodelEndpointsWhenRequestingWithCatenaXId() throws RegistryS assertThat(endpoint.getProtocolInformation().getSubprotocolBody()).contains(existingCatenaXId); assertThat(shellEndpoints.get(0).getSemanticId().getKeys().get(0).getValue()).isEqualTo( - singleLevelBomAsBuiltURN); - assertThat(shellEndpoints.get(1).getSemanticId().getKeys().get(0).getValue()).isEqualTo(serialPartURN); + SemanticModelNames.SINGLE_LEVEL_BOM_AS_BUILT_3_0_0); + assertThat(shellEndpoints.get(1).getSemanticId().getKeys().get(0).getValue()).isEqualTo( + SemanticModelNames.SERIAL_PART_3_0_0); } @Test @@ -187,6 +187,7 @@ void shouldReturnSubmodelEndpointsWhenFilteringByAspectType() throws RegistrySer assertThat(shellEndpoints).isNotNull().isNotEmpty(); final SubmodelDescriptor endpoint = shellEndpoints.get(0); - assertThat(endpoint.getSemanticId().getKeys().get(0).getValue()).isEqualTo(singleLevelBomAsBuiltURN); + assertThat(endpoint.getSemanticId().getKeys().get(0).getValue()).isEqualTo( + SemanticModelNames.SINGLE_LEVEL_BOM_AS_BUILT_3_0_0); } } From f5962084d109a3cb19467ae2cc3c6497ab3f6143 Mon Sep 17 00:00:00 2001 From: jhartmann Date: Tue, 28 May 2024 16:05:51 +0200 Subject: [PATCH 03/15] feat(irs-api):[#470] Split SemanticsHubClient interface, implementation and stub in to separate files --- .../irs/semanticshub/SemanticsHubClient.java | 223 ------------------ .../semanticshub/SemanticsHubClientImpl.java | 219 +++++++++++++++++ .../SemanticsHubClientLocalStub.java | 56 +++++ 3 files changed, 275 insertions(+), 223 deletions(-) create mode 100644 irs-api/src/main/java/org/eclipse/tractusx/irs/semanticshub/SemanticsHubClientImpl.java create mode 100644 irs-api/src/main/java/org/eclipse/tractusx/irs/semanticshub/SemanticsHubClientLocalStub.java diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/semanticshub/SemanticsHubClient.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/semanticshub/SemanticsHubClient.java index 8066c18503..6c4639cd22 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/semanticshub/SemanticsHubClient.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/semanticshub/SemanticsHubClient.java @@ -23,36 +23,9 @@ ********************************************************************************/ package org.eclipse.tractusx.irs.semanticshub; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.ArrayList; -import java.util.Base64; import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import java.util.stream.Stream; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.io.FilenameUtils; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.reflect.TypeUtils; -import org.eclipse.tractusx.irs.configuration.RestTemplateConfig; -import org.eclipse.tractusx.irs.configuration.SemanticsHubConfiguration; import org.eclipse.tractusx.irs.services.validation.SchemaNotFoundException; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.context.annotation.Profile; -import org.springframework.core.ParameterizedTypeReference; -import org.springframework.http.RequestEntity; -import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Service; -import org.springframework.web.client.RestClientException; -import org.springframework.web.client.RestTemplate; -import org.springframework.web.util.UriComponentsBuilder; /** * Semantics Hub Rest Client @@ -70,199 +43,3 @@ interface SemanticsHubClient { List getAllAspectModels() throws SchemaNotFoundException; } -/** - * Semantics Hub Rest Client Stub used in local environment - */ -@Service -@Profile({ "local", - "test" -}) -class SemanticsHubClientLocalStub implements SemanticsHubClient { - - public static final String MODEL_TYPE = "BAMM"; - public static final String MODEL_STATUS = "RELEASED"; - - @Override - public String getModelJsonSchema(final String urn) { - return "{" + " \"$schema\": \"http://json-schema.org/draft-07/schema#\"," + " \"type\": \"integer\"" + "}"; - } - - @Override - public List getAllAspectModels() { - return List.of( - new AspectModel("urn:samm:io.catenax.serial_part:3.0.0#SerialPart", "3.0.0", - "SerialPart", MODEL_TYPE, MODEL_STATUS), - new AspectModel("urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt", - "3.0.0", "SingleLevelBomAsBuilt", MODEL_TYPE, MODEL_STATUS), - new AspectModel("urn:samm:io.catenax.part_as_specified:2.0.0#PartAsSpecified", - "2.0.0", "PartAsSpecified", MODEL_TYPE, MODEL_STATUS), - new AspectModel("urn:bamm:io.catenax.part_as_planned:1.0.1#PartAsPlanned", - "1.0.1", "PartAsPlanned", MODEL_TYPE, MODEL_STATUS)); - } -} - -/** - * Semantics Hub Rest Client Implementation - */ -@Service -@Slf4j -@Profile({ "!local && !test" }) -class SemanticsHubClientImpl implements SemanticsHubClient { - - public static final String LOCAL_MODEL_TYPE_BAMM = "BAMM"; - public static final String LOCAL_MODEL_TYPE_SAMM = "SAMM"; - public static final String LOCAL_MODEL_STATUS = "PROVIDED"; - private static final String PLACEHOLDER_URN = "urn"; - private final SemanticsHubConfiguration config; - private final RestTemplate restTemplate; - - /* package */ SemanticsHubClientImpl( - @Qualifier(RestTemplateConfig.SEMHUB_REST_TEMPLATE) final RestTemplate restTemplate, - final SemanticsHubConfiguration config) { - this.config = config; - this.restTemplate = restTemplate; - - if (StringUtils.isNotBlank(config.getModelJsonSchemaEndpoint())) { - requirePlaceholder(config.getModelJsonSchemaEndpoint()); - } else if (StringUtils.isBlank(config.getLocalModelDirectory())) { - log.warn("No Semantic Hub URL or local model directory was provided. Cannot validate submodel payloads!"); - } - } - - private static void requirePlaceholder(final String url) { - if (!url.contains(wrap(SemanticsHubClientImpl.PLACEHOLDER_URN))) { - throw new IllegalStateException( - "Configuration value for 'semanticsHub.modelJsonSchemaEndpoint' must contain the URL placeholder '" - + SemanticsHubClientImpl.PLACEHOLDER_URN + "'!"); - } - } - - private static String wrap(final String placeholderIdType) { - return "{" + placeholderIdType + "}"; - } - - @Override - public String getModelJsonSchema(final String urn) throws SchemaNotFoundException { - return readFromSemanticHub(urn).or(() -> readFromFilesystem(urn)) - .orElseThrow(() -> new SchemaNotFoundException( - "Could not load model with URN " + urn)); - } - - @Override - public List getAllAspectModels() throws SchemaNotFoundException { - return readAllFromSemanticHub().or(this::readAllFromFilesystem).orElse(List.of()); - } - - private Optional> readAllFromFilesystem() { - if (StringUtils.isNotBlank(config.getLocalModelDirectory())) { - final Path path = Paths.get(config.getLocalModelDirectory()); - try (Stream stream = Files.list(path)) { - return Optional.of(stream.filter(file -> !Files.isDirectory(file)) - .map(Path::getFileName) - .map(Path::toString) - .map(this::getDecodedString) - .map(this::createAspectModel) - .filter(Optional::isPresent) - .map(Optional::get) - .toList()); - } catch (IOException e) { - log.error("Could not read schema Files.", e); - } - } - return Optional.empty(); - } - - private String getDecodedString(final String urnBase64) { - try { - return decode(urnBase64); - } catch (IllegalArgumentException e) { - log.error("Could not Base64 decode urn.", e); - return urnBase64; - } - } - - private Optional createAspectModel(final String urn) { - log.debug("Extracting aspect information for urn: '{}'", urn); - final Matcher matcher = Pattern.compile("^urn:[sb]amm:.*:(\\d\\.\\d\\.\\d)#(\\w+)$").matcher(urn); - if (matcher.find()) { - final String version = matcher.group(1); - final String name = matcher.group(2); - final String localModelType = urn.contains("samm") ? LOCAL_MODEL_TYPE_SAMM : LOCAL_MODEL_TYPE_BAMM; - return Optional.of(new AspectModel(urn, version, name, localModelType, LOCAL_MODEL_STATUS)); - } - log.warn("Could not extract aspect information from urn: '{}'", urn); - return Optional.empty(); - } - - private Optional> readAllFromSemanticHub() { - log.info("Reading models from semantic hub."); - if (StringUtils.isNotBlank(config.getUrl())) { - int currentPage = 0; - final List aspectModelsCollection = new ArrayList<>(); - Optional> semanticHubPage; - do { - semanticHubPage = getSemanticHubPage(currentPage++, config.getPageSize()); - log.info("Got response from semantic hub '{}'", semanticHubPage.toString()); - aspectModelsCollection.addAll( - semanticHubPage.orElseThrow().toPageImpl(config.getPageSize()).getContent()); - } while (semanticHubPage.isPresent() && semanticHubPage.get().toPageImpl(config.getPageSize()).hasNext()); - - return Optional.of(aspectModelsCollection); - } - return Optional.empty(); - } - - private Optional> getSemanticHubPage(final int page, final int pageSize) { - try { - log.info("Request semantic hub page '{}' with size '{}' for url '{}'", page, pageSize, config.getUrl()); - final UriComponentsBuilder uriBuilder = UriComponentsBuilder.fromUriString(config.getUrl()) - .queryParam("page", page) - .queryParam("pageSize", pageSize); - log.info("Semantic Hub URL '{}'", uriBuilder.toUriString()); - final ParameterizedTypeReference> responseType = ParameterizedTypeReference.forType( - TypeUtils.parameterize(PaginatedResponse.class, AspectModel.class)); - final ResponseEntity> result = restTemplate.exchange( - RequestEntity.get(uriBuilder.toUriString()).build(), responseType); - return Optional.ofNullable(result.getBody()); - } catch (RestClientException e) { - log.error("Unable to retrieve models from semantic hub.", e); - } - return Optional.empty(); - } - - private Optional readFromFilesystem(final String urn) { - if (StringUtils.isNotBlank(config.getLocalModelDirectory())) { - final Path path = Paths.get(config.getLocalModelDirectory(), normalize(urn)); - if (path.toFile().exists()) { - try { - return Optional.of(Files.readString(path)); - } catch (IOException e) { - log.error("Unable to read schema file at path '{}'", path, e); - } - } - } - return Optional.empty(); - } - - private Optional readFromSemanticHub(final String urn) { - if (StringUtils.isNotBlank(config.getModelJsonSchemaEndpoint())) { - try { - final UriComponentsBuilder uriBuilder = UriComponentsBuilder.fromUriString( - config.getModelJsonSchemaEndpoint()); - uriBuilder.uriVariables(Map.of(PLACEHOLDER_URN, urn)); - return Optional.ofNullable(restTemplate.getForObject(uriBuilder.build().toUri(), String.class)); - } catch (final RestClientException e) { - log.error("Unable to retrieve schema from semantic hub for urn '{}'", urn, e); - } - } - return Optional.empty(); - } - - private String normalize(final String urn) { - return Base64.getEncoder().withoutPadding().encodeToString(FilenameUtils.getName(urn).getBytes(StandardCharsets.UTF_8)); - } - - private String decode(final String urnBase64) { - return new String(Base64.getDecoder().decode(urnBase64), StandardCharsets.UTF_8); - } -} diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/semanticshub/SemanticsHubClientImpl.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/semanticshub/SemanticsHubClientImpl.java new file mode 100644 index 0000000000..fd8286dc10 --- /dev/null +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/semanticshub/SemanticsHubClientImpl.java @@ -0,0 +1,219 @@ +/******************************************************************************** + * Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * Copyright (c) 2021,2024 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ +package org.eclipse.tractusx.irs.semanticshub; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.Base64; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.stream.Stream; + +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.io.FilenameUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.reflect.TypeUtils; +import org.eclipse.tractusx.irs.configuration.RestTemplateConfig; +import org.eclipse.tractusx.irs.configuration.SemanticsHubConfiguration; +import org.eclipse.tractusx.irs.services.validation.SchemaNotFoundException; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.context.annotation.Profile; +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.http.RequestEntity; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Service; +import org.springframework.web.client.RestClientException; +import org.springframework.web.client.RestTemplate; +import org.springframework.web.util.UriComponentsBuilder; + +/** + * Semantics Hub Rest Client Implementation + */ +@Service +@Slf4j +@Profile({ "!local && !test" }) +class SemanticsHubClientImpl implements SemanticsHubClient { + + public static final String LOCAL_MODEL_TYPE_BAMM = "BAMM"; + public static final String LOCAL_MODEL_TYPE_SAMM = "SAMM"; + public static final String LOCAL_MODEL_STATUS = "PROVIDED"; + private static final String PLACEHOLDER_URN = "urn"; + private final SemanticsHubConfiguration config; + private final RestTemplate restTemplate; + + /* package */ SemanticsHubClientImpl( + @Qualifier(RestTemplateConfig.SEMHUB_REST_TEMPLATE) final RestTemplate restTemplate, + final SemanticsHubConfiguration config) { + this.config = config; + this.restTemplate = restTemplate; + + if (StringUtils.isNotBlank(config.getModelJsonSchemaEndpoint())) { + requirePlaceholder(config.getModelJsonSchemaEndpoint()); + } else if (StringUtils.isBlank(config.getLocalModelDirectory())) { + log.warn("No Semantic Hub URL or local model directory was provided. Cannot validate submodel payloads!"); + } + } + + private static void requirePlaceholder(final String url) { + if (!url.contains(wrap(SemanticsHubClientImpl.PLACEHOLDER_URN))) { + throw new IllegalStateException( + "Configuration value for 'semanticsHub.modelJsonSchemaEndpoint' must contain the URL placeholder '" + + SemanticsHubClientImpl.PLACEHOLDER_URN + "'!"); + } + } + + private static String wrap(final String placeholderIdType) { + return "{" + placeholderIdType + "}"; + } + + @Override + public String getModelJsonSchema(final String urn) throws SchemaNotFoundException { + return readFromSemanticHub(urn).or(() -> readFromFilesystem(urn)) + .orElseThrow(() -> new SchemaNotFoundException( + "Could not load model with URN " + urn)); + } + + @Override + public List getAllAspectModels() throws SchemaNotFoundException { + return readAllFromSemanticHub().or(this::readAllFromFilesystem).orElse(List.of()); + } + + private Optional> readAllFromFilesystem() { + if (StringUtils.isNotBlank(config.getLocalModelDirectory())) { + final Path path = Paths.get(config.getLocalModelDirectory()); + try (Stream stream = Files.list(path)) { + return Optional.of(stream.filter(file -> !Files.isDirectory(file)) + .map(Path::getFileName) + .map(Path::toString) + .map(this::getDecodedString) + .map(this::createAspectModel) + .filter(Optional::isPresent) + .map(Optional::get) + .toList()); + } catch (IOException e) { + log.error("Could not read schema Files.", e); + } + } + return Optional.empty(); + } + + private String getDecodedString(final String urnBase64) { + try { + return decode(urnBase64); + } catch (IllegalArgumentException e) { + log.error("Could not Base64 decode urn.", e); + return urnBase64; + } + } + + private Optional createAspectModel(final String urn) { + log.debug("Extracting aspect information for urn: '{}'", urn); + final Matcher matcher = Pattern.compile("^urn:[sb]amm:.*:(\\d\\.\\d\\.\\d)#(\\w+)$").matcher(urn); + if (matcher.find()) { + final String version = matcher.group(1); + final String name = matcher.group(2); + final String localModelType = urn.contains("samm") ? LOCAL_MODEL_TYPE_SAMM : LOCAL_MODEL_TYPE_BAMM; + return Optional.of(new AspectModel(urn, version, name, localModelType, LOCAL_MODEL_STATUS)); + } + log.warn("Could not extract aspect information from urn: '{}'", urn); + return Optional.empty(); + } + + private Optional> readAllFromSemanticHub() { + log.info("Reading models from semantic hub."); + if (StringUtils.isNotBlank(config.getUrl())) { + int currentPage = 0; + final List aspectModelsCollection = new ArrayList<>(); + Optional> semanticHubPage; + do { + semanticHubPage = getSemanticHubPage(currentPage++, config.getPageSize()); + log.info("Got response from semantic hub '{}'", semanticHubPage.toString()); + aspectModelsCollection.addAll( + semanticHubPage.orElseThrow().toPageImpl(config.getPageSize()).getContent()); + } while (semanticHubPage.isPresent() && semanticHubPage.get().toPageImpl(config.getPageSize()).hasNext()); + + return Optional.of(aspectModelsCollection); + } + return Optional.empty(); + } + + private Optional> getSemanticHubPage(final int page, final int pageSize) { + try { + log.info("Request semantic hub page '{}' with size '{}' for url '{}'", page, pageSize, config.getUrl()); + final UriComponentsBuilder uriBuilder = UriComponentsBuilder.fromUriString(config.getUrl()) + .queryParam("page", page) + .queryParam("pageSize", pageSize); + log.info("Semantic Hub URL '{}'", uriBuilder.toUriString()); + final ParameterizedTypeReference> responseType = ParameterizedTypeReference.forType( + TypeUtils.parameterize(PaginatedResponse.class, AspectModel.class)); + final ResponseEntity> result = restTemplate.exchange( + RequestEntity.get(uriBuilder.toUriString()).build(), responseType); + return Optional.ofNullable(result.getBody()); + } catch (RestClientException e) { + log.error("Unable to retrieve models from semantic hub.", e); + } + return Optional.empty(); + } + + private Optional readFromFilesystem(final String urn) { + if (StringUtils.isNotBlank(config.getLocalModelDirectory())) { + final Path path = Paths.get(config.getLocalModelDirectory(), normalize(urn)); + if (path.toFile().exists()) { + try { + return Optional.of(Files.readString(path)); + } catch (IOException e) { + log.error("Unable to read schema file at path '{}'", path, e); + } + } + } + return Optional.empty(); + } + + private Optional readFromSemanticHub(final String urn) { + if (StringUtils.isNotBlank(config.getModelJsonSchemaEndpoint())) { + try { + final UriComponentsBuilder uriBuilder = UriComponentsBuilder.fromUriString( + config.getModelJsonSchemaEndpoint()); + uriBuilder.uriVariables(Map.of(PLACEHOLDER_URN, urn)); + return Optional.ofNullable(restTemplate.getForObject(uriBuilder.build().toUri(), String.class)); + } catch (final RestClientException e) { + log.error("Unable to retrieve schema from semantic hub for urn '{}'", urn, e); + } + } + return Optional.empty(); + } + + private String normalize(final String urn) { + return Base64.getEncoder() + .withoutPadding() + .encodeToString(FilenameUtils.getName(urn).getBytes(StandardCharsets.UTF_8)); + } + + private String decode(final String urnBase64) { + return new String(Base64.getDecoder().decode(urnBase64), StandardCharsets.UTF_8); + } +} diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/semanticshub/SemanticsHubClientLocalStub.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/semanticshub/SemanticsHubClientLocalStub.java new file mode 100644 index 0000000000..8040e3157f --- /dev/null +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/semanticshub/SemanticsHubClientLocalStub.java @@ -0,0 +1,56 @@ +/******************************************************************************** + * Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * Copyright (c) 2021,2024 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ +package org.eclipse.tractusx.irs.semanticshub; + +import java.util.List; + +import org.eclipse.tractusx.irs.SemanticModelNames; +import org.springframework.context.annotation.Profile; +import org.springframework.stereotype.Service; + +/** + * Semantics Hub Rest Client Stub used in local environment + */ +@Service +@Profile({ "local", + "test" +}) +class SemanticsHubClientLocalStub implements SemanticsHubClient { + + public static final String MODEL_TYPE = "BAMM"; + public static final String MODEL_STATUS = "RELEASED"; + + @Override + public String getModelJsonSchema(final String urn) { + return "{" + " \"$schema\": \"http://json-schema.org/draft-07/schema#\"," + " \"type\": \"integer\"" + "}"; + } + + @Override + public List getAllAspectModels() { + return List.of( + new AspectModel(SemanticModelNames.SERIAL_PART_3_0_0, "3.0.0", "SerialPart", MODEL_TYPE, MODEL_STATUS), + new AspectModel(SemanticModelNames.SINGLE_LEVEL_BOM_AS_BUILT_3_0_0, "3.0.0", "SingleLevelBomAsBuilt", + MODEL_TYPE, MODEL_STATUS), + new AspectModel(SemanticModelNames.PART_AS_SPECIFIED_2_0_0, "2.0.0", "PartAsSpecified", MODEL_TYPE, + MODEL_STATUS), + new AspectModel(SemanticModelNames.PART_AS_PLANNED_1_0_1, "1.0.1", "PartAsPlanned", MODEL_TYPE, + MODEL_STATUS)); + } +} From aca4a3c25783e11f84397061c4909b596c109d0d Mon Sep 17 00:00:00 2001 From: jhartmann Date: Tue, 28 May 2024 16:08:09 +0200 Subject: [PATCH 04/15] feat(irs-api):[#470] Add test for previous supported major versions --- .../delegate/RelationshipDelegateTest.java | 37 +++++++++++++++++++ ...ssetAdministrationShellDescriptorTest.java | 23 +++++++++++- 2 files changed, 59 insertions(+), 1 deletion(-) diff --git a/irs-api/src/test/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/RelationshipDelegateTest.java b/irs-api/src/test/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/RelationshipDelegateTest.java index 14b4063488..c5fadc3a14 100644 --- a/irs-api/src/test/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/RelationshipDelegateTest.java +++ b/irs-api/src/test/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/RelationshipDelegateTest.java @@ -259,6 +259,43 @@ public static Stream relationshipParametersFutureVersions() { ); } + @ParameterizedTest + @MethodSource("relationshipParametersPreviousVersions") + void shouldFillItemContainerWithPreviousVersions(final String relationshipFile, final String aspectName, + final JobParameter jobParameter) throws Exception { + // given + final String payload = Files.readString(Paths.get( + Objects.requireNonNull(getClass().getResource("/relationships/previous/" + relationshipFile)).toURI())); + when(submodelFacade.getSubmodelPayload(anyString(), anyString(), anyString(), any())).thenReturn( + new SubmodelDescriptor("cid", payload)); + when(connectorEndpointsService.fetchConnectorEndpoints(any())).thenReturn(List.of("http://localhost")); + + final ItemContainer.ItemContainerBuilder itemContainerWithShell = ItemContainer.builder() + .shell(shell("", shellDescriptor( + List.of(submodelDescriptorWithDspEndpoint( + aspectName, + "address"))))); + final AASTransferProcess aasTransferProcess = new AASTransferProcess(); + + // when + final ItemContainer result = relationshipDelegate.process(itemContainerWithShell, jobParameter, + aasTransferProcess, createKey()); + + // then + assertThat(result).isNotNull(); + assertThat(result.getRelationships()).isNotEmpty(); + assertThat(aasTransferProcess.getIdsToProcess()).isNotEmpty(); + assertThat(aasTransferProcess.getIdsToProcess().get(0).getGlobalAssetId()).isNotEmpty(); + assertThat(aasTransferProcess.getIdsToProcess().get(0).getBpn()).isNotEmpty(); + } + + public static Stream relationshipParametersPreviousVersions() { + return Stream.of( + Arguments.of("singleLevelBomAsBuilt-2.0.0.json", SINGLE_LEVEL_BOM_AS_BUILT_2_0_0, jobParameter()), + Arguments.of("SingleLevelBomAsPlanned-2.0.0.json", SINGLE_LEVEL_BOM_AS_PLANNED_2_0_0, + jobParameterDownwardAsPlanned())); + } + @Test void shouldPutTombstoneForMissingBpn() { final ItemContainer.ItemContainerBuilder itemContainerWithShell = ItemContainer.builder() diff --git a/irs-api/src/test/java/org/eclipse/tractusx/irs/component/assetadministrationshell/AssetAdministrationShellDescriptorTest.java b/irs-api/src/test/java/org/eclipse/tractusx/irs/component/assetadministrationshell/AssetAdministrationShellDescriptorTest.java index f2245e771e..4bff7777b8 100644 --- a/irs-api/src/test/java/org/eclipse/tractusx/irs/component/assetadministrationshell/AssetAdministrationShellDescriptorTest.java +++ b/irs-api/src/test/java/org/eclipse/tractusx/irs/component/assetadministrationshell/AssetAdministrationShellDescriptorTest.java @@ -106,7 +106,28 @@ void shouldFilterByAspectTypeForUrnFormat() { // Assert assertThat(result).hasSize(2); assertThat(result.get(0).getSemanticId().getKeys().get(0).getValue()).isEqualTo(SERIAL_PART_3_0_0); - assertThat(result.get(1).getSemanticId().getKeys().get(0).getValue()).isEqualTo(SINGLE_LEVEL_BOM_AS_BUILT_3_0_0); + assertThat(result.get(1).getSemanticId().getKeys().get(0).getValue()).isEqualTo( + SINGLE_LEVEL_BOM_AS_BUILT_3_0_0); + } + + @Test + void shouldFilterByByRelationshipAspectType() { + // Arrange + final AssetAdministrationShellDescriptor shellDescriptor = shellDescriptor( + List.of(submodelDescriptorWithDspEndpoint(SINGLE_LEVEL_BOM_AS_BUILT_2_0_0, "endpoint1"), + submodelDescriptorWithDspEndpoint(SINGLE_LEVEL_BOM_AS_BUILT_3_0_0, "endpoint2"), + submodelDescriptorWithDspEndpoint(SINGLE_LEVEL_BOM_AS_BUILT_3_1_0, "endpoint3"), + submodelDescriptorWithDspEndpoint(SINGLE_LEVEL_BOM_AS_PLANNED_3_0_0, "endpoint4"))); + + // Act + final List result = shellDescriptor.findRelationshipEndpointAddresses( + AspectType.SINGLE_LEVEL_BOM_AS_BUILT); + + // Assert + assertThat(result).hasSize(3); + assertThat(result.get(0).getProtocolInformation().getHref()).isEqualTo("endpoint1"); + assertThat(result.get(1).getProtocolInformation().getHref()).isEqualTo("endpoint2"); + assertThat(result.get(2).getProtocolInformation().getHref()).isEqualTo("endpoint3"); } } \ No newline at end of file From d499f967cbab33aaf4e6b67806ee71efcc1ffb24 Mon Sep 17 00:00:00 2001 From: jhartmann Date: Tue, 28 May 2024 16:09:11 +0200 Subject: [PATCH 05/15] feat(irs-api):[#470] Unify all semantic model names in class SemanticModelNames --- .../tractusx/irs/SemanticModelNames.java | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 irs-models/src/main/java/org/eclipse/tractusx/irs/SemanticModelNames.java diff --git a/irs-models/src/main/java/org/eclipse/tractusx/irs/SemanticModelNames.java b/irs-models/src/main/java/org/eclipse/tractusx/irs/SemanticModelNames.java new file mode 100644 index 0000000000..860125872f --- /dev/null +++ b/irs-models/src/main/java/org/eclipse/tractusx/irs/SemanticModelNames.java @@ -0,0 +1,76 @@ +/******************************************************************************** + * Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * Copyright (c) 2021,2024 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ +package org.eclipse.tractusx.irs; + +import static lombok.AccessLevel.PRIVATE; + +import lombok.NoArgsConstructor; + +/** + * The {@code SemanticModelNames} class contains constants representing all available semantic model names. + *

+ * These constants can be used throughout the application to refer to specific semantic models in a consistent manner. + *

+ */ +@NoArgsConstructor(access = PRIVATE) +public final class SemanticModelNames { + public static final String SINGLE_LEVEL_BOM_AS_BUILT_2_0_0 = "urn:samm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt"; + public static final String SINGLE_LEVEL_BOM_AS_BUILT_3_0_0 = "urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt"; + public static final String SINGLE_LEVEL_BOM_AS_BUILT_3_1_0 = "urn:samm:io.catenax.single_level_bom_as_built:3.1.0#SingleLevelBomAsBuilt"; + + public static final String SINGLE_LEVEL_BOM_AS_PLANNED_2_0_0 = "urn:samm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned"; + public static final String SINGLE_LEVEL_BOM_AS_PLANNED_3_0_0 = "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsPlanned"; + public static final String SINGLE_LEVEL_BOM_AS_PLANNED_3_1_0 = "urn:samm:io.catenax.single_level_bom_as_planned:3.1.0#SingleLevelBomAsPlanned"; + + public static final String SINGLE_LEVEL_BOM_AS_SPECIFIED_1_0_0 = "urn:samm:io.catenax.single_level_bom_as_specified:1.0.0#SingleLevelBomAsSpecified"; + public static final String SINGLE_LEVEL_BOM_AS_SPECIFIED_1_1_0 = "urn:samm:io.catenax.single_level_bom_as_specified:1.1.0#SingleLevelBomAsSpecified"; + public static final String SINGLE_LEVEL_BOM_AS_SPECIFIED_2_0_0 = "urn:samm:io.catenax.single_level_bom_as_specified:2.0.0#SingleLevelBomAsSpecified"; + public static final String SINGLE_LEVEL_BOM_AS_SPECIFIED_2_1_0 = "urn:samm:io.catenax.single_level_bom_as_specified:2.1.0#SingleLevelBomAsSpecified"; + + public static final String SINGLE_LEVEL_USAGE_AS_BUILT_2_0_0 = "urn:samm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt"; + public static final String SINGLE_LEVEL_USAGE_AS_BUILT_3_0_0 = "urn:samm:io.catenax.single_level_usage_as_built:3.0.0#SingleLevelUsageAsBuilt"; + public static final String SINGLE_LEVEL_USAGE_AS_BUILT_3_1_0 = "urn:samm:io.catenax.single_level_usage_as_built:3.1.0#SingleLevelUsageAsBuilt"; + + public static final String SINGLE_LEVEL_USAGE_AS_PLANNED_2_0_0 = "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned"; + public static final String SINGLE_LEVEL_USAGE_AS_PLANNED_2_1_0 = "urn:samm:io.catenax.single_level_usage_as_planned:2.1.0#SingleLevelUsageAsPlanned"; + + public static final String SERIAL_PART_3_0_0 = "urn:samm:io.catenax.serial_part:3.0.0#SerialPart"; + public static final String PART_AS_PLANNED_1_0_1 = "urn:samm:io.catenax.part_as_planned:1.0.1#PartAsPlanned"; + public static final String PART_AS_PLANNED_2_0_0 = "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned"; + public static final String PART_AS_SPECIFIED_3_0_0 = "urn:samm:io.catenax.part_as_specified:3.0.0#PartAsSpecified"; + public static final String BATCH_3_0_0 = "urn:samm:io.catenax.batch:3.0.0#Batch"; + public static final String MATERIAL_FOR_RECYCLING_1_1_0 = "urn:samm:io.catenax.material_for_recycling:1.1.0#MaterialForRecycling"; + public static final String BATTERY_PRODUCT_DESCRIPTION_1_0_1 = "urn:samm:io.catenax.battery.product_description:1.0.1#ProductDescription"; + public static final String PHYSICAL_DIMENSION_1_0_0 = "urn:samm:io.catenax.physical_dimension:1.0.0#PhysicalDimension"; + public static final String PART_AS_SPECIFIED_2_0_0 = "urn:samm:io.catenax.part_as_specified:2.0.0#PartAsSpecified"; + public static final String PART_SITE_INFORMATION_AS_PLANNED_1_0_0 = "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned"; + + public static final String VEHICLE_PRODUCT_DESCRIPTION_1_0_0 = "urn:samm:io.catenax.vehicle.product_description:1.0.0#ProductDescription"; + public static final String SECONDARY_MATERIAL_CONTENT_VERIFIABLE_1_0_0 = "urn:samm:io.catenax.secondary_material_content_verifiable:1.0.0#SecondaryMaterialContentVerifiable"; + public static final String JUST_IN_SEQUENCE_PART_3_0_0 = "urn:samm:io.catenax.just_in_sequence_part:3.0.0#JustInSequencePart"; + public static final String TRANSMISSION_PASS_1_0_0 = "urn:samm:io.catenax.transmission_pass:1.0.0#TransmissionPass"; + public static final String MARKET_PLACE_OFFER_1_4_0 = "urn:samm:io.catenax.market_place_offer:1.4.0#MarketPlaceOffer"; + public static final String DIGITAL_PRODUCT_PASSPORT_1_0_0 = "urn:samm:io.catenax.digital_product_passport:1.0.0#DigitalProductPassport"; + public static final String BATTERY_BATTERY_PASS_3_0_1 = "urn:samm:io.catenax.battery.battery_pass:3.0.1#BatteryPass"; + public static final String TRACTION_BATTERY_CODE_1_0_0 = "urn:samm:io.catenax.traction_battery_code:1.0.0#TractionBatteryCode"; + public static final String RETURN_REQUEST_1_0_1 = "urn:samm:io.catenax.return_request:1.0.1#ReturnRequest"; + public static final String SECONDARY_MATERIAL_CONTENT_CALCULATED_1_0_0 = "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated"; + +} From 02d18cb233d7c94f2b646c4715e52b6e9231d3a1 Mon Sep 17 00:00:00 2001 From: jhartmann Date: Tue, 28 May 2024 17:39:41 +0200 Subject: [PATCH 06/15] feat(irs-api):[#470] Unify all semantic model names in class SemanticModelNames --- .../edc/client/CxTestDataAnalyzerTest.java | 40 +++++++++---------- .../irs/data/CxTestDataContainer.java | 38 ++++++------------ 2 files changed, 33 insertions(+), 45 deletions(-) diff --git a/irs-edc-client/src/test/java/org/eclipse/tractusx/irs/edc/client/CxTestDataAnalyzerTest.java b/irs-edc-client/src/test/java/org/eclipse/tractusx/irs/edc/client/CxTestDataAnalyzerTest.java index a04c951337..ef404b3f4a 100644 --- a/irs-edc-client/src/test/java/org/eclipse/tractusx/irs/edc/client/CxTestDataAnalyzerTest.java +++ b/irs-edc-client/src/test/java/org/eclipse/tractusx/irs/edc/client/CxTestDataAnalyzerTest.java @@ -24,15 +24,15 @@ package org.eclipse.tractusx.irs.edc.client; import static org.assertj.core.api.Assertions.assertThat; -import static org.eclipse.tractusx.irs.data.CxTestDataContainer.CxTestData.BATCH_ASPECT_TYPE; -import static org.eclipse.tractusx.irs.data.CxTestDataContainer.CxTestData.MATERIAL_FOR_RECYCLING_ASPECT_TYPE; -import static org.eclipse.tractusx.irs.data.CxTestDataContainer.CxTestData.PART_AS_PLANNED_ASPECT_TYPE; -import static org.eclipse.tractusx.irs.data.CxTestDataContainer.CxTestData.PHYSICAL_DIMENSION_ASPECT_TYPE; -import static org.eclipse.tractusx.irs.data.CxTestDataContainer.CxTestData.PRODUCT_DESCRIPTION_ASPECT_TYPE; -import static org.eclipse.tractusx.irs.data.CxTestDataContainer.CxTestData.SERIAL_PART_ASPECT_TYPE; -import static org.eclipse.tractusx.irs.data.CxTestDataContainer.CxTestData.SINGLE_LEVEL_BOM_AS_BUILT_ASPECT_TYPE; -import static org.eclipse.tractusx.irs.data.CxTestDataContainer.CxTestData.SINGLE_LEVEL_BOM_AS_PLANNED_ASPECT_TYPE; -import static org.eclipse.tractusx.irs.data.CxTestDataContainer.CxTestData.SINGLE_LEVEL_USAGE_AS_BUILT_ASPECT_TYPE; +import static org.eclipse.tractusx.irs.SemanticModelNames.BATCH_3_0_0; +import static org.eclipse.tractusx.irs.SemanticModelNames.BATTERY_PRODUCT_DESCRIPTION_1_0_1; +import static org.eclipse.tractusx.irs.SemanticModelNames.MATERIAL_FOR_RECYCLING_1_1_0; +import static org.eclipse.tractusx.irs.SemanticModelNames.PART_AS_PLANNED_2_0_0; +import static org.eclipse.tractusx.irs.SemanticModelNames.PHYSICAL_DIMENSION_1_0_0; +import static org.eclipse.tractusx.irs.SemanticModelNames.SERIAL_PART_3_0_0; +import static org.eclipse.tractusx.irs.SemanticModelNames.SINGLE_LEVEL_BOM_AS_BUILT_3_0_0; +import static org.eclipse.tractusx.irs.SemanticModelNames.SINGLE_LEVEL_BOM_AS_PLANNED_3_0_0; +import static org.eclipse.tractusx.irs.SemanticModelNames.SINGLE_LEVEL_USAGE_AS_BUILT_3_0_0; import java.io.File; import java.io.IOException; @@ -297,33 +297,32 @@ private List getSubmodelsFor(final String catenaXId, final TestParamet if (relationshipAspect.equals(RelationshipAspect.SINGLE_LEVEL_BOM_AS_BUILT)) { relationshipSubmodelData = cxTestData.flatMap(CxTestDataContainer.CxTestData::getSingleLevelBomAsBuilt); checkAndAddSubmodel(testParameters.shouldCountSingleLevelBomAsBuilt, relationshipSubmodelData, submodels, - SINGLE_LEVEL_BOM_AS_BUILT_ASPECT_TYPE); + SINGLE_LEVEL_BOM_AS_BUILT_3_0_0); checkAndAddSubmodel(testParameters.shouldCountSerialPart, - cxTestData.flatMap(CxTestDataContainer.CxTestData::getSerialPart), submodels, - SERIAL_PART_ASPECT_TYPE); + cxTestData.flatMap(CxTestDataContainer.CxTestData::getSerialPart), submodels, SERIAL_PART_3_0_0); checkAndAddSubmodel(testParameters.shouldCountSingleLevelUsageAsBuilt, cxTestData.flatMap(CxTestDataContainer.CxTestData::getSingleLevelBomAsPlanned), submodels, - SINGLE_LEVEL_USAGE_AS_BUILT_ASPECT_TYPE); + SINGLE_LEVEL_USAGE_AS_BUILT_3_0_0); checkAndAddSubmodel(testParameters.shouldCountBatch, - cxTestData.flatMap(CxTestDataContainer.CxTestData::getBatch), submodels, BATCH_ASPECT_TYPE); + cxTestData.flatMap(CxTestDataContainer.CxTestData::getBatch), submodels, BATCH_3_0_0); checkAndAddSubmodel(testParameters.shouldCountMaterialForRecycling, cxTestData.flatMap(CxTestDataContainer.CxTestData::getMaterialForRecycling), submodels, - MATERIAL_FOR_RECYCLING_ASPECT_TYPE); + MATERIAL_FOR_RECYCLING_1_1_0); checkAndAddSubmodel(testParameters.shouldCountProductDescription, cxTestData.flatMap(CxTestDataContainer.CxTestData::getProductDescription), submodels, - PRODUCT_DESCRIPTION_ASPECT_TYPE); + BATTERY_PRODUCT_DESCRIPTION_1_0_1); checkAndAddSubmodel(testParameters.shouldCountPhysicalDimension, cxTestData.flatMap(CxTestDataContainer.CxTestData::getPhysicalDimension), submodels, - PHYSICAL_DIMENSION_ASPECT_TYPE); + PHYSICAL_DIMENSION_1_0_0); } else if (relationshipAspect.equals(RelationshipAspect.SINGLE_LEVEL_BOM_AS_PLANNED)) { relationshipSubmodelData = cxTestData.flatMap(CxTestDataContainer.CxTestData::getSingleLevelBomAsPlanned); checkAndAddSubmodel(testParameters.shouldCountSingleLevelBomAsPlanned, relationshipSubmodelData, submodels, - SINGLE_LEVEL_BOM_AS_PLANNED_ASPECT_TYPE); + SINGLE_LEVEL_BOM_AS_PLANNED_3_0_0); checkAndAddSubmodel(testParameters.shouldCountPartAsPlanned, cxTestData.flatMap(CxTestDataContainer.CxTestData::getPartAsPlanned), submodels, - PART_AS_PLANNED_ASPECT_TYPE); + PART_AS_PLANNED_2_0_0); } if (relationshipSubmodelData.isPresent()) { @@ -349,7 +348,8 @@ private void checkAndIncrementCounter(final boolean shouldCountSubmodel, private void checkAndAddSubmodel(final boolean shouldCountSubmodel, final Optional> payload, final List submodels, final String aspectType) { if (shouldCountSubmodel && payload.isPresent()) { - submodels.add(Submodel.from(UUID.randomUUID().toString(), aspectType, UUID.randomUUID().toString(), payload.get())); + submodels.add(Submodel.from(UUID.randomUUID().toString(), aspectType, UUID.randomUUID().toString(), + payload.get())); } } diff --git a/irs-models/src/main/java/org/eclipse/tractusx/irs/data/CxTestDataContainer.java b/irs-models/src/main/java/org/eclipse/tractusx/irs/data/CxTestDataContainer.java index 41f9fe6ad0..63ad2f5b6f 100644 --- a/irs-models/src/main/java/org/eclipse/tractusx/irs/data/CxTestDataContainer.java +++ b/irs-models/src/main/java/org/eclipse/tractusx/irs/data/CxTestDataContainer.java @@ -29,6 +29,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Data; +import org.eclipse.tractusx.irs.SemanticModelNames; /** * Container to load test data from resources @@ -54,43 +55,30 @@ public Optional getByCatenaXId(final String catenaXId) { @Data public static class CxTestData { - public static final String SERIAL_PART_ASPECT_TYPE = "urn:samm:io.catenax.serial_part:3.0.0#SerialPart"; - public static final String SINGLE_LEVEL_BOM_AS_BUILT_ASPECT_TYPE = "urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt"; - public static final String SINGLE_LEVEL_USAGE_AS_BUILT_ASPECT_TYPE = "urn:samm:io.catenax.single_level_usage_as_built:3.0.0#SingleLevelUsageAsBuilt"; - public static final String SINGLE_LEVEL_BOM_AS_SPECIFIED_ASPECT_TYPE = "urn:samm:io.catenax.single_level_bom_as_specified:2.0.0#SingleLevelBomAsSpecified"; - public static final String PART_AS_PLANNED_ASPECT_TYPE = "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned"; - public static final String SINGLE_LEVEL_BOM_AS_PLANNED_ASPECT_TYPE = "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsPlanned"; - public static final String SINGLE_LEVEL_USAGE_AS_PLANNED_ASPECT_TYPE = "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned"; - public static final String BATCH_ASPECT_TYPE = "urn:samm:io.catenax.batch:3.0.0#Batch"; - public static final String MATERIAL_FOR_RECYCLING_ASPECT_TYPE = "urn:samm:io.catenax.material_for_recycling:1.1.0#MaterialForRecycling"; - public static final String PRODUCT_DESCRIPTION_ASPECT_TYPE = "urn:samm:io.catenax.battery.product_description:1.0.1#ProductDescription"; - public static final String PHYSICAL_DIMENSION_ASPECT_TYPE = "urn:samm:io.catenax.physical_dimension:1.0.0#PhysicalDimension"; - public static final String PART_AS_SPECIFIED_ASPECT_TYPE = "urn:samm:io.catenax.part_as_specified:2.0.0#PartAsSpecified"; - private String catenaXId; - @JsonProperty(SERIAL_PART_ASPECT_TYPE) + @JsonProperty(SemanticModelNames.SERIAL_PART_3_0_0) private List> serialPart; - @JsonProperty(SINGLE_LEVEL_BOM_AS_BUILT_ASPECT_TYPE) + @JsonProperty(SemanticModelNames.SINGLE_LEVEL_BOM_AS_BUILT_3_0_0) private List> singleLevelBomAsBuilt; - @JsonProperty(SINGLE_LEVEL_USAGE_AS_BUILT_ASPECT_TYPE) + @JsonProperty(SemanticModelNames.SINGLE_LEVEL_USAGE_AS_BUILT_3_0_0) private List> singleLevelUsageAsBuilt; - @JsonProperty(SINGLE_LEVEL_BOM_AS_SPECIFIED_ASPECT_TYPE) + @JsonProperty(SemanticModelNames.SINGLE_LEVEL_BOM_AS_SPECIFIED_2_0_0) private List> singleLevelBomAsSpecified; - @JsonProperty(PART_AS_PLANNED_ASPECT_TYPE) + @JsonProperty(SemanticModelNames.PART_AS_PLANNED_2_0_0) private List> partAsPlanned; - @JsonProperty(SINGLE_LEVEL_BOM_AS_PLANNED_ASPECT_TYPE) + @JsonProperty(SemanticModelNames.SINGLE_LEVEL_BOM_AS_PLANNED_3_0_0) private List> singleLevelBomAsPlanned; - @JsonProperty(SINGLE_LEVEL_USAGE_AS_PLANNED_ASPECT_TYPE) + @JsonProperty(SemanticModelNames.SINGLE_LEVEL_USAGE_AS_PLANNED_2_0_0) private List> singleLevelUsageAsPlanned; - @JsonProperty(BATCH_ASPECT_TYPE) + @JsonProperty(SemanticModelNames.BATCH_3_0_0) private List> batch; - @JsonProperty(MATERIAL_FOR_RECYCLING_ASPECT_TYPE) + @JsonProperty(SemanticModelNames.MATERIAL_FOR_RECYCLING_1_1_0) private List> materialForRecycling; - @JsonProperty(PRODUCT_DESCRIPTION_ASPECT_TYPE) + @JsonProperty(SemanticModelNames.BATTERY_PRODUCT_DESCRIPTION_1_0_1) private List> productDescription; - @JsonProperty(PHYSICAL_DIMENSION_ASPECT_TYPE) + @JsonProperty(SemanticModelNames.PHYSICAL_DIMENSION_1_0_0) private List> physicalDimension; - @JsonProperty(PART_AS_SPECIFIED_ASPECT_TYPE) + @JsonProperty(SemanticModelNames.PART_AS_SPECIFIED_2_0_0) private List> partAsSpecified; public Optional> getSerialPart() { From ae2a138253c73883fa1ef1fc21f9384e796d6bc2 Mon Sep 17 00:00:00 2001 From: jhartmann Date: Tue, 28 May 2024 17:41:19 +0200 Subject: [PATCH 07/15] feat(docs):[#470] Update changelog and compatibility matrix --- CHANGELOG.md | 7 ++++--- COMPATIBILITY_MATRIX.md | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 326c5dfad4..78138c8008 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,15 +18,16 @@ _**For better traceability add the corresponding GitHub issue number in each cha - Extended datamodel of EdcPolicyPermissionConstraint to include andConstraints - Marked createAccessPolicy requests with deprecation mark. - Remove edc namespace from EdcContractAgreementNegotiationResponse and - EdcContractAgreementsResponse eclipse-tractusx/traceability-foss#963 -- Added missing @context values in edc asset creation eclipse-tractusx/traceability-foss#978 -- Switch to `dct:type` `https://w3id.org/catenax/taxonomy#` for notification asset creation eclipse-tractusx/traceability-foss#978 + EdcContractAgreementsResponse. eclipse-tractusx/traceability-foss#963 +- Added missing @context values in edc asset creation. eclipse-tractusx/traceability-foss#978 +- Switch to `dct:type` `https://w3id.org/catenax/taxonomy#` for notification asset creation. eclipse-tractusx/traceability-foss#978 - Shells in Job response will contain all submodel descriptors returned by provider, instead filtered by aspect-type parameter. #510 ## Added - Added endpoint for dedicated removal of policy from BPNL. #559 - Integration Test Policy Store API Unhappy Path. #519 +- Add support for SingleLevelUsageAsPlanned. #470 ## [5.1.4] - 2024-05-27 diff --git a/COMPATIBILITY_MATRIX.md b/COMPATIBILITY_MATRIX.md index 22cda758c8..89a9fdce32 100644 --- a/COMPATIBILITY_MATRIX.md +++ b/COMPATIBILITY_MATRIX.md @@ -15,8 +15,9 @@ Full changelog of IRS: [changelog](CHANGELOG.md) | Kubernetes | 1.29 | - | - | | SingleLevelBomAsBuilt | [ 2.0.0; 3.0.0 ] | - | Model version | | SingleLevelBomAsPlanned | [ 2.0.0; 3.0.0 ] | - | Model version | -| SingleLevelBomAsSpecified | 1.0.0 | - | Model version | +| SingleLevelBomAsSpecified | 2.0.0 | - | Model version | | SingleLevelUsageAsBuilt | 3.0.0 | - | Model version | +| SingleLevelUsageAsPlanned | 2.0.0 | - | Model version | ## [CATENA-X Release 24.05](https://eclipse-tractusx.github.io/CHANGELOG/) - [5.1.3](https://github.com/eclipse-tractusx/item-relationship-service/releases/tag/5.1.3) - 2024-05-17 From 0d9b510da036fb8a07c08e9e5bc0ea79fc44002d Mon Sep 17 00:00:00 2001 From: jhartmann Date: Wed, 29 May 2024 17:22:32 +0200 Subject: [PATCH 08/15] feat(docs):[#470] Add documentation which describes the delegates. --- .../arc42/building-block-view/level-2.adoc | 20 +++++++++++++ docs/src/docs/arc42/index.adoc | 4 +-- .../scope-context/technical-context.adoc | 12 ++++---- ...level-2-int-transfer-process-delegate.puml | 30 +++++++++++++++++++ 4 files changed, 58 insertions(+), 8 deletions(-) create mode 100644 docs/src/uml-diagrams/building-block-view/level-2-int-transfer-process-delegate.puml diff --git a/docs/src/docs/arc42/building-block-view/level-2.adoc b/docs/src/docs/arc42/building-block-view/level-2.adoc index 895d35bfd4..04391abd20 100644 --- a/docs/src/docs/arc42/building-block-view/level-2.adoc +++ b/docs/src/docs/arc42/building-block-view/level-2.adoc @@ -102,6 +102,26 @@ include::../../../uml-diagrams/building-block-view/level-2-int-transfer-process- |The ExecutorService enables the simultaneous execution of requests of transfer processes. |=== +== AASTransferProcessManager + +The AASTransferProcessManager coordinates creation of Runnables which are then passed to the ExecutorService for asynchronous and parallel execution. +The Runnable consists of different Delegates which are each responsible for requesting certain types of data. + +=== Component diagram +[plantuml, level-2-int-transfer-process-delegate, format=svg] +.... +include::../../../uml-diagrams/building-block-view/level-2-int-transfer-process-delegate.puml[] +.... + +=== Component description +|=== +|Components |Description +|DigitalTwinDelegate | Request the digital twin for the globalAssetId. The result is stored in "shells" of the job response. +|RelationshipDelegate| Request the payload for relationship aspects, found in the DTR. Relationships are mapped to the internal linkedItem data structure of IRS and validated to be within the supported major Traversal Aspect version range which can be found in the technical context. +The result is stored in "relationships" of the job response. +|SubmodelDelegate | Request the payload for the other semantic models requested by the Job. The result is stored in "submodels" of the job response. +|=== + == ESS controller The ESS REST controller is used to provide a RESTful web service to related Environmental and Social Standards functionalities. diff --git a/docs/src/docs/arc42/index.adoc b/docs/src/docs/arc42/index.adoc index 4bdc00ce39..9e5e60cb81 100644 --- a/docs/src/docs/arc42/index.adoc +++ b/docs/src/docs/arc42/index.adoc @@ -16,9 +16,9 @@ This work is licensed under the https://www.apache.org/licenses/LICENSE-2.0[Apache-2.0]. - SPDX-License-Identifier: Apache-2.0 -- SPDX-FileCopyrightText: 2021, 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +- SPDX-FileCopyrightText: 2021, 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - SPDX-FileCopyrightText: 2022, 2023 BOSCH AG - SPDX-FileCopyrightText: 2021, 2022 ZF Friedrichshafen AG - SPDX-FileCopyrightText: 2022 ISTOS GmbH -- SPDX-FileCopyrightText: 2021, 2023 Contributors to the Eclipse Foundation +- SPDX-FileCopyrightText: 2021, 2024 Contributors to the Eclipse Foundation - Source URL: https://github.com/eclipse-tractusx/item-relationship-service \ No newline at end of file diff --git a/docs/src/docs/arc42/scope-context/technical-context.adoc b/docs/src/docs/arc42/scope-context/technical-context.adoc index d76d107f39..cfb65d299f 100644 --- a/docs/src/docs/arc42/scope-context/technical-context.adoc +++ b/docs/src/docs/arc42/scope-context/technical-context.adoc @@ -32,8 +32,8 @@ The integrated EDC client in the IRS is responsible for creating restful request |=== | Name | Description | -| SingleLevelBomAsBuilt | The single-level bill of material represents one sub-level of an assembly and does not include any lower-level subassemblies. The as-built lifecycle references all child items as manufactured by the manufacturer referencing only child items in an as-built lifecycle themselves, unless parts can only be tracked by an part ID. If it's unclear which item has been built-in into the parent item, all potential parts must be listed. This is the case when, e.g. the same item is supplied by two suppliers and the item is only tracked by a customer part ID during assembly, these items can not be differentiated from each other. | 3.0.0 -| SingleLevelUsageAsBuilt | The aspect provides the information in which parent part(s)/product(s) the given item is assembled in. Could be a 1:1 relationship in terms of a e.g. a brake component or 1:n for e.g. coatings. The given item as well as the parent item must refer to an object from as-built lifecycle phase, i.e. a batch or a serialized part. | 2.0.0 +| SingleLevelBomAsBuilt | The single-level bill of material represents one sub-level of an assembly and does not include any lower-level subassemblies. The as-built lifecycle references all child items as manufactured by the manufacturer referencing only child items in an as-built lifecycle themselves, unless parts can only be tracked by an part ID. If it's unclear which item has been built-in into the parent item, all potential parts must be listed. This is the case when, e.g. the same item is supplied by two suppliers and the item is only tracked by a customer part ID during assembly, these items can not be differentiated from each other. | [2.0.0, 3.0.0] +| SingleLevelUsageAsBuilt | The aspect provides the information in which parent part(s)/product(s) the given item is assembled in. Could be a 1:1 relationship in terms of a e.g. a brake component or 1:n for e.g. coatings. The given item as well as the parent item must refer to an object from as-built lifecycle phase, i.e. a batch or a serialized part. | 3.0.0 |=== ==== Semantic Model @@ -52,14 +52,14 @@ The integrated EDC client in the IRS is responsible for creating restful request |=== | Name | Description | -| SingleLevelBomAsPlanned | The single-level Bill of Material represents one sub-level of an assembly and does not include any lower-level subassemblies. In as planned lifecycle state all variants are covered (\"120% BoM\"). If multiple versions of child parts exist that can be assembled into the same parent part, all versions of the child part are included in the BoM. If there are multiple suppliers for the same child part, each supplier has an entry for their child part in the BoM.| 2.0.0 -| SingleLevelUsageAsPlanned | The aspect provides the information in which parent part(s)/product(s) the given item is assembled in. This could be a 1:1 relationship in terms of a e.g. a brake component or 1:n for e.g. coatings. The given item as well as the parent item must refer to an object from as planned lifecycle phase. If multiple versions of parent parts exist that the child part can be assembled into, all versions of the parent part are included in the usage list. | Not supported +| SingleLevelBomAsPlanned | The single-level Bill of Material represents one sub-level of an assembly and does not include any lower-level subassemblies. In as planned lifecycle state all variants are covered (\"120% BoM\"). If multiple versions of child parts exist that can be assembled into the same parent part, all versions of the child part are included in the BoM. If there are multiple suppliers for the same child part, each supplier has an entry for their child part in the BoM.| [2.0.0, 3.0.0] +| SingleLevelUsageAsPlanned | The aspect provides the information in which parent part(s)/product(s) the given item is assembled in. This could be a 1:1 relationship in terms of a e.g. a brake component or 1:n for e.g. coatings. The given item as well as the parent item must refer to an object from as planned lifecycle phase. If multiple versions of parent parts exist that the child part can be assembled into, all versions of the parent part are included in the usage list. | 2.0.0 |=== ==== Semantic Model |=== | Name | Description | -| PartAsPlanned | A Part as Planned represents an item in the Catena-X Bill of Material (BOM) in As-Planned lifecycle status in a specific version. | [1.0,0, 1.0.1] +| PartAsPlanned | A Part as Planned represents an item in the Catena-X Bill of Material (BOM) in As-Planned lifecycle status in a specific version. | [1.0.0, 1.0.1] | PartSiteInformationAsPlanned |The aspect provides site related information for a given as planned item (i.e. a part type or part instance that is uniquely identifiable within Catena-X via its Catena-X ID). A site is a delimited geographical area where a legal entity does business. In the \"as planned\" lifecycle context all potentially related sites are listed including all sites where e.g. production of this part (type) is planned. | 1.0.0 |=== @@ -68,7 +68,7 @@ The integrated EDC client in the IRS is responsible for creating restful request ==== Traversal Aspect |=== | Name | Description | -| SingleLevelBomAsSpecified | The SingleLevelBomAsSpecified defines the view of the OEM or producer of the whole product, e.g. the OEM of a vehicle. It is free of any supplier-related information and specifies the promised and guaranteed content of the whole product to the end customer. This “top-down” view is in contrast to the “bottom-up” view of the SingleLevelBoMAsPlanned, though several sub-aspects are shared. The BomAsSpecified is merely one aspect, which is attached to the twin of the whole product and itself does neither introduce further twins nor reference them. Instead it merely comprises all functional information required by dismantlers, workshops or requestors for used parts to search for and to make a match on the market place. | 1.0.0 +| SingleLevelBomAsSpecified | The SingleLevelBomAsSpecified defines the view of the OEM or producer of the whole product, e.g. the OEM of a vehicle. It is free of any supplier-related information and specifies the promised and guaranteed content of the whole product to the end customer. This “top-down” view is in contrast to the “bottom-up” view of the SingleLevelBoMAsPlanned, though several sub-aspects are shared. The BomAsSpecified is merely one aspect, which is attached to the twin of the whole product and itself does neither introduce further twins nor reference them. Instead it merely comprises all functional information required by dismantlers, workshops or requestors for used parts to search for and to make a match on the marketplace. | 2.0.0 |=== ==== Semantic Model diff --git a/docs/src/uml-diagrams/building-block-view/level-2-int-transfer-process-delegate.puml b/docs/src/uml-diagrams/building-block-view/level-2-int-transfer-process-delegate.puml new file mode 100644 index 0000000000..e6e1a21895 --- /dev/null +++ b/docs/src/uml-diagrams/building-block-view/level-2-int-transfer-process-delegate.puml @@ -0,0 +1,30 @@ +@startuml +skinparam monochrome true +skinparam shadowing false +skinparam nodesep 10 +skinparam ranksep 100 +skinparam linetype ortho +skinparam defaultFontName "Architects daughter" + +component [**TransferProcessManagement**] <> as TransferProcessManagement { + component [**AASTransferProcessManager**] <> as TPM + component [**ExecutorService**] <> as executor + component [**Runnable**] <> as runnable { + component [**DigitalTwinDelegate**] <> as DTRDelegate + component [**RelationshipDelegate**] <> as RelDelegate + component [**SubmodelDelegate**] <> as SubDelegate + DTRDelegate -> RelDelegate + RelDelegate -> SubDelegate + } + TPM .. runnable + runnable ..> executor +} + +[**DigitalTwinRegistryService**] <> as AASR +[**EdcSubmodelFacade**] <> as SMS + +DTRDelegate ---(0 AASR +RelDelegate ---(0 SMS +SubDelegate ---(0 SMS + +@enduml \ No newline at end of file From 87aea5ddf5bb5ec1fc7ec3e1d354221dead508d8 Mon Sep 17 00:00:00 2001 From: jhartmann Date: Tue, 4 Jun 2024 09:49:35 +0200 Subject: [PATCH 09/15] feat(irs-api):[#470] small refactoring --- .../irs/aaswrapper/job/AASTransferProcessManager.java | 6 ++++-- .../tractusx/irs/configuration/JobConfiguration.java | 6 +++--- .../irs/aaswrapper/job/AASTransferProcessManagerTest.java | 6 ++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/AASTransferProcessManager.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/AASTransferProcessManager.java index 807df1a5e1..ca7248061e 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/AASTransferProcessManager.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/AASTransferProcessManager.java @@ -55,11 +55,14 @@ public class AASTransferProcessManager implements TransferProcessManager jobOrchestrator( @Qualifier(JOB_BLOB_PERSISTENCE) final BlobPersistence blobStore, final JobStore jobStore, final MeterRegistryService meterService, final ApplicationEventPublisher applicationEventPublisher, @Value("${irs.job.jobstore.ttl.failed:}") final Duration ttlFailedJobs, - @Value("${irs.job.jobstore.ttl.completed:}") final Duration ttlCompletedJobs) { + @Value("${irs.job.jobstore.ttl.completed:}") final Duration ttlCompletedJobs, final JsonUtil jsonUtil) { final var manager = new AASTransferProcessManager(digitalTwinDelegate, Executors.newCachedThreadPool(), - blobStore); - final var logic = new TreeRecursiveLogic(blobStore, new JsonUtil(), new ItemTreesAssembler()); + blobStore, jsonUtil); + final var logic = new TreeRecursiveLogic(blobStore, jsonUtil, new ItemTreesAssembler()); final var handler = new AASRecursiveJobHandler(logic); final JobTTL jobTTL = new JobTTL(ttlCompletedJobs, ttlFailedJobs); diff --git a/irs-api/src/test/java/org/eclipse/tractusx/irs/aaswrapper/job/AASTransferProcessManagerTest.java b/irs-api/src/test/java/org/eclipse/tractusx/irs/aaswrapper/job/AASTransferProcessManagerTest.java index f764bd1ad1..cff2891ec7 100644 --- a/irs-api/src/test/java/org/eclipse/tractusx/irs/aaswrapper/job/AASTransferProcessManagerTest.java +++ b/irs-api/src/test/java/org/eclipse/tractusx/irs/aaswrapper/job/AASTransferProcessManagerTest.java @@ -38,7 +38,7 @@ import org.eclipse.tractusx.irs.component.PartChainIdentificationKey; import org.eclipse.tractusx.irs.connector.job.ResponseStatus; import org.eclipse.tractusx.irs.connector.job.TransferInitiateResponse; -import org.eclipse.tractusx.irs.util.TestMother; +import org.eclipse.tractusx.irs.util.JsonUtil; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.junit.jupiter.MockitoExtension; @@ -46,13 +46,11 @@ @ExtendWith(MockitoExtension.class) class AASTransferProcessManagerTest { - private final TestMother generate = new TestMother(); - DigitalTwinDelegate digitalTwinProcessor = mock(DigitalTwinDelegate.class); ExecutorService pool = mock(ExecutorService.class); final AASTransferProcessManager manager = new AASTransferProcessManager(digitalTwinProcessor, pool, - new InMemoryBlobStore()); + new InMemoryBlobStore(), new JsonUtil()); @Test void shouldExecuteThreadForProcessing() { From a1d2c047cf81b2cee8848e5a353359e73c1e005a Mon Sep 17 00:00:00 2001 From: jhartmann Date: Tue, 4 Jun 2024 12:33:51 +0200 Subject: [PATCH 10/15] feat(irs-api):[#470] fix typo in filepath --- .../irs/aaswrapper/job/delegate/RelationshipDelegateTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irs-api/src/test/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/RelationshipDelegateTest.java b/irs-api/src/test/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/RelationshipDelegateTest.java index c5fadc3a14..40ffcb6b47 100644 --- a/irs-api/src/test/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/RelationshipDelegateTest.java +++ b/irs-api/src/test/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/RelationshipDelegateTest.java @@ -292,7 +292,7 @@ void shouldFillItemContainerWithPreviousVersions(final String relationshipFile, public static Stream relationshipParametersPreviousVersions() { return Stream.of( Arguments.of("singleLevelBomAsBuilt-2.0.0.json", SINGLE_LEVEL_BOM_AS_BUILT_2_0_0, jobParameter()), - Arguments.of("SingleLevelBomAsPlanned-2.0.0.json", SINGLE_LEVEL_BOM_AS_PLANNED_2_0_0, + Arguments.of("singleLevelBomAsPlanned-2.0.0.json", SINGLE_LEVEL_BOM_AS_PLANNED_2_0_0, jobParameterDownwardAsPlanned())); } From 72a2509ae944f9d5464442522fbae8d5661709cb Mon Sep 17 00:00:00 2001 From: jhartmann Date: Tue, 4 Jun 2024 13:12:59 +0200 Subject: [PATCH 11/15] feat(docs):[#470] Update changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 78138c8008..b05757cb75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,7 +27,8 @@ _**For better traceability add the corresponding GitHub issue number in each cha - Added endpoint for dedicated removal of policy from BPNL. #559 - Integration Test Policy Store API Unhappy Path. #519 -- Add support for SingleLevelUsageAsPlanned. #470 +- Support for SingleLevelUsageAsPlanned. #470 +- Documentation to describe the delegate process. #470 ## [5.1.4] - 2024-05-27 From dea1622703506a8c49e779f3eae60a5e7ec2e7e4 Mon Sep 17 00:00:00 2001 From: jhartmann Date: Thu, 6 Jun 2024 09:49:43 +0200 Subject: [PATCH 12/15] feat(irs-api): Fixed SingleLevelBomAsSpecified field names --- .../SingleLevelBomAsSpecified.java | 47 +++++++++++++++++-- 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SingleLevelBomAsSpecified.java b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SingleLevelBomAsSpecified.java index 89a39697f3..0f06a00a35 100644 --- a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SingleLevelBomAsSpecified.java +++ b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SingleLevelBomAsSpecified.java @@ -54,12 +54,20 @@ @NoArgsConstructor public class SingleLevelBomAsSpecified implements RelationshipSubmodel { + @JsonAlias({ "catenaXId", + "assetId" + }) private String catenaXId; + @JsonAlias({ "childParts", + "childItems" + }) private Set childParts; @Override public List asRelationships() { - return Optional.ofNullable(this.childParts).stream().flatMap(Collection::stream) + return Optional.ofNullable(this.childParts) + .stream() + .flatMap(Collection::stream) .map(childData -> childData.toRelationship(this.catenaXId)) .toList(); } @@ -73,8 +81,17 @@ public List asRelationships() { @NoArgsConstructor /* package */ static class ChildData { + @JsonAlias({ "childPartsCategory", + "childItemCategory" + }) private String childPartsCategory; + @JsonAlias({ "part", + "item" + }) private Set part; + @JsonAlias({ "childCatenaXId", + "childassetId" + }) private String childCatenaXId; private String businessPartner; @@ -82,7 +99,8 @@ public Relationship toRelationship(final String catenaXId) { final Part childPart = this.part.stream().findFirst().orElse(Part.builder().build()); final LinkedItem.LinkedItemBuilder linkedItem = LinkedItem.builder() - .childCatenaXId(GlobalAssetIdentification.of(this.childCatenaXId)) + .childCatenaXId(GlobalAssetIdentification.of( + this.childCatenaXId)) .lifecycleContext(BomLifecycle.AS_SPECIFIED) .hasAlternatives(Boolean.FALSE) .assembledOn(childPart.getCreatedOn()) @@ -91,7 +109,10 @@ public Relationship toRelationship(final String catenaXId) { if (childPart.getPartQuantity() != null) { linkedItem.quantity(Quantity.builder() .quantityNumber(childPart.getPartQuantity().getQuantityNumber()) - .measurementUnit(MeasurementUnit.builder().lexicalValue(childPart.getPartQuantity().getMeasurementUnit()).build()) + .measurementUnit(MeasurementUnit.builder() + .lexicalValue(childPart.getPartQuantity() + .getMeasurementUnit()) + .build()) .build()); } @@ -112,9 +133,21 @@ public Relationship toRelationship(final String catenaXId) { @SuppressWarnings("PMD.ShortClassName") /* package */ static class Part { + @JsonAlias({ "ownerPartId", + "ownerItemId" + }) private String ownerPartId; + @JsonAlias({ "partVersion", + "itemVersion" + }) private String partVersion; + @JsonAlias({ "partQuantity", + "itemQuantity" + }) private PartQuantity partQuantity; + @JsonAlias({ "partDescription", + "itemDescription" + }) private String partDescription; private ZonedDateTime createdOn; private ZonedDateTime lastModifiedOn; @@ -126,9 +159,13 @@ public Relationship toRelationship(final String catenaXId) { @Builder @Jacksonized /* package */ static class PartQuantity { - @JsonAlias({ "quantityNumber", "value" }) + @JsonAlias({ "quantityNumber", + "value" + }) private Double quantityNumber; - @JsonAlias({ "measurementUnit", "unit" }) + @JsonAlias({ "measurementUnit", + "unit" + }) private String measurementUnit; } } From 05288e07fabfe526f2793ac9c9fb40529bfc0aec Mon Sep 17 00:00:00 2001 From: jhartmann Date: Thu, 6 Jun 2024 09:50:39 +0200 Subject: [PATCH 13/15] feat(irs-api): Adjusted Jacksonized and Builder annotation to be consistent for all relationship aspects --- .../edc/client/relationships/ParentItem.java | 6 +++ .../relationships/SingleLevelBomAsBuilt.java | 39 +++++++++++++------ .../SingleLevelBomAsPlanned.java | 32 ++++++++++----- .../SingleLevelBomAsSpecified.java | 1 + 4 files changed, 57 insertions(+), 21 deletions(-) diff --git a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/ParentItem.java b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/ParentItem.java index 36f5fd102e..65e9087b35 100644 --- a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/ParentItem.java +++ b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/ParentItem.java @@ -23,8 +23,10 @@ import com.fasterxml.jackson.annotation.JsonAlias; import lombok.AllArgsConstructor; +import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; +import lombok.extern.jackson.Jacksonized; import org.eclipse.tractusx.irs.component.GlobalAssetIdentification; import org.eclipse.tractusx.irs.component.LinkedItem; import org.eclipse.tractusx.irs.component.MeasurementUnit; @@ -36,6 +38,8 @@ * Customer */ @Data +@Builder +@Jacksonized @AllArgsConstructor @NoArgsConstructor class ParentItem { @@ -83,6 +87,8 @@ private boolean thereIsQuantity() { * Quantity */ @Data + @Builder + @Jacksonized /* package */ static class Quantity { @JsonAlias({ "quantityNumber", diff --git a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SingleLevelBomAsBuilt.java b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SingleLevelBomAsBuilt.java index 215c19ef6d..42abdfbcdf 100644 --- a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SingleLevelBomAsBuilt.java +++ b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SingleLevelBomAsBuilt.java @@ -32,8 +32,10 @@ import com.fasterxml.jackson.annotation.JsonAlias; import lombok.AllArgsConstructor; +import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; +import lombok.extern.jackson.Jacksonized; import org.eclipse.tractusx.irs.component.GlobalAssetIdentification; import org.eclipse.tractusx.irs.component.LinkedItem; import org.eclipse.tractusx.irs.component.MeasurementUnit; @@ -46,6 +48,8 @@ * SingleLevelBomAsBuilt */ @Data +@Builder +@Jacksonized @AllArgsConstructor @NoArgsConstructor class SingleLevelBomAsBuilt implements RelationshipSubmodel { @@ -55,7 +59,9 @@ class SingleLevelBomAsBuilt implements RelationshipSubmodel { @Override public List asRelationships() { - return Optional.ofNullable(this.childItems).stream().flatMap(Collection::stream) + return Optional.ofNullable(this.childItems) + .stream() + .flatMap(Collection::stream) .map(childData -> childData.toRelationship(this.catenaXId)) .toList(); } @@ -64,6 +70,8 @@ public List asRelationships() { * ChildData */ @Data + @Builder + @Jacksonized @AllArgsConstructor @NoArgsConstructor /* package */ static class ChildData { @@ -77,7 +85,8 @@ public List asRelationships() { public Relationship toRelationship(final String catenaXId) { final LinkedItem.LinkedItemBuilder linkedItem = LinkedItem.builder() - .childCatenaXId(GlobalAssetIdentification.of(this.catenaXId)) + .childCatenaXId(GlobalAssetIdentification.of( + this.catenaXId)) .lifecycleContext(BomLifecycle.AS_BUILT) .hasAlternatives(this.hasAlternatives) .assembledOn(this.createdOn) @@ -86,19 +95,17 @@ public Relationship toRelationship(final String catenaXId) { if (thereIsQuantity()) { MeasurementUnit measurementUnit = MeasurementUnit.builder().build(); if (this.quantity.getMeasurementUnit() instanceof String str) { - measurementUnit = MeasurementUnit.builder() - .lexicalValue(str) - .build(); + measurementUnit = MeasurementUnit.builder().lexicalValue(str).build(); } else if (this.quantity.getMeasurementUnit() instanceof Map map) { measurementUnit = MeasurementUnit.builder() - .lexicalValue(String.valueOf(map.get("lexicalValue"))) - .datatypeURI(String.valueOf(map.get("datatypeURI"))) - .build(); + .lexicalValue(String.valueOf(map.get("lexicalValue"))) + .datatypeURI(String.valueOf(map.get("datatypeURI"))) + .build(); } - linkedItem.quantity(org.eclipse.tractusx.irs.component.Quantity.builder() - .quantityNumber(this.quantity.getQuantityNumber()) + .quantityNumber( + this.quantity.getQuantityNumber()) .measurementUnit(measurementUnit) .build()); } @@ -119,17 +126,25 @@ private boolean thereIsQuantity() { * Quantity */ @Data + @Builder + @Jacksonized /* package */ static class Quantity { - @JsonAlias({ "quantityNumber", "value" }) + @JsonAlias({ "quantityNumber", + "value" + }) private Double quantityNumber; - @JsonAlias({ "measurementUnit", "unit" }) + @JsonAlias({ "measurementUnit", + "unit" + }) private Object measurementUnit; /** * MeasurementUnit */ @Data + @Builder + @Jacksonized /* package */ static class MeasurementUnit { private String lexicalValue; private String datatypeURI; diff --git a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SingleLevelBomAsPlanned.java b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SingleLevelBomAsPlanned.java index fc52430e2b..6b5d621619 100644 --- a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SingleLevelBomAsPlanned.java +++ b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SingleLevelBomAsPlanned.java @@ -31,6 +31,7 @@ import com.fasterxml.jackson.annotation.JsonAlias; import lombok.AllArgsConstructor; +import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import lombok.extern.jackson.Jacksonized; @@ -46,6 +47,7 @@ * SingleLevelBomAsPlanned */ @Data +@Builder @Jacksonized @AllArgsConstructor @NoArgsConstructor @@ -56,7 +58,9 @@ class SingleLevelBomAsPlanned implements RelationshipSubmodel { @Override public List asRelationships() { - return Optional.ofNullable(this.childItems).stream().flatMap(Collection::stream) + return Optional.ofNullable(this.childItems) + .stream() + .flatMap(Collection::stream) .map(childData -> childData.toRelationship(this.catenaXId)) .toList(); } @@ -65,6 +69,8 @@ public List asRelationships() { * ChildData */ @Data + @Builder + @Jacksonized @AllArgsConstructor @NoArgsConstructor /* package */ static class ChildData { @@ -77,7 +83,8 @@ public List asRelationships() { public Relationship toRelationship(final String catenaXId) { final LinkedItem.LinkedItemBuilder linkedItem = LinkedItem.builder() - .childCatenaXId(GlobalAssetIdentification.of(this.catenaXId)) + .childCatenaXId(GlobalAssetIdentification.of( + this.catenaXId)) .lifecycleContext(BomLifecycle.AS_PLANNED) .hasAlternatives(Boolean.FALSE) .assembledOn(this.createdOn) @@ -85,10 +92,13 @@ public Relationship toRelationship(final String catenaXId) { if (thereIsQuantity()) { linkedItem.quantity(org.eclipse.tractusx.irs.component.Quantity.builder() - .quantityNumber(this.quantity.getQuantityNumber()) - .measurementUnit(MeasurementUnit.builder() - .lexicalValue(this.quantity.getMeasurementUnit()) - .build()) + .quantityNumber( + this.quantity.getQuantityNumber()) + .measurementUnit( + MeasurementUnit.builder() + .lexicalValue( + this.quantity.getMeasurementUnit()) + .build()) .build()); } @@ -108,16 +118,20 @@ private boolean thereIsQuantity() { * Quantity */ @Data + @Builder @Jacksonized /* package */ static class Quantity { - @JsonAlias({ "quantityNumber", "value" }) + @JsonAlias({ "quantityNumber", + "value" + }) private Double quantityNumber; - @JsonAlias({ "measurementUnit", "unit" }) + @JsonAlias({ "measurementUnit", + "unit" + }) private String measurementUnit; } } - } diff --git a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SingleLevelBomAsSpecified.java b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SingleLevelBomAsSpecified.java index 0f06a00a35..aee7568432 100644 --- a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SingleLevelBomAsSpecified.java +++ b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/relationships/SingleLevelBomAsSpecified.java @@ -77,6 +77,7 @@ public List asRelationships() { */ @Data @Builder + @Jacksonized @AllArgsConstructor @NoArgsConstructor /* package */ static class ChildData { From 56397b7ec6566788a07473e62e46a5eb3935518a Mon Sep 17 00:00:00 2001 From: jhartmann Date: Thu, 6 Jun 2024 10:49:54 +0200 Subject: [PATCH 14/15] feat(irs-api): Add tests for quantity of linked item --- .../delegate/RelationshipDelegateTest.java | 29 ++++++++++++++----- .../singleLevelBomAsSpecified-1.1.0.json | 4 +-- .../singleLevelBomAsSpecified-2.1.0.json | 4 +-- .../singleLevelBomAsSpecified-1.0.0.json | 4 +-- .../singleLevelBomAsSpecified-2.0.0.json | 4 +-- 5 files changed, 30 insertions(+), 15 deletions(-) diff --git a/irs-api/src/test/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/RelationshipDelegateTest.java b/irs-api/src/test/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/RelationshipDelegateTest.java index 40ffcb6b47..e2df971471 100644 --- a/irs-api/src/test/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/RelationshipDelegateTest.java +++ b/irs-api/src/test/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/RelationshipDelegateTest.java @@ -59,6 +59,7 @@ import org.eclipse.tractusx.irs.aaswrapper.job.ItemContainer; import org.eclipse.tractusx.irs.component.JobParameter; import org.eclipse.tractusx.irs.component.PartChainIdentificationKey; +import org.eclipse.tractusx.irs.component.Quantity; import org.eclipse.tractusx.irs.component.enums.ProcessStep; import org.eclipse.tractusx.irs.edc.client.EdcSubmodelFacade; import org.eclipse.tractusx.irs.edc.client.exceptions.EdcClientException; @@ -130,7 +131,9 @@ void shouldFillItemContainerWithUpwardRelationshipAndAddChildIdsToProcess() // then assertThat(result).isNotNull(); - assertThat(result.getRelationships()).isNotEmpty(); + final Quantity quantity = result.getRelationships().get(0).getLinkedItem().getQuantity(); + assertThat(quantity.getQuantityNumber()).isEqualTo(20.0); + assertThat(quantity.getMeasurementUnit().getLexicalValue()).isEqualTo("unit:piece"); assertThat(aasTransferProcess.getIdsToProcess()).isNotEmpty(); assertThat(aasTransferProcess.getIdsToProcess().get(0).getGlobalAssetId()).isNotEmpty(); assertThat(aasTransferProcess.getIdsToProcess().get(0).getBpn()).isNotEmpty(); @@ -160,10 +163,13 @@ void shouldFillItemContainerWithUpwardAsPlannedRelationshipAndAddChildIdsToProce // then assertThat(result).isNotNull(); - assertThat(result.getRelationships()).isNotEmpty(); + final Quantity quantity = result.getRelationships().get(0).getLinkedItem().getQuantity(); + assertThat(quantity.getQuantityNumber()).isEqualTo(20.0); + assertThat(quantity.getMeasurementUnit().getLexicalValue()).isEqualTo("unit:piece"); assertThat(aasTransferProcess.getIdsToProcess()).isNotEmpty(); - assertThat(aasTransferProcess.getIdsToProcess().get(0).getGlobalAssetId()).isNotEmpty(); - assertThat(aasTransferProcess.getIdsToProcess().get(0).getBpn()).isNotEmpty(); + assertThat(aasTransferProcess.getIdsToProcess().get(0).getGlobalAssetId()).isEqualTo( + "urn:uuid:56319907-28dc-440e-afcc-72d67ad343e7"); + assertThat(aasTransferProcess.getIdsToProcess().get(0).getBpn()).isEqualTo("BPNL50096894aNXY"); } @ParameterizedTest @@ -190,7 +196,10 @@ void shouldFillItemContainerWithSupportedRelationshipAndAddChildIdsToProcess(fin // then assertThat(result).isNotNull(); - assertThat(result.getRelationships()).isNotEmpty(); + assertThat(result.getRelationships()).hasSize(1); + final Quantity quantity = result.getRelationships().get(0).getLinkedItem().getQuantity(); + assertThat(quantity.getQuantityNumber()).isEqualTo(20.0); + assertThat(quantity.getMeasurementUnit().getLexicalValue()).isEqualTo("unit:piece"); assertThat(aasTransferProcess.getIdsToProcess()).isNotEmpty(); assertThat(aasTransferProcess.getIdsToProcess().get(0).getGlobalAssetId()).isNotEmpty(); assertThat(aasTransferProcess.getIdsToProcess().get(0).getBpn()).isNotEmpty(); @@ -237,7 +246,10 @@ void shouldFillItemContainerWithPotentialFutureMinorVersions(final String relati // then assertThat(result).isNotNull(); - assertThat(result.getRelationships()).isNotEmpty(); + assertThat(result.getRelationships()).hasSize(1); + final Quantity quantity = result.getRelationships().get(0).getLinkedItem().getQuantity(); + assertThat(quantity.getQuantityNumber()).isEqualTo(20.0); + assertThat(quantity.getMeasurementUnit().getLexicalValue()).isEqualTo("unit:piece"); assertThat(aasTransferProcess.getIdsToProcess()).isNotEmpty(); assertThat(aasTransferProcess.getIdsToProcess().get(0).getGlobalAssetId()).isNotEmpty(); assertThat(aasTransferProcess.getIdsToProcess().get(0).getBpn()).isNotEmpty(); @@ -283,7 +295,10 @@ void shouldFillItemContainerWithPreviousVersions(final String relationshipFile, // then assertThat(result).isNotNull(); - assertThat(result.getRelationships()).isNotEmpty(); + assertThat(result.getRelationships()).hasSize(1); + final Quantity quantity = result.getRelationships().get(0).getLinkedItem().getQuantity(); + assertThat(quantity.getQuantityNumber()).isEqualTo(2.5); + assertThat(quantity.getMeasurementUnit().getLexicalValue()).isEqualTo("unit:litre"); assertThat(aasTransferProcess.getIdsToProcess()).isNotEmpty(); assertThat(aasTransferProcess.getIdsToProcess().get(0).getGlobalAssetId()).isNotEmpty(); assertThat(aasTransferProcess.getIdsToProcess().get(0).getBpn()).isNotEmpty(); diff --git a/irs-api/src/test/resources/relationships/futureVersions/singleLevelBomAsSpecified-1.1.0.json b/irs-api/src/test/resources/relationships/futureVersions/singleLevelBomAsSpecified-1.1.0.json index 21f9353986..5f83c4b3c2 100644 --- a/irs-api/src/test/resources/relationships/futureVersions/singleLevelBomAsSpecified-1.1.0.json +++ b/irs-api/src/test/resources/relationships/futureVersions/singleLevelBomAsSpecified-1.1.0.json @@ -8,8 +8,8 @@ "ownerPartId": "uuid!", "partVersion": "05", "partQuantity": { - "quantityNumber": 350.0, - "measurementUnit": "kW" + "quantityNumber": 20.0, + "measurementUnit": "unit:piece" }, "partDescription": "The steering wheel is nice and round", "partClassification": [ diff --git a/irs-api/src/test/resources/relationships/futureVersions/singleLevelBomAsSpecified-2.1.0.json b/irs-api/src/test/resources/relationships/futureVersions/singleLevelBomAsSpecified-2.1.0.json index 4dabc16c6e..75530a5974 100644 --- a/irs-api/src/test/resources/relationships/futureVersions/singleLevelBomAsSpecified-2.1.0.json +++ b/irs-api/src/test/resources/relationships/futureVersions/singleLevelBomAsSpecified-2.1.0.json @@ -13,8 +13,8 @@ } ], "itemQuantity": { - "quantityNumber": 350.0, - "measurementUnit": "unit:kW" + "quantityNumber": 20.0, + "measurementUnit": "unit:piece" }, "ownerItemId": "urn:uuid:b4741433-92bb-4027-9a02-bbc64a58d193", "itemVersion": "05", diff --git a/irs-api/src/test/resources/relationships/singleLevelBomAsSpecified-1.0.0.json b/irs-api/src/test/resources/relationships/singleLevelBomAsSpecified-1.0.0.json index 72d0a3872d..092f2b8b8d 100644 --- a/irs-api/src/test/resources/relationships/singleLevelBomAsSpecified-1.0.0.json +++ b/irs-api/src/test/resources/relationships/singleLevelBomAsSpecified-1.0.0.json @@ -8,8 +8,8 @@ "ownerPartId": "uuid!", "partVersion": "05", "partQuantity": { - "quantityNumber": 350.0, - "measurementUnit": "kW" + "quantityNumber": 20.0, + "measurementUnit": "piece" }, "partDescription": "The steering wheel is nice and round", "partClassification": [ diff --git a/irs-api/src/test/resources/relationships/singleLevelBomAsSpecified-2.0.0.json b/irs-api/src/test/resources/relationships/singleLevelBomAsSpecified-2.0.0.json index 4b0d4f0bce..3832a010e4 100644 --- a/irs-api/src/test/resources/relationships/singleLevelBomAsSpecified-2.0.0.json +++ b/irs-api/src/test/resources/relationships/singleLevelBomAsSpecified-2.0.0.json @@ -13,8 +13,8 @@ } ], "itemQuantity": { - "quantityNumber": 350.0, - "measurementUnit": "unit:kW" + "quantityNumber": 20.0, + "measurementUnit": "unit:piece" }, "ownerItemId": "urn:uuid:b4741433-92bb-4027-9a02-bbc64a58d193", "itemVersion": "05", From 549b16d891d1525e40b5bee1b063a3573b9ed7ca Mon Sep 17 00:00:00 2001 From: jhartmann Date: Thu, 6 Jun 2024 11:00:01 +0200 Subject: [PATCH 15/15] feat(irs-api): fix OpenAPI examples --- docs/src/api/irs-api.yaml | 36 +++++++++---------- .../irs/configuration/OpenApiExamples.java | 34 ++++++++++++------ .../SemanticsHubClientLocalStub.java | 2 +- 3 files changed, 41 insertions(+), 31 deletions(-) diff --git a/docs/src/api/irs-api.yaml b/docs/src/api/irs-api.yaml index 15428e4823..74eff7359e 100644 --- a/docs/src/api/irs-api.yaml +++ b/docs/src/api/irs-api.yaml @@ -1077,14 +1077,14 @@ components: models: - name: SingleLevelBomAsBuilt status: RELEASED - type: BAMM + type: SAMM urn: urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt - version: 2.0.0 + version: 3.0.0 - name: SerialPart status: RELEASED - type: BAMM + type: SAMM urn: urn:samm:io.catenax.serial_part:3.0.0#SerialPart - version: 1.0.1 + version: 3.0.0 canceled-job-response: value: completedOn: 2022-02-03T14:48:54.709Z @@ -1218,7 +1218,7 @@ components: semanticId: keys: - type: ExternalReference - value: urn:bamm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned + value: urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt type: ModelReference - description: - language: en @@ -1341,7 +1341,7 @@ components: semanticId: keys: - type: ExternalReference - value: urn:bamm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned + value: urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt type: ModelReference - description: - language: en @@ -1370,15 +1370,14 @@ components: payload: catenaXId: urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447 childItems: - - catenaXId: urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447 + - businessPartner: BPNL00012345aNXY + catenaXId: urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447 createdOn: 2022-02-03T14:48:54.709Z + hasAlternatives: false lastModifiedOn: 2022-02-03T14:48:54.709Z - lifecycleContext: AsBuilt quantity: - measurementUnit: - datatypeURI: urn:bamm:io.openmanufacturing:meta-model:1.0.0#piece - lexicalValue: piece - quantityNumber: 1 + unit: unit:piece + value: 20.0 tombstones: - catenaXId: urn:uuid:6c311d29-5753-46d4-b32c-19b918ea93b0 endpointURL: https://catena-x.net/vehicle/partdetails/ @@ -1539,7 +1538,7 @@ components: semanticId: keys: - type: ExternalReference - value: urn:bamm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned + value: urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt type: ModelReference - description: - language: en @@ -1568,15 +1567,14 @@ components: payload: catenaXId: urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447 childItems: - - catenaXId: urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447 + - businessPartner: BPNL00012345aNXY + catenaXId: urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447 createdOn: 2022-02-03T14:48:54.709Z + hasAlternatives: false lastModifiedOn: 2022-02-03T14:48:54.709Z - lifecycleContext: AsBuilt quantity: - measurementUnit: - datatypeURI: urn:bamm:io.openmanufacturing:meta-model:1.0.0#piece - lexicalValue: piece - quantityNumber: 1 + unit: unit:piece + value: 20.0 tombstones: - catenaXId: urn:uuid:6c311d29-5753-46d4-b32c-19b918ea93b0 endpointURL: https://catena-x.net/vehicle/partdetails/ diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/configuration/OpenApiExamples.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/configuration/OpenApiExamples.java index c10d25e9fc..947086e23b 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/configuration/OpenApiExamples.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/configuration/OpenApiExamples.java @@ -145,16 +145,16 @@ private Example createAspectModelsResult() { final AspectModel assemblyPartRelationship = AspectModel.builder() .name("SingleLevelBomAsBuilt") .urn(SINGLE_LEVEL_BOM_AS_BUILT_ASPECT) - .version("2.0.0") + .version("3.0.0") .status("RELEASED") - .type("BAMM") + .type("SAMM") .build(); final AspectModel serialPart = AspectModel.builder() .name("SerialPart") .urn(SERIAL_PART_ASPECT) - .version("1.0.1") + .version("3.0.0") .status("RELEASED") - .type("BAMM") + .type("SAMM") .build(); return toExample(AspectModels.builder() @@ -359,12 +359,24 @@ private Submodel createSubmodel() { } private Map createSingleLevelBomAsBuiltPayloadMap() { - final String singleLevelBomAsBuiltPayload = - "{\"catenaXId\": \"urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447\", " - + "\"childItems\": [ { \"createdOn\": \"2022-02-03T14:48:54.709Z\", \"catenaXId\": \"urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447\", " - + "\"lastModifiedOn\": \"2022-02-03T14:48:54.709Z\", \"lifecycleContext\": \"AsBuilt\", \"quantity\": " - + "{\"measurementUnit\": {\"datatypeURI\": \"urn:bamm:io.openmanufacturing:meta-model:1.0.0#piece\",\"lexicalValue\": \"piece\"},\"quantityNumber\": 1}}]}"; - + final String singleLevelBomAsBuiltPayload = """ + { + "catenaXId": "urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447", + "childItems": [ + { + "catenaXId": "urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447", + "quantity": { + "value": 20.0, + "unit": "unit:piece" + }, + "hasAlternatives": false, + "createdOn": "2022-02-03T14:48:54.709Z", + "businessPartner": "BPNL00012345aNXY", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + """; return new JsonUtil().fromString(singleLevelBomAsBuiltPayload, Map.class); } @@ -441,7 +453,7 @@ private SubmodelDescriptor createBaseSubmodelDescriptor() { .semanticId(Reference.builder() .keys(List.of(SemanticId.builder() .type("ExternalReference") - .value("urn:bamm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned") + .value(SINGLE_LEVEL_BOM_AS_BUILT_ASPECT) .build())) .type("ModelReference") .build()) diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/semanticshub/SemanticsHubClientLocalStub.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/semanticshub/SemanticsHubClientLocalStub.java index 8040e3157f..2c00157843 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/semanticshub/SemanticsHubClientLocalStub.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/semanticshub/SemanticsHubClientLocalStub.java @@ -34,7 +34,7 @@ }) class SemanticsHubClientLocalStub implements SemanticsHubClient { - public static final String MODEL_TYPE = "BAMM"; + public static final String MODEL_TYPE = "SAMM"; public static final String MODEL_STATUS = "RELEASED"; @Override