diff --git a/src/DCC.ts b/src/DCC.ts index 5dae4f3754cec791b8ed0ed258505f49526a7c7c..f7bb65b50edab18f38ae50261b17c45b0707e299 100644 --- a/src/DCC.ts +++ b/src/DCC.ts @@ -484,16 +484,15 @@ export class ContactNotStrictType extends DCCXMLElement { /** List of values which describes the measurement equipment. */ export class MeasuringEquipmentQuantityListType extends DCCXMLElement { - measuringEquipmentQuantity: MeasuringEquipmentQuantityType[]; + measuringEquipmentQuantity: PrimitiveQuantityType[]; constructor(el: Partial<MeasuringEquipmentQuantityListType> = {}) { super(el); - this.measuringEquipmentQuantity = ensureArray(el.measuringEquipmentQuantity).map((x) => new MeasuringEquipmentQuantityType(x)); + this.measuringEquipmentQuantity = ensureArray(el.measuringEquipmentQuantity).map((x) => new PrimitiveQuantityType(x)); } } -/** Value which describes the measuringEquipment */ -export class MeasuringEquipmentQuantityType extends DCCXMLElement { +export class PrimitiveQuantityType extends DCCXMLElement { _attr: IIdAndRefIdAndRefTypeAttributes; name?: TextType; @@ -636,7 +635,7 @@ export class MeasuringEquipmentQuantityType extends DCCXMLElement { // endregion choice - constructor(el: Partial<MeasuringEquipmentQuantityType> = {}) { + constructor(el: Partial<PrimitiveQuantityType> = {}) { super(el); if (el.name) this.name = new TextType(el.name); if (el.description) this.description = new RichContentType(el.description); @@ -662,6 +661,7 @@ export class ItemType extends DCCXMLElement { manufacturer: ContactNotStrictType; model?: DCCXMLElement; identifications: IdentificationListType; + itemQuantities: ItemQuantityListType; constructor(el: Partial<ItemType> = {}) { super(el); @@ -672,6 +672,17 @@ export class ItemType extends DCCXMLElement { this.manufacturer = new ContactNotStrictType(el.manufacturer); if (el.model) this.model = new DCCXMLElement(el.model); this.identifications = new IdentificationListType(el.identifications); + if (el.itemQuantities) this.itemQuantities = new ItemQuantityListType(el.itemQuantities); + } +} + +/** List of value(s) which belongs to the to be calibrated item. */ +export class ItemQuantityListType extends DCCXMLElement { + itemQuantity: PrimitiveQuantityType[]; + + constructor(el: Partial<ItemQuantityListType> = {}) { + super(el); + this.itemQuantity = ensureArray(el.itemQuantity).map((x) => new PrimitiveQuantityType(x)); } }