@itwin/ecschema-metadata 5.0.0-dev.8 → 5.0.0-dev.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -1
- package/lib/cjs/Constants.js +20 -20
- package/lib/cjs/Constants.js.map +1 -1
- package/lib/cjs/Context.d.ts +60 -20
- package/lib/cjs/Context.d.ts.map +1 -1
- package/lib/cjs/Context.js +43 -19
- package/lib/cjs/Context.js.map +1 -1
- package/lib/cjs/DelayedPromise.js +6 -4
- package/lib/cjs/DelayedPromise.js.map +1 -1
- package/lib/cjs/Deserialization/AbstractParser.js +1 -0
- package/lib/cjs/Deserialization/AbstractParser.js.map +1 -1
- package/lib/cjs/Deserialization/Helper.d.ts +3 -3
- package/lib/cjs/Deserialization/Helper.d.ts.map +1 -1
- package/lib/cjs/Deserialization/Helper.js +8 -0
- package/lib/cjs/Deserialization/Helper.js.map +1 -1
- package/lib/cjs/Deserialization/JsonParser.js +3 -0
- package/lib/cjs/Deserialization/JsonParser.js.map +1 -1
- package/lib/cjs/Deserialization/JsonProps.d.ts +3 -0
- package/lib/cjs/Deserialization/JsonProps.d.ts.map +1 -1
- package/lib/cjs/Deserialization/JsonProps.js.map +1 -1
- package/lib/cjs/Deserialization/XmlParser.js +11 -1
- package/lib/cjs/Deserialization/XmlParser.js.map +1 -1
- package/lib/cjs/ECName.js +1 -0
- package/lib/cjs/ECName.js.map +1 -1
- package/lib/cjs/ECObjects.d.ts +21 -1
- package/lib/cjs/ECObjects.d.ts.map +1 -1
- package/lib/cjs/ECObjects.js +34 -2
- package/lib/cjs/ECObjects.js.map +1 -1
- package/lib/cjs/Exception.js +1 -0
- package/lib/cjs/Exception.js.map +1 -1
- package/lib/cjs/Interfaces.d.ts +10 -3
- package/lib/cjs/Interfaces.d.ts.map +1 -1
- package/lib/cjs/Interfaces.js.map +1 -1
- package/lib/cjs/Metadata/Class.d.ts +53 -5
- package/lib/cjs/Metadata/Class.d.ts.map +1 -1
- package/lib/cjs/Metadata/Class.js +118 -19
- package/lib/cjs/Metadata/Class.js.map +1 -1
- package/lib/cjs/Metadata/Constant.d.ts +14 -1
- package/lib/cjs/Metadata/Constant.d.ts.map +1 -1
- package/lib/cjs/Metadata/Constant.js +27 -2
- package/lib/cjs/Metadata/Constant.js.map +1 -1
- package/lib/cjs/Metadata/CustomAttributeClass.d.ts +16 -4
- package/lib/cjs/Metadata/CustomAttributeClass.d.ts.map +1 -1
- package/lib/cjs/Metadata/CustomAttributeClass.js +22 -4
- package/lib/cjs/Metadata/CustomAttributeClass.js.map +1 -1
- package/lib/cjs/Metadata/EntityClass.d.ts +18 -6
- package/lib/cjs/Metadata/EntityClass.d.ts.map +1 -1
- package/lib/cjs/Metadata/EntityClass.js +29 -9
- package/lib/cjs/Metadata/EntityClass.js.map +1 -1
- package/lib/cjs/Metadata/Enumeration.d.ts +14 -1
- package/lib/cjs/Metadata/Enumeration.d.ts.map +1 -1
- package/lib/cjs/Metadata/Enumeration.js +22 -1
- package/lib/cjs/Metadata/Enumeration.js.map +1 -1
- package/lib/cjs/Metadata/Format.d.ts +41 -1
- package/lib/cjs/Metadata/Format.d.ts.map +1 -1
- package/lib/cjs/Metadata/Format.js +68 -3
- package/lib/cjs/Metadata/Format.js.map +1 -1
- package/lib/cjs/Metadata/InvertedUnit.d.ts +8 -3
- package/lib/cjs/Metadata/InvertedUnit.d.ts.map +1 -1
- package/lib/cjs/Metadata/InvertedUnit.js +17 -6
- package/lib/cjs/Metadata/InvertedUnit.js.map +1 -1
- package/lib/cjs/Metadata/KindOfQuantity.d.ts +14 -3
- package/lib/cjs/Metadata/KindOfQuantity.d.ts.map +1 -1
- package/lib/cjs/Metadata/KindOfQuantity.js +43 -18
- package/lib/cjs/Metadata/KindOfQuantity.js.map +1 -1
- package/lib/cjs/Metadata/Mixin.d.ts +15 -1
- package/lib/cjs/Metadata/Mixin.d.ts.map +1 -1
- package/lib/cjs/Metadata/Mixin.js +23 -2
- package/lib/cjs/Metadata/Mixin.js.map +1 -1
- package/lib/cjs/Metadata/OverrideFormat.js +9 -0
- package/lib/cjs/Metadata/OverrideFormat.js.map +1 -1
- package/lib/cjs/Metadata/Phenomenon.d.ts +14 -1
- package/lib/cjs/Metadata/Phenomenon.d.ts.map +1 -1
- package/lib/cjs/Metadata/Phenomenon.js +22 -1
- package/lib/cjs/Metadata/Phenomenon.js.map +1 -1
- package/lib/cjs/Metadata/Property.d.ts +1 -1
- package/lib/cjs/Metadata/Property.d.ts.map +1 -1
- package/lib/cjs/Metadata/Property.js +83 -28
- package/lib/cjs/Metadata/Property.js.map +1 -1
- package/lib/cjs/Metadata/PropertyCategory.d.ts +14 -1
- package/lib/cjs/Metadata/PropertyCategory.d.ts.map +1 -1
- package/lib/cjs/Metadata/PropertyCategory.js +21 -1
- package/lib/cjs/Metadata/PropertyCategory.js.map +1 -1
- package/lib/cjs/Metadata/RelationshipClass.d.ts +15 -2
- package/lib/cjs/Metadata/RelationshipClass.d.ts.map +1 -1
- package/lib/cjs/Metadata/RelationshipClass.js +47 -10
- package/lib/cjs/Metadata/RelationshipClass.js.map +1 -1
- package/lib/cjs/Metadata/Schema.d.ts +116 -11
- package/lib/cjs/Metadata/Schema.d.ts.map +1 -1
- package/lib/cjs/Metadata/Schema.js +135 -33
- package/lib/cjs/Metadata/Schema.js.map +1 -1
- package/lib/cjs/Metadata/SchemaItem.d.ts +11 -2
- package/lib/cjs/Metadata/SchemaItem.d.ts.map +1 -1
- package/lib/cjs/Metadata/SchemaItem.js +10 -0
- package/lib/cjs/Metadata/SchemaItem.js.map +1 -1
- package/lib/cjs/Metadata/Unit.d.ts +8 -1
- package/lib/cjs/Metadata/Unit.d.ts.map +1 -1
- package/lib/cjs/Metadata/Unit.js +21 -3
- package/lib/cjs/Metadata/Unit.js.map +1 -1
- package/lib/cjs/Metadata/UnitSystem.d.ts +14 -3
- package/lib/cjs/Metadata/UnitSystem.d.ts.map +1 -1
- package/lib/cjs/Metadata/UnitSystem.js +21 -3
- package/lib/cjs/Metadata/UnitSystem.js.map +1 -1
- package/lib/cjs/SchemaJsonLocater.d.ts +3 -3
- package/lib/cjs/SchemaJsonLocater.d.ts.map +1 -1
- package/lib/cjs/SchemaJsonLocater.js +3 -3
- package/lib/cjs/SchemaJsonLocater.js.map +1 -1
- package/lib/cjs/SchemaKey.d.ts +7 -1
- package/lib/cjs/SchemaKey.d.ts.map +1 -1
- package/lib/cjs/SchemaKey.js +13 -3
- package/lib/cjs/SchemaKey.js.map +1 -1
- package/lib/cjs/SchemaLoader.d.ts +2 -2
- package/lib/cjs/SchemaLoader.d.ts.map +1 -1
- package/lib/cjs/SchemaLoader.js +1 -0
- package/lib/cjs/SchemaLoader.js.map +1 -1
- package/lib/cjs/SchemaPartVisitorDelegate.js +1 -0
- package/lib/cjs/SchemaPartVisitorDelegate.js.map +1 -1
- package/lib/cjs/UnitConversion/Graph.js +69 -65
- package/lib/cjs/UnitConversion/Graph.js.map +1 -1
- package/lib/cjs/UnitConversion/UnitConversion.d.ts +1 -1
- package/lib/cjs/UnitConversion/UnitConversion.d.ts.map +1 -1
- package/lib/cjs/UnitConversion/UnitConversion.js +9 -7
- package/lib/cjs/UnitConversion/UnitConversion.js.map +1 -1
- package/lib/cjs/UnitConversion/UnitConverter.js +2 -0
- package/lib/cjs/UnitConversion/UnitConverter.js.map +1 -1
- package/lib/cjs/UnitConversion/UnitTree.d.ts +2 -0
- package/lib/cjs/UnitConversion/UnitTree.d.ts.map +1 -1
- package/lib/cjs/UnitConversion/UnitTree.js +11 -1
- package/lib/cjs/UnitConversion/UnitTree.js.map +1 -1
- package/lib/cjs/UnitProvider/SchemaUnitProvider.js +6 -3
- package/lib/cjs/UnitProvider/SchemaUnitProvider.js.map +1 -1
- package/lib/cjs/Validation/SchemaWalker.d.ts +1 -1
- package/lib/cjs/Validation/SchemaWalker.d.ts.map +1 -1
- package/lib/cjs/Validation/SchemaWalker.js +4 -0
- package/lib/cjs/Validation/SchemaWalker.js.map +1 -1
- package/lib/cjs/utils/SchemaGraph.js +2 -3
- package/lib/cjs/utils/SchemaGraph.js.map +1 -1
- package/lib/esm/Constants.js +20 -20
- package/lib/esm/Constants.js.map +1 -1
- package/lib/esm/Context.d.ts +60 -20
- package/lib/esm/Context.d.ts.map +1 -1
- package/lib/esm/Context.js +41 -17
- package/lib/esm/Context.js.map +1 -1
- package/lib/esm/DelayedPromise.js +6 -4
- package/lib/esm/DelayedPromise.js.map +1 -1
- package/lib/esm/Deserialization/AbstractParser.js +1 -0
- package/lib/esm/Deserialization/AbstractParser.js.map +1 -1
- package/lib/esm/Deserialization/Helper.d.ts +3 -3
- package/lib/esm/Deserialization/Helper.d.ts.map +1 -1
- package/lib/esm/Deserialization/Helper.js +8 -0
- package/lib/esm/Deserialization/Helper.js.map +1 -1
- package/lib/esm/Deserialization/JsonParser.js +3 -0
- package/lib/esm/Deserialization/JsonParser.js.map +1 -1
- package/lib/esm/Deserialization/JsonProps.d.ts +3 -0
- package/lib/esm/Deserialization/JsonProps.d.ts.map +1 -1
- package/lib/esm/Deserialization/JsonProps.js.map +1 -1
- package/lib/esm/Deserialization/XmlParser.js +11 -1
- package/lib/esm/Deserialization/XmlParser.js.map +1 -1
- package/lib/esm/ECName.js +1 -0
- package/lib/esm/ECName.js.map +1 -1
- package/lib/esm/ECObjects.d.ts +21 -1
- package/lib/esm/ECObjects.d.ts.map +1 -1
- package/lib/esm/ECObjects.js +32 -1
- package/lib/esm/ECObjects.js.map +1 -1
- package/lib/esm/Exception.js +1 -0
- package/lib/esm/Exception.js.map +1 -1
- package/lib/esm/Interfaces.d.ts +10 -3
- package/lib/esm/Interfaces.d.ts.map +1 -1
- package/lib/esm/Interfaces.js.map +1 -1
- package/lib/esm/Metadata/Class.d.ts +53 -5
- package/lib/esm/Metadata/Class.d.ts.map +1 -1
- package/lib/esm/Metadata/Class.js +119 -20
- package/lib/esm/Metadata/Class.js.map +1 -1
- package/lib/esm/Metadata/Constant.d.ts +14 -1
- package/lib/esm/Metadata/Constant.d.ts.map +1 -1
- package/lib/esm/Metadata/Constant.js +27 -2
- package/lib/esm/Metadata/Constant.js.map +1 -1
- package/lib/esm/Metadata/CustomAttributeClass.d.ts +16 -4
- package/lib/esm/Metadata/CustomAttributeClass.d.ts.map +1 -1
- package/lib/esm/Metadata/CustomAttributeClass.js +22 -4
- package/lib/esm/Metadata/CustomAttributeClass.js.map +1 -1
- package/lib/esm/Metadata/EntityClass.d.ts +18 -6
- package/lib/esm/Metadata/EntityClass.d.ts.map +1 -1
- package/lib/esm/Metadata/EntityClass.js +29 -9
- package/lib/esm/Metadata/EntityClass.js.map +1 -1
- package/lib/esm/Metadata/Enumeration.d.ts +14 -1
- package/lib/esm/Metadata/Enumeration.d.ts.map +1 -1
- package/lib/esm/Metadata/Enumeration.js +22 -1
- package/lib/esm/Metadata/Enumeration.js.map +1 -1
- package/lib/esm/Metadata/Format.d.ts +41 -1
- package/lib/esm/Metadata/Format.d.ts.map +1 -1
- package/lib/esm/Metadata/Format.js +68 -3
- package/lib/esm/Metadata/Format.js.map +1 -1
- package/lib/esm/Metadata/InvertedUnit.d.ts +8 -3
- package/lib/esm/Metadata/InvertedUnit.d.ts.map +1 -1
- package/lib/esm/Metadata/InvertedUnit.js +17 -6
- package/lib/esm/Metadata/InvertedUnit.js.map +1 -1
- package/lib/esm/Metadata/KindOfQuantity.d.ts +14 -3
- package/lib/esm/Metadata/KindOfQuantity.d.ts.map +1 -1
- package/lib/esm/Metadata/KindOfQuantity.js +43 -18
- package/lib/esm/Metadata/KindOfQuantity.js.map +1 -1
- package/lib/esm/Metadata/Mixin.d.ts +15 -1
- package/lib/esm/Metadata/Mixin.d.ts.map +1 -1
- package/lib/esm/Metadata/Mixin.js +24 -3
- package/lib/esm/Metadata/Mixin.js.map +1 -1
- package/lib/esm/Metadata/OverrideFormat.js +9 -0
- package/lib/esm/Metadata/OverrideFormat.js.map +1 -1
- package/lib/esm/Metadata/Phenomenon.d.ts +14 -1
- package/lib/esm/Metadata/Phenomenon.d.ts.map +1 -1
- package/lib/esm/Metadata/Phenomenon.js +22 -1
- package/lib/esm/Metadata/Phenomenon.js.map +1 -1
- package/lib/esm/Metadata/Property.d.ts +1 -1
- package/lib/esm/Metadata/Property.d.ts.map +1 -1
- package/lib/esm/Metadata/Property.js +84 -29
- package/lib/esm/Metadata/Property.js.map +1 -1
- package/lib/esm/Metadata/PropertyCategory.d.ts +14 -1
- package/lib/esm/Metadata/PropertyCategory.d.ts.map +1 -1
- package/lib/esm/Metadata/PropertyCategory.js +21 -1
- package/lib/esm/Metadata/PropertyCategory.js.map +1 -1
- package/lib/esm/Metadata/RelationshipClass.d.ts +15 -2
- package/lib/esm/Metadata/RelationshipClass.d.ts.map +1 -1
- package/lib/esm/Metadata/RelationshipClass.js +48 -11
- package/lib/esm/Metadata/RelationshipClass.js.map +1 -1
- package/lib/esm/Metadata/Schema.d.ts +116 -11
- package/lib/esm/Metadata/Schema.d.ts.map +1 -1
- package/lib/esm/Metadata/Schema.js +135 -33
- package/lib/esm/Metadata/Schema.js.map +1 -1
- package/lib/esm/Metadata/SchemaItem.d.ts +11 -2
- package/lib/esm/Metadata/SchemaItem.d.ts.map +1 -1
- package/lib/esm/Metadata/SchemaItem.js +11 -1
- package/lib/esm/Metadata/SchemaItem.js.map +1 -1
- package/lib/esm/Metadata/Unit.d.ts +8 -1
- package/lib/esm/Metadata/Unit.d.ts.map +1 -1
- package/lib/esm/Metadata/Unit.js +21 -3
- package/lib/esm/Metadata/Unit.js.map +1 -1
- package/lib/esm/Metadata/UnitSystem.d.ts +14 -3
- package/lib/esm/Metadata/UnitSystem.d.ts.map +1 -1
- package/lib/esm/Metadata/UnitSystem.js +21 -3
- package/lib/esm/Metadata/UnitSystem.js.map +1 -1
- package/lib/esm/SchemaJsonLocater.d.ts +3 -3
- package/lib/esm/SchemaJsonLocater.d.ts.map +1 -1
- package/lib/esm/SchemaJsonLocater.js +3 -3
- package/lib/esm/SchemaJsonLocater.js.map +1 -1
- package/lib/esm/SchemaKey.d.ts +7 -1
- package/lib/esm/SchemaKey.d.ts.map +1 -1
- package/lib/esm/SchemaKey.js +13 -3
- package/lib/esm/SchemaKey.js.map +1 -1
- package/lib/esm/SchemaLoader.d.ts +2 -2
- package/lib/esm/SchemaLoader.d.ts.map +1 -1
- package/lib/esm/SchemaLoader.js +1 -0
- package/lib/esm/SchemaLoader.js.map +1 -1
- package/lib/esm/SchemaPartVisitorDelegate.js +1 -0
- package/lib/esm/SchemaPartVisitorDelegate.js.map +1 -1
- package/lib/esm/UnitConversion/Graph.js +69 -65
- package/lib/esm/UnitConversion/Graph.js.map +1 -1
- package/lib/esm/UnitConversion/UnitConversion.d.ts +1 -1
- package/lib/esm/UnitConversion/UnitConversion.d.ts.map +1 -1
- package/lib/esm/UnitConversion/UnitConversion.js +9 -7
- package/lib/esm/UnitConversion/UnitConversion.js.map +1 -1
- package/lib/esm/UnitConversion/UnitConverter.js +2 -0
- package/lib/esm/UnitConversion/UnitConverter.js.map +1 -1
- package/lib/esm/UnitConversion/UnitTree.d.ts +2 -0
- package/lib/esm/UnitConversion/UnitTree.d.ts.map +1 -1
- package/lib/esm/UnitConversion/UnitTree.js +11 -1
- package/lib/esm/UnitConversion/UnitTree.js.map +1 -1
- package/lib/esm/UnitProvider/SchemaUnitProvider.js +6 -3
- package/lib/esm/UnitProvider/SchemaUnitProvider.js.map +1 -1
- package/lib/esm/Validation/SchemaWalker.d.ts +1 -1
- package/lib/esm/Validation/SchemaWalker.d.ts.map +1 -1
- package/lib/esm/Validation/SchemaWalker.js +4 -0
- package/lib/esm/Validation/SchemaWalker.js.map +1 -1
- package/lib/esm/utils/SchemaGraph.js +2 -3
- package/lib/esm/utils/SchemaGraph.js.map +1 -1
- package/package.json +14 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JsonParser.js","sourceRoot":"","sources":["../../../src/Deserialization/JsonParser.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,OAAO,EAAE,cAAc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GAAG,CAAC,QAA8B,EAAE,EAAE;oBAClD,OAAO,QAA2B,CAAC;gBACrC,CAAC,CAAC;gBAEF,MAAM,OAAO,GAAoB,CAAC,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;gBAChE,MAAM,OAAO,CAAC;YAChB,CAAC;QACH,CAAC;IACH,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nimport { ECObjectsError, ECObjectsStatus } from \"../Exception\";\nimport { CustomAttribute } from \"../Metadata/CustomAttribute\";\nimport { CustomAttributeClass } from \"../Metadata/CustomAttributeClass\";\nimport { ECName } from \"../ECName\";\nimport { AbstractParser, CAProviderTuple } from \"./AbstractParser\";\nimport {\n ConstantProps, CustomAttributeClassProps, EntityClassProps, EnumerationProps, InvertedUnitProps, KindOfQuantityProps, MixinProps,\n NavigationPropertyProps, PhenomenonProps, PrimitiveArrayPropertyProps, PrimitiveOrEnumPropertyBaseProps, PrimitivePropertyProps,\n PropertyCategoryProps, PropertyProps, RelationshipClassProps, SchemaItemFormatProps, SchemaItemUnitProps, SchemaProps, SchemaReferenceProps, StructArrayPropertyProps, StructClassProps,\n StructPropertyProps, UnitSystemProps,\n} from \"./JsonProps\";\nimport { ECSpecVersion, SchemaReadHelper } from \"./Helper\";\n\ninterface UnknownObject { readonly [name: string]: unknown }\nfunction isObject(x: unknown): x is UnknownObject {\n return typeof (x) === \"object\";\n}\n\nconst SCHEMAURL_JSON = \"https://dev\\\\.bentley\\\\.com/json_schemas/ec\";\n\n/** @internal */\nexport class JsonParser extends AbstractParser<UnknownObject> {\n private _rawSchema: UnknownObject;\n private _schemaName?: string;\n private _currentItemFullName?: string;\n\n constructor(rawSchema: Readonly<unknown>) {\n super();\n\n if (!isObject(rawSchema))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `Invalid JSON object.`);\n\n this._rawSchema = rawSchema;\n this._schemaName = rawSchema.name as string | undefined;\n this._ecSpecVersion = JsonParser.parseJSUri(rawSchema.$schema as string);\n }\n\n public get getECSpecVersion(): ECSpecVersion | undefined { return this._ecSpecVersion; }\n\n public static parseJSUri(uri: string): ECSpecVersion | undefined {\n if (uri === undefined)\n return undefined;\n\n const match = uri.match(`^${SCHEMAURL_JSON}/([0-9]+)/ecschema$`);\n if (!match)\n return;\n\n const readVersion = parseInt(match[1][0], 10);\n const writeVersion = parseInt(match[1][1], 10);\n return { readVersion, writeVersion };\n }\n\n /**\n * Type checks Schema and returns SchemaProps interface\n * @param this._rawSchema\n * @returns SchemaProps\n */\n public parseSchema(): SchemaProps {\n if (undefined === this._rawSchema.name)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `An ECSchema is missing the required 'name' attribute.`);\n if (typeof (this._rawSchema.name) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `An ECSchema has an invalid 'name' attribute. It should be of type 'string'.`);\n\n if (undefined === this._rawSchema.$schema)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECSchema ${this._schemaName} is missing the required '$schema' attribute.`);\n if (typeof (this._rawSchema.$schema) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECSchema ${this._schemaName} has an invalid '$schema' attribute. It should be of type 'string'.`);\n\n if (undefined === this._rawSchema.version)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECSchema ${this._schemaName} is missing the required 'version' attribute.`);\n if (typeof (this._rawSchema.version) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECSchema ${this._schemaName} has an invalid 'version' attribute. It should be of type 'string'.`);\n\n if (undefined !== this._rawSchema.alias) {\n if (typeof (this._rawSchema.alias) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECSchema ${this._schemaName} has an invalid 'alias' attribute. It should be of type 'string'.`);\n }\n\n if (undefined !== this._rawSchema.label) {\n if (typeof (this._rawSchema.label) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECSchema ${this._schemaName} has an invalid 'label' attribute. It should be of type 'string'.`);\n }\n\n if (undefined !== this._rawSchema.description) {\n if (typeof (this._rawSchema.description) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECSchema ${this._schemaName} has an invalid 'description' attribute. It should be of type 'string'.`);\n }\n\n const ecVersions = JsonParser.parseJSUri(this._rawSchema.$schema);\n\n return {\n ...this._rawSchema,\n ecSpecMajorVersion: ecVersions?.readVersion,\n ecSpecMinorVersion: ecVersions?.writeVersion,\n } as SchemaProps;\n }\n\n public *getReferences(): Iterable<SchemaReferenceProps> {\n if (undefined !== this._rawSchema.references) {\n if (!Array.isArray(this._rawSchema.references))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema ${this._rawSchema.name} has an invalid 'references' attribute. It should be of type 'object[]'.`);\n\n for (const ref of this._rawSchema.references) {\n yield this.checkSchemaReference(ref);\n }\n }\n }\n\n private checkSchemaReference(jsonObj: Readonly<unknown>): SchemaReferenceProps {\n if (!isObject(jsonObj))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema ${this._schemaName} has an invalid 'references' attribute. It should be of type 'object[]'.`);\n if (undefined === jsonObj.name)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema ${this._schemaName} has an invalid 'references' attribute. One of the references is missing the required 'name' attribute.`);\n if (typeof (jsonObj.name) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema ${this._schemaName} has an invalid 'references' attribute. One of the references has an invalid 'name' attribute. It should be of type 'string'.`);\n if (undefined === jsonObj.version)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema ${this._schemaName} has an invalid 'references' attribute. One of the references is missing the required 'version' attribute.`);\n if (typeof (jsonObj.version) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema ${this._schemaName} has an invalid 'references' attribute. One of the references has an invalid 'version' attribute. It should be of type 'string'.`);\n return (jsonObj as unknown) as SchemaReferenceProps;\n }\n\n public *getItems(): Iterable<[string, string, UnknownObject]> {\n const items = this._rawSchema.items;\n if (undefined !== items) {\n if (!isObject(items) || Array.isArray(items))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema ${this._schemaName} has an invalid 'items' attribute. It should be of type 'object'.`);\n\n // eslint-disable-next-line guard-for-in\n for (const itemName in items) {\n const item = items[itemName];\n if (!isObject(item))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `A SchemaItem in ${this._schemaName} is an invalid JSON object.`);\n\n if (!ECName.validate(itemName))\n throw new ECObjectsError(ECObjectsStatus.InvalidECName, `A SchemaItem in ${this._schemaName} has an invalid 'name' attribute. '${itemName}' is not a valid ECName.`);\n\n if (undefined === item.schemaItemType)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The SchemaItem ${this._schemaName}.${itemName} is missing the required 'schemaItemType' attribute.`);\n if (typeof (item.schemaItemType) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The SchemaItem ${this._schemaName}.${itemName} has an invalid 'schemaItemType' attribute. It should be of type 'string'.`);\n\n this._currentItemFullName = `${this._schemaName}.${itemName}`;\n yield [itemName, item.schemaItemType, item];\n }\n }\n }\n\n public findItem(itemName: string): [string, string, UnknownObject] | undefined {\n const items = this._rawSchema.items;\n if (undefined !== items) {\n if (!isObject(items) || Array.isArray(items))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema ${this._schemaName} has an invalid 'items' attribute. It should be of type 'object'.`);\n\n const item = items[itemName];\n if (undefined !== item) {\n if (!isObject(item))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `A SchemaItem in ${this._schemaName} is an invalid JSON object.`);\n\n if (!ECName.validate(itemName))\n throw new ECObjectsError(ECObjectsStatus.InvalidECName, `A SchemaItem in ${this._schemaName} has an invalid 'name' attribute. '${itemName}' is not a valid ECName.`);\n\n if (undefined === item.schemaItemType)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The SchemaItem ${this._schemaName}.${itemName} is missing the required 'schemaItemType' attribute.`);\n if (typeof (item.schemaItemType) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The SchemaItem ${this._schemaName}.${itemName} has an invalid 'schemaItemType' attribute. It should be of type 'string'.`);\n\n this._currentItemFullName = `${this._schemaName}.${itemName}`;\n return [itemName, item.schemaItemType, item];\n }\n }\n\n return undefined;\n }\n\n /**\n * Type checks all Schema Item attributes.\n * @param jsonObj The JSON object to check if it represents a Schema Item.\n */\n private checkSchemaItemProps(jsonObj: UnknownObject): void {\n if (undefined !== jsonObj.description) {\n if (typeof (jsonObj.description) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The SchemaItem ${this._currentItemFullName} has an invalid 'description' attribute. It should be of type 'string'.`);\n }\n\n if (undefined !== jsonObj.label) {\n if (typeof (jsonObj.label) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The SchemaItem ${this._currentItemFullName} has an invalid 'label' attribute. It should be of type 'string'.`);\n }\n }\n\n public *getProperties(jsonObj: UnknownObject, itemName: string): Iterable<[string, string, UnknownObject]> {\n const properties = jsonObj.properties;\n if (undefined !== properties) {\n if (!Array.isArray(properties))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECClass ${itemName} has an invalid 'properties' attribute. It should be of type 'object[]'.`);\n\n for (const property of properties as unknown[]) {\n if (!isObject(property))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `An ECProperty in ${itemName} is an invalid JSON object.`);\n\n if (undefined === property.name)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `An ECProperty in ${itemName} is missing the required 'name' attribute.`);\n if (typeof (property.name) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `An ECProperty in ${itemName} has an invalid 'name' attribute. It should be of type 'string'.`);\n\n if (undefined === property.type)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${itemName}.${property.name} does not have the required 'type' attribute.`);\n if (typeof (property.type) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${itemName}.${property.name} has an invalid 'type' attribute. It should be of type 'string'.`);\n if (!this.isValidPropertyType(property.type)) {\n if (SchemaReadHelper.isECSpecVersionNewer(this._ecSpecVersion))\n return;\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${itemName}.${property.name} has an invalid 'type' attribute. '${property.type}' is not a valid type.`);\n }\n\n yield [property.name, property.type, property];\n }\n }\n }\n\n /**\n * Type checks Class and returns ClassProps interface\n * @param jsonObj The JSON object to check if it represents a Class.\n */\n private checkClassProps(jsonObj: UnknownObject): void {\n this.checkSchemaItemProps(jsonObj);\n\n if (undefined !== jsonObj.modifier) {\n if (typeof (jsonObj.modifier) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECClass ${this._currentItemFullName} has an invalid 'modifier' attribute. It should be of type 'string'.`);\n }\n\n if (undefined !== jsonObj.baseClass) {\n if (typeof (jsonObj.baseClass) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECClass ${this._currentItemFullName} has an invalid 'baseClass' attribute. It should be of type 'string'.`);\n }\n if (undefined !== jsonObj.customAttributes) {\n if (!Array.isArray(jsonObj.customAttributes)) {\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECClass ${this._currentItemFullName} has an invalid 'customAttributes' attribute. It should be of type 'array'.`);\n }\n }\n }\n\n /**\n * Type checks entity class and returns EntityClassProps interface\n * @param jsonObj\n * @returns EntityClassProps\n */\n public parseEntityClass(jsonObj: UnknownObject): EntityClassProps {\n this.checkClassProps(jsonObj);\n\n if (undefined !== jsonObj.mixins) {\n if (!Array.isArray(jsonObj.mixins))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECEntityClass ${this._currentItemFullName} has an invalid 'mixins' attribute. It should be of type 'string[]'.`);\n for (const mixinName of jsonObj.mixins) {\n if (typeof (mixinName) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECEntityClass ${this._currentItemFullName} has an invalid 'mixins' attribute. It should be of type 'string[]'.`);\n }\n }\n\n return {\n ...jsonObj,\n originalECSpecMajorVersion : this._ecSpecVersion?.readVersion,\n originalECSpecMinorVersion: this._ecSpecVersion?.writeVersion,\n } as unknown as EntityClassProps;\n }\n\n /**\n * Type checks mixin and returns MixinProps interface\n * @param jsonObj\n * @returns MixinProps\n */\n public parseMixin(jsonObj: UnknownObject): MixinProps {\n this.checkClassProps(jsonObj);\n if (undefined === jsonObj.appliesTo)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Mixin ${this._currentItemFullName} is missing the required 'appliesTo' attribute.`);\n if (typeof (jsonObj.appliesTo) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Mixin ${this._currentItemFullName} has an invalid 'appliesTo' attribute. It should be of type 'string'.`);\n return {\n ...jsonObj,\n originalECSpecMajorVersion: this._ecSpecVersion?.readVersion,\n originalECSpecMinorVersion: this._ecSpecVersion?.writeVersion,\n } as unknown as MixinProps;\n }\n\n /**\n * Type checks custom attribute class and returns CustomAttributeClassProps interface\n * @param jsonObj\n * @returns CustomAttributeClassProps\n */\n public parseCustomAttributeClass(jsonObj: UnknownObject): CustomAttributeClassProps {\n this.checkClassProps(jsonObj);\n if (undefined === jsonObj.appliesTo)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The CustomAttributeClass ${this._currentItemFullName} is missing the required 'appliesTo' attribute.`);\n if (typeof (jsonObj.appliesTo) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The CustomAttributeClass ${this._currentItemFullName} has an invalid 'appliesTo' attribute. It should be of type 'string'.`);\n return {\n ...jsonObj,\n originalECSpecMajorVersion: this._ecSpecVersion?.readVersion,\n originalECSpecMinorVersion: this._ecSpecVersion?.writeVersion,\n } as unknown as CustomAttributeClassProps;\n }\n\n public parseStructClass(jsonObj: UnknownObject): StructClassProps {\n this.checkClassProps(jsonObj);\n return {\n ...jsonObj,\n originalECSpecMajorVersion: this._ecSpecVersion?.readVersion,\n originalECSpecMinorVersion: this._ecSpecVersion?.writeVersion,\n } as unknown as StructClassProps;\n }\n\n public parseUnitSystem(jsonObj: UnknownObject): UnitSystemProps {\n this.checkSchemaItemProps(jsonObj);\n return jsonObj as UnitSystemProps;\n }\n\n /**\n * Type checks Relationship Class and returns RelationshipClassProps interface\n * @param jsonObj\n * @returns RelationshipClassProps\n */\n public parseRelationshipClass(jsonObj: UnknownObject): RelationshipClassProps {\n this.checkClassProps(jsonObj);\n if (undefined === jsonObj.strength)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} is missing the required 'strength' attribute.`);\n if (typeof (jsonObj.strength) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} has an invalid 'strength' attribute. It should be of type 'string'.`);\n\n if (undefined === jsonObj.strengthDirection)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} is missing the required 'strengthDirection' attribute.`);\n if (typeof (jsonObj.strengthDirection) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} has an invalid 'strengthDirection' attribute. It should be of type 'string'.`);\n\n if (undefined === jsonObj.source)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} is missing the required source constraint.`);\n if (!isObject(jsonObj.source))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} has an invalid source constraint. It should be of type 'object'.`);\n this.checkRelationshipConstraintProps(jsonObj.source, true);\n\n if (undefined === jsonObj.target)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} is missing the required target constraint.`);\n if (!isObject(jsonObj.target))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} has an invalid target constraint. It should be of type 'object'.`);\n this.checkRelationshipConstraintProps(jsonObj.target, false);\n\n return {\n ...jsonObj,\n originalECSpecMajorVersion: this._ecSpecVersion?.readVersion,\n originalECSpecMinorVersion: this._ecSpecVersion?.writeVersion,\n } as unknown as RelationshipClassProps;\n }\n\n /**\n * Type checks Relationship Constraint and returns RelationshipConstraintProps interface.\n * @param jsonObj\n * @param isSource For sake of error message, is this relationship constraint a source or target\n * @returns RelationshipConstraintProps\n */\n private checkRelationshipConstraintProps(jsonObj: UnknownObject, isSource: boolean): void {\n const constraintName = `${(isSource) ? \"Source\" : \"Target\"} Constraint of ${this._currentItemFullName}`; // most specific name to call RelationshipConstraint\n\n if (undefined === jsonObj.multiplicity)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} is missing the required 'multiplicity' attribute.`);\n if (typeof (jsonObj.multiplicity) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} has an invalid 'multiplicity' attribute. It should be of type 'string'.`);\n\n if (undefined === jsonObj.roleLabel)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} is missing the required 'roleLabel' attribute.`);\n if (typeof (jsonObj.roleLabel) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} has an invalid 'roleLabel' attribute. It should be of type 'string'.`);\n\n if (undefined === jsonObj.polymorphic)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} is missing the required 'polymorphic' attribute.`);\n if (typeof (jsonObj.polymorphic) !== \"boolean\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} has an invalid 'polymorphic' attribute. It should be of type 'boolean'.`);\n\n if (undefined !== jsonObj.abstractConstraint && typeof (jsonObj.abstractConstraint) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} has an invalid 'abstractConstraint' attribute. It should be of type 'string'.`);\n\n if (undefined === jsonObj.constraintClasses)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} is missing the required 'constraintClasses' attribute.`);\n if (!Array.isArray(jsonObj.constraintClasses))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} has an invalid 'constraintClasses' attribute. It should be of type 'string[]'.`);\n\n for (const constraintClassName of jsonObj.constraintClasses) {\n if (typeof (constraintClassName) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} has an invalid 'constraintClasses' attribute. It should be of type 'string[]'.`);\n }\n\n if (undefined !== jsonObj.customAttributes && !Array.isArray(jsonObj.customAttributes))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} has an invalid 'customAttributes' attribute. It should be of type 'array'.`);\n }\n\n /**\n * Type checks Enumeration and returns EnumerationProps interface\n * @param jsonObj\n * @returns EnumerationProps\n */\n public parseEnumeration(jsonObj: UnknownObject): EnumerationProps {\n this.checkSchemaItemProps(jsonObj);\n if (undefined === jsonObj.type)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} is missing the required 'type' attribute.`);\n if (typeof (jsonObj.type) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an invalid 'type' attribute. It should be of type 'string'.`);\n\n const isValidEnumerationType = (type: string): boolean => {\n type = type.toLowerCase();\n return (type === \"int\") ||\n (type === \"integer\") ||\n (type === \"string\");\n };\n if (!isValidEnumerationType(jsonObj.type)) {\n if (SchemaReadHelper.isECSpecVersionNewer(this._ecSpecVersion))\n (jsonObj as any).type = \"string\";\n else\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an invalid 'type' attribute. It should be either \"int\" or \"string\".`);\n }\n\n if (undefined !== jsonObj.isStrict) { // TODO: make required\n if (typeof (jsonObj.isStrict) !== \"boolean\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an invalid 'isStrict' attribute. It should be of type 'boolean'.`);\n }\n\n if (undefined === jsonObj.enumerators)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} is missing the required 'enumerators' attribute.`);\n if (!Array.isArray(jsonObj.enumerators))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an invalid 'enumerators' attribute. It should be of type 'object[]'.`);\n\n for (const enumerator of jsonObj.enumerators) {\n if (!isObject(enumerator))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an invalid 'enumerators' attribute. It should be of type 'object[]'.`);\n\n if (undefined === enumerator.value)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an enumerator that is missing the required attribute 'value'.`);\n\n // TODO: Should this really be handled here?\n const expectedType = jsonObj.type;\n const receivedType = (typeof (enumerator.value) === \"number\") ? \"int\" : typeof (enumerator.value);\n if (!expectedType.includes(receivedType)) // is receivedType a substring of expectedType? - easiest way to check \"int\" === \"int\" | \"integer\" && \"string\" === \"string\"\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an incompatible type. It must be \"${expectedType}\", not \"${receivedType}\".`);\n\n if (undefined === enumerator.name)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an enumerator that is missing the required attribute 'name'.`);\n if (typeof (enumerator.name) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an enumerator with an invalid 'name' attribute. It should be of type 'string'.`);\n\n if (undefined !== enumerator.label) {\n if (typeof (enumerator.label) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an enumerator with an invalid 'label' attribute. It should be of type 'string'.`);\n }\n\n if (undefined !== enumerator.description) {\n if (typeof (enumerator.description) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an enumerator with an invalid 'description' attribute. It should be of type 'string'.`);\n }\n }\n\n return (jsonObj as unknown) as EnumerationProps;\n }\n\n /**\n * Type checks KindOfQuantity and returns KindOfQuantityProps interface\n * @param jsonObj\n * @returns KindOfQuantityProps\n */\n public parseKindOfQuantity(jsonObj: UnknownObject): KindOfQuantityProps {\n this.checkSchemaItemProps(jsonObj);\n if (undefined === jsonObj.relativeError)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The KindOfQuantity ${this._currentItemFullName} is missing the required 'relativeError' attribute.`);\n if (typeof (jsonObj.relativeError) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The KindOfQuantity ${this._currentItemFullName} has an invalid 'relativeError' attribute. It should be of type 'number'.`);\n\n if (undefined !== jsonObj.presentationUnits) {\n if (!Array.isArray(jsonObj.presentationUnits) && typeof (jsonObj.presentationUnits) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The KindOfQuantity ${this._currentItemFullName} has an invalid 'presentationUnits' attribute. It should be of type 'string' or 'string[]'.`);\n }\n\n if (undefined === jsonObj.persistenceUnit)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The KindOfQuantity ${this._currentItemFullName} is missing the required 'persistenceUnit' attribute.`);\n if (typeof (jsonObj.persistenceUnit) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The KindOfQuantity ${this._currentItemFullName} has an invalid 'persistenceUnit' attribute. It should be of type 'string'.`);\n\n return (jsonObj as unknown) as KindOfQuantityProps;\n }\n\n /**\n * Type checks Property Category and returns PropertyCategoryProps interface\n * @param jsonObj\n * @returns PropertyCategoryProps\n */\n public parsePropertyCategory(jsonObj: UnknownObject): PropertyCategoryProps {\n this.checkSchemaItemProps(jsonObj);\n if (undefined !== jsonObj.priority) { // TODO: make required\n if (typeof (jsonObj.priority) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The PropertyCategory ${this._currentItemFullName} has an invalid 'priority' attribute. It should be of type 'number'.`);\n }\n\n return (jsonObj as unknown) as PropertyCategoryProps;\n }\n\n /**\n * Type checks unit and returns UnitProps interface\n * @param jsonObj\n * @returns UnitProps\n */\n public parseUnit(jsonObj: UnknownObject): SchemaItemUnitProps {\n this.checkSchemaItemProps(jsonObj);\n if (undefined === jsonObj.phenomenon)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} does not have the required 'phenomenon' attribute.`);\n if (typeof (jsonObj.phenomenon) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} has an invalid 'phenomenon' attribute. It should be of type 'string'.`);\n\n if (undefined === jsonObj.unitSystem)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} does not have the required 'unitSystem' attribute.`);\n if (typeof (jsonObj.unitSystem) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} has an invalid 'unitSystem' attribute. It should be of type 'string'.`);\n\n if (undefined === jsonObj.definition)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} does not have the required 'definition' attribute.`);\n if (typeof (jsonObj.definition) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} has an invalid 'definition' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.numerator) {\n if (typeof (jsonObj.numerator) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} has an invalid 'numerator' attribute. It should be of type 'number'.`);\n }\n\n if (undefined !== jsonObj.denominator) {\n if (typeof (jsonObj.denominator) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} has an invalid 'denominator' attribute. It should be of type 'number'.`);\n }\n\n if (undefined !== jsonObj.offset) {\n if (typeof (jsonObj.offset) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} has an invalid 'offset' attribute. It should be of type 'number'.`);\n }\n return (jsonObj as unknown) as SchemaItemUnitProps;\n }\n\n /**\n * Type checks inverted unit and returns InvertedUnitProps interface\n * @param jsonObj\n * @returns InvertedUnitProps\n */\n public parseInvertedUnit(jsonObj: UnknownObject): InvertedUnitProps {\n this.checkSchemaItemProps(jsonObj);\n if (undefined === jsonObj.invertsUnit)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The InvertedUnit ${this._currentItemFullName} does not have the required 'invertsUnit' attribute.`);\n if (typeof (jsonObj.invertsUnit) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The InvertedUnit ${this._currentItemFullName} has an invalid 'invertsUnit' attribute. It should be of type 'string'.`);\n\n if (undefined === jsonObj.unitSystem)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The InvertedUnit ${this._currentItemFullName} does not have the required 'unitSystem' attribute.`);\n if (typeof (jsonObj.unitSystem) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The InvertedUnit ${this._currentItemFullName} has an invalid 'unitSystem' attribute. It should be of type 'string'.`);\n\n return (jsonObj as unknown) as InvertedUnitProps;\n }\n\n /**\n * Type checks constant and returns ConstantProps interface\n * @param jsonObj\n * @returns ConstantProps\n */\n public parseConstant(jsonObj: UnknownObject): ConstantProps {\n this.checkSchemaItemProps(jsonObj);\n if (undefined === jsonObj.phenomenon)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Constant ${this._currentItemFullName} does not have the required 'phenomenon' attribute.`);\n if (typeof (jsonObj.phenomenon) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Constant ${this._currentItemFullName} has an invalid 'phenomenon' attribute. It should be of type 'string'.`);\n\n if (undefined === jsonObj.definition)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Constant ${this._currentItemFullName} does not have the required 'definition' attribute.`);\n if (typeof (jsonObj.definition) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Constant ${this._currentItemFullName} has an invalid 'definition' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.numerator) {\n if (typeof (jsonObj.numerator) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Constant ${this._currentItemFullName} has an invalid 'numerator' attribute. It should be of type 'number'.`);\n }\n\n if (undefined !== jsonObj.denominator) {\n if (typeof (jsonObj.denominator) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Constant ${this._currentItemFullName} has an invalid 'denominator' attribute. It should be of type 'number'.`);\n }\n\n return (jsonObj as unknown) as ConstantProps;\n }\n\n /**\n * Type checks phenomenon and returns PhenomenonProps interface\n * @param jsonObj\n * @returns PhenomenonProps\n */\n public parsePhenomenon(jsonObj: UnknownObject): PhenomenonProps {\n this.checkSchemaItemProps(jsonObj);\n if (undefined === jsonObj.definition)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Phenomenon ${this._currentItemFullName} does not have the required 'definition' attribute.`);\n if (typeof (jsonObj.definition) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Phenomenon ${this._currentItemFullName} has an invalid 'definition' attribute. It should be of type 'string'.`);\n return (jsonObj as unknown) as PhenomenonProps;\n }\n\n /**\n * Type checks format and returns SchemaItemFormatProps interface\n * @param jsonObj\n * @returns SchemaItemFormatProps\n */\n public parseFormat(jsonObj: UnknownObject): SchemaItemFormatProps {\n this.checkSchemaItemProps(jsonObj);\n if (undefined === jsonObj.type)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} does not have the required 'type' attribute.`);\n if (typeof (jsonObj.type) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'type' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.precision && typeof (jsonObj.precision) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'precision' attribute. It should be of type 'number'.`);\n\n if (undefined !== jsonObj.roundFactor && typeof (jsonObj.roundFactor) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'roundFactor' attribute. It should be of type 'number'.`);\n\n if (undefined !== jsonObj.minWidth && typeof (jsonObj.minWidth) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'minWidth' attribute. It should be of type 'number'.`);\n\n if (undefined !== jsonObj.showSignOption && typeof (jsonObj.showSignOption) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'showSignOption' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.formatTraits) {\n if (!Array.isArray(jsonObj.formatTraits) && typeof (jsonObj.formatTraits) !== \"string\") // must be either an array of strings or a string\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'formatTraits' attribute. It should be of type 'string' or 'string[]'.`);\n }\n\n if (undefined !== jsonObj.decimalSeparator && typeof (jsonObj.decimalSeparator) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'decimalSeparator' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.thousandSeparator && typeof (jsonObj.thousandSeparator) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'thousandSeparator' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.uomSeparator && typeof (jsonObj.uomSeparator) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'uomSeparator' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.scientificType && typeof (jsonObj.scientificType) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'scientificType' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.stationOffsetSize && typeof (jsonObj.stationOffsetSize) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'stationOffsetSize' attribute. It should be of type 'number'.`);\n\n if (undefined !== jsonObj.stationSeparator && typeof (jsonObj.stationSeparator) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'stationSeparator' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.composite) { // optional\n if (!isObject(jsonObj.composite))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'composite' object.`);\n if (undefined !== jsonObj.composite.includeZero && typeof (jsonObj.composite.includeZero) !== \"boolean\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has a Composite with an invalid 'includeZero' attribute. It should be of type 'boolean'.`);\n\n if (undefined !== jsonObj.composite.spacer && typeof (jsonObj.composite.spacer) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has a Composite with an invalid 'spacer' attribute. It should be of type 'string'.`);\n\n // if composite is defined\n if (undefined === jsonObj.composite.units)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'Composite' attribute. It should have 1-4 units.`);\n if (!Array.isArray(jsonObj.composite.units))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has a Composite with an invalid 'units' attribute. It should be of type 'object[]'.`);\n\n for (let i = 0; i < jsonObj.composite.units.length; i++) {\n if (!isObject(jsonObj.composite.units[i]))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has a Composite with an invalid 'units' attribute. It should be of type 'object[]'.`);\n\n if (undefined === jsonObj.composite.units[i].name) // required\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has a Composite with an invalid 'units' attribute. The object at position ${i} is missing the required 'name' attribute.`);\n if (typeof (jsonObj.composite.units[i].name) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has a Composite with an invalid 'units' attribute. The object at position ${i} has an invalid 'name' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.composite.units[i].label && typeof (jsonObj.composite.units[i].label) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has a Composite with an invalid 'units' attribute. The object at position ${i} has an invalid 'label' attribute. It should be of type 'string'.`);\n }\n }\n return (jsonObj as unknown) as SchemaItemFormatProps;\n }\n\n private isValidPropertyType(type: string): boolean {\n type = type.toLowerCase();\n return (type === \"primitiveproperty\") ||\n (type === \"structproperty\") ||\n (type === \"primitivearrayproperty\") ||\n (type === \"structarrayproperty\") ||\n (type === \"navigationproperty\");\n }\n\n /**\n * Type checks property and returns PropertyProps interface\n * @param jsonObj\n * @returns PropertyProps\n */\n private checkPropertyProps(jsonObj: UnknownObject): PropertyProps {\n const propName = jsonObj.name;\n\n if (undefined !== jsonObj.label && typeof (jsonObj.label) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'label' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.description && typeof (jsonObj.description) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'description' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.priority && typeof (jsonObj.priority) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'priority' attribute. It should be of type 'number'.`);\n\n if (undefined !== jsonObj.isReadOnly && typeof (jsonObj.isReadOnly) !== \"boolean\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'isReadOnly' attribute. It should be of type 'boolean'.`);\n\n if (undefined !== jsonObj.category && typeof (jsonObj.category) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'category' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.kindOfQuantity && typeof (jsonObj.kindOfQuantity) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'kindOfQuantity' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.inherited && typeof (jsonObj.inherited) !== \"boolean\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'inherited' attribute. It should be of type 'boolean'.`);\n\n if (undefined !== jsonObj.customAttributes && !Array.isArray(jsonObj.customAttributes))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'customAttributes' attribute. It should be of type 'array'.`);\n return (jsonObj as unknown) as PropertyProps;\n }\n\n private checkPropertyTypename(jsonObj: UnknownObject): void {\n const propName = jsonObj.name;\n if (undefined === jsonObj.typeName)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} is missing the required 'typeName' attribute.`);\n if (typeof (jsonObj.typeName) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'typeName' attribute. It should be of type 'string'.`);\n }\n\n private checkPropertyMinAndMaxOccurs(jsonObj: UnknownObject): void {\n const propName = jsonObj.name;\n if (undefined !== jsonObj.minOccurs && typeof (jsonObj.minOccurs) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'minOccurs' attribute. It should be of type 'number'.`);\n if (undefined !== jsonObj.maxOccurs && typeof (jsonObj.maxOccurs) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'maxOccurs' attribute. It should be of type 'number'.`);\n }\n\n /**\n * Type checks PrimitiveOrEnumProperty and returns PrimitiveOrEnumPropertyBaseProps interface\n * @param jsonObj\n * @returns PrimitiveOrEnumPropertyBaseProps\n */\n private checkPrimitiveOrEnumPropertyBaseProps(jsonObj: UnknownObject): PrimitiveOrEnumPropertyBaseProps {\n this.checkPropertyProps(jsonObj);\n this.checkPropertyTypename(jsonObj);\n const propName = jsonObj.name;\n\n if (undefined !== jsonObj.minLength && typeof (jsonObj.minLength) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'minLength' attribute. It should be of type 'number'.`);\n\n if (undefined !== jsonObj.maxLength && typeof (jsonObj.maxLength) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'maxLength' attribute. It should be of type 'number'.`);\n\n if (undefined !== jsonObj.minValue && typeof (jsonObj.minValue) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'minValue' attribute. It should be of type 'number'.`);\n\n if (undefined !== jsonObj.maxValue && typeof (jsonObj.maxValue) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'maxValue' attribute. It should be of type 'number'.`);\n\n if (undefined !== jsonObj.extendedTypeName && typeof (jsonObj.extendedTypeName) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'extendedTypeName' attribute. It should be of type 'string'.`);\n return (jsonObj as unknown) as PrimitiveOrEnumPropertyBaseProps;\n }\n\n /**\n * Type checks PrimitiveProperty and returns PrimitivePropertyProps interface\n * @param jsonObj\n * @returns PrimitivePropertyProps\n */\n public parsePrimitiveProperty(jsonObj: UnknownObject): PrimitivePropertyProps {\n this.checkPrimitiveOrEnumPropertyBaseProps(jsonObj);\n return (jsonObj as unknown) as PrimitivePropertyProps;\n }\n\n /**\n * Type checks StructProperty and returns StructPropertyProps interface\n * @param jsonObj\n * @returns StructPropertyProps\n */\n public parseStructProperty(jsonObj: UnknownObject): StructPropertyProps {\n this.checkPropertyProps(jsonObj);\n this.checkPropertyTypename(jsonObj);\n return (jsonObj as unknown) as StructPropertyProps;\n }\n\n /**\n * Type checks PrimitiveArrayProperty and returns PrimitiveArrayPropertyProps interface\n * @param jsonObj\n * @returns PrimitiveArrayPropertyProps\n */\n public parsePrimitiveArrayProperty(jsonObj: UnknownObject): PrimitiveArrayPropertyProps {\n this.checkPrimitiveOrEnumPropertyBaseProps(jsonObj);\n this.checkPropertyMinAndMaxOccurs(jsonObj);\n return (jsonObj as unknown) as PrimitiveArrayPropertyProps;\n }\n\n /**\n * Type checks StructArrayProperty and returns StructArrayPropertyProps interface\n * @param jsonObj\n * @returns StructArrayPropertyProps\n */\n public parseStructArrayProperty(jsonObj: UnknownObject): StructArrayPropertyProps {\n this.checkPropertyProps(jsonObj);\n this.checkPropertyTypename(jsonObj);\n this.checkPropertyMinAndMaxOccurs(jsonObj);\n return (jsonObj as unknown) as StructArrayPropertyProps;\n }\n\n /**\n * Type checks NavigationProperty and returns NavigationPropertyProps interface\n * @param jsonObj\n * @returns NavigationPropertyProps\n */\n public parseNavigationProperty(jsonObj: UnknownObject): NavigationPropertyProps {\n this.checkPropertyProps(jsonObj);\n const fullname = `${this._currentItemFullName}.${jsonObj.name}`;\n\n if (undefined === jsonObj.relationshipName)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Navigation Property ${fullname} is missing the required 'relationshipName' property.`);\n if (typeof (jsonObj.relationshipName) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Navigation Property ${fullname} has an invalid 'relationshipName' property. It should be of type 'string'.`);\n\n if (undefined === jsonObj.direction)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Navigation Property ${fullname} is missing the required 'direction' property.`);\n if (typeof (jsonObj.direction) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Navigation Property ${fullname} has an invalid 'direction' property. It should be of type 'string'.`);\n\n return (jsonObj as unknown) as NavigationPropertyProps;\n }\n\n public getSchemaCustomAttributeProviders(): Iterable<CAProviderTuple> {\n return this.getCustomAttributeProviders(this._rawSchema, \"Schema\", this._schemaName);\n }\n\n public getClassCustomAttributeProviders(jsonObj: UnknownObject): Iterable<CAProviderTuple> {\n return this.getCustomAttributeProviders(jsonObj, \"ECClass\", this._currentItemFullName);\n }\n\n public getPropertyCustomAttributeProviders(jsonObj: UnknownObject): Iterable<CAProviderTuple> {\n return this.getCustomAttributeProviders(jsonObj, \"ECProperty\", `${this._currentItemFullName}.${jsonObj.name}`);\n }\n\n public getRelationshipConstraintCustomAttributeProviders(jsonObj: UnknownObject): [Iterable<CAProviderTuple> /* source */, Iterable<CAProviderTuple> /* target */] {\n const sourceCustomAttributes = this.getCustomAttributeProviders(jsonObj.source as UnknownObject, \"Source Constraint of\", this._currentItemFullName);\n const targetCustomAttributes = this.getCustomAttributeProviders(jsonObj.target as UnknownObject, \"Target Constraint of\", this._currentItemFullName);\n return [sourceCustomAttributes, targetCustomAttributes];\n }\n\n private *getCustomAttributeProviders(jsonObj: UnknownObject, type: string, name?: string): Iterable<CAProviderTuple> {\n if (undefined !== jsonObj.customAttributes) {\n if (!Array.isArray(jsonObj.customAttributes))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${type} ${name} has an invalid 'customAttributes' attribute. It should be of type 'object[]'.`);\n\n for (const instance of jsonObj.customAttributes) {\n if (!isObject(instance) || Array.isArray(instance))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${type} ${name} has an invalid 'customAttributes' attribute. It should be of type 'object[]'.`);\n if (undefined === instance.className)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `A CustomAttribute in ${name}.customAttributes is missing the required 'className' attribute.`);\n if (typeof (instance.className) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `A CustomAttribute in ${name}.customAttributes has an invalid 'className' attribute. It should be of type 'string'.`);\n\n const provider = (_caClass: CustomAttributeClass) => {\n return instance as CustomAttribute;\n };\n\n const caTuple: CAProviderTuple = [instance.className, provider];\n yield caTuple;\n }\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"JsonParser.js","sourceRoot":"","sources":["../../../src/Deserialization/JsonParser.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG/D,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,cAAc,EAAmB,MAAM,kBAAkB,CAAC;AAOnE,OAAO,EAAiB,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG3D,SAAS,QAAQ,CAAC,CAAU;IAC1B,OAAO,OAAO,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC;AACjC,CAAC;AAED,MAAM,cAAc,GAAG,6CAA6C,CAAC;AAErE,gBAAgB;AAChB,MAAM,OAAO,UAAW,SAAQ,cAA6B;IACnD,UAAU,CAAgB;IAC1B,WAAW,C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C,CAAC;IAC1D,CAAC;IAEO,CAAC,2BAA2B,CAAC,OAAsB,EAAE,IAAY,EAAE,IAAa;QACtF,IAAI,SAAS,KAAK,OAAO,CAAC,gBAAgB,EAAE,CAAC;YAC3C,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,gBAAgB,CAAC;gBAC1C,MAAM,IAAI,cAAc,CAAC,eAAe,CAAC,aAAa,EAAE,OAAO,IAAI,IAAI,IAAI,gFAAgF,CAAC,CAAC;YAE/J,KAAK,MAAM,QAAQ,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC;gBAChD,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC;oBAChD,MAAM,IAAI,cAAc,CAAC,eAAe,CAAC,aAAa,EAAE,OAAO,IAAI,IAAI,IAAI,gFAAgF,CAAC,CAAC;gBAC/J,IAAI,SAAS,KAAK,QAAQ,CAAC,SAAS;oBAClC,MAAM,IAAI,cAAc,CAAC,eAAe,CAAC,aAAa,EAAE,wBAAwB,IAAI,kEAAkE,CAAC,CAAC;gBAC1J,IAAI,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,QAAQ;oBAC1C,MAAM,IAAI,cAAc,CAAC,eAAe,CAAC,aAAa,EAAE,wBAAwB,IAAI,wFAAwF,CAAC,CAAC;gBAEhL,MAAM,QAAQ,GAAG,CAAC,QAA8B,EAAE,EAAE;oBAClD,OAAO,QAA2B,CAAC;gBACrC,CAAC,CAAC;gBAEF,MAAM,OAAO,GAAoB,CAAC,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;gBAChE,MAAM,OAAO,CAAC;YAChB,CAAC;QACH,CAAC;IACH,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nimport { ECObjectsError, ECObjectsStatus } from \"../Exception\";\nimport { CustomAttribute } from \"../Metadata/CustomAttribute\";\nimport { CustomAttributeClass } from \"../Metadata/CustomAttributeClass\";\nimport { ECName } from \"../ECName\";\nimport { AbstractParser, CAProviderTuple } from \"./AbstractParser\";\nimport {\n ConstantProps, CustomAttributeClassProps, EntityClassProps, EnumerationProps, InvertedUnitProps, KindOfQuantityProps, MixinProps,\n NavigationPropertyProps, PhenomenonProps, PrimitiveArrayPropertyProps, PrimitiveOrEnumPropertyBaseProps, PrimitivePropertyProps,\n PropertyCategoryProps, PropertyProps, RelationshipClassProps, SchemaItemFormatProps, SchemaItemUnitProps, SchemaProps, SchemaReferenceProps, StructArrayPropertyProps, StructClassProps,\n StructPropertyProps, UnitSystemProps,\n} from \"./JsonProps\";\nimport { ECSpecVersion, SchemaReadHelper } from \"./Helper\";\n\ninterface UnknownObject { readonly [name: string]: unknown }\nfunction isObject(x: unknown): x is UnknownObject {\n return typeof (x) === \"object\";\n}\n\nconst SCHEMAURL_JSON = \"https://dev\\\\.bentley\\\\.com/json_schemas/ec\";\n\n/** @internal */\nexport class JsonParser extends AbstractParser<UnknownObject> {\n private _rawSchema: UnknownObject;\n private _schemaName?: string;\n private _currentItemFullName?: string;\n\n constructor(rawSchema: Readonly<unknown>) {\n super();\n\n if (!isObject(rawSchema))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `Invalid JSON object.`);\n\n this._rawSchema = rawSchema;\n this._schemaName = rawSchema.name as string | undefined;\n this._ecSpecVersion = JsonParser.parseJSUri(rawSchema.$schema as string);\n }\n\n public get getECSpecVersion(): ECSpecVersion | undefined { return this._ecSpecVersion; }\n\n public static parseJSUri(uri: string): ECSpecVersion | undefined {\n if (uri === undefined)\n return undefined;\n\n const match = uri.match(`^${SCHEMAURL_JSON}/([0-9]+)/ecschema$`);\n if (!match)\n return;\n\n const readVersion = parseInt(match[1][0], 10);\n const writeVersion = parseInt(match[1][1], 10);\n return { readVersion, writeVersion };\n }\n\n /**\n * Type checks Schema and returns SchemaProps interface\n * @param this._rawSchema\n * @returns SchemaProps\n */\n public parseSchema(): SchemaProps {\n if (undefined === this._rawSchema.name)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `An ECSchema is missing the required 'name' attribute.`);\n if (typeof (this._rawSchema.name) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `An ECSchema has an invalid 'name' attribute. It should be of type 'string'.`);\n\n if (undefined === this._rawSchema.$schema)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECSchema ${this._schemaName} is missing the required '$schema' attribute.`);\n if (typeof (this._rawSchema.$schema) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECSchema ${this._schemaName} has an invalid '$schema' attribute. It should be of type 'string'.`);\n\n if (undefined === this._rawSchema.version)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECSchema ${this._schemaName} is missing the required 'version' attribute.`);\n if (typeof (this._rawSchema.version) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECSchema ${this._schemaName} has an invalid 'version' attribute. It should be of type 'string'.`);\n\n if (undefined !== this._rawSchema.alias) {\n if (typeof (this._rawSchema.alias) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECSchema ${this._schemaName} has an invalid 'alias' attribute. It should be of type 'string'.`);\n }\n\n if (undefined !== this._rawSchema.label) {\n if (typeof (this._rawSchema.label) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECSchema ${this._schemaName} has an invalid 'label' attribute. It should be of type 'string'.`);\n }\n\n if (undefined !== this._rawSchema.description) {\n if (typeof (this._rawSchema.description) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECSchema ${this._schemaName} has an invalid 'description' attribute. It should be of type 'string'.`);\n }\n\n const ecVersions = JsonParser.parseJSUri(this._rawSchema.$schema);\n\n return {\n ...this._rawSchema,\n ecSpecMajorVersion: ecVersions?.readVersion,\n ecSpecMinorVersion: ecVersions?.writeVersion,\n } as SchemaProps;\n }\n\n public *getReferences(): Iterable<SchemaReferenceProps> {\n if (undefined !== this._rawSchema.references) {\n if (!Array.isArray(this._rawSchema.references))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema ${this._rawSchema.name} has an invalid 'references' attribute. It should be of type 'object[]'.`);\n\n for (const ref of this._rawSchema.references) {\n yield this.checkSchemaReference(ref);\n }\n }\n }\n\n private checkSchemaReference(jsonObj: Readonly<unknown>): SchemaReferenceProps {\n if (!isObject(jsonObj))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema ${this._schemaName} has an invalid 'references' attribute. It should be of type 'object[]'.`);\n if (undefined === jsonObj.name)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema ${this._schemaName} has an invalid 'references' attribute. One of the references is missing the required 'name' attribute.`);\n if (typeof (jsonObj.name) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema ${this._schemaName} has an invalid 'references' attribute. One of the references has an invalid 'name' attribute. It should be of type 'string'.`);\n if (undefined === jsonObj.version)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema ${this._schemaName} has an invalid 'references' attribute. One of the references is missing the required 'version' attribute.`);\n if (typeof (jsonObj.version) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema ${this._schemaName} has an invalid 'references' attribute. One of the references has an invalid 'version' attribute. It should be of type 'string'.`);\n return (jsonObj as unknown) as SchemaReferenceProps;\n }\n\n public *getItems(): Iterable<[string, string, UnknownObject]> {\n const items = this._rawSchema.items;\n if (undefined !== items) {\n if (!isObject(items) || Array.isArray(items))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema ${this._schemaName} has an invalid 'items' attribute. It should be of type 'object'.`);\n\n // eslint-disable-next-line guard-for-in\n for (const itemName in items) {\n const item = items[itemName];\n if (!isObject(item))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `A SchemaItem in ${this._schemaName} is an invalid JSON object.`);\n\n if (!ECName.validate(itemName))\n throw new ECObjectsError(ECObjectsStatus.InvalidECName, `A SchemaItem in ${this._schemaName} has an invalid 'name' attribute. '${itemName}' is not a valid ECName.`);\n\n if (undefined === item.schemaItemType)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The SchemaItem ${this._schemaName}.${itemName} is missing the required 'schemaItemType' attribute.`);\n if (typeof (item.schemaItemType) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The SchemaItem ${this._schemaName}.${itemName} has an invalid 'schemaItemType' attribute. It should be of type 'string'.`);\n\n this._currentItemFullName = `${this._schemaName}.${itemName}`;\n yield [itemName, item.schemaItemType, item];\n }\n }\n }\n\n public findItem(itemName: string): [string, string, UnknownObject] | undefined {\n const items = this._rawSchema.items;\n if (undefined !== items) {\n if (!isObject(items) || Array.isArray(items))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema ${this._schemaName} has an invalid 'items' attribute. It should be of type 'object'.`);\n\n const item = items[itemName];\n if (undefined !== item) {\n if (!isObject(item))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `A SchemaItem in ${this._schemaName} is an invalid JSON object.`);\n\n if (!ECName.validate(itemName))\n throw new ECObjectsError(ECObjectsStatus.InvalidECName, `A SchemaItem in ${this._schemaName} has an invalid 'name' attribute. '${itemName}' is not a valid ECName.`);\n\n if (undefined === item.schemaItemType)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The SchemaItem ${this._schemaName}.${itemName} is missing the required 'schemaItemType' attribute.`);\n if (typeof (item.schemaItemType) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The SchemaItem ${this._schemaName}.${itemName} has an invalid 'schemaItemType' attribute. It should be of type 'string'.`);\n\n this._currentItemFullName = `${this._schemaName}.${itemName}`;\n return [itemName, item.schemaItemType, item];\n }\n }\n\n return undefined;\n }\n\n /**\n * Type checks all Schema Item attributes.\n * @param jsonObj The JSON object to check if it represents a Schema Item.\n */\n private checkSchemaItemProps(jsonObj: UnknownObject): void {\n if (undefined !== jsonObj.description) {\n if (typeof (jsonObj.description) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The SchemaItem ${this._currentItemFullName} has an invalid 'description' attribute. It should be of type 'string'.`);\n }\n\n if (undefined !== jsonObj.label) {\n if (typeof (jsonObj.label) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The SchemaItem ${this._currentItemFullName} has an invalid 'label' attribute. It should be of type 'string'.`);\n }\n }\n\n public *getProperties(jsonObj: UnknownObject, itemName: string): Iterable<[string, string, UnknownObject]> {\n const properties = jsonObj.properties;\n if (undefined !== properties) {\n if (!Array.isArray(properties))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECClass ${itemName} has an invalid 'properties' attribute. It should be of type 'object[]'.`);\n\n for (const property of properties as unknown[]) {\n if (!isObject(property))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `An ECProperty in ${itemName} is an invalid JSON object.`);\n\n if (undefined === property.name)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `An ECProperty in ${itemName} is missing the required 'name' attribute.`);\n if (typeof (property.name) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `An ECProperty in ${itemName} has an invalid 'name' attribute. It should be of type 'string'.`);\n\n if (undefined === property.type)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${itemName}.${property.name} does not have the required 'type' attribute.`);\n if (typeof (property.type) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${itemName}.${property.name} has an invalid 'type' attribute. It should be of type 'string'.`);\n if (!this.isValidPropertyType(property.type)) {\n if (SchemaReadHelper.isECSpecVersionNewer(this._ecSpecVersion))\n return;\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${itemName}.${property.name} has an invalid 'type' attribute. '${property.type}' is not a valid type.`);\n }\n\n yield [property.name, property.type, property];\n }\n }\n }\n\n /**\n * Type checks Class and returns ClassProps interface\n * @param jsonObj The JSON object to check if it represents a Class.\n */\n private checkClassProps(jsonObj: UnknownObject): void {\n this.checkSchemaItemProps(jsonObj);\n\n if (undefined !== jsonObj.modifier) {\n if (typeof (jsonObj.modifier) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECClass ${this._currentItemFullName} has an invalid 'modifier' attribute. It should be of type 'string'.`);\n }\n\n if (undefined !== jsonObj.baseClass) {\n if (typeof (jsonObj.baseClass) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECClass ${this._currentItemFullName} has an invalid 'baseClass' attribute. It should be of type 'string'.`);\n }\n if (undefined !== jsonObj.customAttributes) {\n if (!Array.isArray(jsonObj.customAttributes)) {\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECClass ${this._currentItemFullName} has an invalid 'customAttributes' attribute. It should be of type 'array'.`);\n }\n }\n }\n\n /**\n * Type checks entity class and returns EntityClassProps interface\n * @param jsonObj\n * @returns EntityClassProps\n */\n public parseEntityClass(jsonObj: UnknownObject): EntityClassProps {\n this.checkClassProps(jsonObj);\n\n if (undefined !== jsonObj.mixins) {\n if (!Array.isArray(jsonObj.mixins))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECEntityClass ${this._currentItemFullName} has an invalid 'mixins' attribute. It should be of type 'string[]'.`);\n for (const mixinName of jsonObj.mixins) {\n if (typeof (mixinName) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECEntityClass ${this._currentItemFullName} has an invalid 'mixins' attribute. It should be of type 'string[]'.`);\n }\n }\n\n return {\n ...jsonObj,\n originalECSpecMajorVersion : this._ecSpecVersion?.readVersion,\n originalECSpecMinorVersion: this._ecSpecVersion?.writeVersion,\n } as unknown as EntityClassProps;\n }\n\n /**\n * Type checks mixin and returns MixinProps interface\n * @param jsonObj\n * @returns MixinProps\n */\n public parseMixin(jsonObj: UnknownObject): MixinProps {\n this.checkClassProps(jsonObj);\n if (undefined === jsonObj.appliesTo)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Mixin ${this._currentItemFullName} is missing the required 'appliesTo' attribute.`);\n if (typeof (jsonObj.appliesTo) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Mixin ${this._currentItemFullName} has an invalid 'appliesTo' attribute. It should be of type 'string'.`);\n return {\n ...jsonObj,\n originalECSpecMajorVersion: this._ecSpecVersion?.readVersion,\n originalECSpecMinorVersion: this._ecSpecVersion?.writeVersion,\n } as unknown as MixinProps;\n }\n\n /**\n * Type checks custom attribute class and returns CustomAttributeClassProps interface\n * @param jsonObj\n * @returns CustomAttributeClassProps\n */\n public parseCustomAttributeClass(jsonObj: UnknownObject): CustomAttributeClassProps {\n this.checkClassProps(jsonObj);\n if (undefined === jsonObj.appliesTo)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The CustomAttributeClass ${this._currentItemFullName} is missing the required 'appliesTo' attribute.`);\n if (typeof (jsonObj.appliesTo) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The CustomAttributeClass ${this._currentItemFullName} has an invalid 'appliesTo' attribute. It should be of type 'string'.`);\n return {\n ...jsonObj,\n originalECSpecMajorVersion: this._ecSpecVersion?.readVersion,\n originalECSpecMinorVersion: this._ecSpecVersion?.writeVersion,\n } as unknown as CustomAttributeClassProps;\n }\n\n public parseStructClass(jsonObj: UnknownObject): StructClassProps {\n this.checkClassProps(jsonObj);\n return {\n ...jsonObj,\n originalECSpecMajorVersion: this._ecSpecVersion?.readVersion,\n originalECSpecMinorVersion: this._ecSpecVersion?.writeVersion,\n } as unknown as StructClassProps;\n }\n\n public parseUnitSystem(jsonObj: UnknownObject): UnitSystemProps {\n this.checkSchemaItemProps(jsonObj);\n return jsonObj as UnitSystemProps;\n }\n\n /**\n * Type checks Relationship Class and returns RelationshipClassProps interface\n * @param jsonObj\n * @returns RelationshipClassProps\n */\n public parseRelationshipClass(jsonObj: UnknownObject): RelationshipClassProps {\n this.checkClassProps(jsonObj);\n if (undefined === jsonObj.strength)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} is missing the required 'strength' attribute.`);\n if (typeof (jsonObj.strength) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} has an invalid 'strength' attribute. It should be of type 'string'.`);\n\n if (undefined === jsonObj.strengthDirection)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} is missing the required 'strengthDirection' attribute.`);\n if (typeof (jsonObj.strengthDirection) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} has an invalid 'strengthDirection' attribute. It should be of type 'string'.`);\n\n if (undefined === jsonObj.source)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} is missing the required source constraint.`);\n if (!isObject(jsonObj.source))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} has an invalid source constraint. It should be of type 'object'.`);\n this.checkRelationshipConstraintProps(jsonObj.source, true);\n\n if (undefined === jsonObj.target)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} is missing the required target constraint.`);\n if (!isObject(jsonObj.target))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} has an invalid target constraint. It should be of type 'object'.`);\n this.checkRelationshipConstraintProps(jsonObj.target, false);\n\n return {\n ...jsonObj,\n originalECSpecMajorVersion: this._ecSpecVersion?.readVersion,\n originalECSpecMinorVersion: this._ecSpecVersion?.writeVersion,\n } as unknown as RelationshipClassProps;\n }\n\n /**\n * Type checks Relationship Constraint and returns RelationshipConstraintProps interface.\n * @param jsonObj\n * @param isSource For sake of error message, is this relationship constraint a source or target\n * @returns RelationshipConstraintProps\n */\n private checkRelationshipConstraintProps(jsonObj: UnknownObject, isSource: boolean): void {\n const constraintName = `${(isSource) ? \"Source\" : \"Target\"} Constraint of ${this._currentItemFullName}`; // most specific name to call RelationshipConstraint\n\n if (undefined === jsonObj.multiplicity)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} is missing the required 'multiplicity' attribute.`);\n if (typeof (jsonObj.multiplicity) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} has an invalid 'multiplicity' attribute. It should be of type 'string'.`);\n\n if (undefined === jsonObj.roleLabel)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} is missing the required 'roleLabel' attribute.`);\n if (typeof (jsonObj.roleLabel) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} has an invalid 'roleLabel' attribute. It should be of type 'string'.`);\n\n if (undefined === jsonObj.polymorphic)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} is missing the required 'polymorphic' attribute.`);\n if (typeof (jsonObj.polymorphic) !== \"boolean\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} has an invalid 'polymorphic' attribute. It should be of type 'boolean'.`);\n\n if (undefined !== jsonObj.abstractConstraint && typeof (jsonObj.abstractConstraint) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} has an invalid 'abstractConstraint' attribute. It should be of type 'string'.`);\n\n if (undefined === jsonObj.constraintClasses)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} is missing the required 'constraintClasses' attribute.`);\n if (!Array.isArray(jsonObj.constraintClasses))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} has an invalid 'constraintClasses' attribute. It should be of type 'string[]'.`);\n\n for (const constraintClassName of jsonObj.constraintClasses) {\n if (typeof (constraintClassName) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} has an invalid 'constraintClasses' attribute. It should be of type 'string[]'.`);\n }\n\n if (undefined !== jsonObj.customAttributes && !Array.isArray(jsonObj.customAttributes))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} has an invalid 'customAttributes' attribute. It should be of type 'array'.`);\n }\n\n /**\n * Type checks Enumeration and returns EnumerationProps interface\n * @param jsonObj\n * @returns EnumerationProps\n */\n public parseEnumeration(jsonObj: UnknownObject): EnumerationProps {\n this.checkSchemaItemProps(jsonObj);\n if (undefined === jsonObj.type)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} is missing the required 'type' attribute.`);\n if (typeof (jsonObj.type) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an invalid 'type' attribute. It should be of type 'string'.`);\n\n const isValidEnumerationType = (type: string): boolean => {\n type = type.toLowerCase();\n return (type === \"int\") ||\n (type === \"integer\") ||\n (type === \"string\");\n };\n if (!isValidEnumerationType(jsonObj.type)) {\n if (SchemaReadHelper.isECSpecVersionNewer(this._ecSpecVersion))\n (jsonObj as any).type = \"string\";\n else\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an invalid 'type' attribute. It should be either \"int\" or \"string\".`);\n }\n\n if (undefined !== jsonObj.isStrict) { // TODO: make required\n if (typeof (jsonObj.isStrict) !== \"boolean\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an invalid 'isStrict' attribute. It should be of type 'boolean'.`);\n }\n\n if (undefined === jsonObj.enumerators)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} is missing the required 'enumerators' attribute.`);\n if (!Array.isArray(jsonObj.enumerators))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an invalid 'enumerators' attribute. It should be of type 'object[]'.`);\n\n for (const enumerator of jsonObj.enumerators) {\n if (!isObject(enumerator))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an invalid 'enumerators' attribute. It should be of type 'object[]'.`);\n\n if (undefined === enumerator.value)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an enumerator that is missing the required attribute 'value'.`);\n\n // TODO: Should this really be handled here?\n const expectedType = jsonObj.type;\n const receivedType = (typeof (enumerator.value) === \"number\") ? \"int\" : typeof (enumerator.value);\n if (!expectedType.includes(receivedType)) // is receivedType a substring of expectedType? - easiest way to check \"int\" === \"int\" | \"integer\" && \"string\" === \"string\"\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an incompatible type. It must be \"${expectedType}\", not \"${receivedType}\".`);\n\n if (undefined === enumerator.name)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an enumerator that is missing the required attribute 'name'.`);\n if (typeof (enumerator.name) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an enumerator with an invalid 'name' attribute. It should be of type 'string'.`);\n\n if (undefined !== enumerator.label) {\n if (typeof (enumerator.label) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an enumerator with an invalid 'label' attribute. It should be of type 'string'.`);\n }\n\n if (undefined !== enumerator.description) {\n if (typeof (enumerator.description) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an enumerator with an invalid 'description' attribute. It should be of type 'string'.`);\n }\n }\n\n return (jsonObj as unknown) as EnumerationProps;\n }\n\n /**\n * Type checks KindOfQuantity and returns KindOfQuantityProps interface\n * @param jsonObj\n * @returns KindOfQuantityProps\n */\n public parseKindOfQuantity(jsonObj: UnknownObject): KindOfQuantityProps {\n this.checkSchemaItemProps(jsonObj);\n if (undefined === jsonObj.relativeError)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The KindOfQuantity ${this._currentItemFullName} is missing the required 'relativeError' attribute.`);\n if (typeof (jsonObj.relativeError) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The KindOfQuantity ${this._currentItemFullName} has an invalid 'relativeError' attribute. It should be of type 'number'.`);\n\n if (undefined !== jsonObj.presentationUnits) {\n if (!Array.isArray(jsonObj.presentationUnits) && typeof (jsonObj.presentationUnits) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The KindOfQuantity ${this._currentItemFullName} has an invalid 'presentationUnits' attribute. It should be of type 'string' or 'string[]'.`);\n }\n\n if (undefined === jsonObj.persistenceUnit)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The KindOfQuantity ${this._currentItemFullName} is missing the required 'persistenceUnit' attribute.`);\n if (typeof (jsonObj.persistenceUnit) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The KindOfQuantity ${this._currentItemFullName} has an invalid 'persistenceUnit' attribute. It should be of type 'string'.`);\n\n return (jsonObj as unknown) as KindOfQuantityProps;\n }\n\n /**\n * Type checks Property Category and returns PropertyCategoryProps interface\n * @param jsonObj\n * @returns PropertyCategoryProps\n */\n public parsePropertyCategory(jsonObj: UnknownObject): PropertyCategoryProps {\n this.checkSchemaItemProps(jsonObj);\n if (undefined !== jsonObj.priority) { // TODO: make required\n if (typeof (jsonObj.priority) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The PropertyCategory ${this._currentItemFullName} has an invalid 'priority' attribute. It should be of type 'number'.`);\n }\n\n return (jsonObj as unknown) as PropertyCategoryProps;\n }\n\n /**\n * Type checks unit and returns UnitProps interface\n * @param jsonObj\n * @returns UnitProps\n */\n public parseUnit(jsonObj: UnknownObject): SchemaItemUnitProps {\n this.checkSchemaItemProps(jsonObj);\n if (undefined === jsonObj.phenomenon)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} does not have the required 'phenomenon' attribute.`);\n if (typeof (jsonObj.phenomenon) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} has an invalid 'phenomenon' attribute. It should be of type 'string'.`);\n\n if (undefined === jsonObj.unitSystem)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} does not have the required 'unitSystem' attribute.`);\n if (typeof (jsonObj.unitSystem) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} has an invalid 'unitSystem' attribute. It should be of type 'string'.`);\n\n if (undefined === jsonObj.definition)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} does not have the required 'definition' attribute.`);\n if (typeof (jsonObj.definition) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} has an invalid 'definition' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.numerator) {\n if (typeof (jsonObj.numerator) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} has an invalid 'numerator' attribute. It should be of type 'number'.`);\n }\n\n if (undefined !== jsonObj.denominator) {\n if (typeof (jsonObj.denominator) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} has an invalid 'denominator' attribute. It should be of type 'number'.`);\n }\n\n if (undefined !== jsonObj.offset) {\n if (typeof (jsonObj.offset) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} has an invalid 'offset' attribute. It should be of type 'number'.`);\n }\n return (jsonObj as unknown) as SchemaItemUnitProps;\n }\n\n /**\n * Type checks inverted unit and returns InvertedUnitProps interface\n * @param jsonObj\n * @returns InvertedUnitProps\n */\n public parseInvertedUnit(jsonObj: UnknownObject): InvertedUnitProps {\n this.checkSchemaItemProps(jsonObj);\n if (undefined === jsonObj.invertsUnit)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The InvertedUnit ${this._currentItemFullName} does not have the required 'invertsUnit' attribute.`);\n if (typeof (jsonObj.invertsUnit) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The InvertedUnit ${this._currentItemFullName} has an invalid 'invertsUnit' attribute. It should be of type 'string'.`);\n\n if (undefined === jsonObj.unitSystem)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The InvertedUnit ${this._currentItemFullName} does not have the required 'unitSystem' attribute.`);\n if (typeof (jsonObj.unitSystem) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The InvertedUnit ${this._currentItemFullName} has an invalid 'unitSystem' attribute. It should be of type 'string'.`);\n\n return (jsonObj as unknown) as InvertedUnitProps;\n }\n\n /**\n * Type checks constant and returns ConstantProps interface\n * @param jsonObj\n * @returns ConstantProps\n */\n public parseConstant(jsonObj: UnknownObject): ConstantProps {\n this.checkSchemaItemProps(jsonObj);\n if (undefined === jsonObj.phenomenon)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Constant ${this._currentItemFullName} does not have the required 'phenomenon' attribute.`);\n if (typeof (jsonObj.phenomenon) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Constant ${this._currentItemFullName} has an invalid 'phenomenon' attribute. It should be of type 'string'.`);\n\n if (undefined === jsonObj.definition)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Constant ${this._currentItemFullName} does not have the required 'definition' attribute.`);\n if (typeof (jsonObj.definition) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Constant ${this._currentItemFullName} has an invalid 'definition' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.numerator) {\n if (typeof (jsonObj.numerator) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Constant ${this._currentItemFullName} has an invalid 'numerator' attribute. It should be of type 'number'.`);\n }\n\n if (undefined !== jsonObj.denominator) {\n if (typeof (jsonObj.denominator) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Constant ${this._currentItemFullName} has an invalid 'denominator' attribute. It should be of type 'number'.`);\n }\n\n return (jsonObj as unknown) as ConstantProps;\n }\n\n /**\n * Type checks phenomenon and returns PhenomenonProps interface\n * @param jsonObj\n * @returns PhenomenonProps\n */\n public parsePhenomenon(jsonObj: UnknownObject): PhenomenonProps {\n this.checkSchemaItemProps(jsonObj);\n if (undefined === jsonObj.definition)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Phenomenon ${this._currentItemFullName} does not have the required 'definition' attribute.`);\n if (typeof (jsonObj.definition) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Phenomenon ${this._currentItemFullName} has an invalid 'definition' attribute. It should be of type 'string'.`);\n return (jsonObj as unknown) as PhenomenonProps;\n }\n\n /**\n * Type checks format and returns SchemaItemFormatProps interface\n * @param jsonObj\n * @returns SchemaItemFormatProps\n */\n public parseFormat(jsonObj: UnknownObject): SchemaItemFormatProps {\n this.checkSchemaItemProps(jsonObj);\n if (undefined === jsonObj.type)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} does not have the required 'type' attribute.`);\n if (typeof (jsonObj.type) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'type' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.precision && typeof (jsonObj.precision) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'precision' attribute. It should be of type 'number'.`);\n\n if (undefined !== jsonObj.roundFactor && typeof (jsonObj.roundFactor) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'roundFactor' attribute. It should be of type 'number'.`);\n\n if (undefined !== jsonObj.minWidth && typeof (jsonObj.minWidth) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'minWidth' attribute. It should be of type 'number'.`);\n\n if (undefined !== jsonObj.showSignOption && typeof (jsonObj.showSignOption) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'showSignOption' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.formatTraits) {\n if (!Array.isArray(jsonObj.formatTraits) && typeof (jsonObj.formatTraits) !== \"string\") // must be either an array of strings or a string\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'formatTraits' attribute. It should be of type 'string' or 'string[]'.`);\n }\n\n if (undefined !== jsonObj.decimalSeparator && typeof (jsonObj.decimalSeparator) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'decimalSeparator' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.thousandSeparator && typeof (jsonObj.thousandSeparator) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'thousandSeparator' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.uomSeparator && typeof (jsonObj.uomSeparator) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'uomSeparator' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.scientificType && typeof (jsonObj.scientificType) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'scientificType' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.stationOffsetSize && typeof (jsonObj.stationOffsetSize) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'stationOffsetSize' attribute. It should be of type 'number'.`);\n\n if (undefined !== jsonObj.stationSeparator && typeof (jsonObj.stationSeparator) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'stationSeparator' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.composite) { // optional\n if (!isObject(jsonObj.composite))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'composite' object.`);\n if (undefined !== jsonObj.composite.includeZero && typeof (jsonObj.composite.includeZero) !== \"boolean\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has a Composite with an invalid 'includeZero' attribute. It should be of type 'boolean'.`);\n\n if (undefined !== jsonObj.composite.spacer && typeof (jsonObj.composite.spacer) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has a Composite with an invalid 'spacer' attribute. It should be of type 'string'.`);\n\n // if composite is defined\n if (undefined === jsonObj.composite.units)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'Composite' attribute. It should have 1-4 units.`);\n if (!Array.isArray(jsonObj.composite.units))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has a Composite with an invalid 'units' attribute. It should be of type 'object[]'.`);\n\n for (let i = 0; i < jsonObj.composite.units.length; i++) {\n if (!isObject(jsonObj.composite.units[i]))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has a Composite with an invalid 'units' attribute. It should be of type 'object[]'.`);\n\n if (undefined === jsonObj.composite.units[i].name) // required\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has a Composite with an invalid 'units' attribute. The object at position ${i} is missing the required 'name' attribute.`);\n if (typeof (jsonObj.composite.units[i].name) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has a Composite with an invalid 'units' attribute. The object at position ${i} has an invalid 'name' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.composite.units[i].label && typeof (jsonObj.composite.units[i].label) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has a Composite with an invalid 'units' attribute. The object at position ${i} has an invalid 'label' attribute. It should be of type 'string'.`);\n }\n }\n return (jsonObj as unknown) as SchemaItemFormatProps;\n }\n\n private isValidPropertyType(type: string): boolean {\n type = type.toLowerCase();\n return (type === \"primitiveproperty\") ||\n (type === \"structproperty\") ||\n (type === \"primitivearrayproperty\") ||\n (type === \"structarrayproperty\") ||\n (type === \"navigationproperty\");\n }\n\n /**\n * Type checks property and returns PropertyProps interface\n * @param jsonObj\n * @returns PropertyProps\n */\n private checkPropertyProps(jsonObj: UnknownObject): PropertyProps {\n const propName = jsonObj.name;\n\n if (undefined !== jsonObj.label && typeof (jsonObj.label) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'label' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.description && typeof (jsonObj.description) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'description' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.priority && typeof (jsonObj.priority) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'priority' attribute. It should be of type 'number'.`);\n\n if (undefined !== jsonObj.isReadOnly && typeof (jsonObj.isReadOnly) !== \"boolean\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'isReadOnly' attribute. It should be of type 'boolean'.`);\n\n if (undefined !== jsonObj.category && typeof (jsonObj.category) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'category' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.kindOfQuantity && typeof (jsonObj.kindOfQuantity) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'kindOfQuantity' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.inherited && typeof (jsonObj.inherited) !== \"boolean\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'inherited' attribute. It should be of type 'boolean'.`);\n\n if (undefined !== jsonObj.customAttributes && !Array.isArray(jsonObj.customAttributes))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'customAttributes' attribute. It should be of type 'array'.`);\n return (jsonObj as unknown) as PropertyProps;\n }\n\n private checkPropertyTypename(jsonObj: UnknownObject): void {\n const propName = jsonObj.name;\n if (undefined === jsonObj.typeName)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} is missing the required 'typeName' attribute.`);\n if (typeof (jsonObj.typeName) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'typeName' attribute. It should be of type 'string'.`);\n }\n\n private checkPropertyMinAndMaxOccurs(jsonObj: UnknownObject): void {\n const propName = jsonObj.name;\n if (undefined !== jsonObj.minOccurs && typeof (jsonObj.minOccurs) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'minOccurs' attribute. It should be of type 'number'.`);\n if (undefined !== jsonObj.maxOccurs && typeof (jsonObj.maxOccurs) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'maxOccurs' attribute. It should be of type 'number'.`);\n }\n\n /**\n * Type checks PrimitiveOrEnumProperty and returns PrimitiveOrEnumPropertyBaseProps interface\n * @param jsonObj\n * @returns PrimitiveOrEnumPropertyBaseProps\n */\n private checkPrimitiveOrEnumPropertyBaseProps(jsonObj: UnknownObject): PrimitiveOrEnumPropertyBaseProps {\n this.checkPropertyProps(jsonObj);\n this.checkPropertyTypename(jsonObj);\n const propName = jsonObj.name;\n\n if (undefined !== jsonObj.minLength && typeof (jsonObj.minLength) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'minLength' attribute. It should be of type 'number'.`);\n\n if (undefined !== jsonObj.maxLength && typeof (jsonObj.maxLength) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'maxLength' attribute. It should be of type 'number'.`);\n\n if (undefined !== jsonObj.minValue && typeof (jsonObj.minValue) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'minValue' attribute. It should be of type 'number'.`);\n\n if (undefined !== jsonObj.maxValue && typeof (jsonObj.maxValue) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'maxValue' attribute. It should be of type 'number'.`);\n\n if (undefined !== jsonObj.extendedTypeName && typeof (jsonObj.extendedTypeName) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'extendedTypeName' attribute. It should be of type 'string'.`);\n return (jsonObj as unknown) as PrimitiveOrEnumPropertyBaseProps;\n }\n\n /**\n * Type checks PrimitiveProperty and returns PrimitivePropertyProps interface\n * @param jsonObj\n * @returns PrimitivePropertyProps\n */\n public parsePrimitiveProperty(jsonObj: UnknownObject): PrimitivePropertyProps {\n this.checkPrimitiveOrEnumPropertyBaseProps(jsonObj);\n return (jsonObj as unknown) as PrimitivePropertyProps;\n }\n\n /**\n * Type checks StructProperty and returns StructPropertyProps interface\n * @param jsonObj\n * @returns StructPropertyProps\n */\n public parseStructProperty(jsonObj: UnknownObject): StructPropertyProps {\n this.checkPropertyProps(jsonObj);\n this.checkPropertyTypename(jsonObj);\n return (jsonObj as unknown) as StructPropertyProps;\n }\n\n /**\n * Type checks PrimitiveArrayProperty and returns PrimitiveArrayPropertyProps interface\n * @param jsonObj\n * @returns PrimitiveArrayPropertyProps\n */\n public parsePrimitiveArrayProperty(jsonObj: UnknownObject): PrimitiveArrayPropertyProps {\n this.checkPrimitiveOrEnumPropertyBaseProps(jsonObj);\n this.checkPropertyMinAndMaxOccurs(jsonObj);\n return (jsonObj as unknown) as PrimitiveArrayPropertyProps;\n }\n\n /**\n * Type checks StructArrayProperty and returns StructArrayPropertyProps interface\n * @param jsonObj\n * @returns StructArrayPropertyProps\n */\n public parseStructArrayProperty(jsonObj: UnknownObject): StructArrayPropertyProps {\n this.checkPropertyProps(jsonObj);\n this.checkPropertyTypename(jsonObj);\n this.checkPropertyMinAndMaxOccurs(jsonObj);\n return (jsonObj as unknown) as StructArrayPropertyProps;\n }\n\n /**\n * Type checks NavigationProperty and returns NavigationPropertyProps interface\n * @param jsonObj\n * @returns NavigationPropertyProps\n */\n public parseNavigationProperty(jsonObj: UnknownObject): NavigationPropertyProps {\n this.checkPropertyProps(jsonObj);\n const fullname = `${this._currentItemFullName}.${jsonObj.name}`;\n\n if (undefined === jsonObj.relationshipName)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Navigation Property ${fullname} is missing the required 'relationshipName' property.`);\n if (typeof (jsonObj.relationshipName) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Navigation Property ${fullname} has an invalid 'relationshipName' property. It should be of type 'string'.`);\n\n if (undefined === jsonObj.direction)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Navigation Property ${fullname} is missing the required 'direction' property.`);\n if (typeof (jsonObj.direction) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Navigation Property ${fullname} has an invalid 'direction' property. It should be of type 'string'.`);\n\n return (jsonObj as unknown) as NavigationPropertyProps;\n }\n\n public getSchemaCustomAttributeProviders(): Iterable<CAProviderTuple> {\n return this.getCustomAttributeProviders(this._rawSchema, \"Schema\", this._schemaName);\n }\n\n public getClassCustomAttributeProviders(jsonObj: UnknownObject): Iterable<CAProviderTuple> {\n return this.getCustomAttributeProviders(jsonObj, \"ECClass\", this._currentItemFullName);\n }\n\n public getPropertyCustomAttributeProviders(jsonObj: UnknownObject): Iterable<CAProviderTuple> {\n return this.getCustomAttributeProviders(jsonObj, \"ECProperty\", `${this._currentItemFullName}.${jsonObj.name}`);\n }\n\n public getRelationshipConstraintCustomAttributeProviders(jsonObj: UnknownObject): [Iterable<CAProviderTuple> /* source */, Iterable<CAProviderTuple> /* target */] {\n const sourceCustomAttributes = this.getCustomAttributeProviders(jsonObj.source as UnknownObject, \"Source Constraint of\", this._currentItemFullName);\n const targetCustomAttributes = this.getCustomAttributeProviders(jsonObj.target as UnknownObject, \"Target Constraint of\", this._currentItemFullName);\n return [sourceCustomAttributes, targetCustomAttributes];\n }\n\n private *getCustomAttributeProviders(jsonObj: UnknownObject, type: string, name?: string): Iterable<CAProviderTuple> {\n if (undefined !== jsonObj.customAttributes) {\n if (!Array.isArray(jsonObj.customAttributes))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${type} ${name} has an invalid 'customAttributes' attribute. It should be of type 'object[]'.`);\n\n for (const instance of jsonObj.customAttributes) {\n if (!isObject(instance) || Array.isArray(instance))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${type} ${name} has an invalid 'customAttributes' attribute. It should be of type 'object[]'.`);\n if (undefined === instance.className)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `A CustomAttribute in ${name}.customAttributes is missing the required 'className' attribute.`);\n if (typeof (instance.className) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `A CustomAttribute in ${name}.customAttributes has an invalid 'className' attribute. It should be of type 'string'.`);\n\n const provider = (_caClass: CustomAttributeClass) => {\n return instance as CustomAttribute;\n };\n\n const caTuple: CAProviderTuple = [instance.className, provider];\n yield caTuple;\n }\n }\n }\n}\n"]}
|
|
@@ -124,6 +124,9 @@ export interface RelationshipConstraintProps {
|
|
|
124
124
|
readonly polymorphic: boolean;
|
|
125
125
|
readonly abstractConstraint?: string;
|
|
126
126
|
readonly constraintClasses: string[];
|
|
127
|
+
readonly customAttributes?: Array<{
|
|
128
|
+
[value: string]: any;
|
|
129
|
+
}>;
|
|
127
130
|
}
|
|
128
131
|
/**
|
|
129
132
|
* @beta
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JsonProps.d.ts","sourceRoot":"","sources":["../../../src/Deserialization/JsonProps.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,sBAAsB,GAAG,mBAAmB,GAAG,2BAA2B,GAAG,wBAAwB,GAAG,uBAAuB,CAAC;AAC/J;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,gBAAgB,GAAG,UAAU,GAAG,yBAAyB,GAAG,sBAAsB,CAAC;AAC/G;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,aAAa,GAAG,gBAAgB,GAAG,mBAAmB,GAAG,qBAAqB,GAAG,mBAAmB,GAAG,iBAAiB,GAAG,aAAa,GAAG,eAAe,GAAG,qBAAqB,GAAG,6BAA6B,CAAC;AAEpP;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM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@@
|
|
|
1
|
-
{"version":3,"file":"JsonProps.js","sourceRoot":"","sources":["../../../src/Deserialization/JsonProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Metadata\n */\n\nimport { FormatProps } from \"@itwin/core-quantity\";\n\n/**\n * @beta\n */\nexport type AnyPropertyProps = PrimitivePropertyProps | StructPropertyProps | PrimitiveArrayPropertyProps | StructArrayPropertyProps | NavigationPropertyProps;\n/**\n * @beta\n */\nexport type AnyClassProps = EntityClassProps | MixinProps | CustomAttributeClassProps | RelationshipClassProps;\n/**\n * @beta\n */\nexport type AnySchemaItemProps = AnyClassProps | EnumerationProps | KindOfQuantityProps | PropertyCategoryProps | SchemaItemUnitProps | InvertedUnitProps | ConstantProps | PhenomenonProps | SchemaItemFormatProps | SchemaItemOverrideFormatProps;\n\n/**\n * @beta\n */\nexport interface SchemaProps {\n readonly $schema: string;\n readonly name: string;\n readonly version: string;\n readonly alias: string;\n readonly label?: string;\n readonly description?: string;\n readonly references?: SchemaReferenceProps[];\n readonly items?: { [name: string]: SchemaItemProps };\n readonly customAttributes?: Array<{ [value: string]: any }>;\n readonly ecSpecMajorVersion?: number;\n readonly ecSpecMinorVersion?: number;\n}\n\n/**\n * JSON Object interface used to deserialize into a [[SchemaKey]].\n * @beta\n */\nexport interface SchemaKeyProps {\n /** The schema name */\n readonly name: string;\n /** Read version of the schema */\n readonly read: number;\n /** Write version of the schema */\n readonly write: number;\n /** Minor version of the schema */\n readonly minor: number;\n}\n\n/**\n * @beta\n */\nexport interface SchemaReferenceProps {\n readonly name: string;\n readonly version: string;\n}\n\n/**\n * @beta\n */\nexport interface SchemaItemProps {\n // NEEDSWORK: Still need to clarify how single-item deserialization works...\n readonly $schema?: string;\n readonly schema?: string; // conditionally required\n readonly schemaVersion?: string;\n readonly name?: string;\n readonly schemaItemType?: string;\n readonly label?: string;\n readonly description?: string;\n readonly customAttributes?: Array<{ [value: string]: any }>;\n readonly originalECSpecMajorVersion?: number;\n readonly originalECSpecMinorVersion?: number;\n}\n\n/**\n * @beta\n */\nexport interface ClassProps extends SchemaItemProps {\n readonly modifier?: string;\n readonly baseClass?: string;\n readonly properties?: AnyPropertyProps[];\n}\n\n/**\n * @beta\n */\nexport interface EntityClassProps extends ClassProps {\n readonly mixins?: string[];\n}\n\n/**\n * @beta\n */\nexport interface MixinProps extends ClassProps {\n readonly appliesTo: string;\n}\n\n/**\n * @beta\n */\nexport type StructClassProps = ClassProps;\n\n/**\n * @beta\n */\nexport interface CustomAttributeClassProps extends ClassProps {\n /**\n * Can be any combination of the [CustomAttributeContainerType]$(docs/bis/ec/customattribute-container-types.md) string values\n * separated by commas.\n */\n readonly appliesTo: string;\n}\n\n/**\n * @beta\n */\nexport interface RelationshipClassProps extends ClassProps {\n readonly strength: string;\n readonly strengthDirection: string;\n readonly source: RelationshipConstraintProps;\n readonly target: RelationshipConstraintProps;\n}\n\n/**\n * @beta\n */\nexport interface RelationshipConstraintProps {\n readonly multiplicity: string;\n readonly roleLabel: string;\n readonly polymorphic: boolean;\n readonly abstractConstraint?: string;\n readonly constraintClasses: string[];\n}\n\n/**\n * @beta\n */\nexport interface EnumerationProps extends SchemaItemProps {\n readonly type: string;\n readonly isStrict: boolean;\n readonly enumerators: EnumeratorProps[];\n}\n\n/**\n * @beta\n */\nexport interface EnumeratorProps {\n readonly name: string;\n readonly value: string | number;\n readonly label?: string;\n readonly description?: string;\n}\n\n/**\n * @beta\n */\nexport interface KindOfQuantityProps extends SchemaItemProps {\n readonly persistenceUnit: string;\n readonly presentationUnits?: string | string[];\n readonly relativeError: number;\n}\n\n/**\n * @beta\n */\nexport interface PropertyCategoryProps extends SchemaItemProps {\n readonly priority: number;\n}\n\n/**\n * @beta\n */\nexport interface PropertyProps {\n readonly name: string;\n readonly type: string;\n readonly description?: string;\n readonly label?: string;\n readonly isReadOnly?: boolean;\n readonly category?: string;\n readonly priority?: number;\n readonly inherited?: boolean;\n readonly kindOfQuantity?: string;\n readonly customAttributes?: Array<{ [value: string]: any }>;\n}\n\n/**\n * @beta\n */\nexport interface PrimitiveOrEnumPropertyBaseProps extends PropertyProps {\n readonly extendedTypeName?: string;\n readonly minLength?: number;\n readonly maxLength?: number;\n readonly minValue?: number;\n readonly maxValue?: number;\n}\n\n/**\n * @beta\n */\nexport interface PrimitivePropertyProps extends PrimitiveOrEnumPropertyBaseProps {\n readonly typeName: string;\n}\n\n/**\n * @beta\n */\nexport interface StructPropertyProps extends PropertyProps {\n readonly typeName: string;\n}\n\n/**\n * @beta\n */\nexport interface EnumerationPropertyProps extends PrimitiveOrEnumPropertyBaseProps {\n readonly typeName: string;\n}\n\n/**\n * @beta\n */\nexport interface ArrayPropertyProps extends PrimitiveOrEnumPropertyBaseProps {\n readonly minOccurs?: number;\n readonly maxOccurs?: number;\n}\n\n/**\n * @beta\n */\nexport interface PrimitiveArrayPropertyProps extends ArrayPropertyProps {\n readonly typeName: string;\n}\n\n/**\n * @beta\n */\nexport interface StructArrayPropertyProps extends ArrayPropertyProps {\n readonly typeName: string;\n}\n\n/**\n * @beta\n */\nexport interface NavigationPropertyProps extends PropertyProps {\n readonly relationshipName: string;\n readonly direction: string;\n}\n\n/**\n * @beta\n */\nexport interface ConstantProps extends SchemaItemProps {\n readonly phenomenon: string;\n readonly definition: string;\n readonly numerator?: number;\n readonly denominator?: number;\n}\n\n/**\n * @beta\n */\nexport type SchemaItemFormatProps = SchemaItemProps & FormatProps;\n\n/**\n * @beta\n */\nexport interface SchemaItemOverrideFormatProps extends SchemaItemFormatProps {\n readonly parent: string;\n}\n\n/**\n * @beta\n */\nexport interface InvertedUnitProps extends SchemaItemProps {\n readonly invertsUnit: string;\n readonly unitSystem: string;\n}\n\n/**\n * @beta\n */\nexport interface PhenomenonProps extends SchemaItemProps {\n readonly definition: string;\n}\n\n/**\n * @beta\n */\nexport type UnitSystemProps = SchemaItemProps;\n\n/**\n * @beta\n */\nexport interface SchemaItemUnitProps extends SchemaItemProps {\n readonly phenomenon: string;\n readonly unitSystem: string;\n readonly definition: string;\n readonly numerator?: number;\n readonly denominator?: number;\n readonly offset?: number;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"JsonProps.js","sourceRoot":"","sources":["../../../src/Deserialization/JsonProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Metadata\n */\n\nimport { FormatProps } from \"@itwin/core-quantity\";\n\n/**\n * @beta\n */\nexport type AnyPropertyProps = PrimitivePropertyProps | StructPropertyProps | PrimitiveArrayPropertyProps | StructArrayPropertyProps | NavigationPropertyProps;\n/**\n * @beta\n */\nexport type AnyClassProps = EntityClassProps | MixinProps | CustomAttributeClassProps | RelationshipClassProps;\n/**\n * @beta\n */\nexport type AnySchemaItemProps = AnyClassProps | EnumerationProps | KindOfQuantityProps | PropertyCategoryProps | SchemaItemUnitProps | InvertedUnitProps | ConstantProps | PhenomenonProps | SchemaItemFormatProps | SchemaItemOverrideFormatProps;\n\n/**\n * @beta\n */\nexport interface SchemaProps {\n readonly $schema: string;\n readonly name: string;\n readonly version: string;\n readonly alias: string;\n readonly label?: string;\n readonly description?: string;\n readonly references?: SchemaReferenceProps[];\n readonly items?: { [name: string]: SchemaItemProps };\n readonly customAttributes?: Array<{ [value: string]: any }>;\n readonly ecSpecMajorVersion?: number;\n readonly ecSpecMinorVersion?: number;\n}\n\n/**\n * JSON Object interface used to deserialize into a [[SchemaKey]].\n * @beta\n */\nexport interface SchemaKeyProps {\n /** The schema name */\n readonly name: string;\n /** Read version of the schema */\n readonly read: number;\n /** Write version of the schema */\n readonly write: number;\n /** Minor version of the schema */\n readonly minor: number;\n}\n\n/**\n * @beta\n */\nexport interface SchemaReferenceProps {\n readonly name: string;\n readonly version: string;\n}\n\n/**\n * @beta\n */\nexport interface SchemaItemProps {\n // NEEDSWORK: Still need to clarify how single-item deserialization works...\n readonly $schema?: string;\n readonly schema?: string; // conditionally required\n readonly schemaVersion?: string;\n readonly name?: string;\n readonly schemaItemType?: string;\n readonly label?: string;\n readonly description?: string;\n readonly customAttributes?: Array<{ [value: string]: any }>;\n readonly originalECSpecMajorVersion?: number;\n readonly originalECSpecMinorVersion?: number;\n}\n\n/**\n * @beta\n */\nexport interface ClassProps extends SchemaItemProps {\n readonly modifier?: string;\n readonly baseClass?: string;\n readonly properties?: AnyPropertyProps[];\n}\n\n/**\n * @beta\n */\nexport interface EntityClassProps extends ClassProps {\n readonly mixins?: string[];\n}\n\n/**\n * @beta\n */\nexport interface MixinProps extends ClassProps {\n readonly appliesTo: string;\n}\n\n/**\n * @beta\n */\nexport type StructClassProps = ClassProps;\n\n/**\n * @beta\n */\nexport interface CustomAttributeClassProps extends ClassProps {\n /**\n * Can be any combination of the [CustomAttributeContainerType]$(docs/bis/ec/customattribute-container-types.md) string values\n * separated by commas.\n */\n readonly appliesTo: string;\n}\n\n/**\n * @beta\n */\nexport interface RelationshipClassProps extends ClassProps {\n readonly strength: string;\n readonly strengthDirection: string;\n readonly source: RelationshipConstraintProps;\n readonly target: RelationshipConstraintProps;\n}\n\n/**\n * @beta\n */\nexport interface RelationshipConstraintProps {\n readonly multiplicity: string;\n readonly roleLabel: string;\n readonly polymorphic: boolean;\n readonly abstractConstraint?: string;\n readonly constraintClasses: string[];\n readonly customAttributes?: Array<{ [value: string]: any }>;\n}\n\n/**\n * @beta\n */\nexport interface EnumerationProps extends SchemaItemProps {\n readonly type: string;\n readonly isStrict: boolean;\n readonly enumerators: EnumeratorProps[];\n}\n\n/**\n * @beta\n */\nexport interface EnumeratorProps {\n readonly name: string;\n readonly value: string | number;\n readonly label?: string;\n readonly description?: string;\n}\n\n/**\n * @beta\n */\nexport interface KindOfQuantityProps extends SchemaItemProps {\n readonly persistenceUnit: string;\n readonly presentationUnits?: string | string[];\n readonly relativeError: number;\n}\n\n/**\n * @beta\n */\nexport interface PropertyCategoryProps extends SchemaItemProps {\n readonly priority: number;\n}\n\n/**\n * @beta\n */\nexport interface PropertyProps {\n readonly name: string;\n readonly type: string;\n readonly description?: string;\n readonly label?: string;\n readonly isReadOnly?: boolean;\n readonly category?: string;\n readonly priority?: number;\n readonly inherited?: boolean;\n readonly kindOfQuantity?: string;\n readonly customAttributes?: Array<{ [value: string]: any }>;\n}\n\n/**\n * @beta\n */\nexport interface PrimitiveOrEnumPropertyBaseProps extends PropertyProps {\n readonly extendedTypeName?: string;\n readonly minLength?: number;\n readonly maxLength?: number;\n readonly minValue?: number;\n readonly maxValue?: number;\n}\n\n/**\n * @beta\n */\nexport interface PrimitivePropertyProps extends PrimitiveOrEnumPropertyBaseProps {\n readonly typeName: string;\n}\n\n/**\n * @beta\n */\nexport interface StructPropertyProps extends PropertyProps {\n readonly typeName: string;\n}\n\n/**\n * @beta\n */\nexport interface EnumerationPropertyProps extends PrimitiveOrEnumPropertyBaseProps {\n readonly typeName: string;\n}\n\n/**\n * @beta\n */\nexport interface ArrayPropertyProps extends PrimitiveOrEnumPropertyBaseProps {\n readonly minOccurs?: number;\n readonly maxOccurs?: number;\n}\n\n/**\n * @beta\n */\nexport interface PrimitiveArrayPropertyProps extends ArrayPropertyProps {\n readonly typeName: string;\n}\n\n/**\n * @beta\n */\nexport interface StructArrayPropertyProps extends ArrayPropertyProps {\n readonly typeName: string;\n}\n\n/**\n * @beta\n */\nexport interface NavigationPropertyProps extends PropertyProps {\n readonly relationshipName: string;\n readonly direction: string;\n}\n\n/**\n * @beta\n */\nexport interface ConstantProps extends SchemaItemProps {\n readonly phenomenon: string;\n readonly definition: string;\n readonly numerator?: number;\n readonly denominator?: number;\n}\n\n/**\n * @beta\n */\nexport type SchemaItemFormatProps = SchemaItemProps & FormatProps;\n\n/**\n * @beta\n */\nexport interface SchemaItemOverrideFormatProps extends SchemaItemFormatProps {\n readonly parent: string;\n}\n\n/**\n * @beta\n */\nexport interface InvertedUnitProps extends SchemaItemProps {\n readonly invertsUnit: string;\n readonly unitSystem: string;\n}\n\n/**\n * @beta\n */\nexport interface PhenomenonProps extends SchemaItemProps {\n readonly definition: string;\n}\n\n/**\n * @beta\n */\nexport type UnitSystemProps = SchemaItemProps;\n\n/**\n * @beta\n */\nexport interface SchemaItemUnitProps extends SchemaItemProps {\n readonly phenomenon: string;\n readonly unitSystem: string;\n readonly definition: string;\n readonly numerator?: number;\n readonly denominator?: number;\n readonly offset?: number;\n}\n"]}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { assert } from "@itwin/core-bentley";
|
|
6
6
|
import { parsePrimitiveType, PrimitiveType, primitiveTypeToString, StrengthDirection, strengthDirectionToString } from "../ECObjects";
|
|
7
7
|
import { ECObjectsError, ECObjectsStatus } from "../Exception";
|
|
8
|
+
import { Enumeration } from "../Metadata/Enumeration";
|
|
8
9
|
import { ECName } from "../ECName";
|
|
9
10
|
import { AbstractParser } from "./AbstractParser";
|
|
10
11
|
import { SchemaReadHelper } from "./Helper";
|
|
@@ -12,6 +13,15 @@ const NON_ITEM_SCHEMA_ELEMENTS = ["ECSchemaReference", "ECCustomAttributes"];
|
|
|
12
13
|
const ECXML_URI = "http://www\\.bentley\\.com/schemas/Bentley\\.ECXML";
|
|
13
14
|
/** @internal */
|
|
14
15
|
export class XmlParser extends AbstractParser {
|
|
16
|
+
_rawSchema;
|
|
17
|
+
_schemaName;
|
|
18
|
+
_schemaReferenceNames;
|
|
19
|
+
_schemaAlias;
|
|
20
|
+
_schemaVersion;
|
|
21
|
+
_xmlNamespace;
|
|
22
|
+
_currentItemFullName;
|
|
23
|
+
_schemaItems;
|
|
24
|
+
_mapIsPopulated;
|
|
15
25
|
constructor(rawSchema) {
|
|
16
26
|
super();
|
|
17
27
|
this._rawSchema = rawSchema;
|
|
@@ -801,7 +811,7 @@ export class XmlParser extends AbstractParser {
|
|
|
801
811
|
let enumeration;
|
|
802
812
|
if (propertyClass.isPrimitive()) {
|
|
803
813
|
if (propertyClass.isEnumeration() && propertyClass.enumeration) {
|
|
804
|
-
enumeration = propertyClass.schema.lookupItemSync(propertyClass.enumeration.fullName);
|
|
814
|
+
enumeration = propertyClass.schema.lookupItemSync(propertyClass.enumeration.fullName, Enumeration);
|
|
805
815
|
if (!enumeration)
|
|
806
816
|
throw new ECObjectsError(ECObjectsStatus.ClassNotFound, `The Enumeration class '${propertyClass.enumeration.fullName}' could not be found.`);
|
|
807
817
|
}
|