diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a4c43d1c..43585c882 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +## [2.2.1] - non-released +### Fix +- Update PCF schema fields for SDE + ## [2.2.0] - 2023-09-20 ### Added - Pcf model schema and model registration. diff --git a/DEPENDENCIES b/DEPENDENCIES index 78cbe77f2..8e8b927b9 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -39,7 +39,7 @@ maven/mavencentral/jakarta.annotation/jakarta.annotation-api/2.1.1, EPL-2.0 OR G maven/mavencentral/jakarta.inject/jakarta.inject-api/2.0.1, Apache-2.0, approved, clearlydefined maven/mavencentral/jakarta.persistence/jakarta.persistence-api/3.1.0, EPL-2.0 OR BSD-3-Clause AND (EPL-2.0 OR BSD-3-Clause AND BSD-3-Clause), approved, #7696 maven/mavencentral/jakarta.transaction/jakarta.transaction-api/2.0.1, EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0, approved, #7697 -maven/mavencentral/jakarta.validation/jakarta.validation-api/3.0.2, Apache-2.0, approved, clearlydefined +maven/mavencentral/jakarta.validation/jakarta.validation-api/3.0.2, Apache-2.0, approved, ee4j.validation maven/mavencentral/jakarta.xml.bind/jakarta.xml.bind-api/4.0.0, BSD-3-Clause, approved, ee4j.jaxb maven/mavencentral/net.bytebuddy/byte-buddy-agent/1.14.4, Apache-2.0, approved, #7164 maven/mavencentral/net.bytebuddy/byte-buddy/1.14.4, Apache-2.0 AND BSD-3-Clause, approved, #7163 diff --git a/modules/sde-common/src/main/java/org/eclipse/tractusx/sde/common/submodel/executor/create/steps/impl/RecordProcessUtils.java b/modules/sde-common/src/main/java/org/eclipse/tractusx/sde/common/submodel/executor/create/steps/impl/RecordProcessUtils.java index 83c58185a..db379c59b 100644 --- a/modules/sde-common/src/main/java/org/eclipse/tractusx/sde/common/submodel/executor/create/steps/impl/RecordProcessUtils.java +++ b/modules/sde-common/src/main/java/org/eclipse/tractusx/sde/common/submodel/executor/create/steps/impl/RecordProcessUtils.java @@ -38,9 +38,13 @@ public void setFieldValue(ObjectNode rowjObject, String ele, JsonObject jObject, fieldValue = fieldValue.trim(); - if (isNumberTypeField(jObject, fieldValue)) - rowjObject.put(ele, Double.parseDouble(fieldValue)); - else if (isDateFormatField(jObject)) { + if (isNumberTypeField(jObject)) { + if (fieldValue.isBlank()) { + rowjObject.putNull(ele); + } else { + rowjObject.put(ele, Double.parseDouble(fieldValue)); + } + } else if (isDateFormatField(jObject)) { if (fieldValue.isBlank()) fieldValue = null; @@ -57,12 +61,10 @@ private boolean isDateFormatField(JsonObject jObject) { return jObject.get("format") != null && "date-time".equals(jObject.get("format").getAsString()); } - private boolean isNumberTypeField(JsonObject jObject, String fieldValue) { - - if (fieldValue != null && !fieldValue.isBlank() && jObject.get("type") != null - && jObject.get("type").isJsonArray()) { + private boolean isNumberTypeField(JsonObject jObject) { + JsonElement jsonElement = JsonParser.parseString("number"); + if (jObject.get("type") != null && jObject.get("type").isJsonArray()) { JsonArray types = jObject.get("type").getAsJsonArray(); - JsonElement jsonElement = JsonParser.parseString("number"); return types.contains(jsonElement); } return false; diff --git a/modules/sde-core/src/main/java/org/eclipse/tractusx/sde/core/processreport/ProcessReportUseCase.java b/modules/sde-core/src/main/java/org/eclipse/tractusx/sde/core/processreport/ProcessReportUseCase.java index c82f6ffb5..07ac506b4 100644 --- a/modules/sde-core/src/main/java/org/eclipse/tractusx/sde/core/processreport/ProcessReportUseCase.java +++ b/modules/sde-core/src/main/java/org/eclipse/tractusx/sde/core/processreport/ProcessReportUseCase.java @@ -103,7 +103,7 @@ public ProcessReportPageResponse listAllProcessReports(int page, int size) { .findAll(PageRequest.of(page, size, Sort.by(Sort.Direction.DESC, "startDate"))); List processReports = result.get().map(mapper::mapFrom).toList(); return ProcessReportPageResponse.builder().items(processReports).pageSize(result.getSize()) - .pageNumber(result.getNumber()).totalItems(result.getTotalElements()).build(); + .page(result.getNumber()).totalItems(result.getTotalElements()).build(); } public ProcessReport getProcessReportById(String id) { diff --git a/modules/sde-core/src/main/java/org/eclipse/tractusx/sde/core/processreport/model/ProcessReportPageResponse.java b/modules/sde-core/src/main/java/org/eclipse/tractusx/sde/core/processreport/model/ProcessReportPageResponse.java index 463f3b67d..6e6b1ee1f 100644 --- a/modules/sde-core/src/main/java/org/eclipse/tractusx/sde/core/processreport/model/ProcessReportPageResponse.java +++ b/modules/sde-core/src/main/java/org/eclipse/tractusx/sde/core/processreport/model/ProcessReportPageResponse.java @@ -35,7 +35,7 @@ @NoArgsConstructor public class ProcessReportPageResponse { - private int pageNumber; + private int page; private int pageSize; private long totalItems; private List items; diff --git a/modules/sde-submodules/assembly-part-relationship/src/main/java/org/eclipse/tractusx/sde/submodels/apr/model/AspectRelationship.java b/modules/sde-submodules/assembly-part-relationship/src/main/java/org/eclipse/tractusx/sde/submodels/apr/model/AspectRelationship.java index 46c5efeec..e517f433a 100644 --- a/modules/sde-submodules/assembly-part-relationship/src/main/java/org/eclipse/tractusx/sde/submodels/apr/model/AspectRelationship.java +++ b/modules/sde-submodules/assembly-part-relationship/src/main/java/org/eclipse/tractusx/sde/submodels/apr/model/AspectRelationship.java @@ -52,7 +52,7 @@ public class AspectRelationship { private String oldSubmodelIdforUpdateCase; @JsonProperty(value = "row_number") - private int rowNumber; + private Integer rowNumber; @JsonProperty(value = "process_id") private String processId; diff --git a/modules/sde-submodules/part-as-planned/src/main/java/org/eclipse/tractusx/sde/submodels/pap/model/PartAsPlanned.java b/modules/sde-submodules/part-as-planned/src/main/java/org/eclipse/tractusx/sde/submodels/pap/model/PartAsPlanned.java index b93ea5cac..1f47f0d29 100644 --- a/modules/sde-submodules/part-as-planned/src/main/java/org/eclipse/tractusx/sde/submodels/pap/model/PartAsPlanned.java +++ b/modules/sde-submodules/part-as-planned/src/main/java/org/eclipse/tractusx/sde/submodels/pap/model/PartAsPlanned.java @@ -44,7 +44,7 @@ public class PartAsPlanned { private String subModelId; @JsonProperty(value ="row_number") - private int rowNumber; + private Integer rowNumber; @JsonProperty(value ="uuid") private String uuid; diff --git a/modules/sde-submodules/part-site-information-as-planned/src/main/java/org/eclipse/tractusx/sde/submodels/psiap/model/PartSiteInformationAsPlanned.java b/modules/sde-submodules/part-site-information-as-planned/src/main/java/org/eclipse/tractusx/sde/submodels/psiap/model/PartSiteInformationAsPlanned.java index d4f99c9f5..283f41dfa 100644 --- a/modules/sde-submodules/part-site-information-as-planned/src/main/java/org/eclipse/tractusx/sde/submodels/psiap/model/PartSiteInformationAsPlanned.java +++ b/modules/sde-submodules/part-site-information-as-planned/src/main/java/org/eclipse/tractusx/sde/submodels/psiap/model/PartSiteInformationAsPlanned.java @@ -44,7 +44,7 @@ public class PartSiteInformationAsPlanned { private String subModelId; @JsonProperty(value ="row_number") - private int rowNumber; + private Integer rowNumber; @JsonProperty(value ="uuid") private String uuid; diff --git a/modules/sde-submodules/pcf/src/main/java/org/eclipse/tractusx/sde/submodels/pcf/PcfSubmodel.java b/modules/sde-submodules/pcf/src/main/java/org/eclipse/tractusx/sde/submodels/pcf/PcfSubmodel.java index 9ef34a2e2..9bb32b62c 100644 --- a/modules/sde-submodules/pcf/src/main/java/org/eclipse/tractusx/sde/submodels/pcf/PcfSubmodel.java +++ b/modules/sde-submodules/pcf/src/main/java/org/eclipse/tractusx/sde/submodels/pcf/PcfSubmodel.java @@ -35,7 +35,7 @@ public class PcfSubmodel extends SubmodelExtension { @Autowired private PcfExecutor pcfWorkflow; - + @PostConstruct public void init() { @@ -48,7 +48,7 @@ public void init() { } submodel = loadSubmodel(input); - + submodel.setExecutor(pcfWorkflow); submodel.addProperties("tableName", "pcf_aspect"); diff --git a/modules/sde-submodules/pcf/src/main/java/org/eclipse/tractusx/sde/submodels/pcf/mapper/PcfMapper.java b/modules/sde-submodules/pcf/src/main/java/org/eclipse/tractusx/sde/submodels/pcf/mapper/PcfMapper.java index ffc0cb6ae..e54e8e840 100644 --- a/modules/sde-submodules/pcf/src/main/java/org/eclipse/tractusx/sde/submodels/pcf/mapper/PcfMapper.java +++ b/modules/sde-submodules/pcf/src/main/java/org/eclipse/tractusx/sde/submodels/pcf/mapper/PcfMapper.java @@ -95,9 +95,9 @@ public JsonObject mapToResponse(PcfEntity entity) { .productMassPerDeclaredUnit(entity.getProductMassPerDeclaredUnit()) .productOrSectorSpecificRules(List.of(ProductOrSectorSpecificRules.builder() .extWBCSDOperator(entity.getExtWBCSDOperator()) - .productOrSectorSpecificRulesObj(ProductOrSectorSpecificRule.builder() + .productOrSectorSpecificRulesObj(List.of(ProductOrSectorSpecificRule.builder() .ruleName(entity.getRuleName()) - .build()) + .build())) .extWBCSDOtherOperatorName(entity.getExtWBCSDOtherOperatorName()) .build())) .extTFSAllocationWasteIncineration(entity.getExtTFSAllocationWasteIncineration()) @@ -140,9 +140,9 @@ public JsonObject mapToResponse(PcfEntity entity) { return new Gson().toJsonTree(PcfSubmodelResponse.builder() .specVersion(entity.getSpecVersion()) - .companyIds(CompanyIds.builder() + .companyIds(List.of(CompanyIds.builder() .companyId(entity.getCompanyId()) - .build()) + .build())) .extWBCSDProductCodeCpc(entity.getExtWBCSDProductCodeCpc()) .created(entity.getCreated()) .companyName(entity.getCompanyName()) @@ -151,9 +151,9 @@ public JsonObject mapToResponse(PcfEntity entity) { .productName(entity.getProductName()) .pcf(pcfResponse) .partialFullPcf(entity.getPartialFullPcf()) - .productIds(ProductIds.builder() + .productIds(List.of(ProductIds.builder() .productId(entity.getProductId()) - .build()) + .build())) .validityPeriodStart(entity.getValidityPeriodStart()) .comment(entity.getComment()) @@ -162,9 +162,9 @@ public JsonObject mapToResponse(PcfEntity entity) { .pcfLegalStatement(entity.getPcfLegalStatement()) .productDescription(entity.getProductDescription()) - .precedingPfIds(PrecedingPfIds.builder() + .precedingPfIds(List.of(PrecedingPfIds.builder() .id(entity.getPrecedingPfId()) - .build()) + .build())) .build()).getAsJsonObject(); } diff --git a/modules/sde-submodules/pcf/src/main/java/org/eclipse/tractusx/sde/submodels/pcf/model/PcfAspect.java b/modules/sde-submodules/pcf/src/main/java/org/eclipse/tractusx/sde/submodels/pcf/model/PcfAspect.java index aca59a980..2565c074a 100644 --- a/modules/sde-submodules/pcf/src/main/java/org/eclipse/tractusx/sde/submodels/pcf/model/PcfAspect.java +++ b/modules/sde-submodules/pcf/src/main/java/org/eclipse/tractusx/sde/submodels/pcf/model/PcfAspect.java @@ -46,7 +46,7 @@ public class PcfAspect { private String subModelIdforPcf; @JsonProperty(value = "row_number") - private int rowNumberforPcf; + private Integer rowNumberforPcf; @JsonProperty(value = "bpn_numbers") private List bpnNumbersforPcf; diff --git a/modules/sde-submodules/pcf/src/main/java/org/eclipse/tractusx/sde/submodels/pcf/model/PcfSubmodelResponse.java b/modules/sde-submodules/pcf/src/main/java/org/eclipse/tractusx/sde/submodels/pcf/model/PcfSubmodelResponse.java index 66b28af42..ebc74d83c 100644 --- a/modules/sde-submodules/pcf/src/main/java/org/eclipse/tractusx/sde/submodels/pcf/model/PcfSubmodelResponse.java +++ b/modules/sde-submodules/pcf/src/main/java/org/eclipse/tractusx/sde/submodels/pcf/model/PcfSubmodelResponse.java @@ -19,6 +19,8 @@ ********************************************************************************/ package org.eclipse.tractusx.sde.submodels.pcf.model; +import java.util.List; + import com.google.gson.annotations.SerializedName; import lombok.AllArgsConstructor; @@ -31,7 +33,7 @@ public class PcfSubmodelResponse { private String specVersion; - private CompanyIds companyIds; + private List companyIds; @SerializedName(value = "extWBCSD_productCodeCpc") private String extWBCSDProductCodeCpc; @@ -44,13 +46,13 @@ public class PcfSubmodelResponse { private double version; private Pcf pcf; private String partialFullPcf; - private ProductIds productIds; + private List productIds; private String validityPeriodStart; private String comment; private String id; private String validityPeriodEnd; private String pcfLegalStatement; private String productDescription; - private PrecedingPfIds precedingPfIds; + private List precedingPfIds; -} +} \ No newline at end of file diff --git a/modules/sde-submodules/pcf/src/main/java/org/eclipse/tractusx/sde/submodels/pcf/model/ProductOrSectorSpecificRules.java b/modules/sde-submodules/pcf/src/main/java/org/eclipse/tractusx/sde/submodels/pcf/model/ProductOrSectorSpecificRules.java index 4e5937714..79d64dd82 100644 --- a/modules/sde-submodules/pcf/src/main/java/org/eclipse/tractusx/sde/submodels/pcf/model/ProductOrSectorSpecificRules.java +++ b/modules/sde-submodules/pcf/src/main/java/org/eclipse/tractusx/sde/submodels/pcf/model/ProductOrSectorSpecificRules.java @@ -19,6 +19,8 @@ ********************************************************************************/ package org.eclipse.tractusx.sde.submodels.pcf.model; +import java.util.List; + import com.google.gson.annotations.SerializedName; import lombok.AllArgsConstructor; @@ -34,7 +36,7 @@ public class ProductOrSectorSpecificRules { private String extWBCSDOperator; @SerializedName(value = "productOrSectorSpecificRules") - private ProductOrSectorSpecificRule productOrSectorSpecificRulesObj; + private List productOrSectorSpecificRulesObj; @SerializedName(value = "extWBCSD_otherOperatorName") private String extWBCSDOtherOperatorName; diff --git a/modules/sde-submodules/pcf/src/main/resources/pcf.json b/modules/sde-submodules/pcf/src/main/resources/pcf.json index 0b1a3dbce..eb8f2db72 100644 --- a/modules/sde-submodules/pcf/src/main/resources/pcf.json +++ b/modules/sde-submodules/pcf/src/main/resources/pcf.json @@ -12,6 +12,7 @@ "items": { "type": "object", "required": [ + "id", "specVersion", "companyId", "companyName", @@ -37,19 +38,19 @@ "pcfExcludingBiogenic", "extWBCSD_packagingGhgEmissions", "precedingPfId", - "secondaryEmissionFactorSource" + "secondaryEmissionFactorSource", + "assetLifeCyclePhase" ], - "dependentRequired": { - }, + "dependentRequired": {}, "properties": { "id": { "type": [ - "string", - "null" + "string" ], "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "title": "Id", "description": "Constraint for defining a UUID v4 identifier.", + "minLength": 1, "examples": [ "3893bb5d-da16-4dc1-9185-11d97476c254" ] @@ -65,7 +66,7 @@ "2.0.1-20230314" ] }, - "partialFullPcf": { + "partialFullPcf": { "type": [ "string" ], @@ -80,22 +81,24 @@ "Cradle-to-gate" ] }, - "precedingPfId": { + "precedingPfId": { "type": [ "string" ], "title": "PrecedingPfId", + "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "description": "The product footprint identifier as specified in the Catena-X PCF Rulebook in accordance with the technical specifications for PCF Data Exchange (Version 2.0.0) from the WBCSD (World Business Council for Sustainable Development)/ PACT initiative.", "minLength": 1, "examples": [ "3893bb5d-da16-4dc1-9185-11d97476c254" ] }, - "version": { + "version": { "type": [ "number" ], "title": "Version", + "minimum": 0, "description": "Version of the product (carbon) footprint as specified in the Catena-X PCF Rulebook in accordance with the technical specifications for PCF Data Exchange (Version 2.0.0) from the WBCSD (World Business Council for Sustainable Development)/ PACT initiative. In Catena-X for example set to \"0\" per default.", "minLength": 1, "examples": [ @@ -106,15 +109,16 @@ "type": [ "string" ], - "format": "date-time", "title": "Created", + "format": "date-time", + "pattern": "-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T(([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\.[0-9]+)?|(24:00:00(\\.0+)?))(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?", "description": "Timestamp of the creation of the Product (Carbon) Footprint as specified in the Catena-X PCF Rulebook in accordance with the technical specifications for PCF Data Exchange (Version 2.0.0) from the WBCSD (World Business Council for Sustainable Development)/ PACT initiative.", "minLength": 1, "examples": [ "2023-05-22T21:47:32Z" ] }, - "extWBCSD_pfStatus": { + "extWBCSD_pfStatus": { "type": [ "string" ], @@ -129,13 +133,14 @@ "Active" ] }, - "validityPeriodStart": { + "validityPeriodStart": { "type": [ "string", "null" ], "title": "ValidityPeriodStart", "format": "date-time", + "pattern": "-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T(([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\.[0-9]+)?|(24:00:00(\\.0+)?))(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?", "description": "Start of interval during which the product (carbon) footprint is declared as valid as specified in the Catena-X PCF Rulebook in accordance with the technical specifications for PCF Data Exchange (Version 2.0.0) from the WBCSD (World Business Council for Sustainable Development)/ PACT initiative. If specified, the validity period start must be equal to or greater than the reference period end.", "examples": [ "2022-01-01T00:00:01Z" @@ -148,12 +153,13 @@ ], "title": "ValidityPeriodEnd", "format": "date-time", + "pattern": "-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T(([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\.[0-9]+)?|(24:00:00(\\.0+)?))(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?", "description": "End of interval during which the product (carbon) footprint is declared as valid as specified in the Catena-X PCF Rulebook in accordance with the technical specifications for PCF Data Exchange (Version 2.0.0) from the WBCSD (World Business Council for Sustainable Development)/ PACT initiative.", "examples": [ "2022-12-31T23:59:59Z" ] }, - "comment": { + "comment": { "type": [ "string", "null" @@ -164,7 +170,7 @@ "Comment for version 42." ] }, - "pcfLegalStatement": { + "pcfLegalStatement": { "type": [ "string", "null" @@ -175,7 +181,7 @@ "This PCF (Product Carbon Footprint) is for information purposes only. It is based upon the standards mentioned above." ] }, - "companyName": { + "companyName": { "type": [ "string" ], @@ -191,14 +197,14 @@ "string" ], "title": "CompanyId", - "pattern": "^urn:uuid:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", + "format": "uri", "description": "Identifier of a company in context of a product (carbon) footprint as specified in the Catena-X PCF Rulebook in accordance with the technical specifications for PCF Data Exchange (Version 2.0.0) from the WBCSD (World Business Council for Sustainable Development)/ PACT initiative.", "minLength": 1, "examples": [ "urn:uuid:51131FB5-42A2-4267-A402-0ECFEFAD1619" ] }, - "productDescription": { + "productDescription": { "type": [ "string", "null" @@ -209,11 +215,12 @@ "Ethanol, 95% solution" ] }, - "productId": { + "productId": { "type": [ "string" ], "title": "ProductId", + "format": "uri", "description": "Identifier of a product in context of a product (carbon) footprint as specified in the Catena-X PCF Rulebook in accordance with the technical specifications for PCF Data Exchange (Version 2.0.0) from the WBCSD (World Business Council for Sustainable Development)/ PACT initiative.", "minLength": 1, "examples": [ @@ -231,7 +238,7 @@ "011-99000" ] }, - "productName": { + "productName": { "type": [ "string" ], @@ -242,7 +249,7 @@ "My Product Name" ] }, - "declaredUnit": { + "declaredUnit": { "type": [ "string" ], @@ -263,40 +270,41 @@ "liter" ] }, - "unitaryProductAmount": { + "unitaryProductAmount": { "type": [ "number" ], "title": "UnitaryProductAmount", + "minimum": 0, "description": "Amount of units contained within a product in context of the PCF (Product Carbon Footprint) as specified in the Catena-X PCF Rulebook in accordance with the technical specifications for PCF Data Exchange (Version 2.0.0) from the WBCSD (World Business Council for Sustainable Development)/ PACT initiative.", - "minLength": 1, "examples": [ - "1000.0" + 1000.0 ] }, - "productMassPerDeclaredUnit": { + "productMassPerDeclaredUnit": { "type": [ "number" ], "title": "ProductMassPerDeclaredUnit", "description": "Mass of a product per declared unit in context of the PCF (Product Carbon Footprint) as specified in the Catena-X PCF Rulebook.", - "minLength": 1, + "minimum": 0, "examples": [ - "0.456" + 0.456 ] }, - "exemptedEmissionsPercent": { + "exemptedEmissionsPercent": { "type": [ "number" ], "title": "ExemptedEmissionsPercent", "description": "Percentage of emissions excluded from PCF (Product Carbon Footprint) as specified in the Catena-X PCF Rulebook in accordance with the technical specifications for PCF Data Exchange (Version 2.0.0) from the WBCSD (World Business Council for Sustainable Development)/ PACT initiative.", - "minLength": 1, + "maximum": 5, + "minimum": 0, "examples": [ - "0.0" + 0.0 ] }, - "exemptedEmissionsDescription": { + "exemptedEmissionsDescription": { "type": [ "string", "null" @@ -307,7 +315,7 @@ "No exemption" ] }, - "extWBCSD_packagingEmissionsIncluded": { + "extWBCSD_packagingEmissionsIncluded": { "type": [ "string" ], @@ -322,7 +330,7 @@ "true" ] }, - "boundaryProcessesDescription": { + "boundaryProcessesDescription": { "type": [ "string", "null" @@ -333,7 +341,7 @@ "Electricity consumption included as an input in the production phase" ] }, - "geographyCountrySubdivision": { + "geographyCountrySubdivision": { "type": [ "string", "null" @@ -345,7 +353,7 @@ "US-NY" ] }, - "geographyCountry": { + "geographyCountry": { "type": [ "string", "null" @@ -357,12 +365,13 @@ "DE" ] }, - "geographyRegionOrSubregion": { + "geographyRegionOrSubregion": { "type": [ "string", "null" ], "enum": [ + "", "Africa", "Americas", "Asia", @@ -393,31 +402,33 @@ "DE" ] }, - "referencePeriodStart": { + "referencePeriodStart": { "type": [ "string" ], "title": "ReferencePeriodStart", "format": "date-time", + "pattern": "-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T(([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\.[0-9]+)?|(24:00:00(\\.0+)?))(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?", "minLength": 1, "description": "Start of time boundary for which a PCF (Product Carbon Footprint) value is considered to be representative as specified in the Catena-X PCF Rulebook in accordance with the technical specifications for PCF Data Exchange (Version 2.0.0) from the WBCSD (World Business Council for Sustainable Development)/ PACT initiative.", "examples": [ "2022-01-01T00:00:01Z" ] }, - "referencePeriodEnd": { + "referencePeriodEnd": { "type": [ "string" ], "title": "ReferencePeriodEnd", "format": "date-time", + "pattern": "-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T(([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\.[0-9]+)?|(24:00:00(\\.0+)?))(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?", "minLength": 1, "description": "End of time boundary for which a PCF (Product Carbon Footprint) value is considered to be representative as specified in the Catena-X PCF Rulebook in accordance with the technical specifications for PCF Data Exchange (Version 2.0.0) from the WBCSD (World Business Council for Sustainable Development)/ PACT initiative.", "examples": [ "2022-12-31T23:59:59Z" ] }, - "crossSectoralStandard": { + "crossSectoralStandard": { "type": [ "string" ], @@ -433,7 +444,7 @@ "GHG Protocol Product standard" ] }, - "extWBCSD_operator": { + "extWBCSD_operator": { "type": [ "string" ], @@ -449,7 +460,7 @@ "PEF" ] }, - "ruleName": { + "ruleName": { "type": [ "string" ], @@ -460,18 +471,19 @@ "urn:tfs-initiative.com:PCR:The Product Carbon Footprint Guideline for the Chemical Industry:version:v2.0" ] }, - "extWBCSD_otherOperatorName": { + "extWBCSD_otherOperatorName": { "type": [ "string", "null" ], "title": "ExtWBCSD_otherOperatorName", "description": "Other operator of PCR (Product Category Rule)/ PSR (Product Specific Rule) as specified in the technical specifications for PCF Data Exchange (Version 2.0.0) from the WBCSD (World Business Council for Sustainable Development)/ PACT initiative. WBCSD specific extension, in Catena-X for example specified by a default value.", + "minLength": 1, "examples": [ "NSF" ] }, - "extWBCSD_characterizationFactors": { + "extWBCSD_characterizationFactors": { "type": [ "string" ], @@ -486,18 +498,18 @@ "AR5" ] }, - "extWBCSD_allocationRulesDescription": { + "extWBCSD_allocationRulesDescription": { "type": [ - "string" + "string", + "null" ], "title": "ExtWBCSD_allocationRulesDescription", "description": "Allocation rules used and underlying reasoning in context of a product carbon footprint as specified in the technical specifications for PCF Data Exchange (Version 2.0.0) from the WBCSD (World Business Council for Sustainable Development)/ PACT initiative. WBCSD specific extension, in Catena-X for example specified by default with value \"In accordance with Catena-X PCF Rulebook\".", - "minLength": 1, "examples": [ "In accordance with Catena-X PCF Rulebook" ] }, - "extTFS_allocationWasteIncineration": { + "extTFS_allocationWasteIncineration": { "type": [ "string" ], @@ -513,18 +525,20 @@ "cut-off" ] }, - "primaryDataShare": { + "primaryDataShare": { "type": [ "number", "null" ], "title": "PrimaryDataShare", + "maximum": 1E+2, + "minimum": 0, "description": "Share of primary data in percent as specified in the Catena-X PCF Rulebook in accordance with the technical specifications for PCF Data Exchange (Version 2.0.0) from the WBCSD (World Business Council for Sustainable Development)/ PACT initiative.", "examples": [ 56.12 ] }, - "secondaryEmissionFactorSource": { + "secondaryEmissionFactorSource": { "type": [ "string" ], @@ -535,84 +549,97 @@ "ecoinvent 3.8" ] }, - "coveragePercent": { + "coveragePercent": { "type": [ "number", "null" ], "title": "CoveragePercent", + "maximum": 1E+2, + "minimum": 0, "description": "Percentage of PCF (Product Carbon Footprint) included in the data quality assessment based on the >5% emissions threshold as specified in the Catena-X PCF Rulebook in accordance with the technical specifications for PCF Data Exchange (Version 2.0.0) from the WBCSD (World Business Council for Sustainable Development)/ PACT initiative. In Catena-X for example set to \"100\" per default.", "examples": [ 100 ] }, - "technologicalDQR": { + "technologicalDQR": { "type": [ "number", "null" ], "title": "TechnologicalDQR", + "maximum": 3, + "minimum": 1, "description": "Technological representativeness of the sources used for PCF (Product Carbon Footprint) calculation based on weighted average of all inputs representing >5% of PCF emissions. Specified in the Catena-X PCF Rulebook in accordance with the technical specifications for PCF Data Exchange (Version 2.0.0) from the WBCSD (World Business Council for Sustainable Development)/ PACT initiative.", "examples": [ 2.0 ] }, - "temporalDQR": { + "temporalDQR": { "type": [ "number", "null" ], "title": "TemporalDQR", + "maximum": 3, + "minimum": 1, "description": "Temporal representativeness of the sources used for PCF (Product Carbon Footprint) calculation based on weighted average of all inputs representing >5% of PCF emissions. Specified in the Catena-X PCF Rulebook in accordance with the technical specifications for PCF Data Exchange (Version 2.0.0) from the WBCSD (World Business Council for Sustainable Development)/ PACT initiative.", "examples": [ 2.0 ] }, - "geographicalDQR": { + "geographicalDQR": { "type": [ "number", "null" ], "title": "GeographicalDQR", + "maximum": 3, + "minimum": 1, "description": "Geographical representativeness of the sources used for PCF (Product Carbon Footprint) calculation based on weighted average of all inputs representing >5% of PCF emissions. Specified in the Catena-X PCF Rulebook in accordance with the technical specifications for PCF Data Exchange (Version 2.0.0) from the WBCSD (World Business Council for Sustainable Development)/ PACT initiative.", "examples": [ 2.0 ] }, - "completenessDQR": { + "completenessDQR": { "type": [ "number", "null" ], "title": "CompletenessDQR", + "maximum": 3, + "minimum": 1, "description": "Completeness of the data collected for PCF (Product Carbon Footprint) calculation based on weighted average of all inputs representing >5% of PCF emissions. Specified in the Catena-X PCF Rulebook in accordance with the technical specifications for PCF Data Exchange (Version 2.0.0) from the WBCSD (World Business Council for Sustainable Development)/ PACT initiative.", "examples": [ 2.0 ] }, - "reliabilityDQR": { + "reliabilityDQR": { "type": [ "number", "null" ], "title": "ReliabilityDQR", + "maximum": 3, + "minimum": 1, "description": "Reliability of the data collected for PCF (Product Carbon Footprint) calculation based on weighted average of all inputs representing >5% of PCF emissions. Specified in the Catena-X PCF Rulebook in accordance with the technical specifications for PCF Data Exchange (Version 2.0.0) from the WBCSD (World Business Council for Sustainable Development)/ PACT initiative.", "examples": [ 2.0 ] }, - "pcfExcludingBiogenic": { + "pcfExcludingBiogenic": { "type": [ "number" ], "title": "PcfExcludingBiogenic", + "minimum": 0, "description": "Product carbon footprint of a product excluding biogenic emissions as specified in the Catena-X PCF Rulebook in accordance with the technical specifications for PCF Data Exchange (Version 2.0.0) from the WBCSD (World Business Council for Sustainable Development)/ PACT initiative.", "minLength": 1, "examples": [ 2.0 ] }, - "pcfIncludingBiogenic": { + "pcfIncludingBiogenic": { "type": [ "number", "null" @@ -623,95 +650,103 @@ 1.0 ] }, - "fossilGhgEmissions": { + "fossilGhgEmissions": { "type": [ "number", "null" ], "title": "FossilGhgEmissions", + "minimum": 0, "description": "Emissions from combustion of fossil sources as specified in the Catena-X PCF Rulebook in accordance with the technical specifications for PCF Data Exchange (Version 2.0.0) from the WBCSD (World Business Council for Sustainable Development)/ PACT initiative. Identical to \"pcfExcludingBiogenic\", will be removed in later version.", "examples": [ 0.5 ] }, - "biogenicCarbonEmissionsOtherThanCO2": { + "biogenicCarbonEmissionsOtherThanCO2": { "type": [ "number", "null" ], "title": "BiogenicCarbonEmissionsOtherThanCO2", + "minimum": 0, "description": "GWP (Global Warming Potential) of biogenic CO2e-emissions in production phase which contain only GHG (Greenhouse Gas) emissions other than CO2 - excludes biogenic CO2. For specification see Catena-X PCF Rulebook.", "examples": [ 1.0 ] }, - "biogenicCarbonWithdrawal": { + "biogenicCarbonWithdrawal": { "type": [ "number", "null" ], "title": "BiogenicCarbonWithdrawal", + "minimum": 0, "description": "Biogenic carbon content in the product converted to CO2e as specified in the Catena-X PCF Rulebook in accordance with the technical specifications for PCF Data Exchange (Version 2.0.0) from the WBCSD (World Business Council for Sustainable Development)/ PACT initiative.", "examples": [ 0.0 ] }, - "dlucGhgEmissions": { + "dlucGhgEmissions": { "type": [ "number", "null" ], "title": "BlucGhgEmissions", + "minimum": 0, "description": "Direct land use change CO2e emissions in context of a product carbon footprint as specified in the Catena-X PCF Rulebook in accordance with the technical specifications for PCF Data Exchange (Version 2.0.0) from the WBCSD (World Business Council for Sustainable Development)/ PACT initiative.", "examples": [ 0.4 ] }, - "extTFS_luGhgEmissions": { + "extTFS_luGhgEmissions": { "type": [ "number", "null" ], "title": "ExtTFS_luGhgEmissions", + "minimum": 0, "description": "Land use CO2 emissions in context of a product carbon footprint as specified by the TFS (Together For Sustainability) initiative. TFS specific extension.", "examples": [ 0.3 ] }, - "aircraftGhgEmissions": { + "aircraftGhgEmissions": { "type": [ "number", "null" ], "title": "AircraftGhgEmissions", + "minimum": 0, "description": "GHG (Greenhouse Gas) emissions resulting from aircraft engine usage for the transport of the product as specified in the Catena-X PCF Rulebook in accordance with the technical specifications for PCF Data Exchange (Version 2.0.0) from the WBCSD (World Business Council for Sustainable Development)/ PACT initiative.", "examples": [ 0.0 ] }, - "extWBCSD_packagingGhgEmissions": { + "extWBCSD_packagingGhgEmissions": { "type": [ "number" ], "title": "ExtWBCSD_packagingGhgEmissions", + "minimum": 0, "description": "Emissions resulting from the packaging of the product as specified in the technical specifications for PCF Data Exchange (Version 2.0.0) from the WBCSD (World Business Council for Sustainable Development)/ PACT initiative. WBCSD specific extension, in Catena-X for example value is zero per default.", "minLength": 1, "examples": [ 0 ] }, - "distributionStagePcfExcludingBiogenic": { + "distributionStagePcfExcludingBiogenic": { "type": [ "number", "null" ], "title": "DistributionStagePcfExcludingBiogenic", + "minimum": 0, "description": "Product carbon footprint for the distribution stage of a product excluding biogenic emissions as specified in the Catena-X PCF Rulebook.", "examples": [ 1.5 ] }, - "distributionStagePcfIncludingBiogenic": { + "distributionStagePcfIncludingBiogenic": { "type": [ "number", "null" @@ -722,95 +757,103 @@ 0.0 ] }, - "distributionStageFossilGhgEmissions": { + "distributionStageFossilGhgEmissions": { "type": [ "number", "null" ], "title": "DistributionStageFossilGhgEmissions", + "minimum": 0, "description": "Emissions from the combustion of fossil sources in the distribution stage as specified in the Catena-X PCF Rulebook.", "examples": [ 0.5 ] }, - "distributionStageBiogenicCarbonEmissionsOtherThanCO2": { + "distributionStageBiogenicCarbonEmissionsOtherThanCO2": { "type": [ "number", "null" ], "title": "DistributionStageBiogenicCarbonEmissionsOtherThanCO2", + "minimum": 0, "description": "GWP (Global Warming Potential) of biogenic CO2e-emissions in distribution phase which contain only GHG (Greenhouse Gas) emissions other than CO2 ? excludes biogenic CO2. For specification see Catena-X PCF Rulebook.", "examples": [ 1.0 ] }, - "distributionStageBiogenicCarbonWithdrawal": { + "distributionStageBiogenicCarbonWithdrawal": { "type": [ "number", "null" ], "title": "DistributionStageBiogenicCarbonWithdrawal", + "minimum": 0, "description": "GWP (Global Warming Potential) of biogenic CO2-withdrawal in distribution stage (biogenic CO2 contained in the product) as specified in the Catena-X PCF Rulebook.", "examples": [ 0.5 ] }, - "extTFS_distributionStageDlucGhgEmissions": { + "extTFS_distributionStageDlucGhgEmissions": { "type": [ "number", "null" ], "title": "ExtTFS_distributionStageDlucGhgEmissions", + "minimum": 0, "description": "Direct land use change CO2 emissions during distribution stage in context of a product carbon footprint as specified in the Catena-X PCF Rulebook. TFS specific extension.", "examples": [ 1.0 ] }, - "extTFS_distributionStageLuGhgEmissions": { + "extTFS_distributionStageLuGhgEmissions": { "type": [ "number", "null" ], "title": "ExtTFS_distributionStageLuGhgEmissions", + "minimum": 0, "description": "Land use CO2 emissions in context of a product carbon footprint as specified by the TFS (Together For Sustainability) initiative. TFS specific extension.", "examples": [ 1.1 ] }, - "carbonContentTotal": { + "carbonContentTotal": { "type": [ "number", "null" ], "title": "CarbonContentTotal", + "minimum": 0, "description": "Total carbon content per declared unit in context of a product carbon footprint as specified in the Catena-X PCF Rulebook.", "examples": [ 2.5 ] }, - "extWBCSD_fossilCarbonContent": { + "extWBCSD_fossilCarbonContent": { "type": [ "number", "null" ], "title": "ExtWBCSD_fossilCarbonContent", + "minimum": 0, "description": "Fossil carbon amount embodied in a product as specified in the technical specifications for PCF Data Exchange (Version 2.0.0) from the WBCSD (World Business Council for Sustainable Development)/ PACT initiative. WBCSD specific extension, in Catena-X for example specified by a calculated value.", "examples": [ 0.1 ] }, - "carbonContentBiogenic": { + "carbonContentBiogenic": { "type": [ "number", "null" ], "title": "carbonContentBiogenic", + "minimum": 0, "description": "Biogenic carbon amount embodied in a product as specified in the Catena-X PCF Rulebook in accordance with the technical specifications for PCF Data Exchange (Version 2.0.0) from the WBCSD (World Business Council for Sustainable Development)/ PACT initiative.", "examples": [ 0.0 ] }, - "assetLifeCyclePhase": { + "assetLifeCyclePhase": { "type": [ "string" ], @@ -822,14 +865,13 @@ "AsMaintained", "AsRecycled" ], - "minLength": 1, "title": "Asset Life Cycle Phase", + "minLength": 1, "description": "The lifecycle context in which the child part was assembled into the parent part.", "examples": [ - "lifecycle" + "AsPlanned" ] } - } }, "examples": [ @@ -845,7 +887,7 @@ "validityPeriodEnd": "2022-12-31T23:59:59Z", "comment": "Comment for version 42.", "pcfLegalStatement": "This PCF (Product Carbon Footprint) is for information purposes only. It is based upon the standards mentioned above.", - "companyName": "My Corp", + "companyName": "My Corp", "companyId": "urn:uuid:51131FB5-42A2-4267-A402-0ECFEFAD1619", "productDescription": "Ethanol, 95% solution", "productId": "urn:gtin:4712345060507", @@ -853,7 +895,7 @@ "productName": "My Product Name", "declaredUnit": "liter", "unitaryProductAmount": 1000.0, - "productMassPerDeclaredUnit": 0.456, + "productMassPerDeclaredUnit": 0.456, "exemptedEmissionsPercent": 0.0, "exemptedEmissionsDescription": "No exemption", "extWBCSD_packagingEmissionsIncluded": "true", @@ -865,13 +907,13 @@ "referencePeriodEnd": "2022-12-31T23:59:59Z", "crossSectoralStandard": "GHG Protocol Product standard", "extWBCSD_operator": "PEF", - "ruleName": "urn:tfs-initiative.com:PCR:The Product Carbon Footprint Guideline for the Chemical Industry:version:v2.0", - "extWBCSD_otherOperatorName": "NSF", + "ruleName": "urn:tfs-initiative.com:PCR:The Product Carbon Footprint Guideline for the Chemical Industry:version:v2.0", + "extWBCSD_otherOperatorName": "NSF", "extWBCSD_characterizationFactors": "AR5", - "extWBCSD_allocationRulesDescription": "In accordance with Catena-X PCF Rulebook", + "extWBCSD_allocationRulesDescription": "In accordance with Catena-X PCF Rulebook", "extTFS_allocationWasteIncineration": "cut-off", "primaryDataShare": 56.12, - "secondaryEmissionFactorSource": "ecoinvent 3.8", + "secondaryEmissionFactorSource": "ecoinvent 3.8", "coveragePercent": 100, "technologicalDQR": 2.0, "temporalDQR": 2.0, @@ -896,8 +938,8 @@ "extTFS_distributionStageLuGhgEmissions": 1.1, "carbonContentTotal": 2.5, "extWBCSD_fossilCarbonContent": 0.1, - "carbonContentBiogenic": 0.0, + "carbonContentBiogenic": 0.0, "assetLifeCyclePhase": "AsPlanned" } ] -} +} \ No newline at end of file diff --git a/pom.xml b/pom.xml index de0ca3f5c..65e9735e5 100644 --- a/pom.xml +++ b/pom.xml @@ -40,7 +40,7 @@ SDE for CatenaX - 18 + 17 2.17.1 2022.0.3 1.4.2.Final