@itwin/ecschema-metadata 5.2.0-dev.8 → 5.3.0-dev.1
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 +31 -1
- package/lib/cjs/Deserialization/JsonProps.d.ts +9 -2
- package/lib/cjs/Deserialization/JsonProps.d.ts.map +1 -1
- package/lib/cjs/Deserialization/JsonProps.js.map +1 -1
- package/lib/cjs/Formatting/FormatSetFormatsProvider.d.ts +37 -0
- package/lib/cjs/Formatting/FormatSetFormatsProvider.d.ts.map +1 -0
- package/lib/cjs/Formatting/FormatSetFormatsProvider.js +58 -0
- package/lib/cjs/Formatting/FormatSetFormatsProvider.js.map +1 -0
- package/lib/cjs/{SchemaFormatsProvider.d.ts → Formatting/SchemaFormatsProvider.d.ts} +1 -1
- package/lib/cjs/Formatting/SchemaFormatsProvider.d.ts.map +1 -0
- package/lib/cjs/{SchemaFormatsProvider.js → Formatting/SchemaFormatsProvider.js} +6 -6
- package/lib/cjs/Formatting/SchemaFormatsProvider.js.map +1 -0
- package/lib/cjs/IncrementalLoading/ECSqlSchemaLocater.d.ts +18 -24
- package/lib/cjs/IncrementalLoading/ECSqlSchemaLocater.d.ts.map +1 -1
- package/lib/cjs/IncrementalLoading/ECSqlSchemaLocater.js +62 -34
- package/lib/cjs/IncrementalLoading/ECSqlSchemaLocater.js.map +1 -1
- package/lib/cjs/IncrementalLoading/FullSchemaQueries.d.ts.map +1 -1
- package/lib/cjs/IncrementalLoading/FullSchemaQueries.js +1 -0
- package/lib/cjs/IncrementalLoading/FullSchemaQueries.js.map +1 -1
- package/lib/cjs/IncrementalLoading/IncrementalSchemaLocater.d.ts +20 -3
- package/lib/cjs/IncrementalLoading/IncrementalSchemaLocater.d.ts.map +1 -1
- package/lib/cjs/IncrementalLoading/IncrementalSchemaLocater.js +7 -4
- package/lib/cjs/IncrementalLoading/IncrementalSchemaLocater.js.map +1 -1
- package/lib/cjs/IncrementalLoading/IncrementalSchemaReader.d.ts.map +1 -1
- package/lib/cjs/IncrementalLoading/IncrementalSchemaReader.js +2 -7
- package/lib/cjs/IncrementalLoading/IncrementalSchemaReader.js.map +1 -1
- package/lib/cjs/IncrementalLoading/SchemaItemParsers.d.ts +4 -4
- package/lib/cjs/IncrementalLoading/SchemaItemParsers.d.ts.map +1 -1
- package/lib/cjs/IncrementalLoading/SchemaItemParsers.js +17 -17
- package/lib/cjs/IncrementalLoading/SchemaItemParsers.js.map +1 -1
- package/lib/cjs/IncrementalLoading/SchemaItemQueries.js +4 -4
- package/lib/cjs/IncrementalLoading/SchemaItemQueries.js.map +1 -1
- package/lib/cjs/IncrementalLoading/SchemaParser.d.ts +10 -4
- package/lib/cjs/IncrementalLoading/SchemaParser.d.ts.map +1 -1
- package/lib/cjs/IncrementalLoading/SchemaParser.js +19 -19
- package/lib/cjs/IncrementalLoading/SchemaParser.js.map +1 -1
- package/lib/cjs/IncrementalLoading/SchemaStubQueries.d.ts.map +1 -1
- package/lib/cjs/IncrementalLoading/SchemaStubQueries.js +7 -24
- package/lib/cjs/IncrementalLoading/SchemaStubQueries.js.map +1 -1
- package/lib/cjs/Metadata/EntityClass.js +1 -1
- package/lib/cjs/Metadata/EntityClass.js.map +1 -1
- package/lib/cjs/Metadata/KindOfQuantity.d.ts.map +1 -1
- package/lib/cjs/Metadata/KindOfQuantity.js +9 -22
- package/lib/cjs/Metadata/KindOfQuantity.js.map +1 -1
- package/lib/cjs/Metadata/Schema.d.ts +2 -0
- package/lib/cjs/Metadata/Schema.d.ts.map +1 -1
- package/lib/cjs/Metadata/Schema.js +4 -0
- package/lib/cjs/Metadata/Schema.js.map +1 -1
- package/lib/cjs/ecschema-metadata.d.ts +2 -1
- package/lib/cjs/ecschema-metadata.d.ts.map +1 -1
- package/lib/cjs/ecschema-metadata.js +2 -1
- package/lib/cjs/ecschema-metadata.js.map +1 -1
- package/lib/esm/Deserialization/JsonProps.d.ts +9 -2
- package/lib/esm/Deserialization/JsonProps.d.ts.map +1 -1
- package/lib/esm/Deserialization/JsonProps.js.map +1 -1
- package/lib/esm/Formatting/FormatSetFormatsProvider.d.ts +37 -0
- package/lib/esm/Formatting/FormatSetFormatsProvider.d.ts.map +1 -0
- package/lib/esm/Formatting/FormatSetFormatsProvider.js +54 -0
- package/lib/esm/Formatting/FormatSetFormatsProvider.js.map +1 -0
- package/lib/esm/{SchemaFormatsProvider.d.ts → Formatting/SchemaFormatsProvider.d.ts} +1 -1
- package/lib/esm/Formatting/SchemaFormatsProvider.d.ts.map +1 -0
- package/lib/esm/{SchemaFormatsProvider.js → Formatting/SchemaFormatsProvider.js} +6 -6
- package/lib/esm/Formatting/SchemaFormatsProvider.js.map +1 -0
- package/lib/esm/IncrementalLoading/ECSqlSchemaLocater.d.ts +18 -24
- package/lib/esm/IncrementalLoading/ECSqlSchemaLocater.d.ts.map +1 -1
- package/lib/esm/IncrementalLoading/ECSqlSchemaLocater.js +61 -33
- package/lib/esm/IncrementalLoading/ECSqlSchemaLocater.js.map +1 -1
- package/lib/esm/IncrementalLoading/FullSchemaQueries.d.ts.map +1 -1
- package/lib/esm/IncrementalLoading/FullSchemaQueries.js +1 -0
- package/lib/esm/IncrementalLoading/FullSchemaQueries.js.map +1 -1
- package/lib/esm/IncrementalLoading/IncrementalSchemaLocater.d.ts +20 -3
- package/lib/esm/IncrementalLoading/IncrementalSchemaLocater.d.ts.map +1 -1
- package/lib/esm/IncrementalLoading/IncrementalSchemaLocater.js +7 -4
- package/lib/esm/IncrementalLoading/IncrementalSchemaLocater.js.map +1 -1
- package/lib/esm/IncrementalLoading/IncrementalSchemaReader.d.ts.map +1 -1
- package/lib/esm/IncrementalLoading/IncrementalSchemaReader.js +2 -7
- package/lib/esm/IncrementalLoading/IncrementalSchemaReader.js.map +1 -1
- package/lib/esm/IncrementalLoading/SchemaItemParsers.d.ts +4 -4
- package/lib/esm/IncrementalLoading/SchemaItemParsers.d.ts.map +1 -1
- package/lib/esm/IncrementalLoading/SchemaItemParsers.js +17 -17
- package/lib/esm/IncrementalLoading/SchemaItemParsers.js.map +1 -1
- package/lib/esm/IncrementalLoading/SchemaItemQueries.js +4 -4
- package/lib/esm/IncrementalLoading/SchemaItemQueries.js.map +1 -1
- package/lib/esm/IncrementalLoading/SchemaParser.d.ts +10 -4
- package/lib/esm/IncrementalLoading/SchemaParser.d.ts.map +1 -1
- package/lib/esm/IncrementalLoading/SchemaParser.js +19 -19
- package/lib/esm/IncrementalLoading/SchemaParser.js.map +1 -1
- package/lib/esm/IncrementalLoading/SchemaStubQueries.d.ts.map +1 -1
- package/lib/esm/IncrementalLoading/SchemaStubQueries.js +7 -24
- package/lib/esm/IncrementalLoading/SchemaStubQueries.js.map +1 -1
- package/lib/esm/Metadata/EntityClass.js +1 -1
- package/lib/esm/Metadata/EntityClass.js.map +1 -1
- package/lib/esm/Metadata/KindOfQuantity.d.ts.map +1 -1
- package/lib/esm/Metadata/KindOfQuantity.js +9 -22
- package/lib/esm/Metadata/KindOfQuantity.js.map +1 -1
- package/lib/esm/Metadata/Schema.d.ts +2 -0
- package/lib/esm/Metadata/Schema.d.ts.map +1 -1
- package/lib/esm/Metadata/Schema.js +4 -0
- package/lib/esm/Metadata/Schema.js.map +1 -1
- package/lib/esm/ecschema-metadata.d.ts +2 -1
- package/lib/esm/ecschema-metadata.d.ts.map +1 -1
- package/lib/esm/ecschema-metadata.js +2 -1
- package/lib/esm/ecschema-metadata.js.map +1 -1
- package/package.json +6 -6
- package/lib/cjs/IncrementalLoading/PerformanceLogger.d.ts +0 -60
- package/lib/cjs/IncrementalLoading/PerformanceLogger.d.ts.map +0 -1
- package/lib/cjs/IncrementalLoading/PerformanceLogger.js +0 -82
- package/lib/cjs/IncrementalLoading/PerformanceLogger.js.map +0 -1
- package/lib/cjs/SchemaFormatsProvider.d.ts.map +0 -1
- package/lib/cjs/SchemaFormatsProvider.js.map +0 -1
- package/lib/esm/IncrementalLoading/PerformanceLogger.d.ts +0 -60
- package/lib/esm/IncrementalLoading/PerformanceLogger.d.ts.map +0 -1
- package/lib/esm/IncrementalLoading/PerformanceLogger.js +0 -78
- package/lib/esm/IncrementalLoading/PerformanceLogger.js.map +0 -1
- package/lib/esm/SchemaFormatsProvider.d.ts.map +0 -1
- package/lib/esm/SchemaFormatsProvider.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityClass.js","sourceRoot":"","sources":["../../../src/Metadata/EntityClass.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAqB,MAAM,cAAc,CAAC;AACzF,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAG7D,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAe,kBAAkB,EAAY,MAAM,YAAY,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD;;;GAGG;AACH,MAAM,OAAO,WAAY,SAAQ,OAAO;IACb,cAAc,GAAG,WAAW,CAAC,cAAc,CAAC;IACrE,gBAAgB;IACT,MAAM,KAAc,cAAc,KAAK,OAAO,cAAc,CAAC,WAAW,CAAC,CAAC,CAAC;IAC1E,OAAO,CAAqB;IAEpC,IAAW,MAAM;QACf,IAAI,CAAC,IAAI,CAAC,OAAO;YACf,OAAO,EAAE,CAAC;QACZ,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAEM,CAAC,aAAa;QACnB,IAAI,CAAC,IAAI,CAAC,OAAO;YACf,OAAO;QAET,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjC,MAAM,IAAI,GAAG,IAAI,CAAC,M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C,CAAC;IACxF,CAAC;;QACC,oBAAoB,GAAG,YAAY,CAAC;IAEtC,IAAI,CAAC,oBAAoB;QACvB,MAAM,IAAI,aAAa,CAAC,cAAc,CAAC,WAAW,EAAE,mCAAmC,YAAY,8CAA8C,CAAC,CAAC,CAAE,2DAA2D;IAElN,IAAI,OAAO,CAAC,SAAS,CAAC,KAAK,QAAQ,EAAE,CAAC;QACpC,MAAM,YAAY,GAAG,sBAAsB,CAAC,SAAS,CAAC,CAAC;QACvD,IAAI,SAAS,KAAK,YAAY;YAC5B,MAAM,IAAI,aAAa,CAAC,cAAc,CAAC,wBAAwB,EAAE,mCAAmC,SAAS,qCAAqC,CAAC,CAAC;QACtJ,SAAS,GAAG,YAAY,CAAC;IAC3B,CAAC;IAED,MAAM,gBAAgB,GAAG,IAAI,uBAAuB,CAAC,oBAAoB,CAAC,GAAG,EAAE,KAAK,IAAI,EAAE,CAAC,oBAAoB,CAAC,CAAC;IACjH,OAAO,IAAI,kBAAkB,CAAC,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,SAAS,CAAC,CAAC;AAC5E,CAAC","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 { DelayedPromiseWithProps } from \"../DelayedPromise\";\nimport { EntityClassProps } from \"../Deserialization/JsonProps\";\nimport { XmlSerializationUtils } from \"../Deserialization/XmlSerializationUtils\";\nimport { parseStrengthDirection, SchemaItemType, StrengthDirection } from \"../ECObjects\";\nimport { ECSchemaError, ECSchemaStatus } from \"../Exception\";\nimport { HasMixins, LazyLoadedMixin } from \"../Interfaces\";\nimport { SchemaItemKey } from \"../SchemaKey\";\nimport { ECClass } from \"./Class\";\nimport { Mixin } from \"./Mixin\";\nimport { AnyProperty, NavigationProperty, Property } from \"./Property\";\nimport { RelationshipClass } from \"./RelationshipClass\";\nimport { SchemaItem } from \"./SchemaItem\";\n\n/**\n * A Typescript class representation of an ECEntityClass.\n * @public @preview\n */\nexport class EntityClass extends ECClass implements HasMixins {\n public override readonly schemaItemType = EntityClass.schemaItemType;\n /** @internal */\n public static override get schemaItemType() { return SchemaItemType.EntityClass; }\n private _mixins?: LazyLoadedMixin[];\n\n public get mixins(): ReadonlyArray<LazyLoadedMixin> {\n if (!this._mixins)\n return [];\n return this._mixins;\n }\n\n public *getMixinsSync(): Iterable<Mixin> {\n if (!this._mixins)\n return;\n\n for (const mixin of this._mixins) {\n const mObj = this.schema.lookupItemSync(mixin, Mixin);\n if (mObj) {\n yield mObj;\n }\n }\n }\n\n /**\n *\n * @param mixin\n * @internal\n */\n protected addMixin(mixin: Mixin) {\n if (!this._mixins)\n this._mixins = [];\n\n this._mixins.push(new DelayedPromiseWithProps(mixin.key, async () => mixin));\n return;\n }\n\n /**\n * Searches the base class, if one exists, first then any mixins that exist for the property with the name provided.\n * @param name The name of the property to find.\n */\n public override async getInheritedProperty(name: string): Promise<AnyProperty | undefined> {\n let inheritedProperty = await super.getInheritedProperty(name);\n\n if (!inheritedProperty && this._mixins) {\n const mixinProps = await Promise.all(this._mixins.map(async (mixin) => (await mixin).getProperty(name)));\n mixinProps.some((prop) => {\n inheritedProperty = prop as AnyProperty;\n return inheritedProperty !== undefined;\n });\n }\n\n return inheritedProperty as AnyProperty | undefined;\n }\n\n /**\n * Searches the base class, if one exists, first then any mixins that exist for the property with the name provided.\n * @param name The name of the property to find.\n */\n public override getInheritedPropertySync(name: string): Property | undefined {\n const inheritedProperty = super.getInheritedPropertySync(name);\n if (inheritedProperty)\n return inheritedProperty;\n\n if (!this._mixins) {\n return undefined;\n }\n\n for (const mixin of this._mixins) {\n const mObj = this.schema.lookupItemSync(mixin);\n if (mObj && ECClass.isECClass(mObj)) {\n const result = mObj.getPropertySync(name, true);\n if (result) {\n return result;\n }\n }\n }\n\n return undefined;\n }\n\n /**\n *\n * @param cache\n * @returns\n *\n * @internal\n */\nprotected override async buildPropertyCache(): Promise<Map<string, Property>> {\n const cache = new Map<string, Property>();\n const baseClass = await this.baseClass;\n if (baseClass) {\n for (const property of await baseClass.getProperties()) {\n if (!cache.has(property.name.toUpperCase()))\n cache.set(property.name.toUpperCase(), property);\n }\n }\n\n for (const mixin of this.mixins) {\n const mixinObj = await mixin;\n const mixinProps = mixinObj.getPropertiesSync();\n for (const property of mixinProps) {\n if (!cache.has(property.name.toUpperCase()))\n cache.set(property.name.toUpperCase(), property);\n }\n }\n\n const localProps = await this.getProperties(true);\n if (localProps) {\n for (const property of localProps) {\n cache.set(property.name.toUpperCase(), property);\n }\n }\n return cache;\n}\n\n /**\n *\n * @param cache\n * @internal\n */\n protected override buildPropertyCacheSync(): Map<string, Property> {\n const cache = new Map<string, Property>();\n const baseClass = this.getBaseClassSync();\n if (baseClass) {\n Array.from(baseClass.getPropertiesSync()).forEach((property) => {\n if (!cache.has(property.name.toUpperCase()))\n cache.set(property.name.toUpperCase(), property);\n });\n }\n\n for (const mixin of this.getMixinsSync()) {\n const mixinProps = mixin.getPropertiesSync();\n for (const property of mixinProps) {\n if (!cache.has(property.name.toUpperCase()))\n cache.set(property.name.toUpperCase(), property);\n }\n }\n\n const localProps = this.getPropertiesSync(true);\n if (localProps) {\n Array.from(localProps).forEach(property => {\n cache.set(property.name.toUpperCase(), property);\n });\n }\n return cache;\n }\n\n /**\n *\n * @param name\n * @param relationship\n * @param direction\n * @internal\n */\n protected async createNavigationProperty(name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): Promise<NavigationProperty> {\n return this.addProperty(await createNavigationProperty(this, name, relationship, direction));\n }\n\n /**\n *\n * @param name\n * @param relationship\n * @param direction\n * @internal\n */\n protected createNavigationPropertySync(name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): NavigationProperty {\n return this.addProperty(createNavigationPropertySync(this, name, relationship, direction));\n }\n\n /**\n * Save this EntityClass' properties to an object for serializing to JSON.\n * @param standalone Serialization includes only this object (as opposed to the full schema).\n * @param includeSchemaVersion Include the Schema's version information in the serialized object.\n */\n public override toJSON(standalone: boolean = false, includeSchemaVersion: boolean = false): EntityClassProps {\n const schemaJson = super.toJSON(standalone, includeSchemaVersion) as any;\n if (this.mixins.length > 0)\n schemaJson.mixins = this.mixins.map((mixin) => mixin.fullName);\n return schemaJson;\n }\n\n /** @internal */\n public override async toXml(schemaXml: Document): Promise<Element> {\n const itemElement = await super.toXml(schemaXml);\n\n for (const lazyMixin of this.mixins) {\n const mixin = await lazyMixin;\n const mixinElement = schemaXml.createElement(\"BaseClass\");\n const mixinName = XmlSerializationUtils.createXmlTypedName(this.schema, mixin.schema, mixin.name);\n mixinElement.textContent = mixinName;\n itemElement.appendChild(mixinElement);\n }\n return itemElement;\n }\n\n public override async fromJSON(entityClassProps: EntityClassProps) {\n this.fromJSONSync(entityClassProps);\n }\n\n public override fromJSONSync(entityClassProps: EntityClassProps) {\n super.fromJSONSync(entityClassProps);\n\n if (undefined !== entityClassProps.mixins) {\n if (!this._mixins)\n this._mixins = [];\n for (const name of entityClassProps.mixins) {\n const mixinSchemaItemKey = this.schema.getSchemaItemKey(name);\n if (!mixinSchemaItemKey)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The ECEntityClass ${this.name} has a mixin (\"${name}\") that cannot be found.`);\n\n if (!this._mixins.find((value) => mixinSchemaItemKey.matchesFullName(value.fullName))) {\n this._mixins.push(new DelayedPromiseWithProps<SchemaItemKey, Mixin>(mixinSchemaItemKey,\n async () => {\n const mixin = await this.schema.lookupItem(mixinSchemaItemKey, Mixin);\n if (undefined === mixin)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The ECEntityClass ${this.name} has a mixin (\"${name}\") that cannot be found.`);\n return mixin;\n }));\n }\n }\n }\n }\n\n /**\n * Type guard to check if the SchemaItem is of type EntityClass.\n * @param item The SchemaItem to check.\n * @returns True if the item is an EntityClass, false otherwise.\n */\n public static isEntityClass(item?: SchemaItem): item is EntityClass {\n if (item && item.schemaItemType === SchemaItemType.EntityClass)\n return true;\n\n return false;\n }\n\n /**\n * Type assertion to check if the SchemaItem is of type EntityClass.\n * @param item The SchemaItem to check.\n * @returns The item cast to EntityClass if it is an EntityClass, undefined otherwise.\n * @internal\n */\n public static assertIsEntityClass(item?: SchemaItem): asserts item is EntityClass {\n if (!this.isEntityClass(item))\n throw new ECSchemaError(ECSchemaStatus.InvalidSchemaItemType, `Expected '${SchemaItemType.EntityClass}' (EntityClass)`);\n }\n}\n\n/**\n * Hackish approach that works like a \"friend class\" so we can access protected members without making them public.\n * @internal\n */\nexport abstract class MutableEntityClass extends EntityClass {\n public abstract override addMixin(mixin: Mixin): any;\n public abstract override createNavigationProperty(name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): Promise<NavigationProperty>;\n public abstract override createNavigationPropertySync(name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): NavigationProperty;\n public abstract override setDisplayLabel(displayLabel: string): void;\n}\n\n/** @internal */\nexport async function createNavigationProperty(ecClass: ECClass, name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): Promise<NavigationProperty> {\n if (await ecClass.getProperty(name, true))\n throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${ecClass.name}.`);\n\n let resolvedRelationship: RelationshipClass | undefined;\n if (typeof (relationship) === \"string\") {\n resolvedRelationship = await ecClass.schema.lookupItem(relationship, RelationshipClass);\n } else\n resolvedRelationship = relationship;\n\n if (!resolvedRelationship)\n throw new ECSchemaError(ECSchemaStatus.InvalidType, `The provided RelationshipClass, ${relationship}, is not a valid RelationshipClassInterface.`); // eslint-disable-line @typescript-eslint/no-base-to-string\n\n if (typeof (direction) === \"string\") {\n const tmpDirection = parseStrengthDirection(direction);\n if (undefined === tmpDirection)\n throw new ECSchemaError(ECSchemaStatus.InvalidStrengthDirection, `The provided StrengthDirection, ${direction}, is not a valid StrengthDirection.`);\n direction = tmpDirection;\n }\n\n const lazyRelationship = new DelayedPromiseWithProps(resolvedRelationship.key, async () => resolvedRelationship);\n return new NavigationProperty(ecClass, name, lazyRelationship, direction);\n}\n\n/** @internal */\nexport function createNavigationPropertySync(ecClass: ECClass, name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): NavigationProperty {\n if (ecClass.getPropertySync(name))\n throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${ecClass.name}.`);\n\n let resolvedRelationship: RelationshipClass | undefined;\n if (typeof (relationship) === \"string\") {\n resolvedRelationship = ecClass.schema.lookupItemSync(relationship, RelationshipClass);\n } else\n resolvedRelationship = relationship;\n\n if (!resolvedRelationship)\n throw new ECSchemaError(ECSchemaStatus.InvalidType, `The provided RelationshipClass, ${relationship}, is not a valid RelationshipClassInterface.`); // eslint-disable-line @typescript-eslint/no-base-to-string\n\n if (typeof (direction) === \"string\") {\n const tmpDirection = parseStrengthDirection(direction);\n if (undefined === tmpDirection)\n throw new ECSchemaError(ECSchemaStatus.InvalidStrengthDirection, `The provided StrengthDirection, ${direction}, is not a valid StrengthDirection.`);\n direction = tmpDirection;\n }\n\n const lazyRelationship = new DelayedPromiseWithProps(resolvedRelationship.key, async () => resolvedRelationship);\n return new NavigationProperty(ecClass, name, lazyRelationship, direction);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"EntityClass.js","sourceRoot":"","sources":["../../../src/Metadata/EntityClass.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAqB,MAAM,cAAc,CAAC;AACzF,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAG7D,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,M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C,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,SAAS,CAAC,CAAC;AAC5E,CAAC","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 { DelayedPromiseWithProps } from \"../DelayedPromise\";\nimport { EntityClassProps } from \"../Deserialization/JsonProps\";\nimport { XmlSerializationUtils } from \"../Deserialization/XmlSerializationUtils\";\nimport { parseStrengthDirection, SchemaItemType, StrengthDirection } from \"../ECObjects\";\nimport { ECSchemaError, ECSchemaStatus } from \"../Exception\";\nimport { HasMixins, LazyLoadedMixin } from \"../Interfaces\";\nimport { SchemaItemKey } from \"../SchemaKey\";\nimport { ECClass } from \"./Class\";\nimport { Mixin } from \"./Mixin\";\nimport { AnyProperty, NavigationProperty, Property } from \"./Property\";\nimport { RelationshipClass } from \"./RelationshipClass\";\nimport { SchemaItem } from \"./SchemaItem\";\n\n/**\n * A Typescript class representation of an ECEntityClass.\n * @public @preview\n */\nexport class EntityClass extends ECClass implements HasMixins {\n public override readonly schemaItemType = EntityClass.schemaItemType;\n /** @internal */\n public static override get schemaItemType() { return SchemaItemType.EntityClass; }\n private _mixins?: LazyLoadedMixin[];\n\n public get mixins(): ReadonlyArray<LazyLoadedMixin> {\n if (!this._mixins)\n return [];\n return this._mixins;\n }\n\n public *getMixinsSync(): Iterable<Mixin> {\n if (!this._mixins)\n return;\n\n for (const mixin of this._mixins) {\n const mObj = this.schema.lookupItemSync(mixin, Mixin);\n if (mObj) {\n yield mObj;\n }\n }\n }\n\n /**\n *\n * @param mixin\n * @internal\n */\n protected addMixin(mixin: Mixin) {\n if (!this._mixins)\n this._mixins = [];\n\n this._mixins.push(new DelayedPromiseWithProps(mixin.key, async () => mixin));\n return;\n }\n\n /**\n * Searches the base class, if one exists, first then any mixins that exist for the property with the name provided.\n * @param name The name of the property to find.\n */\n public override async getInheritedProperty(name: string): Promise<AnyProperty | undefined> {\n let inheritedProperty = await super.getInheritedProperty(name);\n\n if (!inheritedProperty && this._mixins) {\n const mixinProps = await Promise.all(this._mixins.map(async (mixin) => (await mixin).getProperty(name)));\n mixinProps.some((prop) => {\n inheritedProperty = prop as AnyProperty;\n return inheritedProperty !== undefined;\n });\n }\n\n return inheritedProperty as AnyProperty | undefined;\n }\n\n /**\n * Searches the base class, if one exists, first then any mixins that exist for the property with the name provided.\n * @param name The name of the property to find.\n */\n public override getInheritedPropertySync(name: string): Property | undefined {\n const inheritedProperty = super.getInheritedPropertySync(name);\n if (inheritedProperty)\n return inheritedProperty;\n\n if (!this._mixins) {\n return undefined;\n }\n\n for (const mixin of this._mixins) {\n const mObj = this.schema.lookupItemSync(mixin);\n if (mObj && ECClass.isECClass(mObj)) {\n const result = mObj.getPropertySync(name, true);\n if (result) {\n return result;\n }\n }\n }\n\n return undefined;\n }\n\n /**\n *\n * @param cache\n * @returns\n *\n * @internal\n */\nprotected override async buildPropertyCache(): Promise<Map<string, Property>> {\n const cache = new Map<string, Property>();\n const baseClass = await this.baseClass;\n if (baseClass) {\n for (const property of await baseClass.getProperties()) {\n if (!cache.has(property.name.toUpperCase()))\n cache.set(property.name.toUpperCase(), property);\n }\n }\n\n for (const mixin of this.mixins) {\n const mixinObj = await mixin;\n const mixinProps = mixinObj.getPropertiesSync();\n for (const property of mixinProps) {\n if (!cache.has(property.name.toUpperCase()))\n cache.set(property.name.toUpperCase(), property);\n }\n }\n\n const localProps = await this.getProperties(true);\n if (localProps) {\n for (const property of localProps) {\n cache.set(property.name.toUpperCase(), property);\n }\n }\n return cache;\n}\n\n /**\n *\n * @param cache\n * @internal\n */\n protected override buildPropertyCacheSync(): Map<string, Property> {\n const cache = new Map<string, Property>();\n const baseClass = this.getBaseClassSync();\n if (baseClass) {\n Array.from(baseClass.getPropertiesSync()).forEach((property) => {\n if (!cache.has(property.name.toUpperCase()))\n cache.set(property.name.toUpperCase(), property);\n });\n }\n\n for (const mixin of this.getMixinsSync()) {\n const mixinProps = mixin.getPropertiesSync();\n for (const property of mixinProps) {\n if (!cache.has(property.name.toUpperCase()))\n cache.set(property.name.toUpperCase(), property);\n }\n }\n\n const localProps = this.getPropertiesSync(true);\n if (localProps) {\n Array.from(localProps).forEach(property => {\n cache.set(property.name.toUpperCase(), property);\n });\n }\n return cache;\n }\n\n /**\n *\n * @param name\n * @param relationship\n * @param direction\n * @internal\n */\n protected async createNavigationProperty(name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): Promise<NavigationProperty> {\n return this.addProperty(await createNavigationProperty(this, name, relationship, direction));\n }\n\n /**\n *\n * @param name\n * @param relationship\n * @param direction\n * @internal\n */\n protected createNavigationPropertySync(name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): NavigationProperty {\n return this.addProperty(createNavigationPropertySync(this, name, relationship, direction));\n }\n\n /**\n * Save this EntityClass' properties to an object for serializing to JSON.\n * @param standalone Serialization includes only this object (as opposed to the full schema).\n * @param includeSchemaVersion Include the Schema's version information in the serialized object.\n */\n public override toJSON(standalone: boolean = false, includeSchemaVersion: boolean = false): EntityClassProps {\n const schemaJson = super.toJSON(standalone, includeSchemaVersion) as any;\n if (this.mixins.length > 0)\n schemaJson.mixins = this.mixins.map((mixin) => mixin.fullName);\n return schemaJson;\n }\n\n /** @internal */\n public override async toXml(schemaXml: Document): Promise<Element> {\n const itemElement = await super.toXml(schemaXml);\n\n for (const lazyMixin of this.mixins) {\n const mixin = await lazyMixin;\n const mixinElement = schemaXml.createElement(\"BaseClass\");\n const mixinName = XmlSerializationUtils.createXmlTypedName(this.schema, mixin.schema, mixin.name);\n mixinElement.textContent = mixinName;\n itemElement.appendChild(mixinElement);\n }\n return itemElement;\n }\n\n public override async fromJSON(entityClassProps: EntityClassProps) {\n this.fromJSONSync(entityClassProps);\n }\n\n public override fromJSONSync(entityClassProps: EntityClassProps) {\n super.fromJSONSync(entityClassProps);\n\n if (undefined !== entityClassProps.mixins) {\n if (!this._mixins)\n this._mixins = [];\n for (const name of entityClassProps.mixins) {\n const mixinSchemaItemKey = this.schema.getSchemaItemKey(name);\n if (!mixinSchemaItemKey)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The ECEntityClass ${this.name} has a mixin (\"${name}\") that cannot be found.`);\n\n if (!this._mixins.find((value) => mixinSchemaItemKey.matchesFullName(value.fullName))) {\n this._mixins.push(new DelayedPromiseWithProps<SchemaItemKey, Mixin>(mixinSchemaItemKey,\n async () => {\n const mixin = await this.schema.lookupItem(mixinSchemaItemKey, Mixin);\n if (undefined === mixin)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The ECEntityClass ${this.name} has a mixin (\"${name}\") that cannot be found.`);\n return mixin;\n }));\n }\n }\n }\n }\n\n /**\n * Type guard to check if the SchemaItem is of type EntityClass.\n * @param item The SchemaItem to check.\n * @returns True if the item is an EntityClass, false otherwise.\n */\n public static isEntityClass(item?: SchemaItem): item is EntityClass {\n if (item && item.schemaItemType === SchemaItemType.EntityClass)\n return true;\n\n return false;\n }\n\n /**\n * Type assertion to check if the SchemaItem is of type EntityClass.\n * @param item The SchemaItem to check.\n * @returns The item cast to EntityClass if it is an EntityClass, undefined otherwise.\n * @internal\n */\n public static assertIsEntityClass(item?: SchemaItem): asserts item is EntityClass {\n if (!this.isEntityClass(item))\n throw new ECSchemaError(ECSchemaStatus.InvalidSchemaItemType, `Expected '${SchemaItemType.EntityClass}' (EntityClass)`);\n }\n}\n\n/**\n * Hackish approach that works like a \"friend class\" so we can access protected members without making them public.\n * @internal\n */\nexport abstract class MutableEntityClass extends EntityClass {\n public abstract override addMixin(mixin: Mixin): any;\n public abstract override createNavigationProperty(name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): Promise<NavigationProperty>;\n public abstract override createNavigationPropertySync(name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): NavigationProperty;\n public abstract override setDisplayLabel(displayLabel: string): void;\n}\n\n/** @internal */\nexport async function createNavigationProperty(ecClass: ECClass, name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): Promise<NavigationProperty> {\n if (await ecClass.getProperty(name, true))\n throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${ecClass.name}.`);\n\n let resolvedRelationship: RelationshipClass | undefined;\n if (typeof (relationship) === \"string\") {\n resolvedRelationship = await ecClass.schema.lookupItem(relationship, RelationshipClass);\n } else\n resolvedRelationship = relationship;\n\n if (!resolvedRelationship)\n throw new ECSchemaError(ECSchemaStatus.InvalidType, `The provided RelationshipClass, ${relationship}, is not a valid RelationshipClassInterface.`); // eslint-disable-line @typescript-eslint/no-base-to-string\n\n if (typeof (direction) === \"string\") {\n const tmpDirection = parseStrengthDirection(direction);\n if (undefined === tmpDirection)\n throw new ECSchemaError(ECSchemaStatus.InvalidStrengthDirection, `The provided StrengthDirection, ${direction}, is not a valid StrengthDirection.`);\n direction = tmpDirection;\n }\n\n const lazyRelationship = new DelayedPromiseWithProps(resolvedRelationship.key, async () => resolvedRelationship);\n return new NavigationProperty(ecClass, name, lazyRelationship, direction);\n}\n\n/** @internal */\nexport function createNavigationPropertySync(ecClass: ECClass, name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): NavigationProperty {\n if (ecClass.getPropertySync(name, true))\n throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${ecClass.name}.`);\n\n let resolvedRelationship: RelationshipClass | undefined;\n if (typeof (relationship) === \"string\") {\n resolvedRelationship = ecClass.schema.lookupItemSync(relationship, RelationshipClass);\n } else\n resolvedRelationship = relationship;\n\n if (!resolvedRelationship)\n throw new ECSchemaError(ECSchemaStatus.InvalidType, `The provided RelationshipClass, ${relationship}, is not a valid RelationshipClassInterface.`); // eslint-disable-line @typescript-eslint/no-base-to-string\n\n if (typeof (direction) === \"string\") {\n const tmpDirection = parseStrengthDirection(direction);\n if (undefined === tmpDirection)\n throw new ECSchemaError(ECSchemaStatus.InvalidStrengthDirection, `The provided StrengthDirection, ${direction}, is not a valid StrengthDirection.`);\n direction = tmpDirection;\n }\n\n const lazyRelationship = new DelayedPromiseWithProps(resolvedRelationship.key, async () => resolvedRelationship);\n return new NavigationProperty(ecClass, name, lazyRelationship, direction);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KindOfQuantity.d.ts","sourceRoot":"","sources":["../../../src/Metadata/KindOfQuantity.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAEnE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACzF,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,cAAc,EAAuB,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C;;GAEG;AACH,qBAAa,cAAe,SAAQ,UAAU;IAC5C,SAAyB,cAAc,iBAAiC;IACxE,gBAAgB;IAChB,WAA2B,cAAc,mBAA4C;IACrF,OAAO,CAAC,cAAc,CAAe;IACrC,OAAO,CAAC,oBAAoB,CAAgD;IAC5E,OAAO,CAAC,gBAAgB,CAAC,CAA0C;IAEnE,4DAA4D;IAC5D,IAAW,yBAAyB,IAAI,gBAAgB,GAAG,cAAc,GAAG,SAAS,CAAwC;IAE7H,sCAAsC;IACtC,IAAW,mBAAmB,IAAI,KAAK,CAAC,gBAAgB,GAAG,cAAc,CAAC,CAAsC;IAEhH,uBAAuB;IACvB,IAAW,eAAe,IAAI,cAAc,GAAG,sBAAsB,GAAG,SAAS,CAAkC;IAEnH,IAAW,aAAa,WAAkC;IAE1D;;;;;OAKG;IACH,SAAS,CAAC,qBAAqB,CAAC,MAAM,EAAE,gBAAgB,GAAG,cAAc,EA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AAI,cAAc;CAIxF;AACD;;;GAGG;AACH,8BAAsB,qBAAsB,SAAQ,cAAc;aACvC,qBAAqB,CAAC,MAAM,EAAE,gBAAgB,GAAG,cAAc,EAAE,SAAS,EAAE,OAAO,GAAG,IAAI;aAC1F,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,kBAAkB,CAAC,EAAE,KAAK,CAAC,CAAC,cAAc,GAAG,sBAAsB,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,GAAG,cAAc;aACnK,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI;aAC3C,kBAAkB,CAAC,KAAK,EAAE,cAAc,GAAG,sBAAsB,GAAG,SAAS,GAAG,IAAI;aACpF,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI;CACvE"}
|
|
@@ -156,32 +156,19 @@ export class KindOfQuantity extends SchemaItem {
|
|
|
156
156
|
fromJSONSync(kindOfQuantityProps) {
|
|
157
157
|
super.fromJSONSync(kindOfQuantityProps);
|
|
158
158
|
this._relativeError = kindOfQuantityProps.relativeError;
|
|
159
|
-
const
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
this._persistenceUnit = new DelayedPromiseWithProps(persistenceUnit.key, async () => persistenceUnit);
|
|
159
|
+
const unitItemKey = this.schema.getSchemaItemKey(kindOfQuantityProps.persistenceUnit);
|
|
160
|
+
this._persistenceUnit = new DelayedPromiseWithProps(unitItemKey, async () => {
|
|
161
|
+
const unitItem = await this.schema.lookupItem(unitItemKey, Unit)
|
|
162
|
+
|| await this.schema.lookupItem(unitItemKey, InvertedUnit);
|
|
163
|
+
if (undefined === unitItem)
|
|
164
|
+
throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `Unable to locate the unit ${kindOfQuantityProps.persistenceUnit}.`);
|
|
165
|
+
return unitItem;
|
|
166
|
+
});
|
|
168
167
|
if (undefined !== kindOfQuantityProps.presentationUnits)
|
|
169
168
|
this.processPresentationUnitsSync(kindOfQuantityProps.presentationUnits);
|
|
170
169
|
}
|
|
171
170
|
async fromJSON(kindOfQuantityProps) {
|
|
172
|
-
|
|
173
|
-
this._relativeError = kindOfQuantityProps.relativeError;
|
|
174
|
-
const persistenceUnit = await this.schema.lookupItem(kindOfQuantityProps.persistenceUnit);
|
|
175
|
-
if (undefined === persistenceUnit)
|
|
176
|
-
throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The Unit ${kindOfQuantityProps.persistenceUnit} does not exist.`);
|
|
177
|
-
if (!Unit.isUnit(persistenceUnit) && !InvertedUnit.isInvertedUnit(persistenceUnit))
|
|
178
|
-
throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The item ${kindOfQuantityProps.persistenceUnit} is not a Unit or InvertedUnit.`);
|
|
179
|
-
if (Unit.isUnit(persistenceUnit))
|
|
180
|
-
this._persistenceUnit = new DelayedPromiseWithProps(persistenceUnit.key, async () => persistenceUnit);
|
|
181
|
-
else
|
|
182
|
-
this._persistenceUnit = new DelayedPromiseWithProps(persistenceUnit.key, async () => persistenceUnit);
|
|
183
|
-
if (undefined !== kindOfQuantityProps.presentationUnits)
|
|
184
|
-
await this.processPresentationUnits(kindOfQuantityProps.presentationUnits);
|
|
171
|
+
this.fromJSONSync(kindOfQuantityProps);
|
|
185
172
|
}
|
|
186
173
|
/**
|
|
187
174
|
* Used for schema editing.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KindOfQuantity.js","sourceRoot":"","sources":["../../../src/Metadata/KindOfQuantity.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,aAAa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,MAAM,CAAC,gBAAgB,CAAC,IAAiB;QAC9C,IAAI,IAAI,IAAI,IAAI,CAAC,cAAc,KAAK,cAAc,CAAC,cAAc;YAC/D,OAAO,IAAI,CAAC;QAEd,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,sBAAsB,CAAC,IAAiB;QACpD,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC;YAC9B,MAAM,IAAI,aAAa,CAAC,cAAc,CAAC,qBAAqB,EAAE,aAAa,cAAc,CAAC,cAAc,oBAAoB,CAAC,CAAC;IAClI,CAAC;CACF;AACD;;;GAGG;AACH,MAAM,OAAgB,qBAAsB,SAAQ,cAAc;CAMjE","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 { DelayedPromiseWithProps } from \"../DelayedPromise\";\nimport { KindOfQuantityProps } from \"../Deserialization/JsonProps\";\nimport { XmlSerializationUtils } from \"../Deserialization/XmlSerializationUtils\";\nimport { SchemaItemType } from \"../ECObjects\";\nimport { ECSchemaError, ECSchemaStatus } from \"../Exception\";\nimport { LazyLoadedFormat, LazyLoadedInvertedUnit, LazyLoadedUnit } from \"../Interfaces\";\nimport { Format } from \"./Format\";\nimport { InvertedUnit } from \"./InvertedUnit\";\nimport { OverrideFormat, OverrideFormatProps } from \"./OverrideFormat\";\nimport { SchemaItem } from \"./SchemaItem\";\nimport { Unit } from \"./Unit\";\n\n/** A Typescript class representation of a KindOfQuantity.\n * @public @preview\n */\nexport class KindOfQuantity extends SchemaItem {\n public override readonly schemaItemType = KindOfQuantity.schemaItemType;\n /** @internal */\n public static override get schemaItemType() { return SchemaItemType.KindOfQuantity; }\n private _relativeError: number = 1.0;\n private _presentationFormats: Array<LazyLoadedFormat | OverrideFormat> = [];\n private _persistenceUnit?: LazyLoadedUnit | LazyLoadedInvertedUnit;\n\n /** The first presentation format in the list of Formats. */\n public get defaultPresentationFormat(): LazyLoadedFormat | OverrideFormat | undefined { return this.presentationFormats[0]; }\n\n /** A list of presentation formats. */\n public get presentationFormats(): Array<LazyLoadedFormat | OverrideFormat> { return this._presentationFormats; }\n\n /** Persistence unit */\n public get persistenceUnit(): LazyLoadedUnit | LazyLoadedInvertedUnit | undefined { return this._persistenceUnit; }\n\n public get relativeError() { return this._relativeError; }\n\n /**\n *\n * @param format The Format to add to this KindOfQuantity\n * @param isDefault\n * @internal\n */\n protected addPresentationFormat(format: LazyLoadedFormat | OverrideFormat, isDefault: boolean = false) {\n // TODO: Add some sort of validation?\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n (isDefault) ? this._presentationFormats.splice(0, 0, format) : this._presentationFormats.push(format);\n }\n\n /** Creates an OverrideFormat in the context of this KindOfQuantity.\n * @param parent The Format to override.\n * @param precision The precision override\n * @param unitLabelOverrides The list of unit and label overrides.\n * @internal\n */\n protected createFormatOverride(parent: Format, precision?: number, unitLabelOverrides?: Array<[LazyLoadedUnit | LazyLoadedInvertedUnit, string | undefined]>): OverrideFormat {\n if (unitLabelOverrides && parent.units && parent.units.length !== unitLabelOverrides.length)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `Cannot add presentation format to KindOfQuantity '${this.name}' because the number of unit overrides is inconsistent with the number in the Format '${parent.name}'.`);\n\n if (parent.units && 0 === parent.units.length && unitLabelOverrides && 0 < unitLabelOverrides.length)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `Cannot add a presentation format to KindOfQuantity '${this.name}' without any units and no unit overrides.`);\n\n // TODO: Check compatibility of Unit overrides with the persistence unit\n\n return new OverrideFormat(parent, precision, unitLabelOverrides);\n }\n\n private async processPresentationUnits(presentationUnitsJson: string | string[]): Promise<void> {\n const presUnitsArr = Array.isArray(presentationUnitsJson) ? presentationUnitsJson : presentationUnitsJson.split(\";\");\n for (const formatString of presUnitsArr) {\n const presFormatOverride: OverrideFormatProps = OverrideFormat.parseFormatString(formatString);\n\n const format = await this.schema.lookupItem(presFormatOverride.name, Format);\n if (undefined === format || format.schemaItemType !== SchemaItemType.Format)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `Unable to locate Format '${presFormatOverride.name}' for the presentation unit on KindOfQuantity ${this.fullName}.`);\n\n if (undefined === presFormatOverride.precision && undefined === presFormatOverride.unitAndLabels) {\n this.addPresentationFormat(new DelayedPromiseWithProps(format.key, async () => format));\n continue;\n }\n\n let unitAndLabels: Array<[LazyLoadedUnit | LazyLoadedInvertedUnit, string | undefined]> | undefined;\n if (undefined !== presFormatOverride.unitAndLabels) {\n if (4 < presFormatOverride.unitAndLabels.length)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, ``);\n\n unitAndLabels = [];\n for (const unitOverride of presFormatOverride.unitAndLabels) {\n const unitOrInverted = await this.schema.lookupItem(unitOverride[0]);\n\n if(Unit.isUnit(unitOrInverted))\n unitAndLabels.push([new DelayedPromiseWithProps(unitOrInverted.key, async () => unitOrInverted), unitOverride[1]]);\n else if(InvertedUnit.isInvertedUnit(unitOrInverted))\n unitAndLabels.push([new DelayedPromiseWithProps(unitOrInverted.key, async () => unitOrInverted), unitOverride[1]]);\n else\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `Unable to locate SchemaItem ${unitOverride[0]}.`);\n }\n }\n\n const overrideFormat = this.createFormatOverride(format, presFormatOverride.precision, unitAndLabels);\n this.addPresentationFormat(overrideFormat);\n }\n }\n\n private processPresentationUnitsSync(presentationUnitsJson: string | string[]): void {\n const presUnitsArr = Array.isArray(presentationUnitsJson) ? presentationUnitsJson : presentationUnitsJson.split(\";\");\n for (const formatString of presUnitsArr) {\n const presFormatOverride: OverrideFormatProps = OverrideFormat.parseFormatString(formatString);\n\n const format = this.schema.lookupItemSync(presFormatOverride.name, Format);\n if (undefined === format || format.schemaItemType !== SchemaItemType.Format)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `Unable to locate Format '${presFormatOverride.name}' for the presentation unit on KindOfQuantity ${this.fullName}.`);\n\n if (undefined === presFormatOverride.precision && undefined === presFormatOverride.unitAndLabels) {\n this.addPresentationFormat(new DelayedPromiseWithProps(format.key, async () => format));\n continue;\n }\n\n let unitAndLabels: Array<[LazyLoadedUnit | LazyLoadedInvertedUnit, string | undefined]> | undefined;\n if (undefined !== presFormatOverride.unitAndLabels) {\n if (4 < presFormatOverride.unitAndLabels.length)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, ``);\n\n unitAndLabels = [];\n for (const unitOverride of presFormatOverride.unitAndLabels) {\n const unitOrInverted = this.schema.lookupItemSync(unitOverride[0]);\n if(Unit.isUnit(unitOrInverted))\n unitAndLabels.push([new DelayedPromiseWithProps(unitOrInverted.key, async () => unitOrInverted), unitOverride[1]]);\n else if(InvertedUnit.isInvertedUnit(unitOrInverted))\n unitAndLabels.push([new DelayedPromiseWithProps(unitOrInverted.key, async () => unitOrInverted), unitOverride[1]]);\n else\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `Unable to locate SchemaItem ${unitOverride[0]}.`);\n }\n }\n\n const overrideFormat = this.createFormatOverride(format, presFormatOverride.precision, unitAndLabels);\n this.addPresentationFormat(overrideFormat);\n }\n }\n\n /**\n * Save this KindOfQuantity's properties to an object for serializing to JSON.\n * @param standalone Serialization includes only this object (as opposed to the full schema).\n * @param includeSchemaVersion Include the Schema's version information in the serialized object.\n */\n public override toJSON(standalone: boolean = false, includeSchemaVersion: boolean = false): KindOfQuantityProps {\n const schemaJson = super.toJSON(standalone, includeSchemaVersion) as any;\n schemaJson.relativeError = this.relativeError;\n schemaJson.persistenceUnit = this.persistenceUnit!.fullName;\n if (undefined !== this.presentationFormats && 0 < this.presentationFormats.length)\n schemaJson.presentationUnits = this.presentationFormats.map((format) => format.fullName);\n return schemaJson;\n }\n\n /** @internal */\n public override async toXml(schemaXml: Document): Promise<Element> {\n const itemElement = await super.toXml(schemaXml);\n\n const persistenceUnit = await this.persistenceUnit;\n if (undefined !== persistenceUnit) {\n const unitName = XmlSerializationUtils.createXmlTypedName(this.schema, persistenceUnit.schema, persistenceUnit.name);\n itemElement.setAttribute(\"persistenceUnit\", unitName);\n }\n\n if (undefined !== this.presentationFormats) {\n const presUnitStrings: string[] = [];\n for(const format of this.presentationFormats) {\n if (!OverrideFormat.isOverrideFormat(format)) {\n const resolvedFormat = await format;\n presUnitStrings.push(XmlSerializationUtils.createXmlTypedName(this.schema, resolvedFormat.schema, format.name));\n continue;\n }\n presUnitStrings.push(format.fullNameXml(this.schema));\n };\n itemElement.setAttribute(\"presentationUnits\", presUnitStrings.join(\";\"));\n }\n itemElement.setAttribute(\"relativeError\", this.relativeError.toString());\n\n return itemElement;\n }\n\n public override fromJSONSync(kindOfQuantityProps: KindOfQuantityProps): void {\n super.fromJSONSync(kindOfQuantityProps);\n this._relativeError = kindOfQuantityProps.relativeError;\n\n const persistenceUnit = this.schema.lookupItemSync(kindOfQuantityProps.persistenceUnit);\n if (undefined === persistenceUnit)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The Unit ${kindOfQuantityProps.persistenceUnit} does not exist.`);\n\n if (!Unit.isUnit(persistenceUnit) && !InvertedUnit.isInvertedUnit(persistenceUnit))\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The item ${kindOfQuantityProps.persistenceUnit} is not a Unit or InvertedUnit.`);\n\n if (Unit.isUnit(persistenceUnit))\n this._persistenceUnit = new DelayedPromiseWithProps(persistenceUnit.key, async () => persistenceUnit);\n else\n this._persistenceUnit = new DelayedPromiseWithProps(persistenceUnit.key, async () => persistenceUnit);\n\n if (undefined !== kindOfQuantityProps.presentationUnits)\n this.processPresentationUnitsSync(kindOfQuantityProps.presentationUnits);\n }\n\n public override async fromJSON(kindOfQuantityProps: KindOfQuantityProps): Promise<void> {\n await super.fromJSON(kindOfQuantityProps);\n this._relativeError = kindOfQuantityProps.relativeError;\n\n const persistenceUnit = await this.schema.lookupItem(kindOfQuantityProps.persistenceUnit);\n if (undefined === persistenceUnit)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The Unit ${kindOfQuantityProps.persistenceUnit} does not exist.`);\n\n if (!Unit.isUnit(persistenceUnit) && !InvertedUnit.isInvertedUnit(persistenceUnit))\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The item ${kindOfQuantityProps.persistenceUnit} is not a Unit or InvertedUnit.`);\n\n if (Unit.isUnit(persistenceUnit))\n this._persistenceUnit = new DelayedPromiseWithProps(persistenceUnit.key, async () => persistenceUnit);\n else\n this._persistenceUnit = new DelayedPromiseWithProps(persistenceUnit.key, async () => persistenceUnit);\n\n\n if (undefined !== kindOfQuantityProps.presentationUnits)\n await this.processPresentationUnits(kindOfQuantityProps.presentationUnits);\n }\n\n /**\n * Used for schema editing.\n * @internal\n */\n protected setRelativeError(relativeError: number): void {\n this._relativeError = relativeError;\n }\n\n /**\n * Used for schema editing.\n * @internal\n */\n protected setPersistenceUnit(value: LazyLoadedUnit | LazyLoadedInvertedUnit | undefined): void {\n this._persistenceUnit = value;\n }\n\n /**\n * Type guard to check if the SchemaItem is of type KindOfQuantity.\n * @param item The SchemaItem to check.\n * @returns True if the item is a KindOfQuantity, false otherwise.\n */\n public static isKindOfQuantity(item?: SchemaItem): item is KindOfQuantity {\n if (item && item.schemaItemType === SchemaItemType.KindOfQuantity)\n return true;\n\n return false;\n }\n\n /**\n * Type assertion to check if the SchemaItem is of type KindOfQuantity.\n * @param item The SchemaItem to check.\n * @returns The item cast to KindOfQuantity if it is a KindOfQuantity, undefined otherwise.\n * @internal\n */\n public static assertIsKindOfQuantity(item?: SchemaItem): asserts item is KindOfQuantity {\n if (!this.isKindOfQuantity(item))\n throw new ECSchemaError(ECSchemaStatus.InvalidSchemaItemType, `Expected '${SchemaItemType.KindOfQuantity}' (KindOfQuantity)`);\n }\n}\n/**\n * @internal\n * An abstract class used for schema editing.\n */\nexport abstract class MutableKindOfQuantity extends KindOfQuantity {\n public abstract override addPresentationFormat(format: LazyLoadedFormat | OverrideFormat, isDefault: boolean): void;\n public abstract override createFormatOverride(parent: Format, precision?: number, unitLabelOverrides?: Array<[LazyLoadedUnit | LazyLoadedInvertedUnit, string | undefined]>): OverrideFormat;\n public abstract override setDisplayLabel(displayLabel: string): void;\n public abstract override setPersistenceUnit(value: LazyLoadedUnit | LazyLoadedInvertedUnit | undefined): void;\n public abstract override setRelativeError(relativeError: number): void;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"KindOfQuantity.js","sourceRoot":"","sources":["../../../src/Metadata/KindOfQuantity.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAuB,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,UAAU;IACnB,cAAc,GAAG,cAAc,CAAC,cAAc,CAAC;IACxE,gBAAgB;IACT,MAAM,KAAc,cAAc,KAAK,OAAO,cAAc,CAAC,cAAc,CAAC,CAAC,CAAC;IAC7E,cAAc,GAAW,GAAG,CAAC;IAC7B,oBAAoB,GAA6C,EAAE,CAAC;IACpE,gBAAgB,CAA2C;IAEnE,4DAA4D;IAC5D,IAAW,yBAAyB,KAAoD,OAAO,IAAI,CAAC,mBAAmB,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AU,CAAC,WAAW,EAAE,IAAI,CAAC;mBAC3D,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;YAE7D,IAAI,SAAS,KAAK,QAAQ;gBACxB,MAAM,IAAI,aAAa,CAAC,cAAc,CAAC,aAAa,EAAE,6BAA6B,mBAAmB,CAAC,eAAe,GAAG,CAAC,CAAC;YAE7H,OAAO,QAAQ,CAAC;QAClB,CAAC,CAA4C,CAAC;QAE9C,IAAI,SAAS,KAAK,mBAAmB,CAAC,iBAAiB;YACrD,IAAI,CAAC,4BAA4B,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;IAC7E,CAAC;IAEe,KAAK,CAAC,QAAQ,CAAC,mBAAwC;QACrE,IAAI,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;IACzC,CAAC;IAED;;;OAGG;IACO,gBAAgB,CAAC,aAAqB;QAC9C,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;IACtC,CAAC;IAED;;;OAGG;IACO,kBAAkB,CAAC,KAA0D;QACrF,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;IAChC,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,gBAAgB,CAAC,IAAiB;QAC9C,IAAI,IAAI,IAAI,IAAI,CAAC,cAAc,KAAK,cAAc,CAAC,cAAc;YAC/D,OAAO,IAAI,CAAC;QAEd,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,sBAAsB,CAAC,IAAiB;QACpD,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC;YAC9B,MAAM,IAAI,aAAa,CAAC,cAAc,CAAC,qBAAqB,EAAE,aAAa,cAAc,CAAC,cAAc,oBAAoB,CAAC,CAAC;IAClI,CAAC;CACF;AACD;;;GAGG;AACH,MAAM,OAAgB,qBAAsB,SAAQ,cAAc;CAMjE","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 { DelayedPromiseWithProps } from \"../DelayedPromise\";\nimport { KindOfQuantityProps } from \"../Deserialization/JsonProps\";\nimport { XmlSerializationUtils } from \"../Deserialization/XmlSerializationUtils\";\nimport { SchemaItemType } from \"../ECObjects\";\nimport { ECSchemaError, ECSchemaStatus } from \"../Exception\";\nimport { LazyLoadedFormat, LazyLoadedInvertedUnit, LazyLoadedUnit } from \"../Interfaces\";\nimport { Format } from \"./Format\";\nimport { InvertedUnit } from \"./InvertedUnit\";\nimport { OverrideFormat, OverrideFormatProps } from \"./OverrideFormat\";\nimport { SchemaItem } from \"./SchemaItem\";\nimport { Unit } from \"./Unit\";\n\n/** A Typescript class representation of a KindOfQuantity.\n * @public @preview\n */\nexport class KindOfQuantity extends SchemaItem {\n public override readonly schemaItemType = KindOfQuantity.schemaItemType;\n /** @internal */\n public static override get schemaItemType() { return SchemaItemType.KindOfQuantity; }\n private _relativeError: number = 1.0;\n private _presentationFormats: Array<LazyLoadedFormat | OverrideFormat> = [];\n private _persistenceUnit?: LazyLoadedUnit | LazyLoadedInvertedUnit;\n\n /** The first presentation format in the list of Formats. */\n public get defaultPresentationFormat(): LazyLoadedFormat | OverrideFormat | undefined { return this.presentationFormats[0]; }\n\n /** A list of presentation formats. */\n public get presentationFormats(): Array<LazyLoadedFormat | OverrideFormat> { return this._presentationFormats; }\n\n /** Persistence unit */\n public get persistenceUnit(): LazyLoadedUnit | LazyLoadedInvertedUnit | undefined { return this._persistenceUnit; }\n\n public get relativeError() { return this._relativeError; }\n\n /**\n *\n * @param format The Format to add to this KindOfQuantity\n * @param isDefault\n * @internal\n */\n protected addPresentationFormat(format: LazyLoadedFormat | OverrideFormat, isDefault: boolean = false) {\n // TODO: Add some sort of validation?\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n (isDefault) ? this._presentationFormats.splice(0, 0, format) : this._presentationFormats.push(format);\n }\n\n /** Creates an OverrideFormat in the context of this KindOfQuantity.\n * @param parent The Format to override.\n * @param precision The precision override\n * @param unitLabelOverrides The list of unit and label overrides.\n * @internal\n */\n protected createFormatOverride(parent: Format, precision?: number, unitLabelOverrides?: Array<[LazyLoadedUnit | LazyLoadedInvertedUnit, string | undefined]>): OverrideFormat {\n if (unitLabelOverrides && parent.units && parent.units.length !== unitLabelOverrides.length)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `Cannot add presentation format to KindOfQuantity '${this.name}' because the number of unit overrides is inconsistent with the number in the Format '${parent.name}'.`);\n\n if (parent.units && 0 === parent.units.length && unitLabelOverrides && 0 < unitLabelOverrides.length)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `Cannot add a presentation format to KindOfQuantity '${this.name}' without any units and no unit overrides.`);\n\n // TODO: Check compatibility of Unit overrides with the persistence unit\n\n return new OverrideFormat(parent, precision, unitLabelOverrides);\n }\n\n private async processPresentationUnits(presentationUnitsJson: string | string[]): Promise<void> {\n const presUnitsArr = Array.isArray(presentationUnitsJson) ? presentationUnitsJson : presentationUnitsJson.split(\";\");\n for (const formatString of presUnitsArr) {\n const presFormatOverride: OverrideFormatProps = OverrideFormat.parseFormatString(formatString);\n\n const format = await this.schema.lookupItem(presFormatOverride.name, Format);\n if (undefined === format || format.schemaItemType !== SchemaItemType.Format)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `Unable to locate Format '${presFormatOverride.name}' for the presentation unit on KindOfQuantity ${this.fullName}.`);\n\n if (undefined === presFormatOverride.precision && undefined === presFormatOverride.unitAndLabels) {\n this.addPresentationFormat(new DelayedPromiseWithProps(format.key, async () => format));\n continue;\n }\n\n let unitAndLabels: Array<[LazyLoadedUnit | LazyLoadedInvertedUnit, string | undefined]> | undefined;\n if (undefined !== presFormatOverride.unitAndLabels) {\n if (4 < presFormatOverride.unitAndLabels.length)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, ``);\n\n unitAndLabels = [];\n for (const unitOverride of presFormatOverride.unitAndLabels) {\n const unitOrInverted = await this.schema.lookupItem(unitOverride[0]);\n\n if(Unit.isUnit(unitOrInverted))\n unitAndLabels.push([new DelayedPromiseWithProps(unitOrInverted.key, async () => unitOrInverted), unitOverride[1]]);\n else if(InvertedUnit.isInvertedUnit(unitOrInverted))\n unitAndLabels.push([new DelayedPromiseWithProps(unitOrInverted.key, async () => unitOrInverted), unitOverride[1]]);\n else\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `Unable to locate SchemaItem ${unitOverride[0]}.`);\n }\n }\n\n const overrideFormat = this.createFormatOverride(format, presFormatOverride.precision, unitAndLabels);\n this.addPresentationFormat(overrideFormat);\n }\n }\n\n private processPresentationUnitsSync(presentationUnitsJson: string | string[]): void {\n const presUnitsArr = Array.isArray(presentationUnitsJson) ? presentationUnitsJson : presentationUnitsJson.split(\";\");\n for (const formatString of presUnitsArr) {\n const presFormatOverride: OverrideFormatProps = OverrideFormat.parseFormatString(formatString);\n\n const format = this.schema.lookupItemSync(presFormatOverride.name, Format);\n if (undefined === format || format.schemaItemType !== SchemaItemType.Format)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `Unable to locate Format '${presFormatOverride.name}' for the presentation unit on KindOfQuantity ${this.fullName}.`);\n\n if (undefined === presFormatOverride.precision && undefined === presFormatOverride.unitAndLabels) {\n this.addPresentationFormat(new DelayedPromiseWithProps(format.key, async () => format));\n continue;\n }\n\n let unitAndLabels: Array<[LazyLoadedUnit | LazyLoadedInvertedUnit, string | undefined]> | undefined;\n if (undefined !== presFormatOverride.unitAndLabels) {\n if (4 < presFormatOverride.unitAndLabels.length)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, ``);\n\n unitAndLabels = [];\n for (const unitOverride of presFormatOverride.unitAndLabels) {\n const unitOrInverted = this.schema.lookupItemSync(unitOverride[0]);\n if(Unit.isUnit(unitOrInverted))\n unitAndLabels.push([new DelayedPromiseWithProps(unitOrInverted.key, async () => unitOrInverted), unitOverride[1]]);\n else if(InvertedUnit.isInvertedUnit(unitOrInverted))\n unitAndLabels.push([new DelayedPromiseWithProps(unitOrInverted.key, async () => unitOrInverted), unitOverride[1]]);\n else\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `Unable to locate SchemaItem ${unitOverride[0]}.`);\n }\n }\n\n const overrideFormat = this.createFormatOverride(format, presFormatOverride.precision, unitAndLabels);\n this.addPresentationFormat(overrideFormat);\n }\n }\n\n /**\n * Save this KindOfQuantity's properties to an object for serializing to JSON.\n * @param standalone Serialization includes only this object (as opposed to the full schema).\n * @param includeSchemaVersion Include the Schema's version information in the serialized object.\n */\n public override toJSON(standalone: boolean = false, includeSchemaVersion: boolean = false): KindOfQuantityProps {\n const schemaJson = super.toJSON(standalone, includeSchemaVersion) as any;\n schemaJson.relativeError = this.relativeError;\n schemaJson.persistenceUnit = this.persistenceUnit!.fullName;\n if (undefined !== this.presentationFormats && 0 < this.presentationFormats.length)\n schemaJson.presentationUnits = this.presentationFormats.map((format) => format.fullName);\n return schemaJson;\n }\n\n /** @internal */\n public override async toXml(schemaXml: Document): Promise<Element> {\n const itemElement = await super.toXml(schemaXml);\n\n const persistenceUnit = await this.persistenceUnit;\n if (undefined !== persistenceUnit) {\n const unitName = XmlSerializationUtils.createXmlTypedName(this.schema, persistenceUnit.schema, persistenceUnit.name);\n itemElement.setAttribute(\"persistenceUnit\", unitName);\n }\n\n if (undefined !== this.presentationFormats) {\n const presUnitStrings: string[] = [];\n for(const format of this.presentationFormats) {\n if (!OverrideFormat.isOverrideFormat(format)) {\n const resolvedFormat = await format;\n presUnitStrings.push(XmlSerializationUtils.createXmlTypedName(this.schema, resolvedFormat.schema, format.name));\n continue;\n }\n presUnitStrings.push(format.fullNameXml(this.schema));\n };\n itemElement.setAttribute(\"presentationUnits\", presUnitStrings.join(\";\"));\n }\n itemElement.setAttribute(\"relativeError\", this.relativeError.toString());\n\n return itemElement;\n }\n\n public override fromJSONSync(kindOfQuantityProps: KindOfQuantityProps): void {\n super.fromJSONSync(kindOfQuantityProps);\n this._relativeError = kindOfQuantityProps.relativeError;\n\n const unitItemKey = this.schema.getSchemaItemKey(kindOfQuantityProps.persistenceUnit);\n this._persistenceUnit = new DelayedPromiseWithProps(unitItemKey, async () => {\n const unitItem = await this.schema.lookupItem(unitItemKey, Unit)\n || await this.schema.lookupItem(unitItemKey, InvertedUnit);\n\n if (undefined === unitItem)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `Unable to locate the unit ${kindOfQuantityProps.persistenceUnit}.`);\n\n return unitItem;\n }) as LazyLoadedUnit | LazyLoadedInvertedUnit;\n\n if (undefined !== kindOfQuantityProps.presentationUnits)\n this.processPresentationUnitsSync(kindOfQuantityProps.presentationUnits);\n }\n\n public override async fromJSON(kindOfQuantityProps: KindOfQuantityProps): Promise<void> {\n this.fromJSONSync(kindOfQuantityProps);\n }\n\n /**\n * Used for schema editing.\n * @internal\n */\n protected setRelativeError(relativeError: number): void {\n this._relativeError = relativeError;\n }\n\n /**\n * Used for schema editing.\n * @internal\n */\n protected setPersistenceUnit(value: LazyLoadedUnit | LazyLoadedInvertedUnit | undefined): void {\n this._persistenceUnit = value;\n }\n\n /**\n * Type guard to check if the SchemaItem is of type KindOfQuantity.\n * @param item The SchemaItem to check.\n * @returns True if the item is a KindOfQuantity, false otherwise.\n */\n public static isKindOfQuantity(item?: SchemaItem): item is KindOfQuantity {\n if (item && item.schemaItemType === SchemaItemType.KindOfQuantity)\n return true;\n\n return false;\n }\n\n /**\n * Type assertion to check if the SchemaItem is of type KindOfQuantity.\n * @param item The SchemaItem to check.\n * @returns The item cast to KindOfQuantity if it is a KindOfQuantity, undefined otherwise.\n * @internal\n */\n public static assertIsKindOfQuantity(item?: SchemaItem): asserts item is KindOfQuantity {\n if (!this.isKindOfQuantity(item))\n throw new ECSchemaError(ECSchemaStatus.InvalidSchemaItemType, `Expected '${SchemaItemType.KindOfQuantity}' (KindOfQuantity)`);\n }\n}\n/**\n * @internal\n * An abstract class used for schema editing.\n */\nexport abstract class MutableKindOfQuantity extends KindOfQuantity {\n public abstract override addPresentationFormat(format: LazyLoadedFormat | OverrideFormat, isDefault: boolean): void;\n public abstract override createFormatOverride(parent: Format, precision?: number, unitLabelOverrides?: Array<[LazyLoadedUnit | LazyLoadedInvertedUnit, string | undefined]>): OverrideFormat;\n public abstract override setDisplayLabel(displayLabel: string): void;\n public abstract override setPersistenceUnit(value: LazyLoadedUnit | LazyLoadedInvertedUnit | undefined): void;\n public abstract override setRelativeError(relativeError: number): void;\n}\n"]}
|
|
@@ -81,6 +81,8 @@ export declare class Schema implements CustomAttributeContainerProps {
|
|
|
81
81
|
get schema(): Schema;
|
|
82
82
|
/** Returns the schema context this schema is within. */
|
|
83
83
|
get context(): SchemaContext;
|
|
84
|
+
/** Returns whether this schema is dynamic schema */
|
|
85
|
+
get isDynamic(): boolean;
|
|
84
86
|
/**
|
|
85
87
|
* Returns the SchemaLoadingController for this Schema. This would only be set if the schema is
|
|
86
88
|
* loaded incrementally.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../../src/Metadata/Schema.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG3C,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAG3D,OAAO,EAAE,eAAe,EAA6B,aAAa,EAAE,MAAM,cAAc,CAAC;AAEzF,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAa,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEnE,OAAO,EAAW,WAAW,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,6BAA6B,EAAE,kBAAkB,EAA6B,MAAM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AO,CAAC,YAAY,CAAC;aACvD,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY;aAClD,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;aACnD,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU;aAC9C,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;aAC3C,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;aACtC,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;aACnD,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU;aAC9C,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;aAC/D,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB;aAC1D,OAAO,CAAC,CAAC,SAAS,UAAU,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI;aAC5C,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;aAC9C,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;aACzC,UAAU,CAAC,aAAa,EAAE,aAAa,GAAG,IAAI;aAC9C,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;aACxC,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;aACnC,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;aAC7C,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;aACxC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;CACvD"}
|
|
@@ -111,6 +111,10 @@ export class Schema {
|
|
|
111
111
|
get schema() { return this; }
|
|
112
112
|
/** Returns the schema context this schema is within. */
|
|
113
113
|
get context() { return this._context; }
|
|
114
|
+
/** Returns whether this schema is dynamic schema */
|
|
115
|
+
get isDynamic() {
|
|
116
|
+
return this.customAttributes !== undefined && this.customAttributes.has("CoreCustomAttributes.DynamicSchema");
|
|
117
|
+
}
|
|
114
118
|
/**
|
|
115
119
|
* Returns the SchemaLoadingController for this Schema. This would only be set if the schema is
|
|
116
120
|
* loaded incrementally.
|