From 2e7d052f3b78c68ab1102245a7c8c328cd46718d Mon Sep 17 00:00:00 2001 From: Kristof Vandenbroucke Date: Wed, 25 Sep 2024 11:52:25 +0200 Subject: [PATCH] Made the connector converter for the ParentURI a bit more forgiving --- .../lib/converter-handlers/ElementConverterHandler.ts | 10 ++++++++-- packages/oslo-converter-uml-ea/package.json | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/oslo-converter-uml-ea/lib/converter-handlers/ElementConverterHandler.ts b/packages/oslo-converter-uml-ea/lib/converter-handlers/ElementConverterHandler.ts index 3bff72d..988f3c4 100644 --- a/packages/oslo-converter-uml-ea/lib/converter-handlers/ElementConverterHandler.ts +++ b/packages/oslo-converter-uml-ea/lib/converter-handlers/ElementConverterHandler.ts @@ -253,9 +253,15 @@ export class ElementConverterHandler extends ConverterHandler { ); if (!parentClassObject) { - throw new Error( - `[ElementConverterHandler]: Unable to find parent object for class (${object.path}).` + this.logger.warn( + `[ElementConverterHandler]: Unable to find parent object for class (${object.path}) with path ${parentClassConnector.path}.` ); + return; + // OLD RULE. We decided to become more flexible and not throw an error in this case + // https://vlaamseoverheid.atlassian.net/browse/SDTT-338 + // throw new Error( + // `[ElementConverterHandler]: Unable to find parent object for class (${object.path}).` + // ); } const parentInternalId: RDF.NamedNode = this.df.namedNode( diff --git a/packages/oslo-converter-uml-ea/package.json b/packages/oslo-converter-uml-ea/package.json index 054936b..f96f118 100644 --- a/packages/oslo-converter-uml-ea/package.json +++ b/packages/oslo-converter-uml-ea/package.json @@ -1,6 +1,6 @@ { "name": "@oslo-flanders/ea-converter", - "version": "0.0.25-alpha.0", + "version": "0.0.26-alpha.0", "description": "Transform an Enterprise Architect UML diagram to RDF", "author": "Digitaal Vlaanderen ", "homepage": "https://github.com/informatievlaanderen/OSLO-UML-Transformer/tree/main/packages/oslo-converter-uml-ea#readme",