@itwin/ecschema-metadata 5.2.0-dev.7 → 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 +36 -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":"Schema.js","sourceRoot":"","sources":["../../../src/Metadata/Schema.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,sDAA4E;AAC5E,8DAA2D;AAE3D,4DAAyD;AACzD,oFAAiF;AACjF,4CAAyF;AACzF,4CAA6D;AAE7D,4CAAmE;AACnE,sCAAmC;AACnC,mCAA+C;AAC/C,yCAAsC;AACtC,uDAAkI;AAClI,iEAA8D;AAC9D,+CAA4C;AAC5C,+CAA4C;AAC5C,qCAAkC;AAClC,iDAA8C;AAC9C,qDAAkD;AAClD,mCAAgC;AAChC,6CAA0C;AAC1C,yDAAsD;AACtD,2DAAwD;AACxD,6CAA0C;AAC1C,iCAA8B;AAC9B,6CAA0C;AAC1C,4CAAqD;AAGrD;;GAEG;AACH,MAAa,MAAM;IACT,MAAM,CAAC,qBAAqB,GAAG,KAAK,CAAC;IACrC,QAAQ,CAAgB;IACxB,UAAU,CAAa;IACvB,MAAM,CAAU;IAChB,MAAM,CAAU;IAChB,YAAY,CAAU;IACd,UAAU,CAAW;IACpB,MAAM,CAA0B;IACzC,iBAAiB,CAAgC;IACjD,2BAA2B,CAAU;IACrC,2BAA2B,CAAU;IACrC,kBAAkB,CAA2B;IAwBrD,gBAAgB;IAChB,YAAY,OAAsB,EAAE,SAA8B,EAAE,KAAc,EAAE,OAAgB,EAAE,QAAiB,EAAE,QAAiB;QACxI,IAAI,CAAC,UAAU,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,qBAAS,CAAC,SAAS,EAAE,IAAI,qBAAS,CAAC,OAAiB,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MAAsB,aAAc,SAAQ,MAAM;CAuCjD;AAvCD,sCAuCC","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 { SchemaContext } from \"../Context\";\nimport { ECSpecVersion, SchemaReadHelper } from \"../Deserialization/Helper\";\nimport { JsonParser } from \"../Deserialization/JsonParser\";\nimport { SchemaProps } from \"../Deserialization/JsonProps\";\nimport { XmlParser } from \"../Deserialization/XmlParser\";\nimport { XmlSerializationUtils } from \"../Deserialization/XmlSerializationUtils\";\nimport { ECClassModifier, isSupportedSchemaItemType, PrimitiveType } from \"../ECObjects\";\nimport { ECSchemaError, ECSchemaStatus } from \"../Exception\";\nimport { AnyClass, SchemaInfo } from \"../Interfaces\";\nimport { ECVersion, SchemaItemKey, SchemaKey } from \"../SchemaKey\";\nimport { ECName } from \"../ECName\";\nimport { ECClass, StructClass } from \"./Class\";\nimport { Constant } from \"./Constant\";\nimport { CustomAttribute, CustomAttributeContainerProps, CustomAttributeSet, serializeCustomAttributes } from \"./CustomAttribute\";\nimport { CustomAttributeClass } from \"./CustomAttributeClass\";\nimport { EntityClass } from \"./EntityClass\";\nimport { Enumeration } from \"./Enumeration\";\nimport { Format } from \"./Format\";\nimport { InvertedUnit } from \"./InvertedUnit\";\nimport { KindOfQuantity } from \"./KindOfQuantity\";\nimport { Mixin } from \"./Mixin\";\nimport { Phenomenon } from \"./Phenomenon\";\nimport { PropertyCategory } from \"./PropertyCategory\";\nimport { RelationshipClass } from \"./RelationshipClass\";\nimport { SchemaItem } from \"./SchemaItem\";\nimport { Unit } from \"./Unit\";\nimport { UnitSystem } from \"./UnitSystem\";\nimport { ECSchemaNamespaceUris } from \"../Constants\";\nimport { SchemaLoadingController } from \"../utils/SchemaLoadingController\";\n\n/**\n * @public @preview\n */\nexport class Schema implements CustomAttributeContainerProps {\n private static _currentECSpecVersion = \"3.2\";\n private _context: SchemaContext;\n private _schemaKey?: SchemaKey;\n private _alias?: string;\n private _label?: string;\n private _description?: string;\n public readonly references: Schema[];\n private readonly _items: Map<string, SchemaItem>;\n private _customAttributes?: Map<string, CustomAttribute>;\n private _originalECSpecMajorVersion?: number;\n private _originalECSpecMinorVersion?: number;\n private _loadingController?: SchemaLoadingController;\n\n /**\n * Constructs an empty Schema with the given name and version in the provided context.\n * @param context The SchemaContext that will control the lifetime of the schema\n * @param name The schema's name\n * @param readVersion The integer read (major) version of the schema\n * @param writeVersion The integer write version of the schema\n * @param minorVersion The integer minor version of the schema\n */\n constructor(context: SchemaContext, name: string, alias: string, readVersion: number, writeVersion: number, minorVersion: number);\n /**\n * Constructs an empty Schema with the given key in the provided context.\n * @param context The SchemaContext that will control the lifetime of the schema\n * @param key A SchemaKey that uniquely identifies the schema\n */\n constructor(context: SchemaContext, key: SchemaKey, alias: string);\n /**\n * Constructs an empty Schema (without a SchemaKey) in the provided context.\n * This should only be used when the schema name and version will be deserialized (via `fromJson()`) immediately after this Schema is instantiated.\n * @param context The SchemaContext that will control the lifetime of the schema\n * @internal\n */\n constructor(context: SchemaContext);\n /** @internal */\n constructor(context: SchemaContext, nameOrKey?: SchemaKey | string, alias?: string, readVer?: number, writeVer?: number, minorVer?: number) {\n this._schemaKey = (typeof (nameOrKey) === \"string\") ? new SchemaKey(nameOrKey, new ECVersion(readVer as number, writeVer, minorVer)) : nameOrKey;\n this._context = context;\n this.references = [];\n this._items = new Map<string, SchemaItem>();\n\n if (alias !== undefined && ECName.validate(alias)) {\n this._alias = alias;\n } else if (nameOrKey !== undefined) {\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The Schema ${this.name} does not have the required 'alias' attribute.`);\n }\n\n this._originalECSpecMajorVersion = Schema.currentECSpecMajorVersion;\n this._originalECSpecMinorVersion = Schema.currentECSpecMinorVersion;\n }\n\n public get schemaKey() {\n if (undefined === this._schemaKey)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The schema has an invalid or missing SchemaKey.`);\n return this._schemaKey;\n }\n\n public get name() {\n if (this._schemaKey === undefined)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The schema has an invalid or missing SchemaKey.`);\n return this.schemaKey.name;\n }\n\n public get readVersion() {\n if (this._schemaKey === undefined)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The schema has an invalid or missing SchemaKey.`);\n return this.schemaKey.readVersion;\n }\n\n public get writeVersion() {\n if (this._schemaKey === undefined)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The schema has an invalid or missing SchemaKey.`);\n return this.schemaKey.writeVersion;\n }\n\n public get minorVersion() {\n if (this._schemaKey === undefined)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The schema has an invalid or missing SchemaKey.`);\n return this.schemaKey.minorVersion;\n }\n\n public get originalECSpecMajorVersion() { return this._originalECSpecMajorVersion; }\n public get originalECSpecMinorVersion() { return this._originalECSpecMinorVersion; }\n public static get currentECSpecMajorVersion(): number { return parseInt(Schema._currentECSpecVersion.split(\".\")[0], 10); }\n public static get currentECSpecMinorVersion(): number { return parseInt(Schema._currentECSpecVersion.split(\".\")[1], 10); }\n\n private get _isECSpecVersionUnsupported(): boolean {\n return (this.originalECSpecMajorVersion !== 3 || this.originalECSpecMinorVersion === undefined\n || (this.originalECSpecMinorVersion < 2 || this.originalECSpecMinorVersion > Schema.currentECSpecMinorVersion))\n }\n\n public get alias() {\n if (this._alias === undefined || this._alias === null) {\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The Schema ${this.name} does not have the required 'alias' attribute.`);\n } else { return this._alias; }\n }\n\n public get label() { return this._label; }\n\n public get description() { return this._description; }\n\n public get customAttributes(): CustomAttributeSet | undefined { return this._customAttributes; }\n\n /** Returns the schema name. */\n public get fullName() { return this.schemaKey.name; }\n\n /** Returns the schema. */\n public get schema(): Schema { return this; }\n\n /** Returns the schema context this schema is within. */\n public get context(): SchemaContext { return this._context; }\n\n /**\n * Returns the SchemaLoadingController for this Schema. This would only be set if the schema is\n * loaded incrementally.\n * @internal\n */\n public get loadingController(): SchemaLoadingController | undefined{\n return this._loadingController;\n }\n\n /**\n * Returns a SchemaItemKey given the item name and the schema it belongs to\n * @param fullName fully qualified name {Schema name}.{Item Name}\n */\n public getSchemaItemKey(fullName: string): SchemaItemKey {\n const [schemaName, itemName] = SchemaItem.parseFullName(fullName);\n let schemaKey = this.schemaKey;\n if (this.name !== schemaName) {\n const newSchemaRef = this.getReferenceSync(schemaName);\n if (undefined === newSchemaRef)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `Unable to find the referenced SchemaItem ${itemName}.`);\n schemaKey = newSchemaRef.schemaKey;\n }\n return new SchemaItemKey(itemName, schemaKey);\n }\n\n /** @internal */\n protected addItem<T extends SchemaItem>(item: T): void {\n if (undefined !== this.getItemSync(item.name))\n throw new ECSchemaError(ECSchemaStatus.DuplicateItem, `The SchemaItem ${item.name} cannot be added to the schema ${this.name} because it already exists`);\n\n this._items.set(item.name.toUpperCase(), item);\n }\n\n /**\n * @internal\n */\n protected createClass<T extends AnyClass>(type: (new (_schema: Schema, _name: string, _modifier?: ECClassModifier) => T), name: string, modifier?: ECClassModifier): T {\n const item = new type(this, name, modifier);\n this.addItem(item);\n return item;\n }\n\n /**\n * Deletes a class from within this schema.\n * @param name the local (unqualified) class name, lookup is case-insensitive\n * @internal\n */\n protected async deleteClass(name: string): Promise<void> {\n const schemaItem = await this.getItem(name);\n if (ECClass.isECClass(schemaItem)) {\n this._items.delete(name.toUpperCase());\n }\n }\n\n /**\n * Deletes a class from within this schema.\n * @param name the local (unqualified) class name, lookup is case-insensitive\n * @internal\n */\n protected deleteClassSync(name: string): void {\n const schemaItem = this.getItemSync(name);\n if (ECClass.isECClass(schemaItem))\n this._items.delete(name.toUpperCase());\n }\n\n /**\n * Deletes a SchemaItem from within this schema.\n * @param name the local (unqualified) class name, lookup is case-insensitive\n * @internal\n */\n protected async deleteSchemaItem(name: string): Promise<void> {\n const schemaItem = await this.getItem(name);\n if (SchemaItem.isSchemaItem(schemaItem)) {\n this._items.delete(name.toUpperCase());\n }\n }\n\n /**\n * Deletes a SchemaItem from within this schema.\n * @param name the local (unqualified) class name, lookup is case-insensitive\n * @internal\n */\n protected deleteSchemaItemSync(name: string): void {\n const schemaItem = this.getItemSync(name);\n if (SchemaItem.isSchemaItem(schemaItem))\n this._items.delete(name.toUpperCase());\n }\n\n /** @internal */\n protected createItem<T extends SchemaItem>(type: (new (_schema: Schema, _name: string) => T), name: string): T {\n const item = new type(this, name);\n this.addItem(item);\n return item;\n }\n\n /** @internal */\n protected addCustomAttribute(customAttribute: CustomAttribute) {\n if (!this._customAttributes)\n this._customAttributes = new Map<string, CustomAttribute>();\n\n this._customAttributes.set(customAttribute.className, customAttribute);\n }\n\n /**\n * Creates a EntityClass with the provided name in this schema.\n * @param name\n * @param modifier\n * @internal\n */\n protected async createEntityClass(name: string, modifier?: ECClassModifier): Promise<EntityClass> {\n return this.createClass<EntityClass>(EntityClass, name, modifier);\n }\n\n /** @internal */\n protected createEntityClassSync(name: string, modifier?: ECClassModifier): EntityClass {\n return this.createClass<EntityClass>(EntityClass, name, modifier);\n }\n\n /**\n * Creates a Mixin with the provided name in this schema.\n * @param name\n * @internal\n */\n protected async createMixinClass(name: string): Promise<Mixin> { return this.createClass<Mixin>(Mixin, name); }\n /** @internal */\n protected createMixinClassSync(name: string): Mixin { return this.createClass<Mixin>(Mixin, name); }\n\n /**\n * Creates a StructClass with the provided name in this schema.\n * @param name\n * @param modifier\n * @internal\n */\n protected async createStructClass(name: string, modifier?: ECClassModifier): Promise<StructClass> {\n return this.createClass<StructClass>(StructClass, name, modifier);\n }\n\n /** @internal */\n protected createStructClassSync(name: string, modifier?: ECClassModifier): StructClass {\n return this.createClass<StructClass>(StructClass, name, modifier);\n }\n\n /**\n * Creates a CustomAttributeClass with the provided name in this schema.\n * @param name\n * @param modifier\n * @internal\n */\n protected async createCustomAttributeClass(name: string, modifier?: ECClassModifier): Promise<CustomAttributeClass> {\n return this.createClass<CustomAttributeClass>(CustomAttributeClass, name, modifier);\n }\n\n /** @internal */\n protected createCustomAttributeClassSync(name: string, modifier?: ECClassModifier): CustomAttributeClass {\n return this.createClass<CustomAttributeClass>(CustomAttributeClass, name, modifier);\n }\n\n /**\n * Creates a RelationshipClass with the provided name in this schema.\n * @param name\n * @param modifier\n * @internal\n */\n protected async createRelationshipClass(name: string, modifier?: ECClassModifier): Promise<RelationshipClass> {\n return this.createRelationshipClassSync(name, modifier);\n }\n\n /** @internal */\n protected createRelationshipClassSync(name: string, modifier?: ECClassModifier): RelationshipClass {\n return this.createClass<RelationshipClass>(RelationshipClass, name, modifier);\n }\n\n /**\n * Creates an Enumeration with the provided name in this schema.\n * @param name\n * @param primitiveType\n *\n * @internal\n */\n protected async createEnumeration(name: string, primitiveType?: PrimitiveType.Integer | PrimitiveType.String): Promise<Enumeration> {\n return this.createEnumerationSync(name, primitiveType);\n }\n\n /** @internal */\n protected createEnumerationSync(name: string, primitiveType?: PrimitiveType.Integer | PrimitiveType.String): Enumeration {\n const item = new Enumeration(this, name, primitiveType);\n this.addItem(item);\n return item;\n }\n\n /**\n * Creates an KindOfQuantity with the provided name in this schema.\n * @param name\n * @internal\n */\n protected async createKindOfQuantity(name: string): Promise<KindOfQuantity> {\n return this.createKindOfQuantitySync(name);\n }\n\n /** @internal */\n protected createKindOfQuantitySync(name: string): KindOfQuantity {\n return this.createItem<KindOfQuantity>(KindOfQuantity, name);\n }\n\n /**\n * Creates a Constant with the provided name in this schema.\n * @param name\n * @internal\n */\n protected async createConstant(name: string): Promise<Constant> {\n return this.createItem<Constant>(Constant, name);\n }\n\n /** @internal */\n protected createConstantSync(name: string): Constant {\n return this.createItem<Constant>(Constant, name);\n }\n\n /**\n * Creates a Inverted Unit with the provided name in this schema.\n * @param name\n * @internal\n */\n protected async createInvertedUnit(name: string): Promise<InvertedUnit> {\n return this.createItem<InvertedUnit>(InvertedUnit, name);\n }\n\n /** @internal */\n protected createInvertedUnitSync(name: string): InvertedUnit {\n return this.createItem<InvertedUnit>(InvertedUnit, name);\n }\n\n /**\n * Creates an Format with the provided name in this schema.\n * @param name\n * @internal\n */\n protected async createFormat(name: string): Promise<Format> {\n return this.createItem<Format>(Format, name);\n }\n\n /** @internal */\n protected createFormatSync(name: string): Format {\n return this.createItem<Format>(Format, name);\n }\n\n /**\n * Creates a UnitSystem with the provided name in this schema.\n * @param name\n * @internal\n */\n protected async createUnitSystem(name: string): Promise<UnitSystem> {\n return this.createItem<UnitSystem>(UnitSystem, name);\n }\n\n /** @internal */\n protected createUnitSystemSync(name: string): UnitSystem {\n return this.createItem<UnitSystem>(UnitSystem, name);\n }\n\n /**\n * Creates a Phenomenon with the provided name in this schema.\n * @param name\n * @internal\n */\n protected async createPhenomenon(name: string): Promise<Phenomenon> {\n return this.createItem<Phenomenon>(Phenomenon, name);\n }\n\n /** @internal */\n protected createPhenomenonSync(name: string): Phenomenon {\n return this.createItem<Phenomenon>(Phenomenon, name);\n }\n\n /**\n * Creates a Unit with the provided name in this schema.\n * @param name\n * @internal\n */\n protected async createUnit(name: string): Promise<Unit> {\n return this.createItem<Unit>(Unit, name);\n }\n\n /** @internal */\n protected createUnitSync(name: string): Unit {\n return this.createItem<Unit>(Unit, name);\n }\n\n /**\n * Creates an PropertyCategory with the provided name in this schema.\n * @param name\n * @internal\n */\n protected async createPropertyCategory(name: string): Promise<PropertyCategory> {\n return this.createItem<PropertyCategory>(PropertyCategory, name);\n }\n\n /** @internal */\n protected createPropertyCategorySync(name: string): PropertyCategory {\n return this.createItem<PropertyCategory>(PropertyCategory, name);\n }\n\n /**\n *\n * @param refSchema\n * @internal\n */\n protected async addReference(refSchema: Schema): Promise<void> {\n // TODO validation of reference schema. For now just adding\n this.addReferenceSync(refSchema);\n }\n\n /** @internal */\n protected addReferenceSync(refSchema: Schema): void {\n this.references.push(refSchema);\n }\n\n /** @internal */\n protected setContext(context: SchemaContext): void {\n this._context = context;\n }\n\n /**\n * Sets the version of the SchemaKey identifying the schema.\n * @param readVersion The read version of the schema. If undefined, the value from the existing SchemaKey will be used.\n * @param writeVersion The write version of the schema. If undefined, the value from the existing SchemaKey will be used.\n * @param minorVersion The minor version of the schema. If undefined, the value from the existing SchemaKey will be used.\n * @internal\n */\n public setVersion(readVersion?: number, writeVersion?: number, minorVersion?: number): void {\n if (!this._schemaKey)\n throw new ECSchemaError(ECSchemaStatus.InvalidSchemaKey, `The schema '${this.name}' has an invalid SchemaKey.`);\n\n const newVersion = new ECVersion(readVersion ?? this._schemaKey.readVersion, writeVersion ?? this._schemaKey.writeVersion, minorVersion ?? this._schemaKey.minorVersion);\n this._schemaKey = new SchemaKey(this._schemaKey.name, newVersion);\n }\n\n /**\n * Shortcut for calling getItem with EntityClass.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested EntityClass or undefined if not found.\n */\n public async getEntityClass(name: string): Promise<EntityClass | undefined> { return this.getItem(name, EntityClass); }\n\n /**\n * Shortcut for calling getItem with Mixin.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested Mixin or undefined if not found.\n */\n public async getMixin(name: string): Promise<Mixin | undefined> { return this.getItem(name, Mixin); }\n\n /**\n * Shortcut for calling getItem with StructClass.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested StructClass or undefined if not found.\n */\n public async getStructClass(name: string): Promise<StructClass | undefined> { return this.getItem(name, StructClass); }\n\n /**\n * Shortcut for calling getItem with CustomAttributeClass.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested CustomAttributeClass or undefined if not found.\n */\n public async getCustomAttributeClass(name: string): Promise<CustomAttributeClass | undefined> { return this.getItem(name, CustomAttributeClass); }\n\n /**\n * Shortcut for calling getItem with RelationshipClass.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested RelationshipClass or undefined if not found.\n */\n public async getRelationshipClass(name: string): Promise<RelationshipClass | undefined> { return this.getItem(name, RelationshipClass); }\n\n /**\n * Shortcut for calling getItem with Enumeration.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested Enumeration or undefined if not found.\n */\n public async getEnumeration(name: string): Promise<Enumeration | undefined> { return this.getItem(name, Enumeration); }\n\n /**\n * Shortcut for calling getItem with KindOfQuantity.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested KindOfQuantity or undefined if not found.\n */\n public async getKindOfQuantity(name: string): Promise<KindOfQuantity | undefined> { return this.getItem(name, KindOfQuantity); }\n\n /**\n * Shortcut for calling getItem with PropertyCategory.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested PropertyCategory or undefined if not found.\n */\n public async getPropertyCategory(name: string): Promise<PropertyCategory | undefined> { return this.getItem(name, PropertyCategory); }\n\n /**\n * Shortcut for calling getItem with Unit.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested Unit or undefined if not found.\n */\n public async getUnit(name: string): Promise<Unit | undefined> { return this.getItem(name, Unit); }\n\n /**\n * Shortcut for calling getItem with InvertedUnit.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested InvertedUnit or undefined if not found.\n */\n public async getInvertedUnit(name: string): Promise<InvertedUnit | undefined> { return this.getItem(name, InvertedUnit); }\n\n /**\n * Shortcut for calling getItem with Constant.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested Constant or undefined if not found.\n */\n public async getConstant(name: string): Promise<Constant | undefined> { return this.getItem(name, Constant); }\n\n /**\n * Shortcut for calling getItem with Phenomenon.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested Phenomenon or undefined if not found.\n */\n public async getPhenomenon(name: string): Promise<Phenomenon | undefined> { return this.getItem(name, Phenomenon); }\n\n /**\n * Shortcut for calling getItem with UnitSystem.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested UnitSystem or undefined if not found.\n */\n public async getUnitSystem(name: string): Promise<UnitSystem | undefined> { return this.getItem(name, UnitSystem); }\n\n /**\n * Shortcut for calling getItem with Format.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested Format or undefined if not found.\n */\n public async getFormat(name: string): Promise<Format | undefined> { return this.getItem(name, Format); }\n /**\n * Gets an item from within this schema. To get by full name use lookupItem instead.\n * @param key the local (unqualified) name, lookup is case-insensitive\n */\n public async getItem(name: string): Promise<SchemaItem | undefined>\n public async getItem<T extends typeof SchemaItem>(name: string, itemConstructor: T): Promise<InstanceType<T> | undefined>\n public async getItem<T extends typeof SchemaItem>(name: string, itemConstructor?: T): Promise<SchemaItem | InstanceType<T> | undefined> {\n // this method exists so we can rewire it later when we load partial schemas, for now it is identical to the sync version\n if (itemConstructor === undefined)\n return this.getItemSync(name) as InstanceType<T> | undefined;\n\n return this.getItemSync(name, itemConstructor);\n }\n\n /**\n * Gets an item from within this schema. To get by full name use lookupItem instead.\n * If an item of the name exists but does not match the requested type, undefined is returned\n * @param key the local (unqualified) name, lookup is case-insensitive\n * @param itemConstructor The constructor of the item to return.\n */\n public getItemSync(name: string): SchemaItem | undefined\n public getItemSync<T extends typeof SchemaItem>(name: string, itemConstructor: T): InstanceType<T> | undefined\n public getItemSync<T extends typeof SchemaItem>(name: string, itemConstructor?: T): SchemaItem | InstanceType<T> | undefined {\n const value = this._items.get(name.toUpperCase());\n if (value === undefined || itemConstructor === undefined)\n return value;\n\n if (isSupportedSchemaItemType(value.schemaItemType, itemConstructor.schemaItemType))\n return value as InstanceType<T>;\n\n return undefined;\n }\n\n /**\n * Attempts to find a schema item within this schema or a (directly) referenced schema\n * @param key The full name or a SchemaItemKey identifying the desired item.\n */\n public async lookupItem(key: Readonly<SchemaItemKey> | string): Promise<SchemaItem | undefined>;\n public async lookupItem<T extends typeof SchemaItem>(key: Readonly<SchemaItemKey> | string, itemConstructor: T): Promise<InstanceType<T> | undefined>;\n public async lookupItem<T extends typeof SchemaItem>(key: Readonly<SchemaItemKey> | string, itemConstructor?: T): Promise<SchemaItem | InstanceType<T> | undefined> {\n let schemaName, itemName: string;\n if (typeof (key) === \"string\") {\n [schemaName, itemName] = SchemaItem.parseFullName(key);\n } else {\n itemName = key.name;\n schemaName = key.schemaName;\n }\n\n if (!schemaName || schemaName.toUpperCase() === this.name.toUpperCase()) {\n return itemConstructor\n ? this.getItem(itemName, itemConstructor)\n : this.getItem(itemName);\n }\n\n const refSchema = await this.getReference(schemaName);\n if (!refSchema)\n return undefined;\n\n return itemConstructor\n ? refSchema.getItem(itemName, itemConstructor)\n : refSchema.getItem(itemName);\n }\n\n /**\n * Attempts to find a schema item within this schema or a (directly) referenced schema\n * @param key The full name or a SchemaItemKey identifying the desired item.\n */\n public lookupItemSync(key: Readonly<SchemaItemKey> | string): SchemaItem | undefined;\n public lookupItemSync<T extends typeof SchemaItem>(key: Readonly<SchemaItemKey> | string, itemConstructor: T): InstanceType<T> | undefined;\n public lookupItemSync<T extends typeof SchemaItem>(key: Readonly<SchemaItemKey> | string, itemConstructor?: T): SchemaItem | InstanceType<T> | undefined {\n let schemaName, itemName: string;\n if (typeof (key) === \"string\") {\n [schemaName, itemName] = SchemaItem.parseFullName(key);\n } else {\n itemName = key.name;\n schemaName = key.schemaName;\n }\n\n if (!schemaName || schemaName.toUpperCase() === this.name.toUpperCase()) {\n return itemConstructor\n ? this.getItemSync(itemName, itemConstructor)\n : this.getItemSync(itemName);\n }\n\n const refSchema = this.getReferenceSync(schemaName);\n if (!refSchema)\n return undefined;\n\n return itemConstructor\n ? refSchema.getItemSync(itemName, itemConstructor)\n : refSchema.getItemSync(itemName);\n }\n\n /**\n * Returns all of the loaded items in this schema.\n */\n public getItems(): Iterable<SchemaItem>;\n public getItems<T extends typeof SchemaItem>(itemConstructor: T): Iterable<InstanceType<T>>;\n public * getItems<T extends typeof SchemaItem>(itemConstructor?: T): Iterable<InstanceType<T> | SchemaItem> {\n if (!this._items)\n return;\n\n for (const item of this._items.values()) {\n if (itemConstructor === undefined || isSupportedSchemaItemType(item.schemaItemType, itemConstructor.schemaItemType))\n yield item;\n }\n }\n\n /**\n * Gets a referenced schema by name\n * @param refSchemaName schema name to find\n */\n public async getReference(refSchemaName: string): Promise<Schema | undefined> {\n if (this.references.length === 0)\n return undefined;\n\n return this.references.find((ref) => ref.name.toLowerCase() === refSchemaName.toLowerCase());\n }\n\n /**\n * Gets a referenced schema by alias\n * @param alias alias to find\n */\n public getReferenceNameByAlias(alias: string): string | undefined {\n if (this.references.length === 0)\n return undefined;\n\n const schema = this.references.find((ref) => ref.alias ? ref.alias.toLowerCase() === alias.toLowerCase() : false);\n return schema ? schema.name : undefined;\n }\n\n /**\n * Gets a referenced schema by name\n * @param refSchemaName schema name to find\n */\n public getReferenceSync(refSchemaName: string): Schema | undefined {\n if (this.references.length === 0)\n return undefined;\n\n return this.references.find((ref) => ref.name.toLowerCase() === refSchemaName.toLowerCase());\n }\n\n /**\n * Save this Schema's properties to an object for serializing to JSON.\n */\n public toJSON(): SchemaProps {\n if (this._isECSpecVersionUnsupported)\n throw new ECSchemaError(ECSchemaStatus.NewerECSpecVersion, `The Schema '${this.name}' has an unsupported ECSpecVersion and cannot be serialized.`);\n\n const schemaJson: { [value: string]: any } = {};\n schemaJson.$schema = ECSchemaNamespaceUris.SCHEMAURL3_2_JSON; // $schema is required\n schemaJson.name = this.name; // name is required\n schemaJson.version = this.schemaKey.version.toString(true);\n schemaJson.alias = this.alias; // alias is required\n if (undefined !== this.label) // label is optional\n schemaJson.label = this.label;\n if (undefined !== this.description) // description is optional\n schemaJson.description = this.description;\n if (undefined !== this.references && this.references.length > 0) // references is optional\n schemaJson.references = this.references.map(({ name, schemaKey }) => ({ name, version: schemaKey.version.toString() }));\n\n const customAttributes = serializeCustomAttributes(this.customAttributes);\n if (undefined !== customAttributes)\n schemaJson.customAttributes = customAttributes;\n if (this._items.size > 0) {\n schemaJson.items = {};\n this._items.forEach((schemaItem: SchemaItem) => {\n schemaJson.items[schemaItem.name] = schemaItem.toJSON(false, true);\n });\n }\n return schemaJson as SchemaProps;\n }\n\n /**\n * Converts the schema to a DOM XML Document.\n * @param schemaXml An empty DOM document to which the schema will be written\n */\n public async toXml(schemaXml: Document): Promise<Document> {\n if (this._isECSpecVersionUnsupported)\n throw new ECSchemaError(ECSchemaStatus.NewerECSpecVersion, `The Schema '${this.name}' has an unsupported ECSpecVersion and cannot be serialized.`);\n\n const schemaMetadata = schemaXml.createElement(\"ECSchema\");\n schemaMetadata.setAttribute(\"xmlns\", ECSchemaNamespaceUris.SCHEMAURL3_2_XML);\n schemaMetadata.setAttribute(\"version\", this.schemaKey.version.toString());\n schemaMetadata.setAttribute(\"schemaName\", this.name);\n schemaMetadata.setAttribute(\"alias\", this.alias ? this.alias : \"\");\n if (undefined !== this.label)\n schemaMetadata.setAttribute(\"displayLabel\", this.label);\n if (undefined !== this.description)\n schemaMetadata.setAttribute(\"description\", this.description);\n\n // Map used for CA serialization\n const refSchemaMap = new Map<string, string>();\n\n this.references.forEach(({ name, schemaKey, alias }) => {\n const schemaRef = schemaXml.createElement(\"ECSchemaReference\");\n schemaRef.setAttribute(\"name\", name);\n schemaRef.setAttribute(\"version\", schemaKey.version.toString());\n schemaRef.setAttribute(\"alias\", alias ? alias : \"\");\n schemaMetadata.appendChild(schemaRef);\n refSchemaMap.set(name, schemaKey.version.toString());\n });\n\n if (this._customAttributes) {\n const parentElem = schemaXml.createElement(\"ECCustomAttributes\");\n for (const [name, attribute] of this._customAttributes) {\n const caElem = await XmlSerializationUtils.writeCustomAttribute(name, attribute, schemaXml, this);\n parentElem.appendChild(caElem);\n }\n schemaMetadata.appendChild(parentElem);\n }\n\n for (const [, item] of this._items) {\n const itemXml = await item.toXml(schemaXml);\n schemaMetadata.appendChild(itemXml);\n }\n\n schemaXml.appendChild(schemaMetadata);\n return schemaXml;\n }\n\n /**\n * Loads the schema header (name, version alias, label and description) from the input SchemaProps\n */\n public fromJSONSync(schemaProps: SchemaProps) {\n if (undefined === this._schemaKey) {\n const schemaName = schemaProps.name;\n const version = ECVersion.fromString(schemaProps.version);\n this._schemaKey = new SchemaKey(schemaName, version);\n } else {\n if (schemaProps.name.toLowerCase() !== this.name.toLowerCase())\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The Schema ${this.name} does not match the provided name, '${schemaProps.name}'.`);\n if (this.schemaKey.version.compare(ECVersion.fromString(schemaProps.version)))\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The Schema ${this.name} has the version '${this.schemaKey.version}' that does not match the provided version '${schemaProps.version}'.`);\n }\n\n if (schemaProps.$schema.match(`https://dev\\\\.bentley\\\\.com/json_schemas/ec/([0-9]+)/ecschema`) == null && schemaProps.$schema.match(`http://www\\\\.bentley\\\\.com/schemas/Bentley\\\\.ECXML\\\\.([0-9]+)`) == null)\n throw new ECSchemaError(ECSchemaStatus.MissingSchemaUrl, `The Schema '${this.name}' has an unsupported namespace '${schemaProps.$schema}'.`);\n\n // The schema props have not been parsed. Parse the ECXml version from the $schema attribute\n let ecVersion: ECSpecVersion;\n if (schemaProps.ecSpecMajorVersion === undefined || schemaProps.ecSpecMinorVersion === undefined) {\n ecVersion = ((schemaProps.$schema.search(\"ECXML\") !== -1) ? XmlParser.parseXmlNamespace(schemaProps.$schema) : JsonParser.parseJSUri(schemaProps.$schema)) as ECSpecVersion;\n } else {\n ecVersion = { readVersion: schemaProps.ecSpecMajorVersion, writeVersion: schemaProps.ecSpecMinorVersion } as ECSpecVersion;\n }\n\n this._originalECSpecMajorVersion = ecVersion.readVersion;\n this._originalECSpecMinorVersion = ecVersion.writeVersion;\n\n if (ecVersion.readVersion !== 3 || (ecVersion.readVersion === 3 && ecVersion.writeVersion < 2))\n throw new ECSchemaError(ECSchemaStatus.InvalidECVersion, `The Schema '${this.name}' has an unsupported ECVersion ${ecVersion.readVersion}.${ecVersion.writeVersion} and cannot be loaded.`);\n\n if (ECName.validate(schemaProps.alias)) {\n this._alias = schemaProps.alias;\n } else {\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The Schema ${schemaProps.name} does not have the required 'alias' attribute.`);\n }\n\n if (undefined !== schemaProps.label)\n this._label = schemaProps.label;\n\n if (undefined !== schemaProps.description)\n this._description = schemaProps.description;\n }\n\n /**\n * Loads the schema header (name, version alias, label and description) from the input SchemaProps\n */\n public async fromJSON(schemaProps: SchemaProps) {\n this.fromJSONSync(schemaProps);\n }\n\n /**\n * Completely loads the SchemaInfo from the input json and starts loading the entire schema. The complete schema can be retrieved from the\n * schema context using the getCachedSchema method\n */\n public static async startLoadingFromJson(jsonObj: object | string, context: SchemaContext): Promise<SchemaInfo> {\n const schema = new Schema(context);\n\n const reader = new SchemaReadHelper(JsonParser, context);\n const rawSchema = typeof jsonObj === \"string\" ? JSON.parse(jsonObj) : jsonObj;\n return reader.readSchemaInfo(schema, rawSchema);\n }\n\n public static async fromJson(jsonObj: object | string, context: SchemaContext): Promise<Schema> {\n let schema: Schema = new Schema(context);\n\n const reader = new SchemaReadHelper(JsonParser, context);\n const rawSchema = typeof jsonObj === \"string\" ? JSON.parse(jsonObj) : jsonObj;\n schema = await reader.readSchema(schema, rawSchema);\n\n return schema;\n }\n\n /**\n * Completely loads the Schema from the input json. The schema is cached in the schema context.\n */\n public static fromJsonSync(jsonObj: object | string, context: SchemaContext): Schema {\n let schema: Schema = new Schema(context);\n\n const reader = new SchemaReadHelper(JsonParser, context);\n const rawSchema = typeof jsonObj === \"string\" ? JSON.parse(jsonObj) : jsonObj;\n schema = reader.readSchemaSync(schema, rawSchema);\n\n return schema;\n }\n\n /**\n * @internal\n */\n public static isSchema(object: any): object is Schema {\n const schema = object as Schema;\n\n return schema !== undefined && schema.schemaKey !== undefined && schema.context !== undefined;\n }\n\n /** @internal */\n protected setDisplayLabel(displayLabel: string) {\n this._label = displayLabel;\n }\n\n /** @internal */\n protected setDescription(description: string) {\n this._description = description;\n }\n\n /** @internal */\n protected setAlias(alias: string) {\n if (!ECName.validate(alias)) {\n throw new ECSchemaError(ECSchemaStatus.InvalidECName, \"The specified schema alias is invalid.\");\n }\n this._alias = alias;\n }\n\n /** @internal */\n public setLoadingController(controller: SchemaLoadingController) {\n this._loadingController = controller;\n }\n}\n\n/**\n * Hackish approach that works like a \"friend class\" so we can access protected members without making them public.\n * We cannot put this into Helper.ts and make it non-export, because we are importing Helper.ts from this file, and the circular import\n * would prevent this class from extending Schema.\n * @internal\n */\nexport abstract class MutableSchema extends Schema {\n public abstract override addCustomAttribute(customAttribute: CustomAttribute): void;\n public abstract override createEntityClass(name: string, modifier?: ECClassModifier): Promise<EntityClass>;\n public abstract override createEntityClassSync(name: string, modifier?: ECClassModifier): EntityClass;\n public abstract override createMixinClass(name: string): Promise<Mixin>;\n public abstract override createMixinClassSync(name: string): Mixin;\n public abstract override createStructClass(name: string, modifier?: ECClassModifier): Promise<StructClass>;\n public abstract override createStructClassSync(name: string, modifier?: ECClassModifier): StructClass;\n public abstract override createCustomAttributeClass(name: string, modifier?: ECClassModifier): Promise<CustomAttributeClass>;\n public abstract override createCustomAttributeClassSync(name: string, modifier?: ECClassModifier): CustomAttributeClass;\n public abstract override createRelationshipClass(name: string, modifier?: ECClassModifier): Promise<RelationshipClass>;\n public abstract override createRelationshipClassSync(name: string, modifier?: ECClassModifier): RelationshipClass;\n public abstract override createEnumeration(name: string, primitiveType?: PrimitiveType.Integer | PrimitiveType.String): Promise<Enumeration>;\n public abstract override createEnumerationSync(name: string, primitiveType?: PrimitiveType.Integer | PrimitiveType.String): Enumeration;\n public abstract override createKindOfQuantity(name: string): Promise<KindOfQuantity>;\n public abstract override createKindOfQuantitySync(name: string): KindOfQuantity;\n public abstract override createUnit(name: string): Promise<Unit>;\n public abstract override createUnitSync(name: string): Unit;\n public abstract override createConstant(name: string): Promise<Constant>;\n public abstract override createConstantSync(name: string): Constant;\n public abstract override createInvertedUnit(name: string): Promise<InvertedUnit>;\n public abstract override createInvertedUnitSync(name: string): InvertedUnit;\n public abstract override createPhenomenon(name: string): Promise<Phenomenon>;\n public abstract override createPhenomenonSync(name: string): Phenomenon;\n public abstract override createFormat(name: string): Promise<Format>;\n public abstract override createFormatSync(name: string): Format;\n public abstract override createUnitSystem(name: string): Promise<UnitSystem>;\n public abstract override createUnitSystemSync(name: string): UnitSystem;\n public abstract override createPropertyCategory(name: string): Promise<PropertyCategory>;\n public abstract override createPropertyCategorySync(name: string): PropertyCategory;\n public abstract override addItem<T extends SchemaItem>(item: T): void;\n public abstract override addReference(refSchema: Schema): Promise<void>;\n public abstract override addReferenceSync(refSchema: Schema): void;\n public abstract override setContext(schemaContext: SchemaContext): void;\n public abstract override deleteClass(name: string): Promise<void>;\n public abstract override deleteClassSync(name: string): void;\n public abstract override deleteSchemaItem(name: string): Promise<void>;\n public abstract override deleteSchemaItemSync(name: string): void;\n public abstract override setAlias(alias: string): void;\n}"]}
|
|
1
|
+
{"version":3,"file":"Schema.js","sourceRoot":"","sources":["../../../src/Metadata/Schema.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,sDAA4E;AAC5E,8DAA2D;AAE3D,4DAAyD;AACzD,oFAAiF;AACjF,4CAAyF;AACzF,4CAA6D;AAE7D,4CAAmE;AACnE,sCAAmC;AACnC,mCAA+C;AAC/C,yCAAsC;AACtC,uDAAkI;AAClI,iEAA8D;AAC9D,+CAA4C;AAC5C,+CAA4C;AAC5C,qCAAkC;AAClC,iDAA8C;AAC9C,qDAAkD;AAClD,mCAAgC;AAChC,6CAA0C;AAC1C,yDAAsD;AACtD,2DAAwD;AACxD,6CAA0C;AAC1C,iCAA8B;AAC9B,6CAA0C;AAC1C,4CAAqD;AAGrD;;GAEG;AACH,MAAa,MAAM;IACT,MAAM,CAAC,qBAAqB,GAAG,KAAK,CAAC;IACrC,QAAQ,CAAgB;IACxB,UAAU,CAAa;IACvB,MAAM,CAAU;IAChB,MAAM,CAAU;IAChB,YAAY,CAAU;IACd,UAAU,CAAW;IACpB,MAAM,CAA0B;IACzC,iBAAiB,CAAgC;IACjD,2BAA2B,CAAU;IACrC,2BAA2B,CAAU;IACrC,kBAAkB,CAA2B;IAwBrD,gBAAgB;IAChB,YAAY,OAAsB,EAAE,SAA8B,EAAE,KAAc,EAAE,OAAgB,EAAE,QAAiB,EA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,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YAC5B,MAAM,IAAI,yBAAa,CAAC,0BAAc,CAAC,aAAa,EAAE,wCAAwC,CAAC,CAAC;QAClG,CAAC;QACD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;IAED,gBAAgB;IACT,oBAAoB,CAAC,UAAmC;QAC7D,IAAI,CAAC,kBAAkB,GAAG,UAAU,CAAC;IACvC,CAAC;;AA33BH,wBA43BC;AAED;;;;;GAKG;AACH,MAAsB,aAAc,SAAQ,MAAM;CAuCjD;AAvCD,sCAuCC","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 { SchemaContext } from \"../Context\";\nimport { ECSpecVersion, SchemaReadHelper } from \"../Deserialization/Helper\";\nimport { JsonParser } from \"../Deserialization/JsonParser\";\nimport { SchemaProps } from \"../Deserialization/JsonProps\";\nimport { XmlParser } from \"../Deserialization/XmlParser\";\nimport { XmlSerializationUtils } from \"../Deserialization/XmlSerializationUtils\";\nimport { ECClassModifier, isSupportedSchemaItemType, PrimitiveType } from \"../ECObjects\";\nimport { ECSchemaError, ECSchemaStatus } from \"../Exception\";\nimport { AnyClass, SchemaInfo } from \"../Interfaces\";\nimport { ECVersion, SchemaItemKey, SchemaKey } from \"../SchemaKey\";\nimport { ECName } from \"../ECName\";\nimport { ECClass, StructClass } from \"./Class\";\nimport { Constant } from \"./Constant\";\nimport { CustomAttribute, CustomAttributeContainerProps, CustomAttributeSet, serializeCustomAttributes } from \"./CustomAttribute\";\nimport { CustomAttributeClass } from \"./CustomAttributeClass\";\nimport { EntityClass } from \"./EntityClass\";\nimport { Enumeration } from \"./Enumeration\";\nimport { Format } from \"./Format\";\nimport { InvertedUnit } from \"./InvertedUnit\";\nimport { KindOfQuantity } from \"./KindOfQuantity\";\nimport { Mixin } from \"./Mixin\";\nimport { Phenomenon } from \"./Phenomenon\";\nimport { PropertyCategory } from \"./PropertyCategory\";\nimport { RelationshipClass } from \"./RelationshipClass\";\nimport { SchemaItem } from \"./SchemaItem\";\nimport { Unit } from \"./Unit\";\nimport { UnitSystem } from \"./UnitSystem\";\nimport { ECSchemaNamespaceUris } from \"../Constants\";\nimport { SchemaLoadingController } from \"../utils/SchemaLoadingController\";\n\n/**\n * @public @preview\n */\nexport class Schema implements CustomAttributeContainerProps {\n private static _currentECSpecVersion = \"3.2\";\n private _context: SchemaContext;\n private _schemaKey?: SchemaKey;\n private _alias?: string;\n private _label?: string;\n private _description?: string;\n public readonly references: Schema[];\n private readonly _items: Map<string, SchemaItem>;\n private _customAttributes?: Map<string, CustomAttribute>;\n private _originalECSpecMajorVersion?: number;\n private _originalECSpecMinorVersion?: number;\n private _loadingController?: SchemaLoadingController;\n\n /**\n * Constructs an empty Schema with the given name and version in the provided context.\n * @param context The SchemaContext that will control the lifetime of the schema\n * @param name The schema's name\n * @param readVersion The integer read (major) version of the schema\n * @param writeVersion The integer write version of the schema\n * @param minorVersion The integer minor version of the schema\n */\n constructor(context: SchemaContext, name: string, alias: string, readVersion: number, writeVersion: number, minorVersion: number);\n /**\n * Constructs an empty Schema with the given key in the provided context.\n * @param context The SchemaContext that will control the lifetime of the schema\n * @param key A SchemaKey that uniquely identifies the schema\n */\n constructor(context: SchemaContext, key: SchemaKey, alias: string);\n /**\n * Constructs an empty Schema (without a SchemaKey) in the provided context.\n * This should only be used when the schema name and version will be deserialized (via `fromJson()`) immediately after this Schema is instantiated.\n * @param context The SchemaContext that will control the lifetime of the schema\n * @internal\n */\n constructor(context: SchemaContext);\n /** @internal */\n constructor(context: SchemaContext, nameOrKey?: SchemaKey | string, alias?: string, readVer?: number, writeVer?: number, minorVer?: number) {\n this._schemaKey = (typeof (nameOrKey) === \"string\") ? new SchemaKey(nameOrKey, new ECVersion(readVer as number, writeVer, minorVer)) : nameOrKey;\n this._context = context;\n this.references = [];\n this._items = new Map<string, SchemaItem>();\n\n if (alias !== undefined && ECName.validate(alias)) {\n this._alias = alias;\n } else if (nameOrKey !== undefined) {\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The Schema ${this.name} does not have the required 'alias' attribute.`);\n }\n\n this._originalECSpecMajorVersion = Schema.currentECSpecMajorVersion;\n this._originalECSpecMinorVersion = Schema.currentECSpecMinorVersion;\n }\n\n public get schemaKey() {\n if (undefined === this._schemaKey)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The schema has an invalid or missing SchemaKey.`);\n return this._schemaKey;\n }\n\n public get name() {\n if (this._schemaKey === undefined)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The schema has an invalid or missing SchemaKey.`);\n return this.schemaKey.name;\n }\n\n public get readVersion() {\n if (this._schemaKey === undefined)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The schema has an invalid or missing SchemaKey.`);\n return this.schemaKey.readVersion;\n }\n\n public get writeVersion() {\n if (this._schemaKey === undefined)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The schema has an invalid or missing SchemaKey.`);\n return this.schemaKey.writeVersion;\n }\n\n public get minorVersion() {\n if (this._schemaKey === undefined)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The schema has an invalid or missing SchemaKey.`);\n return this.schemaKey.minorVersion;\n }\n\n public get originalECSpecMajorVersion() { return this._originalECSpecMajorVersion; }\n public get originalECSpecMinorVersion() { return this._originalECSpecMinorVersion; }\n public static get currentECSpecMajorVersion(): number { return parseInt(Schema._currentECSpecVersion.split(\".\")[0], 10); }\n public static get currentECSpecMinorVersion(): number { return parseInt(Schema._currentECSpecVersion.split(\".\")[1], 10); }\n\n private get _isECSpecVersionUnsupported(): boolean {\n return (this.originalECSpecMajorVersion !== 3 || this.originalECSpecMinorVersion === undefined\n || (this.originalECSpecMinorVersion < 2 || this.originalECSpecMinorVersion > Schema.currentECSpecMinorVersion))\n }\n\n public get alias() {\n if (this._alias === undefined || this._alias === null) {\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The Schema ${this.name} does not have the required 'alias' attribute.`);\n } else { return this._alias; }\n }\n\n public get label() { return this._label; }\n\n public get description() { return this._description; }\n\n public get customAttributes(): CustomAttributeSet | undefined { return this._customAttributes; }\n\n /** Returns the schema name. */\n public get fullName() { return this.schemaKey.name; }\n\n /** Returns the schema. */\n public get schema(): Schema { return this; }\n\n /** Returns the schema context this schema is within. */\n public get context(): SchemaContext { return this._context; }\n\n /** Returns whether this schema is dynamic schema */\n public get isDynamic(): boolean {\n return this.customAttributes !== undefined && this.customAttributes.has(\"CoreCustomAttributes.DynamicSchema\");\n }\n\n /**\n * Returns the SchemaLoadingController for this Schema. This would only be set if the schema is\n * loaded incrementally.\n * @internal\n */\n public get loadingController(): SchemaLoadingController | undefined{\n return this._loadingController;\n }\n\n /**\n * Returns a SchemaItemKey given the item name and the schema it belongs to\n * @param fullName fully qualified name {Schema name}.{Item Name}\n */\n public getSchemaItemKey(fullName: string): SchemaItemKey {\n const [schemaName, itemName] = SchemaItem.parseFullName(fullName);\n let schemaKey = this.schemaKey;\n if (this.name !== schemaName) {\n const newSchemaRef = this.getReferenceSync(schemaName);\n if (undefined === newSchemaRef)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `Unable to find the referenced SchemaItem ${itemName}.`);\n schemaKey = newSchemaRef.schemaKey;\n }\n return new SchemaItemKey(itemName, schemaKey);\n }\n\n /** @internal */\n protected addItem<T extends SchemaItem>(item: T): void {\n if (undefined !== this.getItemSync(item.name))\n throw new ECSchemaError(ECSchemaStatus.DuplicateItem, `The SchemaItem ${item.name} cannot be added to the schema ${this.name} because it already exists`);\n\n this._items.set(item.name.toUpperCase(), item);\n }\n\n /**\n * @internal\n */\n protected createClass<T extends AnyClass>(type: (new (_schema: Schema, _name: string, _modifier?: ECClassModifier) => T), name: string, modifier?: ECClassModifier): T {\n const item = new type(this, name, modifier);\n this.addItem(item);\n return item;\n }\n\n /**\n * Deletes a class from within this schema.\n * @param name the local (unqualified) class name, lookup is case-insensitive\n * @internal\n */\n protected async deleteClass(name: string): Promise<void> {\n const schemaItem = await this.getItem(name);\n if (ECClass.isECClass(schemaItem)) {\n this._items.delete(name.toUpperCase());\n }\n }\n\n /**\n * Deletes a class from within this schema.\n * @param name the local (unqualified) class name, lookup is case-insensitive\n * @internal\n */\n protected deleteClassSync(name: string): void {\n const schemaItem = this.getItemSync(name);\n if (ECClass.isECClass(schemaItem))\n this._items.delete(name.toUpperCase());\n }\n\n /**\n * Deletes a SchemaItem from within this schema.\n * @param name the local (unqualified) class name, lookup is case-insensitive\n * @internal\n */\n protected async deleteSchemaItem(name: string): Promise<void> {\n const schemaItem = await this.getItem(name);\n if (SchemaItem.isSchemaItem(schemaItem)) {\n this._items.delete(name.toUpperCase());\n }\n }\n\n /**\n * Deletes a SchemaItem from within this schema.\n * @param name the local (unqualified) class name, lookup is case-insensitive\n * @internal\n */\n protected deleteSchemaItemSync(name: string): void {\n const schemaItem = this.getItemSync(name);\n if (SchemaItem.isSchemaItem(schemaItem))\n this._items.delete(name.toUpperCase());\n }\n\n /** @internal */\n protected createItem<T extends SchemaItem>(type: (new (_schema: Schema, _name: string) => T), name: string): T {\n const item = new type(this, name);\n this.addItem(item);\n return item;\n }\n\n /** @internal */\n protected addCustomAttribute(customAttribute: CustomAttribute) {\n if (!this._customAttributes)\n this._customAttributes = new Map<string, CustomAttribute>();\n\n this._customAttributes.set(customAttribute.className, customAttribute);\n }\n\n /**\n * Creates a EntityClass with the provided name in this schema.\n * @param name\n * @param modifier\n * @internal\n */\n protected async createEntityClass(name: string, modifier?: ECClassModifier): Promise<EntityClass> {\n return this.createClass<EntityClass>(EntityClass, name, modifier);\n }\n\n /** @internal */\n protected createEntityClassSync(name: string, modifier?: ECClassModifier): EntityClass {\n return this.createClass<EntityClass>(EntityClass, name, modifier);\n }\n\n /**\n * Creates a Mixin with the provided name in this schema.\n * @param name\n * @internal\n */\n protected async createMixinClass(name: string): Promise<Mixin> { return this.createClass<Mixin>(Mixin, name); }\n /** @internal */\n protected createMixinClassSync(name: string): Mixin { return this.createClass<Mixin>(Mixin, name); }\n\n /**\n * Creates a StructClass with the provided name in this schema.\n * @param name\n * @param modifier\n * @internal\n */\n protected async createStructClass(name: string, modifier?: ECClassModifier): Promise<StructClass> {\n return this.createClass<StructClass>(StructClass, name, modifier);\n }\n\n /** @internal */\n protected createStructClassSync(name: string, modifier?: ECClassModifier): StructClass {\n return this.createClass<StructClass>(StructClass, name, modifier);\n }\n\n /**\n * Creates a CustomAttributeClass with the provided name in this schema.\n * @param name\n * @param modifier\n * @internal\n */\n protected async createCustomAttributeClass(name: string, modifier?: ECClassModifier): Promise<CustomAttributeClass> {\n return this.createClass<CustomAttributeClass>(CustomAttributeClass, name, modifier);\n }\n\n /** @internal */\n protected createCustomAttributeClassSync(name: string, modifier?: ECClassModifier): CustomAttributeClass {\n return this.createClass<CustomAttributeClass>(CustomAttributeClass, name, modifier);\n }\n\n /**\n * Creates a RelationshipClass with the provided name in this schema.\n * @param name\n * @param modifier\n * @internal\n */\n protected async createRelationshipClass(name: string, modifier?: ECClassModifier): Promise<RelationshipClass> {\n return this.createRelationshipClassSync(name, modifier);\n }\n\n /** @internal */\n protected createRelationshipClassSync(name: string, modifier?: ECClassModifier): RelationshipClass {\n return this.createClass<RelationshipClass>(RelationshipClass, name, modifier);\n }\n\n /**\n * Creates an Enumeration with the provided name in this schema.\n * @param name\n * @param primitiveType\n *\n * @internal\n */\n protected async createEnumeration(name: string, primitiveType?: PrimitiveType.Integer | PrimitiveType.String): Promise<Enumeration> {\n return this.createEnumerationSync(name, primitiveType);\n }\n\n /** @internal */\n protected createEnumerationSync(name: string, primitiveType?: PrimitiveType.Integer | PrimitiveType.String): Enumeration {\n const item = new Enumeration(this, name, primitiveType);\n this.addItem(item);\n return item;\n }\n\n /**\n * Creates an KindOfQuantity with the provided name in this schema.\n * @param name\n * @internal\n */\n protected async createKindOfQuantity(name: string): Promise<KindOfQuantity> {\n return this.createKindOfQuantitySync(name);\n }\n\n /** @internal */\n protected createKindOfQuantitySync(name: string): KindOfQuantity {\n return this.createItem<KindOfQuantity>(KindOfQuantity, name);\n }\n\n /**\n * Creates a Constant with the provided name in this schema.\n * @param name\n * @internal\n */\n protected async createConstant(name: string): Promise<Constant> {\n return this.createItem<Constant>(Constant, name);\n }\n\n /** @internal */\n protected createConstantSync(name: string): Constant {\n return this.createItem<Constant>(Constant, name);\n }\n\n /**\n * Creates a Inverted Unit with the provided name in this schema.\n * @param name\n * @internal\n */\n protected async createInvertedUnit(name: string): Promise<InvertedUnit> {\n return this.createItem<InvertedUnit>(InvertedUnit, name);\n }\n\n /** @internal */\n protected createInvertedUnitSync(name: string): InvertedUnit {\n return this.createItem<InvertedUnit>(InvertedUnit, name);\n }\n\n /**\n * Creates an Format with the provided name in this schema.\n * @param name\n * @internal\n */\n protected async createFormat(name: string): Promise<Format> {\n return this.createItem<Format>(Format, name);\n }\n\n /** @internal */\n protected createFormatSync(name: string): Format {\n return this.createItem<Format>(Format, name);\n }\n\n /**\n * Creates a UnitSystem with the provided name in this schema.\n * @param name\n * @internal\n */\n protected async createUnitSystem(name: string): Promise<UnitSystem> {\n return this.createItem<UnitSystem>(UnitSystem, name);\n }\n\n /** @internal */\n protected createUnitSystemSync(name: string): UnitSystem {\n return this.createItem<UnitSystem>(UnitSystem, name);\n }\n\n /**\n * Creates a Phenomenon with the provided name in this schema.\n * @param name\n * @internal\n */\n protected async createPhenomenon(name: string): Promise<Phenomenon> {\n return this.createItem<Phenomenon>(Phenomenon, name);\n }\n\n /** @internal */\n protected createPhenomenonSync(name: string): Phenomenon {\n return this.createItem<Phenomenon>(Phenomenon, name);\n }\n\n /**\n * Creates a Unit with the provided name in this schema.\n * @param name\n * @internal\n */\n protected async createUnit(name: string): Promise<Unit> {\n return this.createItem<Unit>(Unit, name);\n }\n\n /** @internal */\n protected createUnitSync(name: string): Unit {\n return this.createItem<Unit>(Unit, name);\n }\n\n /**\n * Creates an PropertyCategory with the provided name in this schema.\n * @param name\n * @internal\n */\n protected async createPropertyCategory(name: string): Promise<PropertyCategory> {\n return this.createItem<PropertyCategory>(PropertyCategory, name);\n }\n\n /** @internal */\n protected createPropertyCategorySync(name: string): PropertyCategory {\n return this.createItem<PropertyCategory>(PropertyCategory, name);\n }\n\n /**\n *\n * @param refSchema\n * @internal\n */\n protected async addReference(refSchema: Schema): Promise<void> {\n // TODO validation of reference schema. For now just adding\n this.addReferenceSync(refSchema);\n }\n\n /** @internal */\n protected addReferenceSync(refSchema: Schema): void {\n this.references.push(refSchema);\n }\n\n /** @internal */\n protected setContext(context: SchemaContext): void {\n this._context = context;\n }\n\n /**\n * Sets the version of the SchemaKey identifying the schema.\n * @param readVersion The read version of the schema. If undefined, the value from the existing SchemaKey will be used.\n * @param writeVersion The write version of the schema. If undefined, the value from the existing SchemaKey will be used.\n * @param minorVersion The minor version of the schema. If undefined, the value from the existing SchemaKey will be used.\n * @internal\n */\n public setVersion(readVersion?: number, writeVersion?: number, minorVersion?: number): void {\n if (!this._schemaKey)\n throw new ECSchemaError(ECSchemaStatus.InvalidSchemaKey, `The schema '${this.name}' has an invalid SchemaKey.`);\n\n const newVersion = new ECVersion(readVersion ?? this._schemaKey.readVersion, writeVersion ?? this._schemaKey.writeVersion, minorVersion ?? this._schemaKey.minorVersion);\n this._schemaKey = new SchemaKey(this._schemaKey.name, newVersion);\n }\n\n /**\n * Shortcut for calling getItem with EntityClass.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested EntityClass or undefined if not found.\n */\n public async getEntityClass(name: string): Promise<EntityClass | undefined> { return this.getItem(name, EntityClass); }\n\n /**\n * Shortcut for calling getItem with Mixin.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested Mixin or undefined if not found.\n */\n public async getMixin(name: string): Promise<Mixin | undefined> { return this.getItem(name, Mixin); }\n\n /**\n * Shortcut for calling getItem with StructClass.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested StructClass or undefined if not found.\n */\n public async getStructClass(name: string): Promise<StructClass | undefined> { return this.getItem(name, StructClass); }\n\n /**\n * Shortcut for calling getItem with CustomAttributeClass.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested CustomAttributeClass or undefined if not found.\n */\n public async getCustomAttributeClass(name: string): Promise<CustomAttributeClass | undefined> { return this.getItem(name, CustomAttributeClass); }\n\n /**\n * Shortcut for calling getItem with RelationshipClass.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested RelationshipClass or undefined if not found.\n */\n public async getRelationshipClass(name: string): Promise<RelationshipClass | undefined> { return this.getItem(name, RelationshipClass); }\n\n /**\n * Shortcut for calling getItem with Enumeration.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested Enumeration or undefined if not found.\n */\n public async getEnumeration(name: string): Promise<Enumeration | undefined> { return this.getItem(name, Enumeration); }\n\n /**\n * Shortcut for calling getItem with KindOfQuantity.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested KindOfQuantity or undefined if not found.\n */\n public async getKindOfQuantity(name: string): Promise<KindOfQuantity | undefined> { return this.getItem(name, KindOfQuantity); }\n\n /**\n * Shortcut for calling getItem with PropertyCategory.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested PropertyCategory or undefined if not found.\n */\n public async getPropertyCategory(name: string): Promise<PropertyCategory | undefined> { return this.getItem(name, PropertyCategory); }\n\n /**\n * Shortcut for calling getItem with Unit.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested Unit or undefined if not found.\n */\n public async getUnit(name: string): Promise<Unit | undefined> { return this.getItem(name, Unit); }\n\n /**\n * Shortcut for calling getItem with InvertedUnit.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested InvertedUnit or undefined if not found.\n */\n public async getInvertedUnit(name: string): Promise<InvertedUnit | undefined> { return this.getItem(name, InvertedUnit); }\n\n /**\n * Shortcut for calling getItem with Constant.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested Constant or undefined if not found.\n */\n public async getConstant(name: string): Promise<Constant | undefined> { return this.getItem(name, Constant); }\n\n /**\n * Shortcut for calling getItem with Phenomenon.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested Phenomenon or undefined if not found.\n */\n public async getPhenomenon(name: string): Promise<Phenomenon | undefined> { return this.getItem(name, Phenomenon); }\n\n /**\n * Shortcut for calling getItem with UnitSystem.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested UnitSystem or undefined if not found.\n */\n public async getUnitSystem(name: string): Promise<UnitSystem | undefined> { return this.getItem(name, UnitSystem); }\n\n /**\n * Shortcut for calling getItem with Format.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested Format or undefined if not found.\n */\n public async getFormat(name: string): Promise<Format | undefined> { return this.getItem(name, Format); }\n /**\n * Gets an item from within this schema. To get by full name use lookupItem instead.\n * @param key the local (unqualified) name, lookup is case-insensitive\n */\n public async getItem(name: string): Promise<SchemaItem | undefined>\n public async getItem<T extends typeof SchemaItem>(name: string, itemConstructor: T): Promise<InstanceType<T> | undefined>\n public async getItem<T extends typeof SchemaItem>(name: string, itemConstructor?: T): Promise<SchemaItem | InstanceType<T> | undefined> {\n // this method exists so we can rewire it later when we load partial schemas, for now it is identical to the sync version\n if (itemConstructor === undefined)\n return this.getItemSync(name) as InstanceType<T> | undefined;\n\n return this.getItemSync(name, itemConstructor);\n }\n\n /**\n * Gets an item from within this schema. To get by full name use lookupItem instead.\n * If an item of the name exists but does not match the requested type, undefined is returned\n * @param key the local (unqualified) name, lookup is case-insensitive\n * @param itemConstructor The constructor of the item to return.\n */\n public getItemSync(name: string): SchemaItem | undefined\n public getItemSync<T extends typeof SchemaItem>(name: string, itemConstructor: T): InstanceType<T> | undefined\n public getItemSync<T extends typeof SchemaItem>(name: string, itemConstructor?: T): SchemaItem | InstanceType<T> | undefined {\n const value = this._items.get(name.toUpperCase());\n if (value === undefined || itemConstructor === undefined)\n return value;\n\n if (isSupportedSchemaItemType(value.schemaItemType, itemConstructor.schemaItemType))\n return value as InstanceType<T>;\n\n return undefined;\n }\n\n /**\n * Attempts to find a schema item within this schema or a (directly) referenced schema\n * @param key The full name or a SchemaItemKey identifying the desired item.\n */\n public async lookupItem(key: Readonly<SchemaItemKey> | string): Promise<SchemaItem | undefined>;\n public async lookupItem<T extends typeof SchemaItem>(key: Readonly<SchemaItemKey> | string, itemConstructor: T): Promise<InstanceType<T> | undefined>;\n public async lookupItem<T extends typeof SchemaItem>(key: Readonly<SchemaItemKey> | string, itemConstructor?: T): Promise<SchemaItem | InstanceType<T> | undefined> {\n let schemaName, itemName: string;\n if (typeof (key) === \"string\") {\n [schemaName, itemName] = SchemaItem.parseFullName(key);\n } else {\n itemName = key.name;\n schemaName = key.schemaName;\n }\n\n if (!schemaName || schemaName.toUpperCase() === this.name.toUpperCase()) {\n return itemConstructor\n ? this.getItem(itemName, itemConstructor)\n : this.getItem(itemName);\n }\n\n const refSchema = await this.getReference(schemaName);\n if (!refSchema)\n return undefined;\n\n return itemConstructor\n ? refSchema.getItem(itemName, itemConstructor)\n : refSchema.getItem(itemName);\n }\n\n /**\n * Attempts to find a schema item within this schema or a (directly) referenced schema\n * @param key The full name or a SchemaItemKey identifying the desired item.\n */\n public lookupItemSync(key: Readonly<SchemaItemKey> | string): SchemaItem | undefined;\n public lookupItemSync<T extends typeof SchemaItem>(key: Readonly<SchemaItemKey> | string, itemConstructor: T): InstanceType<T> | undefined;\n public lookupItemSync<T extends typeof SchemaItem>(key: Readonly<SchemaItemKey> | string, itemConstructor?: T): SchemaItem | InstanceType<T> | undefined {\n let schemaName, itemName: string;\n if (typeof (key) === \"string\") {\n [schemaName, itemName] = SchemaItem.parseFullName(key);\n } else {\n itemName = key.name;\n schemaName = key.schemaName;\n }\n\n if (!schemaName || schemaName.toUpperCase() === this.name.toUpperCase()) {\n return itemConstructor\n ? this.getItemSync(itemName, itemConstructor)\n : this.getItemSync(itemName);\n }\n\n const refSchema = this.getReferenceSync(schemaName);\n if (!refSchema)\n return undefined;\n\n return itemConstructor\n ? refSchema.getItemSync(itemName, itemConstructor)\n : refSchema.getItemSync(itemName);\n }\n\n /**\n * Returns all of the loaded items in this schema.\n */\n public getItems(): Iterable<SchemaItem>;\n public getItems<T extends typeof SchemaItem>(itemConstructor: T): Iterable<InstanceType<T>>;\n public * getItems<T extends typeof SchemaItem>(itemConstructor?: T): Iterable<InstanceType<T> | SchemaItem> {\n if (!this._items)\n return;\n\n for (const item of this._items.values()) {\n if (itemConstructor === undefined || isSupportedSchemaItemType(item.schemaItemType, itemConstructor.schemaItemType))\n yield item;\n }\n }\n\n /**\n * Gets a referenced schema by name\n * @param refSchemaName schema name to find\n */\n public async getReference(refSchemaName: string): Promise<Schema | undefined> {\n if (this.references.length === 0)\n return undefined;\n\n return this.references.find((ref) => ref.name.toLowerCase() === refSchemaName.toLowerCase());\n }\n\n /**\n * Gets a referenced schema by alias\n * @param alias alias to find\n */\n public getReferenceNameByAlias(alias: string): string | undefined {\n if (this.references.length === 0)\n return undefined;\n\n const schema = this.references.find((ref) => ref.alias ? ref.alias.toLowerCase() === alias.toLowerCase() : false);\n return schema ? schema.name : undefined;\n }\n\n /**\n * Gets a referenced schema by name\n * @param refSchemaName schema name to find\n */\n public getReferenceSync(refSchemaName: string): Schema | undefined {\n if (this.references.length === 0)\n return undefined;\n\n return this.references.find((ref) => ref.name.toLowerCase() === refSchemaName.toLowerCase());\n }\n\n /**\n * Save this Schema's properties to an object for serializing to JSON.\n */\n public toJSON(): SchemaProps {\n if (this._isECSpecVersionUnsupported)\n throw new ECSchemaError(ECSchemaStatus.NewerECSpecVersion, `The Schema '${this.name}' has an unsupported ECSpecVersion and cannot be serialized.`);\n\n const schemaJson: { [value: string]: any } = {};\n schemaJson.$schema = ECSchemaNamespaceUris.SCHEMAURL3_2_JSON; // $schema is required\n schemaJson.name = this.name; // name is required\n schemaJson.version = this.schemaKey.version.toString(true);\n schemaJson.alias = this.alias; // alias is required\n if (undefined !== this.label) // label is optional\n schemaJson.label = this.label;\n if (undefined !== this.description) // description is optional\n schemaJson.description = this.description;\n if (undefined !== this.references && this.references.length > 0) // references is optional\n schemaJson.references = this.references.map(({ name, schemaKey }) => ({ name, version: schemaKey.version.toString() }));\n\n const customAttributes = serializeCustomAttributes(this.customAttributes);\n if (undefined !== customAttributes)\n schemaJson.customAttributes = customAttributes;\n if (this._items.size > 0) {\n schemaJson.items = {};\n this._items.forEach((schemaItem: SchemaItem) => {\n schemaJson.items[schemaItem.name] = schemaItem.toJSON(false, true);\n });\n }\n return schemaJson as SchemaProps;\n }\n\n /**\n * Converts the schema to a DOM XML Document.\n * @param schemaXml An empty DOM document to which the schema will be written\n */\n public async toXml(schemaXml: Document): Promise<Document> {\n if (this._isECSpecVersionUnsupported)\n throw new ECSchemaError(ECSchemaStatus.NewerECSpecVersion, `The Schema '${this.name}' has an unsupported ECSpecVersion and cannot be serialized.`);\n\n const schemaMetadata = schemaXml.createElement(\"ECSchema\");\n schemaMetadata.setAttribute(\"xmlns\", ECSchemaNamespaceUris.SCHEMAURL3_2_XML);\n schemaMetadata.setAttribute(\"version\", this.schemaKey.version.toString());\n schemaMetadata.setAttribute(\"schemaName\", this.name);\n schemaMetadata.setAttribute(\"alias\", this.alias ? this.alias : \"\");\n if (undefined !== this.label)\n schemaMetadata.setAttribute(\"displayLabel\", this.label);\n if (undefined !== this.description)\n schemaMetadata.setAttribute(\"description\", this.description);\n\n // Map used for CA serialization\n const refSchemaMap = new Map<string, string>();\n\n this.references.forEach(({ name, schemaKey, alias }) => {\n const schemaRef = schemaXml.createElement(\"ECSchemaReference\");\n schemaRef.setAttribute(\"name\", name);\n schemaRef.setAttribute(\"version\", schemaKey.version.toString());\n schemaRef.setAttribute(\"alias\", alias ? alias : \"\");\n schemaMetadata.appendChild(schemaRef);\n refSchemaMap.set(name, schemaKey.version.toString());\n });\n\n if (this._customAttributes) {\n const parentElem = schemaXml.createElement(\"ECCustomAttributes\");\n for (const [name, attribute] of this._customAttributes) {\n const caElem = await XmlSerializationUtils.writeCustomAttribute(name, attribute, schemaXml, this);\n parentElem.appendChild(caElem);\n }\n schemaMetadata.appendChild(parentElem);\n }\n\n for (const [, item] of this._items) {\n const itemXml = await item.toXml(schemaXml);\n schemaMetadata.appendChild(itemXml);\n }\n\n schemaXml.appendChild(schemaMetadata);\n return schemaXml;\n }\n\n /**\n * Loads the schema header (name, version alias, label and description) from the input SchemaProps\n */\n public fromJSONSync(schemaProps: SchemaProps) {\n if (undefined === this._schemaKey) {\n const schemaName = schemaProps.name;\n const version = ECVersion.fromString(schemaProps.version);\n this._schemaKey = new SchemaKey(schemaName, version);\n } else {\n if (schemaProps.name.toLowerCase() !== this.name.toLowerCase())\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The Schema ${this.name} does not match the provided name, '${schemaProps.name}'.`);\n if (this.schemaKey.version.compare(ECVersion.fromString(schemaProps.version)))\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The Schema ${this.name} has the version '${this.schemaKey.version}' that does not match the provided version '${schemaProps.version}'.`);\n }\n\n if (schemaProps.$schema.match(`https://dev\\\\.bentley\\\\.com/json_schemas/ec/([0-9]+)/ecschema`) == null && schemaProps.$schema.match(`http://www\\\\.bentley\\\\.com/schemas/Bentley\\\\.ECXML\\\\.([0-9]+)`) == null)\n throw new ECSchemaError(ECSchemaStatus.MissingSchemaUrl, `The Schema '${this.name}' has an unsupported namespace '${schemaProps.$schema}'.`);\n\n // The schema props have not been parsed. Parse the ECXml version from the $schema attribute\n let ecVersion: ECSpecVersion;\n if (schemaProps.ecSpecMajorVersion === undefined || schemaProps.ecSpecMinorVersion === undefined) {\n ecVersion = ((schemaProps.$schema.search(\"ECXML\") !== -1) ? XmlParser.parseXmlNamespace(schemaProps.$schema) : JsonParser.parseJSUri(schemaProps.$schema)) as ECSpecVersion;\n } else {\n ecVersion = { readVersion: schemaProps.ecSpecMajorVersion, writeVersion: schemaProps.ecSpecMinorVersion } as ECSpecVersion;\n }\n\n this._originalECSpecMajorVersion = ecVersion.readVersion;\n this._originalECSpecMinorVersion = ecVersion.writeVersion;\n\n if (ecVersion.readVersion !== 3 || (ecVersion.readVersion === 3 && ecVersion.writeVersion < 2))\n throw new ECSchemaError(ECSchemaStatus.InvalidECVersion, `The Schema '${this.name}' has an unsupported ECVersion ${ecVersion.readVersion}.${ecVersion.writeVersion} and cannot be loaded.`);\n\n if (ECName.validate(schemaProps.alias)) {\n this._alias = schemaProps.alias;\n } else {\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The Schema ${schemaProps.name} does not have the required 'alias' attribute.`);\n }\n\n if (undefined !== schemaProps.label)\n this._label = schemaProps.label;\n\n if (undefined !== schemaProps.description)\n this._description = schemaProps.description;\n }\n\n /**\n * Loads the schema header (name, version alias, label and description) from the input SchemaProps\n */\n public async fromJSON(schemaProps: SchemaProps) {\n this.fromJSONSync(schemaProps);\n }\n\n /**\n * Completely loads the SchemaInfo from the input json and starts loading the entire schema. The complete schema can be retrieved from the\n * schema context using the getCachedSchema method\n */\n public static async startLoadingFromJson(jsonObj: object | string, context: SchemaContext): Promise<SchemaInfo> {\n const schema = new Schema(context);\n\n const reader = new SchemaReadHelper(JsonParser, context);\n const rawSchema = typeof jsonObj === \"string\" ? JSON.parse(jsonObj) : jsonObj;\n return reader.readSchemaInfo(schema, rawSchema);\n }\n\n public static async fromJson(jsonObj: object | string, context: SchemaContext): Promise<Schema> {\n let schema: Schema = new Schema(context);\n\n const reader = new SchemaReadHelper(JsonParser, context);\n const rawSchema = typeof jsonObj === \"string\" ? JSON.parse(jsonObj) : jsonObj;\n schema = await reader.readSchema(schema, rawSchema);\n\n return schema;\n }\n\n /**\n * Completely loads the Schema from the input json. The schema is cached in the schema context.\n */\n public static fromJsonSync(jsonObj: object | string, context: SchemaContext): Schema {\n let schema: Schema = new Schema(context);\n\n const reader = new SchemaReadHelper(JsonParser, context);\n const rawSchema = typeof jsonObj === \"string\" ? JSON.parse(jsonObj) : jsonObj;\n schema = reader.readSchemaSync(schema, rawSchema);\n\n return schema;\n }\n\n /**\n * @internal\n */\n public static isSchema(object: any): object is Schema {\n const schema = object as Schema;\n\n return schema !== undefined && schema.schemaKey !== undefined && schema.context !== undefined;\n }\n\n /** @internal */\n protected setDisplayLabel(displayLabel: string) {\n this._label = displayLabel;\n }\n\n /** @internal */\n protected setDescription(description: string) {\n this._description = description;\n }\n\n /** @internal */\n protected setAlias(alias: string) {\n if (!ECName.validate(alias)) {\n throw new ECSchemaError(ECSchemaStatus.InvalidECName, \"The specified schema alias is invalid.\");\n }\n this._alias = alias;\n }\n\n /** @internal */\n public setLoadingController(controller: SchemaLoadingController) {\n this._loadingController = controller;\n }\n}\n\n/**\n * Hackish approach that works like a \"friend class\" so we can access protected members without making them public.\n * We cannot put this into Helper.ts and make it non-export, because we are importing Helper.ts from this file, and the circular import\n * would prevent this class from extending Schema.\n * @internal\n */\nexport abstract class MutableSchema extends Schema {\n public abstract override addCustomAttribute(customAttribute: CustomAttribute): void;\n public abstract override createEntityClass(name: string, modifier?: ECClassModifier): Promise<EntityClass>;\n public abstract override createEntityClassSync(name: string, modifier?: ECClassModifier): EntityClass;\n public abstract override createMixinClass(name: string): Promise<Mixin>;\n public abstract override createMixinClassSync(name: string): Mixin;\n public abstract override createStructClass(name: string, modifier?: ECClassModifier): Promise<StructClass>;\n public abstract override createStructClassSync(name: string, modifier?: ECClassModifier): StructClass;\n public abstract override createCustomAttributeClass(name: string, modifier?: ECClassModifier): Promise<CustomAttributeClass>;\n public abstract override createCustomAttributeClassSync(name: string, modifier?: ECClassModifier): CustomAttributeClass;\n public abstract override createRelationshipClass(name: string, modifier?: ECClassModifier): Promise<RelationshipClass>;\n public abstract override createRelationshipClassSync(name: string, modifier?: ECClassModifier): RelationshipClass;\n public abstract override createEnumeration(name: string, primitiveType?: PrimitiveType.Integer | PrimitiveType.String): Promise<Enumeration>;\n public abstract override createEnumerationSync(name: string, primitiveType?: PrimitiveType.Integer | PrimitiveType.String): Enumeration;\n public abstract override createKindOfQuantity(name: string): Promise<KindOfQuantity>;\n public abstract override createKindOfQuantitySync(name: string): KindOfQuantity;\n public abstract override createUnit(name: string): Promise<Unit>;\n public abstract override createUnitSync(name: string): Unit;\n public abstract override createConstant(name: string): Promise<Constant>;\n public abstract override createConstantSync(name: string): Constant;\n public abstract override createInvertedUnit(name: string): Promise<InvertedUnit>;\n public abstract override createInvertedUnitSync(name: string): InvertedUnit;\n public abstract override createPhenomenon(name: string): Promise<Phenomenon>;\n public abstract override createPhenomenonSync(name: string): Phenomenon;\n public abstract override createFormat(name: string): Promise<Format>;\n public abstract override createFormatSync(name: string): Format;\n public abstract override createUnitSystem(name: string): Promise<UnitSystem>;\n public abstract override createUnitSystemSync(name: string): UnitSystem;\n public abstract override createPropertyCategory(name: string): Promise<PropertyCategory>;\n public abstract override createPropertyCategorySync(name: string): PropertyCategory;\n public abstract override addItem<T extends SchemaItem>(item: T): void;\n public abstract override addReference(refSchema: Schema): Promise<void>;\n public abstract override addReferenceSync(refSchema: Schema): void;\n public abstract override setContext(schemaContext: SchemaContext): void;\n public abstract override deleteClass(name: string): Promise<void>;\n public abstract override deleteClassSync(name: string): void;\n public abstract override deleteSchemaItem(name: string): Promise<void>;\n public abstract override deleteSchemaItemSync(name: string): void;\n public abstract override setAlias(alias: string): void;\n}"]}
|
|
@@ -36,7 +36,8 @@ export * from "./UnitConversion/UnitConverter";
|
|
|
36
36
|
export * from "./UnitProvider/SchemaUnitProvider";
|
|
37
37
|
export * from "./Validation/SchemaWalker";
|
|
38
38
|
export * from "./SchemaPartVisitorDelegate";
|
|
39
|
-
export * from "./SchemaFormatsProvider";
|
|
39
|
+
export * from "./Formatting/SchemaFormatsProvider";
|
|
40
|
+
export * from "./Formatting/FormatSetFormatsProvider";
|
|
40
41
|
export * from "./IncrementalLoading/ECSqlSchemaLocater";
|
|
41
42
|
export * from "./IncrementalLoading/IncrementalSchemaLocater";
|
|
42
43
|
export { CustomAttribute, CustomAttributeContainerProps } from "./Metadata/CustomAttribute";
|
|
@@ -1 +1 @@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CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD;;GAEG;AACH;;;GAGG;AACH;;;GAGG"}
|
|
@@ -85,7 +85,8 @@ __exportStar(require("./UnitConversion/UnitConverter"), exports);
|
|
|
85
85
|
__exportStar(require("./UnitProvider/SchemaUnitProvider"), exports);
|
|
86
86
|
__exportStar(require("./Validation/SchemaWalker"), exports);
|
|
87
87
|
__exportStar(require("./SchemaPartVisitorDelegate"), exports);
|
|
88
|
-
__exportStar(require("./SchemaFormatsProvider"), exports);
|
|
88
|
+
__exportStar(require("./Formatting/SchemaFormatsProvider"), exports);
|
|
89
|
+
__exportStar(require("./Formatting/FormatSetFormatsProvider"), exports);
|
|
89
90
|
__exportStar(require("./IncrementalLoading/ECSqlSchemaLocater"), exports);
|
|
90
91
|
__exportStar(require("./IncrementalLoading/IncrementalSchemaLocater"), exports);
|
|
91
92
|
var SchemaGraph_1 = require("./utils/SchemaGraph");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ecschema-metadata.js","sourceRoot":"","sources":["../../src/ecschema-metadata.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;;;;;;AAE/F,8CAA4B;AAC5B,4CAA0B;AAC1B,mDAAiC;AACjC,oEAAkD;AAClD,8DAA4C;AAC5C,2DAAyC;AACzC,8DAA4C;AAC5C,2CAAyB;AACzB,8CAA4B;AAC5B,8CAA4B;AAC5B,+CAA6B;AAC7B,0CAAwD;AAA/C,gGAAA,OAAO,OAAA;AAAE,oGAAA,WAAW,OAAA;AAC7B,gDAA+C;AAAtC,oGAAA,QAAQ,OAAA;AACjB,wEAAuE;AAA9D,4HAAA,oBAAoB,OAAA;AAC7B,sDAAqD;AAA5C,0GAAA,WAAW,OAAA;AACpB,sDAAgF;AAAxD,0GAAA,WAAW,OAAA;AACnC,4CAA2C;AAAlC,gGAAA,MAAM,OAAA;AACf,wDAAuD;AAA9C,4GAAA,YAAY,OAAA;AACr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,OAAA;AACjB,wEAAuE;AAA9D,4HAAA,oBAAoB,OAAA;AAC7B,sDAAqD;AAA5C,0GAAA,WAAW,OAAA;AACpB,sDAAgF;AAAxD,0GAAA,WAAW,OAAA;AACnC,4CAA2C;AAAlC,gGAAA,MAAM,OAAA;AACf,wDAAuD;AAA9C,4GAAA,YAAY,OAAA;AACrB,4DAA2D;AAAlD,gHAAA,cAAc,OAAA;AACvB,0CAAyC;AAAhC,8FAAA,KAAK,OAAA;AACd,4DAA0C;AAC1C,oDAAmD;AAA1C,wGAAA,UAAU,OAAA;AACnB,gDAI6B;AAH3B,oGAAA,QAAQ,OAAA;AAAE,6GAAA,iBAAiB,OAAA;AAAE,kHAAA,sBAAsB,OAAA;AAAE,+GAAA,mBAAmB,OAAA;AAAE,0GAAA,cAAc,OAAA;AACxF,+GAAA,mBAAmB,OAAA;AAAE,oHAAA,wBAAwB,OAAA;AAAE,8GAAA,kBAAkB,OAAA;AACX,yGAAA,aAAa,OAAA;AAAE,uHAAA,2BAA2B,OAAA;AAElG,gEAA+D;AAAtD,oHAAA,gBAAgB,OAAA;AACzB,kEAAmH;AAA1G,sHAAA,iBAAiB,OAAA;AAAE,2HAAA,sBAAsB,OAAA;AAAE,6HAAA,wBAAwB,OAAA;AAC5E,4CAA2C;AAAlC,gGAAA,MAAM,OAAA;AACf,wDAAsC;AACtC,wCAAuC;AAA9B,4FAAA,IAAI,OAAA;AACb,oDAAmD;AAA1C,wGAAA,UAAU,OAAA;AACnB,kDAAgC;AAChC,sDAAoC;AACpC,8CAA4B;AAC5B,iDAA+B;AAC/B,kEAAgD;AAChD,iEAA+C;AAC/C,oEAAkD;AAClD,4DAA0C;AAC1C,8DAA4C;AAC5C,qEAAmD;AACnD,wEAAsD;AACtD,0EAAwD;AACxD,gFAA8D;AAE9D,mDAAkD;AAAzC,0GAAA,WAAW,OAAA;AAEpB;;GAEG;AACH;;;GAGG;AACH;;;GAGG","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\nexport * from \"./Constants\";\nexport * from \"./Context\";\nexport * from \"./DelayedPromise\";\nexport * from \"./Deserialization/SchemaGraphUtil\";\nexport * from \"./Deserialization/JsonProps\";\nexport * from \"./Deserialization/Helper\";\nexport * from \"./Deserialization/XmlParser\";\nexport * from \"./ECName\";\nexport * from \"./ECObjects\";\nexport * from \"./Exception\";\nexport * from \"./Interfaces\";\nexport { ECClass, StructClass } from \"./Metadata/Class\";\nexport { Constant } from \"./Metadata/Constant\";\nexport { CustomAttributeClass } from \"./Metadata/CustomAttributeClass\";\nexport { EntityClass } from \"./Metadata/EntityClass\";\nexport { AnyEnumerator, Enumeration, Enumerator } from \"./Metadata/Enumeration\";\nexport { Format } from \"./Metadata/Format\";\nexport { InvertedUnit } from \"./Metadata/InvertedUnit\";\nexport { KindOfQuantity } from \"./Metadata/KindOfQuantity\";\nexport { Mixin } from \"./Metadata/Mixin\";\nexport * from \"./Metadata/OverrideFormat\";\nexport { Phenomenon } from \"./Metadata/Phenomenon\";\nexport {\n Property, PrimitiveProperty, PrimitiveArrayProperty, EnumerationProperty, StructProperty,\n StructArrayProperty, EnumerationArrayProperty, NavigationProperty, AnyArrayProperty, AnyEnumerationProperty,\n AnyPrimitiveProperty, AnyProperty, AnyStructProperty, ArrayProperty, PrimitiveOrEnumPropertyBase,\n} from \"./Metadata/Property\";\nexport { PropertyCategory } from \"./Metadata/PropertyCategory\";\nexport { RelationshipClass, RelationshipConstraint, RelationshipMultiplicity } from \"./Metadata/RelationshipClass\";\nexport { Schema } from \"./Metadata/Schema\";\nexport * from \"./Metadata/SchemaItem\";\nexport { Unit } from \"./Metadata/Unit\";\nexport { UnitSystem } from \"./Metadata/UnitSystem\";\nexport * from \"./PropertyTypes\";\nexport * from \"./SchemaJsonLocater\";\nexport * from \"./SchemaKey\";\nexport * from \"./SchemaLoader\";\nexport * from \"./UnitConversion/UnitConversion\";\nexport * from \"./UnitConversion/UnitConverter\";\nexport * from \"./UnitProvider/SchemaUnitProvider\";\nexport * from \"./Validation/SchemaWalker\";\nexport * from \"./SchemaPartVisitorDelegate\";\nexport * from \"./Formatting/SchemaFormatsProvider\";\nexport * from \"./Formatting/FormatSetFormatsProvider\";\nexport * from \"./IncrementalLoading/ECSqlSchemaLocater\";\nexport * from \"./IncrementalLoading/IncrementalSchemaLocater\";\nexport { CustomAttribute, CustomAttributeContainerProps} from \"./Metadata/CustomAttribute\";\nexport { SchemaGraph } from \"./utils/SchemaGraph\";\n\n/** @docs-package-description\n * The ecschema-metadata package contains classes for working with ECSchemas that can be used in both [frontend]($docs/learning/frontend/index.md) and [backend]($docs/learning/backend/index.md).\n */\n/**\n * @docs-group-description Metadata\n * Definitions of classes and interfaces that represent all [EC elements]($docs/bis/ec/index.md).\n */\n/**\n * @docs-group-description Utils\n * A set of utility classes used throughout the package.\n */\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module Metadata
|
|
3
3
|
*/
|
|
4
|
-
import { FormatProps } from "@itwin/core-quantity";
|
|
4
|
+
import { FormatDefinition, FormatProps, UnitSystemKey } from "@itwin/core-quantity";
|
|
5
5
|
/**
|
|
6
6
|
* @public @preview
|
|
7
7
|
*/
|
|
@@ -248,10 +248,17 @@ export type SchemaItemFormatProps = SchemaItemProps & FormatProps;
|
|
|
248
248
|
* @beta
|
|
249
249
|
*/
|
|
250
250
|
export interface FormatSet {
|
|
251
|
+
/** The unique name identifier for this format set. */
|
|
251
252
|
name: string;
|
|
253
|
+
/** The display label for this format set. */
|
|
252
254
|
label: string;
|
|
255
|
+
/** The description for this format set. */
|
|
256
|
+
description?: string;
|
|
257
|
+
/** A [UnitSystemKey]($quantity) that determines the unit system for this format set. */
|
|
258
|
+
unitSystem: UnitSystemKey;
|
|
259
|
+
/** A mapping of kind of quantity identifiers to their corresponding format properties. */
|
|
253
260
|
formats: {
|
|
254
|
-
[kindOfQuantityId: string]:
|
|
261
|
+
[kindOfQuantityId: string]: FormatDefinition;
|
|
255
262
|
};
|
|
256
263
|
}
|
|
257
264
|
/**
|
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"JsonProps.d.ts","sourceRoot":"","sources":["../../../src/Deserialization/JsonProps.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAEpF;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACxB,sBAAsB,GACtB,mBAAmB,GACnB,2BAA2B,GAC3B,wBAAwB,GACxB,uBAAuB,CAAC;AAC5B;;GAEG;AACH,MAAM,MAAM,aAAa,GACrB,gBAAgB,GAChB,UAAU,GACV,yBAAyB,GACzB,sBAAsB,CAAC;AAC3B;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAC1B,aAAa,GACb,gBAAgB,GAChB,mBAAmB,GACnB,qBAAqB,GACrB,mBAAmB,GACnB,iBAAiB,GACjB,aAAa,GACb,eAAe,GACf,qBAAqB,GACrB,6BAA6B,CAAC;AAElC;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,oBA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ACH,MAAM,WAAW,mBAAoB,SAAQ,eAAe;IAC1D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JsonProps.js","sourceRoot":"","sources":["../../../src/Deserialization/JsonProps.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;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 * @public @preview\n */\nexport type AnyPropertyProps =\n | PrimitivePropertyProps\n | StructPropertyProps\n | PrimitiveArrayPropertyProps\n | StructArrayPropertyProps\n | NavigationPropertyProps;\n/**\n * @public @preview\n */\nexport type AnyClassProps =\n | EntityClassProps\n | MixinProps\n | CustomAttributeClassProps\n | RelationshipClassProps;\n/**\n * @public @preview\n */\nexport type AnySchemaItemProps =\n | AnyClassProps\n | EnumerationProps\n | KindOfQuantityProps\n | PropertyCategoryProps\n | SchemaItemUnitProps\n | InvertedUnitProps\n | ConstantProps\n | PhenomenonProps\n | SchemaItemFormatProps\n | SchemaItemOverrideFormatProps;\n\n/**\n * @public @preview\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 * @public @preview\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 * @public @preview\n */\nexport interface SchemaReferenceProps {\n readonly name: string;\n readonly version: string;\n}\n\n/**\n * @public @preview\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 * @public @preview\n */\nexport interface ClassProps extends SchemaItemProps {\n readonly modifier?: string;\n readonly baseClass?: string;\n readonly properties?: AnyPropertyProps[];\n}\n\n/**\n * @public @preview\n */\nexport interface EntityClassProps extends ClassProps {\n readonly mixins?: string[];\n}\n\n/**\n * @public @preview\n */\nexport interface MixinProps extends ClassProps {\n readonly appliesTo: string;\n}\n\n/**\n * @public @preview\n */\nexport type StructClassProps = ClassProps;\n\n/**\n * @public @preview\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 * @public @preview\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 * @public @preview\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 * @public @preview\n */\nexport interface EnumerationProps extends SchemaItemProps {\n readonly type: string;\n readonly isStrict: boolean;\n readonly enumerators: EnumeratorProps[];\n}\n\n/**\n * @public @preview\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 * @public @preview\n */\nexport interface KindOfQuantityProps extends SchemaItemProps {\n readonly persistenceUnit: string;\n readonly presentationUnits?: string | string[];\n readonly relativeError: number;\n}\n\n/**\n * @public @preview\n */\nexport interface PropertyCategoryProps extends SchemaItemProps {\n readonly priority: number;\n}\n\n/**\n * @public @preview\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 * @public @preview\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 * @public @preview\n */\nexport interface PrimitivePropertyProps\n extends PrimitiveOrEnumPropertyBaseProps {\n readonly typeName: string;\n}\n\n/**\n * @public @preview\n */\nexport interface StructPropertyProps extends PropertyProps {\n readonly typeName: string;\n}\n\n/**\n * @public @preview\n */\nexport interface EnumerationPropertyProps\n extends PrimitiveOrEnumPropertyBaseProps {\n readonly typeName: string;\n}\n\n/**\n * @public @preview\n */\nexport interface ArrayPropertyProps extends PrimitiveOrEnumPropertyBaseProps {\n readonly minOccurs?: number;\n readonly maxOccurs?: number;\n}\n\n/**\n * @public @preview\n */\nexport interface PrimitiveArrayPropertyProps extends ArrayPropertyProps {\n readonly typeName: string;\n}\n\n/**\n * @public @preview\n */\nexport interface StructArrayPropertyProps extends ArrayPropertyProps {\n readonly typeName: string;\n}\n\n/**\n * @public @preview\n */\nexport interface NavigationPropertyProps extends PropertyProps {\n readonly relationshipName: string;\n readonly direction: string;\n}\n\n/**\n * @public @preview\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 * @public @preview\n */\nexport type SchemaItemFormatProps = SchemaItemProps & FormatProps;\n\n/**\n * This interface defines properties necessary to support persistence of a set of formats.\n * @beta\n */\nexport interface FormatSet {\n name: string;\n label: string;\n formats: { [kindOfQuantityId: string]:
|
|
1
|
+
{"version":3,"file":"JsonProps.js","sourceRoot":"","sources":["../../../src/Deserialization/JsonProps.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;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 { FormatDefinition, FormatProps, UnitSystemKey } from \"@itwin/core-quantity\";\n\n/**\n * @public @preview\n */\nexport type AnyPropertyProps =\n | PrimitivePropertyProps\n | StructPropertyProps\n | PrimitiveArrayPropertyProps\n | StructArrayPropertyProps\n | NavigationPropertyProps;\n/**\n * @public @preview\n */\nexport type AnyClassProps =\n | EntityClassProps\n | MixinProps\n | CustomAttributeClassProps\n | RelationshipClassProps;\n/**\n * @public @preview\n */\nexport type AnySchemaItemProps =\n | AnyClassProps\n | EnumerationProps\n | KindOfQuantityProps\n | PropertyCategoryProps\n | SchemaItemUnitProps\n | InvertedUnitProps\n | ConstantProps\n | PhenomenonProps\n | SchemaItemFormatProps\n | SchemaItemOverrideFormatProps;\n\n/**\n * @public @preview\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 * @public @preview\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 * @public @preview\n */\nexport interface SchemaReferenceProps {\n readonly name: string;\n readonly version: string;\n}\n\n/**\n * @public @preview\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 * @public @preview\n */\nexport interface ClassProps extends SchemaItemProps {\n readonly modifier?: string;\n readonly baseClass?: string;\n readonly properties?: AnyPropertyProps[];\n}\n\n/**\n * @public @preview\n */\nexport interface EntityClassProps extends ClassProps {\n readonly mixins?: string[];\n}\n\n/**\n * @public @preview\n */\nexport interface MixinProps extends ClassProps {\n readonly appliesTo: string;\n}\n\n/**\n * @public @preview\n */\nexport type StructClassProps = ClassProps;\n\n/**\n * @public @preview\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 * @public @preview\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 * @public @preview\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 * @public @preview\n */\nexport interface EnumerationProps extends SchemaItemProps {\n readonly type: string;\n readonly isStrict: boolean;\n readonly enumerators: EnumeratorProps[];\n}\n\n/**\n * @public @preview\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 * @public @preview\n */\nexport interface KindOfQuantityProps extends SchemaItemProps {\n readonly persistenceUnit: string;\n readonly presentationUnits?: string | string[];\n readonly relativeError: number;\n}\n\n/**\n * @public @preview\n */\nexport interface PropertyCategoryProps extends SchemaItemProps {\n readonly priority: number;\n}\n\n/**\n * @public @preview\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 * @public @preview\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 * @public @preview\n */\nexport interface PrimitivePropertyProps\n extends PrimitiveOrEnumPropertyBaseProps {\n readonly typeName: string;\n}\n\n/**\n * @public @preview\n */\nexport interface StructPropertyProps extends PropertyProps {\n readonly typeName: string;\n}\n\n/**\n * @public @preview\n */\nexport interface EnumerationPropertyProps\n extends PrimitiveOrEnumPropertyBaseProps {\n readonly typeName: string;\n}\n\n/**\n * @public @preview\n */\nexport interface ArrayPropertyProps extends PrimitiveOrEnumPropertyBaseProps {\n readonly minOccurs?: number;\n readonly maxOccurs?: number;\n}\n\n/**\n * @public @preview\n */\nexport interface PrimitiveArrayPropertyProps extends ArrayPropertyProps {\n readonly typeName: string;\n}\n\n/**\n * @public @preview\n */\nexport interface StructArrayPropertyProps extends ArrayPropertyProps {\n readonly typeName: string;\n}\n\n/**\n * @public @preview\n */\nexport interface NavigationPropertyProps extends PropertyProps {\n readonly relationshipName: string;\n readonly direction: string;\n}\n\n/**\n * @public @preview\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 * @public @preview\n */\nexport type SchemaItemFormatProps = SchemaItemProps & FormatProps;\n\n/**\n * This interface defines properties necessary to support persistence of a set of formats.\n * @beta\n */\nexport interface FormatSet {\n /** The unique name identifier for this format set. */\n name: string;\n /** The display label for this format set. */\n label: string;\n /** The description for this format set. */\n description?: string;\n /** A [UnitSystemKey]($quantity) that determines the unit system for this format set. */\n unitSystem: UnitSystemKey;\n /** A mapping of kind of quantity identifiers to their corresponding format properties. */\n formats: { [kindOfQuantityId: string]: FormatDefinition };\n}\n\n/**\n * @public @preview\n */\nexport interface SchemaItemOverrideFormatProps extends SchemaItemFormatProps {\n readonly parent: string;\n}\n\n/**\n * @public @preview\n */\nexport interface InvertedUnitProps extends SchemaItemProps {\n readonly invertsUnit: string;\n readonly unitSystem: string;\n}\n\n/**\n * @public @preview\n */\nexport interface PhenomenonProps extends SchemaItemProps {\n readonly definition: string;\n}\n\n/**\n * @public @preview\n */\nexport type UnitSystemProps = SchemaItemProps;\n\n/**\n * @public @preview\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"]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { BeEvent } from "@itwin/core-bentley";
|
|
2
|
+
import { FormatDefinition, FormatsChangedArgs, FormatsProvider, MutableFormatsProvider } from "@itwin/core-quantity";
|
|
3
|
+
import { FormatSet } from "../Deserialization/JsonProps";
|
|
4
|
+
/**
|
|
5
|
+
* A mutable format provider that manages format definitions within a format set.
|
|
6
|
+
* When formats are added or removed, the underlying format set is automatically updated.
|
|
7
|
+
* @beta
|
|
8
|
+
*/
|
|
9
|
+
export declare class FormatSetFormatsProvider implements MutableFormatsProvider {
|
|
10
|
+
onFormatsChanged: BeEvent<(args: FormatsChangedArgs) => void>;
|
|
11
|
+
private _formatSet;
|
|
12
|
+
private _fallbackProvider?;
|
|
13
|
+
constructor(props: {
|
|
14
|
+
formatSet: FormatSet;
|
|
15
|
+
fallbackProvider?: FormatsProvider;
|
|
16
|
+
});
|
|
17
|
+
/**
|
|
18
|
+
* Adds a format definition to the format set or updates an existing one.
|
|
19
|
+
* @param name The name of the format to add or update
|
|
20
|
+
* @param format The format definition to add or update
|
|
21
|
+
*/
|
|
22
|
+
addFormat(name: string, format: FormatDefinition): Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Clears the fallback provider, if one is set.
|
|
25
|
+
*/
|
|
26
|
+
clearFallbackProvider(): void;
|
|
27
|
+
/**
|
|
28
|
+
* Retrieves a format definition by its name from the format set. If not found, it checks the fallback provider to find the format, else returns undefined.
|
|
29
|
+
*/
|
|
30
|
+
getFormat(input: string): Promise<FormatDefinition | undefined>;
|
|
31
|
+
/**
|
|
32
|
+
* Removes a format definition from the format set.
|
|
33
|
+
* @param name The name of the format to remove
|
|
34
|
+
*/
|
|
35
|
+
removeFormat(name: string): Promise<void>;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=FormatSetFormatsProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormatSetFormatsProvider.d.ts","sourceRoot":"","sources":["../../../src/Formatting/FormatSetFormatsProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AACrH,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAGzD;;;;GAIG;AACH,qBAAa,wBAAyB,YAAW,sBAAsB;IAC9D,gBAAgB,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE,kBAAkB,KAAK,IAAI,CAAC,CAAqD;IAEzH,OAAO,CAAC,UAAU,CAAY;IAC9B,OAAO,CAAC,iBAAiB,CAAC,CAAkB;gBAEzB,KAAK,EAAE;QAAC,SAAS,EAAE,SAAS,CAAC;QAAC,gBAAgB,CAAC,EAAE,eAAe,CAAA;KAAC;IAKpF;;;;OAIG;IACU,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAK7E;;OAEG;IACI,qBAAqB,IAAI,IAAI;IAIpC;;OAEG;IACU,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC;IAW5E;;;OAGG;IACU,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAIvD"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { BeEvent } from "@itwin/core-bentley";
|
|
2
|
+
import { SchemaItem } from "../Metadata/SchemaItem";
|
|
3
|
+
/**
|
|
4
|
+
* A mutable format provider that manages format definitions within a format set.
|
|
5
|
+
* When formats are added or removed, the underlying format set is automatically updated.
|
|
6
|
+
* @beta
|
|
7
|
+
*/
|
|
8
|
+
export class FormatSetFormatsProvider {
|
|
9
|
+
onFormatsChanged = new BeEvent();
|
|
10
|
+
_formatSet;
|
|
11
|
+
_fallbackProvider;
|
|
12
|
+
constructor(props) {
|
|
13
|
+
this._formatSet = props.formatSet;
|
|
14
|
+
this._fallbackProvider = props.fallbackProvider;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Adds a format definition to the format set or updates an existing one.
|
|
18
|
+
* @param name The name of the format to add or update
|
|
19
|
+
* @param format The format definition to add or update
|
|
20
|
+
*/
|
|
21
|
+
async addFormat(name, format) {
|
|
22
|
+
this._formatSet.formats[name] = format;
|
|
23
|
+
this.onFormatsChanged.raiseEvent({ formatsChanged: [name] });
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Clears the fallback provider, if one is set.
|
|
27
|
+
*/
|
|
28
|
+
clearFallbackProvider() {
|
|
29
|
+
this._fallbackProvider = undefined;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Retrieves a format definition by its name from the format set. If not found, it checks the fallback provider to find the format, else returns undefined.
|
|
33
|
+
*/
|
|
34
|
+
async getFormat(input) {
|
|
35
|
+
// Normalizes any schemaItem names coming from node addon 'schemaName:schemaItemName' -> 'schemaName.schemaItemName'
|
|
36
|
+
const [schemaName, itemName] = SchemaItem.parseFullName(input);
|
|
37
|
+
const name = (schemaName === "") ? itemName : `${schemaName}.${itemName}`;
|
|
38
|
+
const format = this._formatSet.formats[name];
|
|
39
|
+
if (format)
|
|
40
|
+
return format;
|
|
41
|
+
if (this._fallbackProvider)
|
|
42
|
+
return this._fallbackProvider.getFormat(name);
|
|
43
|
+
return undefined;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Removes a format definition from the format set.
|
|
47
|
+
* @param name The name of the format to remove
|
|
48
|
+
*/
|
|
49
|
+
async removeFormat(name) {
|
|
50
|
+
delete this._formatSet.formats[name];
|
|
51
|
+
this.onFormatsChanged.raiseEvent({ formatsChanged: [name] });
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=FormatSetFormatsProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormatSetFormatsProvider.js","sourceRoot":"","sources":["../../../src/Formatting/FormatSetFormatsProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAG9C,OAAO,EAAE,UAAU,EAA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ACpC,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,EAAE,cAAc,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC/D,CAAC;CACF","sourcesContent":["import { BeEvent } from \"@itwin/core-bentley\";\nimport { FormatDefinition, FormatsChangedArgs, FormatsProvider, MutableFormatsProvider } from \"@itwin/core-quantity\";\nimport { FormatSet } from \"../Deserialization/JsonProps\";\nimport { SchemaItem } from \"../Metadata/SchemaItem\";\n\n/**\n * A mutable format provider that manages format definitions within a format set.\n * When formats are added or removed, the underlying format set is automatically updated.\n * @beta\n */\nexport class FormatSetFormatsProvider implements MutableFormatsProvider {\n public onFormatsChanged: BeEvent<(args: FormatsChangedArgs) => void> = new BeEvent<(args: FormatsChangedArgs) => void>();\n\n private _formatSet: FormatSet;\n private _fallbackProvider?: FormatsProvider;\n\n public constructor(props: {formatSet: FormatSet, fallbackProvider?: FormatsProvider}) {\n this._formatSet = props.formatSet;\n this._fallbackProvider = props.fallbackProvider;\n }\n\n /**\n * Adds a format definition to the format set or updates an existing one.\n * @param name The name of the format to add or update\n * @param format The format definition to add or update\n */\n public async addFormat(name: string, format: FormatDefinition): Promise<void> {\n this._formatSet.formats[name] = format;\n this.onFormatsChanged.raiseEvent({ formatsChanged: [name] });\n }\n\n /**\n * Clears the fallback provider, if one is set.\n */\n public clearFallbackProvider(): void {\n this._fallbackProvider = undefined;\n }\n\n /**\n * Retrieves a format definition by its name from the format set. If not found, it checks the fallback provider to find the format, else returns undefined.\n */\n public async getFormat(input: string): Promise<FormatDefinition | undefined> {\n // Normalizes any schemaItem names coming from node addon 'schemaName:schemaItemName' -> 'schemaName.schemaItemName'\n const [schemaName, itemName] = SchemaItem.parseFullName(input);\n\n const name = (schemaName === \"\") ? itemName : `${schemaName}.${itemName}`;\n const format = this._formatSet.formats[name];\n if (format) return format;\n if (this._fallbackProvider) return this._fallbackProvider.getFormat(name);\n return undefined;\n }\n\n /**\n * Removes a format definition from the format set.\n * @param name The name of the format to remove\n */\n public async removeFormat(name: string): Promise<void> {\n delete this._formatSet.formats[name];\n this.onFormatsChanged.raiseEvent({ formatsChanged: [name] });\n }\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module Metadata
|
|
3
3
|
*/
|
|
4
|
-
import { ISchemaLocater, SchemaContext } from "
|
|
4
|
+
import { ISchemaLocater, SchemaContext } from "../Context";
|
|
5
5
|
import { BeEvent } from "@itwin/core-bentley";
|
|
6
6
|
import { FormatDefinition, FormatsChangedArgs, FormatsProvider, UnitSystemKey } from "@itwin/core-quantity";
|
|
7
7
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaFormatsProvider.d.ts","sourceRoot":"","sources":["../../../src/Formatting/SchemaFormatsProvider.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAK3D,OAAO,EAAE,OAAO,EAAU,MAAM,qBAAqB,CAAC;AAGtD,OAAO,EAAE,gBAAgB,EAAe,kBAAkB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAMzH;;;GAGG;AACH,qBAAa,qBAAsB,YAAW,eAAe;IAC3D,OAAO,CAAC,QAAQ,CAAgB;IAChC,OAAO,CAAC,WAAW,CAAgB;IACnC,OAAO,CAAC,iBAAiB,CAA0B;IAC5C,gBAAgB,iBAAsB,kBAAkB,KAAK,IAAI,EAAI;IAC5E;;;;;;OAMG;gBACS,gBAAgB,EAAE,cAAc,EAAE,UAAU,EAAE,aAAa;IAUvE,IAAW,OAAO,kBAA4B;IAC9C,IAAW,UAAU,IAEa,aAAa,CAFK;IAEpD,IAAW,UAAU,CAAC,UAAU,EAAE,aAAa,EAG9C;IAED,OAAO,CAAC,KAAK;IAMb,0HAA0H;IAC1H,OAAO,CAAC,yBAAyB;YAenB,iCAAiC;IAmD/C;;;;;;OAMG;IACU,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC;CA8B5E"}
|