From fad5f6aba3404abe6917e4a3817d2b095e77e419 Mon Sep 17 00:00:00 2001 From: Jan Loewe <jan.loewe@ptb.de> Date: Wed, 15 Feb 2023 12:41:00 +0100 Subject: [PATCH] fix(namespace): fix namespace issue on RelativeUncertaintyType Related to https://gitlab1.ptb.de/d-ptb/dcc/gemimeg-tool/-/issues/185 --- src/DCC.ts | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/DCC.ts b/src/DCC.ts index e944d0a..57f0bef 100644 --- a/src/DCC.ts +++ b/src/DCC.ts @@ -1250,17 +1250,28 @@ export class ListType extends DCCXMLElement { export class RelativeUncertaintyType extends DCCXMLElement { // region choice - relativeUncertaintyXmlList?: si.RealListXMLListType; - relativeUncertaintySingle?: si.RealQuantityType; - + relativeUncertaintyXmlList?: RelativeUncertaintyXmlList; + relativeUncertaintySingle?: RelativeUncertaintySingle; // endregion choice constructor(el: Partial<RelativeUncertaintyType> = {}) { super(el); // choice - if (el.relativeUncertaintyXmlList) this.relativeUncertaintyXmlList = new si.RealListXMLListType(el.relativeUncertaintyXmlList); - else if (el.relativeUncertaintySingle) this.relativeUncertaintySingle = new si.RealQuantityType(el.relativeUncertaintySingle); + if (el.relativeUncertaintyXmlList) this.relativeUncertaintyXmlList = new RelativeUncertaintyXmlList(el.relativeUncertaintyXmlList); + else if (el.relativeUncertaintySingle) this.relativeUncertaintySingle = new RelativeUncertaintySingle(el.relativeUncertaintySingle); + } +} + +export class RelativeUncertaintyXmlList extends si.RealListXMLListType { + get ns(): string { + return DCC.namespace; + } +} + +export class RelativeUncertaintySingle extends si.RealQuantityType { + get ns(): string { + return DCC.namespace; } } -- GitLab