Skip to content

Commit

Permalink
Merge pull request #896 from catenax-ng/feat/slbap-3-support-and-test…
Browse files Browse the repository at this point in the history
…s-updated

feat(impl):[#558] SingleLevelBomAsPlanned 3.0.0 support, tests updated
  • Loading branch information
ds-ext-kmassalski authored Apr 29, 2024
2 parents 90a7859 + 6691ce0 commit 1150e9e
Show file tree
Hide file tree
Showing 5 changed files with 5,356 additions and 7,140 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ _**For better traceability add the corresponding GitHub issue number in each cha

- Removed obsolete entries from acceptedPolicies configuration. #530
- Support of building relationships based on SingleLevelUsageAsBuilt v3.0.0 #558
-
- Support of building relationships based on SingleLevelBomAsPlanned v3.0.0 #558

### Fixed

- Update bouncycastle to 1.78 to fix CVE's.
Expand Down
31 changes: 12 additions & 19 deletions COMPATIBILITY_MATRIX.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,18 @@ Full changelog of IRS: [changelog](CHANGELOG.md)

## [Unreleased]

| Dependency | Version | Helm | Comments |
|----------------------------|------------------------------|------------|-----------------|
| EDC | 0.5.3 | 0.5.3 | |
| EDC PostgresSQL | 15.1.0-debian-11-r12 | 12.1.6 | Optional |
| MIW | 0.1.0 | 0.1.0 | REST connection |
| Semantics Hub | 0.1.29 | v0.2.11-M1 | REST connection |
| DTR | 0.3.14-M1 | 0.3.22 | REST connection |
| Minio | RELEASE.2022-11-11T03-44-20Z | 5.0.1 | |
| SingleLevelBomAsBuilt | 2.0.0 | - | Model version |
| SingleLevelBomAsPlanned | 2.0.0 | - | Model version |
| SingleLevelBomAsSpecified | 1.0.0 | - | Model version |
| SingleLevelUsageAsBuilt | 3.0.0 | - | Model version |
| PartAsPlanned | 2.0.0 | - | Model Version |
| SingleLevelBomAsPlanned | 3.0.0 | - | Model Version |
| SerialPart | 3.0.0 | - | Model Version |
| Batch | 3.0.0 | - | Model Version |
| JustInSequencePart | 3.0.0 | - | Model Version |
| SingleLevelBomAsBuilt | 3.0.0 | - | Model Version |
| PartSiteInformationAsBuilt | 1.0.0 | - | Model Version |
| Dependency | Version | Helm | Comments |
|---------------------------|------------------------------|------------|-----------------|
| EDC | 0.5.3 | 0.5.3 | |
| EDC PostgresSQL | 15.1.0-debian-11-r12 | 12.1.6 | Optional |
| MIW | 0.1.0 | 0.1.0 | REST connection |
| Semantics Hub | 0.1.29 | v0.2.11-M1 | REST connection |
| DTR | 0.3.14-M1 | 0.3.22 | REST connection |
| Minio | RELEASE.2022-11-11T03-44-20Z | 5.0.1 | |
| SingleLevelBomAsBuilt | [ 2.0.0; 3.0.0 ] | - | Model version |
| SingleLevelBomAsPlanned | [ 2.0.0; 3.0.0 ] | - | Model version |
| SingleLevelBomAsSpecified | 1.0.0 | - | Model version |
| SingleLevelUsageAsBuilt | 3.0.0 | - | Model version |

## [4.9.0] - 2024-04-03

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import java.time.ZonedDateTime;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;

Expand Down Expand Up @@ -84,22 +83,11 @@ public Relationship toRelationship(final String catenaXId) {
.lastModifiedOn(this.lastModifiedOn);

if (thereIsQuantity()) {
MeasurementUnit measurementUnit = MeasurementUnit.builder().build();
if (this.quantity.getMeasurementUnit() instanceof String str) {
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();
}


linkedItem.quantity(org.eclipse.tractusx.irs.component.Quantity.builder()
.quantityNumber(this.quantity.getQuantityNumber())
.measurementUnit(measurementUnit)
.measurementUnit(MeasurementUnit.builder()
.lexicalValue(this.quantity.getMeasurementUnit())
.build())
.build());
}

Expand All @@ -125,17 +113,8 @@ private boolean thereIsQuantity() {
@JsonAlias({ "quantityNumber", "value" })
private Double quantityNumber;
@JsonAlias({ "measurementUnit", "unit" })
private Object measurementUnit;

/**
* MeasurementUnit
*/
@Data
@Jacksonized
/* package */ static class MeasurementUnit {
private String lexicalValue;
private String datatypeURI;
}
private String measurementUnit;

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ public static class CxTestData {
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_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:bamm:io.catenax.part_as_planned:1.0.1#PartAsPlanned";
public static final String SINGLE_LEVEL_BOM_AS_PLANNED_ASPECT_TYPE = "urn:bamm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned";
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 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";
Expand Down
Loading

0 comments on commit 1150e9e

Please sign in to comment.