@itwin/ecschema-metadata 5.1.0-dev.9 → 5.2.0-dev.2
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 +74 -1
- package/lib/cjs/Context.d.ts +1 -1
- package/lib/cjs/Context.js +1 -1
- package/lib/cjs/Context.js.map +1 -1
- package/lib/cjs/Deserialization/Helper.d.ts +30 -11
- package/lib/cjs/Deserialization/Helper.d.ts.map +1 -1
- package/lib/cjs/Deserialization/Helper.js +124 -96
- package/lib/cjs/Deserialization/Helper.js.map +1 -1
- package/lib/cjs/Deserialization/SchemaGraphUtil.d.ts +12 -3
- package/lib/cjs/Deserialization/SchemaGraphUtil.d.ts.map +1 -1
- package/lib/cjs/Deserialization/SchemaGraphUtil.js +36 -23
- package/lib/cjs/Deserialization/SchemaGraphUtil.js.map +1 -1
- package/lib/cjs/Deserialization/XmlParser.d.ts.map +1 -1
- package/lib/cjs/Deserialization/XmlParser.js +14 -5
- package/lib/cjs/Deserialization/XmlParser.js.map +1 -1
- package/lib/cjs/Deserialization/XmlSerializationUtils.js +1 -1
- package/lib/cjs/Deserialization/XmlSerializationUtils.js.map +1 -1
- package/lib/cjs/ECName.js +1 -1
- package/lib/cjs/ECName.js.map +1 -1
- package/lib/cjs/ECObjects.d.ts +1 -1
- package/lib/cjs/ECObjects.js +2 -2
- package/lib/cjs/ECObjects.js.map +1 -1
- package/lib/cjs/IncrementalLoading/ClassParsers.d.ts +60 -0
- package/lib/cjs/IncrementalLoading/ClassParsers.d.ts.map +1 -0
- package/lib/cjs/IncrementalLoading/ClassParsers.js +111 -0
- package/lib/cjs/IncrementalLoading/ClassParsers.js.map +1 -0
- package/lib/cjs/IncrementalLoading/ECSqlSchemaLocater.d.ts +211 -0
- package/lib/cjs/IncrementalLoading/ECSqlSchemaLocater.d.ts.map +1 -0
- package/lib/cjs/IncrementalLoading/ECSqlSchemaLocater.js +387 -0
- package/lib/cjs/IncrementalLoading/ECSqlSchemaLocater.js.map +1 -0
- package/lib/cjs/IncrementalLoading/FullSchemaQueries.d.ts +14 -0
- package/lib/cjs/IncrementalLoading/FullSchemaQueries.d.ts.map +1 -0
- package/lib/cjs/IncrementalLoading/FullSchemaQueries.js +609 -0
- package/lib/cjs/IncrementalLoading/FullSchemaQueries.js.map +1 -0
- package/lib/cjs/IncrementalLoading/IncrementalSchemaLocater.d.ts +109 -0
- package/lib/cjs/IncrementalLoading/IncrementalSchemaLocater.d.ts.map +1 -0
- package/lib/cjs/IncrementalLoading/IncrementalSchemaLocater.js +219 -0
- package/lib/cjs/IncrementalLoading/IncrementalSchemaLocater.js.map +1 -0
- package/lib/cjs/IncrementalLoading/IncrementalSchemaReader.d.ts +36 -0
- package/lib/cjs/IncrementalLoading/IncrementalSchemaReader.d.ts.map +1 -0
- package/lib/cjs/IncrementalLoading/IncrementalSchemaReader.js +77 -0
- package/lib/cjs/IncrementalLoading/IncrementalSchemaReader.js.map +1 -0
- package/lib/cjs/IncrementalLoading/PerformanceLogger.d.ts +60 -0
- package/lib/cjs/IncrementalLoading/PerformanceLogger.d.ts.map +1 -0
- package/lib/cjs/IncrementalLoading/PerformanceLogger.js +82 -0
- package/lib/cjs/IncrementalLoading/PerformanceLogger.js.map +1 -0
- package/lib/cjs/IncrementalLoading/SchemaItemParsers.d.ts +51 -0
- package/lib/cjs/IncrementalLoading/SchemaItemParsers.d.ts.map +1 -0
- package/lib/cjs/IncrementalLoading/SchemaItemParsers.js +122 -0
- package/lib/cjs/IncrementalLoading/SchemaItemParsers.js.map +1 -0
- package/lib/cjs/IncrementalLoading/SchemaItemQueries.d.ts +16 -0
- package/lib/cjs/IncrementalLoading/SchemaItemQueries.d.ts.map +1 -0
- package/lib/cjs/IncrementalLoading/SchemaItemQueries.js +308 -0
- package/lib/cjs/IncrementalLoading/SchemaItemQueries.js.map +1 -0
- package/lib/cjs/IncrementalLoading/SchemaParser.d.ts +42 -0
- package/lib/cjs/IncrementalLoading/SchemaParser.d.ts.map +1 -0
- package/lib/cjs/IncrementalLoading/SchemaParser.js +109 -0
- package/lib/cjs/IncrementalLoading/SchemaParser.js.map +1 -0
- package/lib/cjs/IncrementalLoading/SchemaStubQueries.d.ts +12 -0
- package/lib/cjs/IncrementalLoading/SchemaStubQueries.d.ts.map +1 -0
- package/lib/cjs/IncrementalLoading/SchemaStubQueries.js +365 -0
- package/lib/cjs/IncrementalLoading/SchemaStubQueries.js.map +1 -0
- package/lib/cjs/Metadata/Class.d.ts +5 -16
- package/lib/cjs/Metadata/Class.d.ts.map +1 -1
- package/lib/cjs/Metadata/Class.js +68 -68
- package/lib/cjs/Metadata/Class.js.map +1 -1
- package/lib/cjs/Metadata/CustomAttribute.d.ts +7 -1
- package/lib/cjs/Metadata/CustomAttribute.d.ts.map +1 -1
- package/lib/cjs/Metadata/CustomAttribute.js.map +1 -1
- package/lib/cjs/Metadata/CustomAttributeClass.d.ts +1 -1
- package/lib/cjs/Metadata/CustomAttributeClass.js +1 -1
- package/lib/cjs/Metadata/CustomAttributeClass.js.map +1 -1
- package/lib/cjs/Metadata/EntityClass.d.ts +6 -6
- package/lib/cjs/Metadata/EntityClass.d.ts.map +1 -1
- package/lib/cjs/Metadata/EntityClass.js +48 -26
- package/lib/cjs/Metadata/EntityClass.js.map +1 -1
- package/lib/cjs/Metadata/Format.d.ts +5 -0
- package/lib/cjs/Metadata/Format.d.ts.map +1 -1
- package/lib/cjs/Metadata/Format.js +7 -0
- package/lib/cjs/Metadata/Format.js.map +1 -1
- package/lib/cjs/Metadata/KindOfQuantity.js.map +1 -1
- package/lib/cjs/Metadata/Schema.d.ts +10 -0
- package/lib/cjs/Metadata/Schema.d.ts.map +1 -1
- package/lib/cjs/Metadata/Schema.js +13 -0
- package/lib/cjs/Metadata/Schema.js.map +1 -1
- package/lib/cjs/Metadata/SchemaItem.d.ts +10 -0
- package/lib/cjs/Metadata/SchemaItem.d.ts.map +1 -1
- package/lib/cjs/Metadata/SchemaItem.js +13 -0
- package/lib/cjs/Metadata/SchemaItem.js.map +1 -1
- package/lib/cjs/SchemaFormatsProvider.d.ts +4 -3
- package/lib/cjs/SchemaFormatsProvider.d.ts.map +1 -1
- package/lib/cjs/SchemaFormatsProvider.js +60 -17
- package/lib/cjs/SchemaFormatsProvider.js.map +1 -1
- package/lib/cjs/SchemaLoader.d.ts +4 -1
- package/lib/cjs/SchemaLoader.d.ts.map +1 -1
- package/lib/cjs/SchemaLoader.js +4 -1
- package/lib/cjs/SchemaLoader.js.map +1 -1
- package/lib/cjs/ecschema-metadata.d.ts +2 -0
- package/lib/cjs/ecschema-metadata.d.ts.map +1 -1
- package/lib/cjs/ecschema-metadata.js +2 -0
- package/lib/cjs/ecschema-metadata.js.map +1 -1
- package/lib/cjs/utils/SchemaLoadingController.d.ts +37 -0
- package/lib/cjs/utils/SchemaLoadingController.d.ts.map +1 -0
- package/lib/cjs/utils/SchemaLoadingController.js +65 -0
- package/lib/cjs/utils/SchemaLoadingController.js.map +1 -0
- package/lib/esm/Context.d.ts +1 -1
- package/lib/esm/Context.js +1 -1
- package/lib/esm/Context.js.map +1 -1
- package/lib/esm/Deserialization/Helper.d.ts +30 -11
- package/lib/esm/Deserialization/Helper.d.ts.map +1 -1
- package/lib/esm/Deserialization/Helper.js +124 -96
- package/lib/esm/Deserialization/Helper.js.map +1 -1
- package/lib/esm/Deserialization/SchemaGraphUtil.d.ts +12 -3
- package/lib/esm/Deserialization/SchemaGraphUtil.d.ts.map +1 -1
- package/lib/esm/Deserialization/SchemaGraphUtil.js +36 -23
- package/lib/esm/Deserialization/SchemaGraphUtil.js.map +1 -1
- package/lib/esm/Deserialization/XmlParser.d.ts.map +1 -1
- package/lib/esm/Deserialization/XmlParser.js +14 -5
- package/lib/esm/Deserialization/XmlParser.js.map +1 -1
- package/lib/esm/Deserialization/XmlSerializationUtils.js +1 -1
- package/lib/esm/Deserialization/XmlSerializationUtils.js.map +1 -1
- package/lib/esm/ECName.js +1 -1
- package/lib/esm/ECName.js.map +1 -1
- package/lib/esm/ECObjects.d.ts +1 -1
- package/lib/esm/ECObjects.js +2 -2
- package/lib/esm/ECObjects.js.map +1 -1
- package/lib/esm/IncrementalLoading/ClassParsers.d.ts +60 -0
- package/lib/esm/IncrementalLoading/ClassParsers.d.ts.map +1 -0
- package/lib/esm/IncrementalLoading/ClassParsers.js +104 -0
- package/lib/esm/IncrementalLoading/ClassParsers.js.map +1 -0
- package/lib/esm/IncrementalLoading/ECSqlSchemaLocater.d.ts +211 -0
- package/lib/esm/IncrementalLoading/ECSqlSchemaLocater.d.ts.map +1 -0
- package/lib/esm/IncrementalLoading/ECSqlSchemaLocater.js +383 -0
- package/lib/esm/IncrementalLoading/ECSqlSchemaLocater.js.map +1 -0
- package/lib/esm/IncrementalLoading/FullSchemaQueries.d.ts +14 -0
- package/lib/esm/IncrementalLoading/FullSchemaQueries.d.ts.map +1 -0
- package/lib/esm/IncrementalLoading/FullSchemaQueries.js +606 -0
- package/lib/esm/IncrementalLoading/FullSchemaQueries.js.map +1 -0
- package/lib/esm/IncrementalLoading/IncrementalSchemaLocater.d.ts +109 -0
- package/lib/esm/IncrementalLoading/IncrementalSchemaLocater.d.ts.map +1 -0
- package/lib/esm/IncrementalLoading/IncrementalSchemaLocater.js +215 -0
- package/lib/esm/IncrementalLoading/IncrementalSchemaLocater.js.map +1 -0
- package/lib/esm/IncrementalLoading/IncrementalSchemaReader.d.ts +36 -0
- package/lib/esm/IncrementalLoading/IncrementalSchemaReader.d.ts.map +1 -0
- package/lib/esm/IncrementalLoading/IncrementalSchemaReader.js +73 -0
- package/lib/esm/IncrementalLoading/IncrementalSchemaReader.js.map +1 -0
- package/lib/esm/IncrementalLoading/PerformanceLogger.d.ts +60 -0
- package/lib/esm/IncrementalLoading/PerformanceLogger.d.ts.map +1 -0
- package/lib/esm/IncrementalLoading/PerformanceLogger.js +78 -0
- package/lib/esm/IncrementalLoading/PerformanceLogger.js.map +1 -0
- package/lib/esm/IncrementalLoading/SchemaItemParsers.d.ts +51 -0
- package/lib/esm/IncrementalLoading/SchemaItemParsers.d.ts.map +1 -0
- package/lib/esm/IncrementalLoading/SchemaItemParsers.js +117 -0
- package/lib/esm/IncrementalLoading/SchemaItemParsers.js.map +1 -0
- package/lib/esm/IncrementalLoading/SchemaItemQueries.d.ts +16 -0
- package/lib/esm/IncrementalLoading/SchemaItemQueries.d.ts.map +1 -0
- package/lib/esm/IncrementalLoading/SchemaItemQueries.js +305 -0
- package/lib/esm/IncrementalLoading/SchemaItemQueries.js.map +1 -0
- package/lib/esm/IncrementalLoading/SchemaParser.d.ts +42 -0
- package/lib/esm/IncrementalLoading/SchemaParser.d.ts.map +1 -0
- package/lib/esm/IncrementalLoading/SchemaParser.js +104 -0
- package/lib/esm/IncrementalLoading/SchemaParser.js.map +1 -0
- package/lib/esm/IncrementalLoading/SchemaStubQueries.d.ts +12 -0
- package/lib/esm/IncrementalLoading/SchemaStubQueries.d.ts.map +1 -0
- package/lib/esm/IncrementalLoading/SchemaStubQueries.js +359 -0
- package/lib/esm/IncrementalLoading/SchemaStubQueries.js.map +1 -0
- package/lib/esm/Metadata/Class.d.ts +5 -16
- package/lib/esm/Metadata/Class.d.ts.map +1 -1
- package/lib/esm/Metadata/Class.js +68 -68
- package/lib/esm/Metadata/Class.js.map +1 -1
- package/lib/esm/Metadata/CustomAttribute.d.ts +7 -1
- package/lib/esm/Metadata/CustomAttribute.d.ts.map +1 -1
- package/lib/esm/Metadata/CustomAttribute.js.map +1 -1
- package/lib/esm/Metadata/CustomAttributeClass.d.ts +1 -1
- package/lib/esm/Metadata/CustomAttributeClass.js +1 -1
- package/lib/esm/Metadata/CustomAttributeClass.js.map +1 -1
- package/lib/esm/Metadata/EntityClass.d.ts +6 -6
- package/lib/esm/Metadata/EntityClass.d.ts.map +1 -1
- package/lib/esm/Metadata/EntityClass.js +48 -26
- package/lib/esm/Metadata/EntityClass.js.map +1 -1
- package/lib/esm/Metadata/Format.d.ts +5 -0
- package/lib/esm/Metadata/Format.d.ts.map +1 -1
- package/lib/esm/Metadata/Format.js +7 -0
- package/lib/esm/Metadata/Format.js.map +1 -1
- package/lib/esm/Metadata/KindOfQuantity.js.map +1 -1
- package/lib/esm/Metadata/Schema.d.ts +10 -0
- package/lib/esm/Metadata/Schema.d.ts.map +1 -1
- package/lib/esm/Metadata/Schema.js +13 -0
- package/lib/esm/Metadata/Schema.js.map +1 -1
- package/lib/esm/Metadata/SchemaItem.d.ts +10 -0
- package/lib/esm/Metadata/SchemaItem.d.ts.map +1 -1
- package/lib/esm/Metadata/SchemaItem.js +13 -0
- package/lib/esm/Metadata/SchemaItem.js.map +1 -1
- package/lib/esm/SchemaFormatsProvider.d.ts +4 -3
- package/lib/esm/SchemaFormatsProvider.d.ts.map +1 -1
- package/lib/esm/SchemaFormatsProvider.js +61 -18
- package/lib/esm/SchemaFormatsProvider.js.map +1 -1
- package/lib/esm/SchemaLoader.d.ts +4 -1
- package/lib/esm/SchemaLoader.d.ts.map +1 -1
- package/lib/esm/SchemaLoader.js +4 -1
- package/lib/esm/SchemaLoader.js.map +1 -1
- package/lib/esm/ecschema-metadata.d.ts +2 -0
- package/lib/esm/ecschema-metadata.d.ts.map +1 -1
- package/lib/esm/ecschema-metadata.js +2 -0
- package/lib/esm/ecschema-metadata.js.map +1 -1
- package/lib/esm/utils/SchemaLoadingController.d.ts +37 -0
- package/lib/esm/utils/SchemaLoadingController.d.ts.map +1 -0
- package/lib/esm/utils/SchemaLoadingController.js +61 -0
- package/lib/esm/utils/SchemaLoadingController.js.map +1 -0
- package/package.json +15 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Class.d.ts","sourceRoot":"","sources":["../../../src/Metadata/Class.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,OAAO,EAAiD,eAAe,EAA0C,aAAa,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAE9L,OAAO,EAAE,QAAQ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E,UAAU,EAAE,MAAM,GAAG,WAAW,GAAG,cAAc;aAExF,yBAAyB,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,WAAW,GAAG,OAAO,CAAC,mBAAmB,CAAC;aACvG,6BAA6B,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,WAAW,GAAG,mBAAmB;aAElG,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;aAC3C,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;CAChE"}
|
|
@@ -124,34 +124,44 @@ class ECClass extends SchemaItem_1.SchemaItem {
|
|
|
124
124
|
* @param name The name of the property to retrieve.
|
|
125
125
|
* @param excludeInherited If true, excludes inherited properties from the results. Defaults to false.
|
|
126
126
|
*/
|
|
127
|
-
async getProperty(name, excludeInherited
|
|
127
|
+
async getProperty(name, excludeInherited) {
|
|
128
|
+
const upperKey = name.toUpperCase();
|
|
129
|
+
let property;
|
|
128
130
|
if (this._properties) {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
if (property)
|
|
131
|
+
property = this._properties.get(upperKey);
|
|
132
|
+
if (property) {
|
|
132
133
|
return property;
|
|
134
|
+
}
|
|
133
135
|
}
|
|
134
136
|
if (excludeInherited) {
|
|
135
137
|
return undefined;
|
|
136
138
|
}
|
|
137
|
-
|
|
139
|
+
if (!this._mergedPropertyCache) {
|
|
140
|
+
this._mergedPropertyCache = await this.buildPropertyCache();
|
|
141
|
+
}
|
|
142
|
+
return this._mergedPropertyCache.get(upperKey);
|
|
138
143
|
}
|
|
139
144
|
/**
|
|
140
145
|
* Searches, case-insensitive, for a local ECProperty with the name provided.
|
|
141
146
|
* @param name The name of the property to retrieve.
|
|
142
147
|
* @param excludeInherited If true, excludes inherited properties from the results. Defaults to false.
|
|
143
148
|
*/
|
|
144
|
-
getPropertySync(name, excludeInherited
|
|
149
|
+
getPropertySync(name, excludeInherited) {
|
|
150
|
+
const upperKey = name.toUpperCase();
|
|
151
|
+
let property;
|
|
145
152
|
if (this._properties) {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
if (property)
|
|
153
|
+
property = this._properties.get(upperKey);
|
|
154
|
+
if (property) {
|
|
149
155
|
return property;
|
|
156
|
+
}
|
|
150
157
|
}
|
|
151
158
|
if (excludeInherited) {
|
|
152
159
|
return undefined;
|
|
153
160
|
}
|
|
154
|
-
|
|
161
|
+
if (!this._mergedPropertyCache) {
|
|
162
|
+
this._mergedPropertyCache = this.buildPropertyCacheSync();
|
|
163
|
+
}
|
|
164
|
+
return this._mergedPropertyCache.get(upperKey);
|
|
155
165
|
}
|
|
156
166
|
/**
|
|
157
167
|
* Searches the base class, if one exists, for the property with the name provided.
|
|
@@ -270,6 +280,7 @@ class ECClass extends SchemaItem_1.SchemaItem {
|
|
|
270
280
|
else
|
|
271
281
|
correctType = structType;
|
|
272
282
|
if (!correctType)
|
|
283
|
+
// eslint-disable-next-line @typescript-eslint/no-base-to-string
|
|
273
284
|
throw new Exception_1.ECSchemaError(Exception_1.ECSchemaStatus.InvalidType, `The provided Struct type, ${structType}, is not a valid StructClass.`);
|
|
274
285
|
return correctType;
|
|
275
286
|
}
|
|
@@ -289,6 +300,7 @@ class ECClass extends SchemaItem_1.SchemaItem {
|
|
|
289
300
|
else
|
|
290
301
|
correctType = structType;
|
|
291
302
|
if (!correctType)
|
|
303
|
+
// eslint-disable-next-line @typescript-eslint/no-base-to-string
|
|
292
304
|
throw new Exception_1.ECSchemaError(Exception_1.ECSchemaStatus.InvalidType, `The provided Struct type, ${structType}, is not a valid StructClass.`);
|
|
293
305
|
return correctType;
|
|
294
306
|
}
|
|
@@ -371,7 +383,7 @@ class ECClass extends SchemaItem_1.SchemaItem {
|
|
|
371
383
|
baseClassElement.textContent = baseClassName;
|
|
372
384
|
itemElement.appendChild(baseClassElement);
|
|
373
385
|
}
|
|
374
|
-
if (
|
|
386
|
+
if (this._properties) {
|
|
375
387
|
for (const prop of this._properties.values()) {
|
|
376
388
|
const propXml = await prop.toXml(schemaXml);
|
|
377
389
|
itemElement.appendChild(propXml);
|
|
@@ -483,69 +495,51 @@ class ECClass extends SchemaItem_1.SchemaItem {
|
|
|
483
495
|
}
|
|
484
496
|
/**
|
|
485
497
|
*
|
|
486
|
-
* @param
|
|
487
|
-
* @
|
|
488
|
-
* @param propertiesToMerge
|
|
489
|
-
* @param overwriteExisting
|
|
498
|
+
* @param cache
|
|
499
|
+
* @returns
|
|
490
500
|
*
|
|
491
501
|
* @internal
|
|
492
502
|
*/
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
if (
|
|
499
|
-
|
|
503
|
+
async buildPropertyCache() {
|
|
504
|
+
const cache = new Map();
|
|
505
|
+
const baseClass = await this.baseClass;
|
|
506
|
+
if (baseClass) {
|
|
507
|
+
for (const property of await baseClass.getProperties()) {
|
|
508
|
+
if (!cache.has(property.name.toUpperCase())) {
|
|
509
|
+
cache.set(property.name.toUpperCase(), property);
|
|
500
510
|
}
|
|
501
511
|
}
|
|
502
|
-
else {
|
|
503
|
-
existingValues.set(upperCaseName, target.length);
|
|
504
|
-
target.push(property);
|
|
505
|
-
}
|
|
506
512
|
}
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
* @param existingValues
|
|
512
|
-
* @returns
|
|
513
|
-
*
|
|
514
|
-
* @internal
|
|
515
|
-
*/
|
|
516
|
-
async buildPropertyCache(result, existingValues) {
|
|
517
|
-
if (!existingValues) {
|
|
518
|
-
existingValues = new Map();
|
|
519
|
-
}
|
|
520
|
-
if (this.baseClass) {
|
|
521
|
-
const baseClass = await this.baseClass;
|
|
522
|
-
if (baseClass) {
|
|
523
|
-
ECClass.mergeProperties(result, existingValues, await baseClass.getProperties(), false);
|
|
524
|
-
}
|
|
513
|
+
if (this._properties) {
|
|
514
|
+
this._properties.forEach(property => {
|
|
515
|
+
cache.set(property.name.toUpperCase(), property);
|
|
516
|
+
});
|
|
525
517
|
}
|
|
526
|
-
|
|
527
|
-
return;
|
|
528
|
-
ECClass.mergeProperties(result, existingValues, [...this._properties.values()], true);
|
|
518
|
+
return cache;
|
|
529
519
|
}
|
|
530
520
|
/**
|
|
531
521
|
*
|
|
532
|
-
* @param
|
|
533
|
-
* @param existingValues
|
|
522
|
+
* @param cache
|
|
534
523
|
* @returns
|
|
535
524
|
*
|
|
536
525
|
* @internal
|
|
537
526
|
*/
|
|
538
|
-
buildPropertyCacheSync(
|
|
539
|
-
|
|
540
|
-
existingValues = new Map();
|
|
541
|
-
}
|
|
527
|
+
buildPropertyCacheSync() {
|
|
528
|
+
const cache = new Map();
|
|
542
529
|
const baseClass = this.getBaseClassSync();
|
|
543
530
|
if (baseClass) {
|
|
544
|
-
|
|
531
|
+
for (const property of baseClass.getPropertiesSync()) {
|
|
532
|
+
if (!cache.has(property.name.toUpperCase())) {
|
|
533
|
+
cache.set(property.name.toUpperCase(), property);
|
|
534
|
+
}
|
|
535
|
+
}
|
|
545
536
|
}
|
|
546
|
-
if (
|
|
547
|
-
|
|
548
|
-
|
|
537
|
+
if (this._properties) {
|
|
538
|
+
this._properties.forEach(property => {
|
|
539
|
+
cache.set(property.name.toUpperCase(), property);
|
|
540
|
+
});
|
|
541
|
+
}
|
|
542
|
+
return cache;
|
|
549
543
|
}
|
|
550
544
|
/**
|
|
551
545
|
* Clears all caches on this object. This is called implicitly for this class,
|
|
@@ -566,10 +560,9 @@ class ECClass extends SchemaItem_1.SchemaItem {
|
|
|
566
560
|
return this._properties && this._properties.size > 0 ? this._properties.values() : [];
|
|
567
561
|
}
|
|
568
562
|
if (!this._mergedPropertyCache) {
|
|
569
|
-
this._mergedPropertyCache =
|
|
570
|
-
this.buildPropertyCacheSync(this._mergedPropertyCache, undefined);
|
|
563
|
+
this._mergedPropertyCache = this.buildPropertyCacheSync();
|
|
571
564
|
}
|
|
572
|
-
return this._mergedPropertyCache;
|
|
565
|
+
return this._mergedPropertyCache.values();
|
|
573
566
|
}
|
|
574
567
|
/**
|
|
575
568
|
* Quick way to check whether this class has any local properties without having to use the iterable
|
|
@@ -658,14 +651,21 @@ class ECClass extends SchemaItem_1.SchemaItem {
|
|
|
658
651
|
return this.traverseBaseClasses((thisSchemaItem, thatSchemaItemOrKey) => SchemaItem_1.SchemaItem.equalByKey(thisSchemaItem, thatSchemaItemOrKey), targetClass);
|
|
659
652
|
}
|
|
660
653
|
}
|
|
661
|
-
/**
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
654
|
+
/** @internal */
|
|
655
|
+
isSync(targetClass, schemaName) {
|
|
656
|
+
if (schemaName !== undefined) {
|
|
657
|
+
(0, core_bentley_1.assert)(typeof (targetClass) === "string", "Expected targetClass of type string because schemaName was specified");
|
|
658
|
+
const key = new SchemaKey_1.SchemaItemKey(targetClass, new SchemaKey_1.SchemaKey(schemaName));
|
|
659
|
+
if (SchemaItem_1.SchemaItem.equalByKey(this, key))
|
|
660
|
+
return true;
|
|
661
|
+
return this.traverseBaseClassesSync((thisSchemaItem, thatSchemaItemOrKey) => SchemaItem_1.SchemaItem.equalByKey(thisSchemaItem, thatSchemaItemOrKey), key);
|
|
662
|
+
}
|
|
663
|
+
else {
|
|
664
|
+
(0, core_bentley_1.assert)(ECClass.isECClass(targetClass), "Expected targetClass to be of type ECClass");
|
|
665
|
+
if (SchemaItem_1.SchemaItem.equalByKey(this, targetClass))
|
|
666
|
+
return true;
|
|
667
|
+
return this.traverseBaseClassesSync((thisSchemaItem, thatSchemaItemOrKey) => SchemaItem_1.SchemaItem.equalByKey(thisSchemaItem, thatSchemaItemOrKey), targetClass);
|
|
668
|
+
}
|
|
669
669
|
}
|
|
670
670
|
/**
|
|
671
671
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Class.js","sourceRoot":"","sources":["../../../src/Metadata/Class.ts"],"names":[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AM,KAAc,cAAc,KAAK,OAAO,0BAAc,CAAC,WAAW,CAAC,CAAC,CAAC;IAClF;;;;OAIG;IACI,MAAM,CAAC,aAAa,CAAC,IAAiB;QAC3C,IAAI,IAAI,IAAI,IAAI,CAAC,cAAc,KAAK,0BAAc,CAAC,WAAW;YAC5D,OAAO,IAAI,CAAC;QAEd,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,mBAAmB,CAAC,IAAiB;QACjD,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC;YAC3B,MAAM,IAAI,yBAAa,CAAC,0BAAc,CAAC,qBAAqB,EAAE,aAAa,0BAAc,CAAC,WAAW,iBAAiB,CAAC,CAAC;IAC5H,CAAC;CACF;AAjCD,kCAiCC;AAED;;;GAGG;AACH,MAAsB,kBAAmB,SAAQ,WAAW;CAE3D;AAFD,gDAEC;AAED;;;GAGG;AACH,MAAsB,YAAa,SAAQ,OAAO;CA6BjD;AA7BD,oCA6BC","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 { assert } from \"@itwin/core-bentley\";\nimport { DelayedPromiseWithProps } from \"../DelayedPromise\";\nimport { ClassProps } from \"../Deserialization/JsonProps\";\nimport { XmlSerializationUtils } from \"../Deserialization/XmlSerializationUtils\";\nimport { AbstractSchemaItemType, classModifierToString, ECClassModifier, parseClassModifier, parsePrimitiveType, PrimitiveType, SchemaItemType, SupportedSchemaItemType } from \"../ECObjects\";\nimport { ECSchemaError, ECSchemaStatus } from \"../Exception\";\nimport { AnyClass, HasMixins, LazyLoadedECClass } from \"../Interfaces\";\nimport { SchemaItemKey, SchemaKey } from \"../SchemaKey\";\nimport { CustomAttribute, CustomAttributeContainerProps, CustomAttributeSet, serializeCustomAttributes } from \"./CustomAttribute\";\nimport { Enumeration } from \"./Enumeration\";\nimport {\n EnumerationArrayProperty, EnumerationProperty, PrimitiveArrayProperty, PrimitiveProperty, Property, StructArrayProperty, StructProperty,\n} from \"./Property\";\nimport { Schema } from \"./Schema\";\nimport { SchemaItem } from \"./SchemaItem\";\nimport { ECSpecVersion, SchemaReadHelper } from \"../Deserialization/Helper\";\n\n/**\n * A common abstract class for all of the ECClass types.\n * @public @preview\n */\nexport abstract class ECClass extends SchemaItem implements CustomAttributeContainerProps {\n /** @internal */\n public static override get schemaItemType(): SupportedSchemaItemType { return AbstractSchemaItemType.Class; } // need this so getItem(\"name\", ECClass) in schema works\n private _modifier: ECClassModifier;\n private _baseClass?: LazyLoadedECClass;\n private _derivedClasses?: Map<string, LazyLoadedECClass>;\n private _properties?: Map<string, Property>;\n private _customAttributes?: Map<string, CustomAttribute>;\n private _mergedPropertyCache?: Property[];\n\n public get modifier() { return this._modifier; }\n public get customAttributes(): CustomAttributeSet | undefined { return this._customAttributes; }\n\n /** @internal */\n constructor(schema: Schema, name: string, modifier?: ECClassModifier) {\n super(schema, name);\n\n if (modifier)\n this._modifier = modifier;\n else\n this._modifier = ECClassModifier.None;\n }\n\n /**\n * Gets the base class if it exists, otherwise returns undefined.\n */\n public get baseClass(): LazyLoadedECClass | undefined {\n return this._baseClass;\n }\n\n public getBaseClassSync(): ECClass | undefined {\n if (!this.baseClass) {\n return undefined;\n }\n\n return this.schema.lookupItemSync(this.baseClass, ECClass);\n }\n\n /**\n * Sets the base class of the ECClass. Pass undefined to 'remove' the base class.\n *\n * @internal\n */\n protected async setBaseClass(baseClass: LazyLoadedECClass | undefined) {\n const oldBaseClass = this._baseClass;\n this._baseClass = baseClass;\n\n if (baseClass)\n this.addDerivedClass(await baseClass, this);\n else if (oldBaseClass)\n this.removeDerivedClass(await oldBaseClass, this);\n }\n\n /**\n * Gets the derived classes belonging to this class.\n * @returns An array of ECClasses or undefined if no derived classes exist.\n */\n public async getDerivedClasses(): Promise<ECClass[] | undefined> {\n if (!this._derivedClasses || this._derivedClasses.size === 0)\n return undefined;\n\n return Array.from(await Promise.all(this._derivedClasses.values()));\n }\n\n /**\n * Convenience method for adding an already loaded ECProperty used by create*Property methods.\n * @param prop The property to add.\n * @return The property that was added.\n *\n * @internal\n */\n protected addProperty<T extends Property>(prop: T): T {\n if (!this._properties)\n this._properties = new Map<string, Property>();\n\n this._properties.set(prop.name.toUpperCase(), prop);\n this.cleanCache();\n return prop;\n }\n\n /**\n * Deletes a property from within this class.\n * @param name The property name to delete, lookup is case-insensitive\n * @internal\n */\n protected async deleteProperty(name: string): Promise<void> {\n if (this._properties) {\n const property = await this.getProperty(name);\n if (property) {\n this._properties.delete(name.toUpperCase());\n this.cleanCache();\n }\n }\n }\n\n /**\n * Deletes a property from within this class.\n * @param name The property name to delete, lookup is case-insensitive\n * @internal\n */\n protected deletePropertySync(name: string): void {\n if (this._properties) {\n const property = this.getPropertySync(name);\n if (property) {\n this._properties.delete(name.toUpperCase());\n this.cleanCache();\n }\n }\n }\n\n\n\n /**\n * Searches, case-insensitive, for an ECProperty with given the name on this class and, by default, on\n * all base classes. Set excludeInherited to 'true' to only search the local class.\n * @param name The name of the property to retrieve.\n * @param excludeInherited If true, excludes inherited properties from the results. Defaults to false.\n */\n public async getProperty(name: string, excludeInherited: boolean = false): Promise<Property | undefined> {\n if (this._properties) {\n const upperKey = name.toUpperCase();\n const property = this._properties.get(upperKey);\n if (property)\n return property;\n }\n\n if (excludeInherited) {\n return undefined;\n }\n\n return this.getInheritedProperty(name);\n }\n\n /**\n * Searches, case-insensitive, for a local ECProperty with the name provided.\n * @param name The name of the property to retrieve.\n * @param excludeInherited If true, excludes inherited properties from the results. Defaults to false.\n */\n public getPropertySync(name: string, excludeInherited: boolean = false): Property | undefined {\n if (this._properties) {\n const upperKey = name.toUpperCase();\n const property = this._properties.get(upperKey);\n if (property)\n return property;\n }\n\n if (excludeInherited) {\n return undefined;\n }\n\n return this.getInheritedPropertySync(name);\n }\n\n /**\n * Searches the base class, if one exists, for the property with the name provided.\n * @param name The name of the inherited property to find.\n */\n public async getInheritedProperty(name: string): Promise<Property | undefined> {\n if (this.baseClass) {\n const baseClassObj = await this.baseClass;\n return baseClassObj.getProperty(name);\n }\n\n return undefined;\n }\n\n /**\n * Searches the base class, if one exists, for the property with the name provided.\n * @param name The name of the inherited property to find.\n */\n public getInheritedPropertySync(name: string): Property | undefined {\n const baseClassObj = this.getBaseClassSync();\n if (baseClassObj)\n return baseClassObj.getPropertySync(name);\n\n return undefined;\n }\n\n /**\n * Creates a PrimitiveECProperty.\n * @param name The name of property to create.\n * @param primitiveType The primitive type of property to create. If not provided the default is PrimitiveType.Integer\n * @throws ECSchemaStatus DuplicateProperty: thrown if a property with the same name already exists in the class.\n *\n * @internal\n */\n protected async createPrimitiveProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveProperty>;\n protected async createPrimitiveProperty(name: string, primitiveType: Enumeration): Promise<EnumerationProperty>;\n protected async createPrimitiveProperty(name: string, primitiveType?: string | PrimitiveType | Enumeration): Promise<Property> {\n if (await this.getProperty(name, true))\n throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);\n\n const propType = await this.loadPrimitiveType(primitiveType, this.schema);\n if (typeof (propType) === \"number\")\n return this.addProperty(new PrimitiveProperty(this, name, propType));\n\n return this.addProperty(new EnumerationProperty(this, name, new DelayedPromiseWithProps(propType.key, async () => propType)));\n }\n\n /**\n * Creates a PrimitiveECProperty.\n * @param name The name of property to create.\n * @param primitiveType The primitive type of property to create. If not provided the default is PrimitiveType.Integer\n * @throws ECSchemaStatus DuplicateProperty: thrown if a property with the same name already exists in the class.\n *\n * @internal\n */\n protected createPrimitivePropertySync(name: string, primitiveType: PrimitiveType): PrimitiveProperty;\n protected createPrimitivePropertySync(name: string, primitiveType: Enumeration): EnumerationProperty;\n protected createPrimitivePropertySync(name: string, primitiveType?: string | PrimitiveType | Enumeration): Property {\n if (this.getPropertySync(name, true))\n throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);\n\n const propType = this.loadPrimitiveTypeSync(primitiveType, this.schema);\n if (typeof (propType) === \"number\")\n return this.addProperty(new PrimitiveProperty(this, name, propType));\n\n return this.addProperty(new EnumerationProperty(this, name, new DelayedPromiseWithProps(propType.key, async () => propType)));\n }\n\n /**\n * Creates a PrimitiveArrayECProperty.\n * @param name The name of property to create.\n * @param primitiveType The primitive type of property to create. If not provided the default is PrimitiveType.Integer\n *\n * @internal\n */\n protected async createPrimitiveArrayProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveArrayProperty>;\n protected async createPrimitiveArrayProperty(name: string, primitiveType: Enumeration): Promise<EnumerationArrayProperty>;\n protected async createPrimitiveArrayProperty(name: string, primitiveType?: string | PrimitiveType | Enumeration): Promise<Property> {\n if (await this.getProperty(name, true))\n throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);\n\n const propType = await this.loadPrimitiveType(primitiveType, this.schema);\n if (typeof (propType) === \"number\")\n return this.addProperty(new PrimitiveArrayProperty(this, name, propType));\n\n return this.addProperty(new EnumerationArrayProperty(this, name, new DelayedPromiseWithProps(propType.key, async () => propType)));\n }\n\n /**\n * Creates a PrimitiveArrayECProperty.\n * @param name The name of property to create.\n * @param primitiveType The primitive type of property to create. If not provided the default is PrimitiveType.Integer\n *\n * @internal\n */\n protected createPrimitiveArrayPropertySync(name: string, primitiveType: PrimitiveType): PrimitiveArrayProperty;\n protected createPrimitiveArrayPropertySync(name: string, primitiveType: Enumeration): EnumerationArrayProperty;\n protected createPrimitiveArrayPropertySync(name: string, primitiveType?: string | PrimitiveType | Enumeration): Property {\n if (this.getPropertySync(name, true))\n throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);\n\n const propType = this.loadPrimitiveTypeSync(primitiveType, this.schema);\n if (typeof (propType) === \"number\")\n return this.addProperty(new PrimitiveArrayProperty(this, name, propType));\n\n return this.addProperty(new EnumerationArrayProperty(this, name, new DelayedPromiseWithProps(propType.key, async () => propType)));\n }\n\n /**\n *\n * @param name The name of property to create.\n * @param structType The struct type of property to create.\n *\n * @internal\n */\n protected async createStructProperty(name: string, structType: string | StructClass): Promise<StructProperty> {\n if (await this.getProperty(name, true))\n throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);\n\n return this.addProperty(new StructProperty(this, name, await this.loadStructType(structType, this.schema)));\n }\n\n /**\n *\n * @param name The name of property to create.\n * @param structType The struct type of property to create.\n *\n * @internal\n */\n protected createStructPropertySync(name: string, structType: string | StructClass): StructProperty {\n if (this.getPropertySync(name, true))\n throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);\n\n return this.addProperty(new StructProperty(this, name, this.loadStructTypeSync(structType, this.schema)));\n }\n\n /**\n *\n * @param name\n * @param type\n *\n * @internal\n */\n protected async createStructArrayProperty(name: string, structType: string | StructClass): Promise<StructArrayProperty> {\n if (await this.getProperty(name, true))\n throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);\n\n return this.addProperty(new StructArrayProperty(this, name, await this.loadStructType(structType, this.schema)));\n }\n\n /**\n *\n * @param name\n * @param type\n *\n * @internal\n */\n protected createStructArrayPropertySync(name: string, structType: string | StructClass): StructArrayProperty {\n if (this.getPropertySync(name, true))\n throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);\n\n return this.addProperty(new StructArrayProperty(this, name, this.loadStructTypeSync(structType, this.schema)));\n }\n\n /**\n *\n * @param structType\n * @param schema\n * @returns\n *\n * @internal\n */\n protected async loadStructType(structType: string | StructClass | undefined, schema: Schema): Promise<StructClass> {\n let correctType: StructClass | undefined;\n if (typeof (structType) === \"string\") {\n correctType = await schema.lookupItem(structType, StructClass);\n } else\n correctType = structType;\n\n if (!correctType)\n throw new ECSchemaError(ECSchemaStatus.InvalidType, `The provided Struct type, ${structType}, is not a valid StructClass.`);\n\n return correctType;\n }\n\n /**\n *\n * @param structType\n * @param schema\n * @returns\n *\n * @internal\n */\n protected loadStructTypeSync(structType: string | StructClass | undefined, schema: Schema): StructClass {\n let correctType: StructClass | undefined;\n if (typeof (structType) === \"string\") {\n correctType = schema.lookupItemSync(structType, StructClass);\n } else\n correctType = structType;\n\n if (!correctType)\n throw new ECSchemaError(ECSchemaStatus.InvalidType, `The provided Struct type, ${structType}, is not a valid StructClass.`);\n\n return correctType;\n }\n\n /**\n *\n * @param primitiveType\n * @param schema\n * @returns\n *\n * @internal\n */\n protected async loadPrimitiveType(primitiveType: string | PrimitiveType | Enumeration | undefined, schema: Schema): Promise<PrimitiveType | Enumeration> {\n if (primitiveType === undefined)\n return PrimitiveType.Integer;\n\n if (typeof (primitiveType) === \"string\") {\n let resolvedType: (PrimitiveType | Enumeration | undefined) = parsePrimitiveType(primitiveType);\n if (!resolvedType) {\n resolvedType = await schema.lookupItem(primitiveType, Enumeration);\n }\n\n if (resolvedType === undefined)\n throw new ECSchemaError(ECSchemaStatus.InvalidType, `The provided primitive type, ${primitiveType}, is not a valid PrimitiveType or Enumeration.`);\n\n // If resolvedType is a SchemaItem, make sure it is an Enumeration- if not, throw an error\n if (typeof (resolvedType) !== \"number\" && resolvedType.schemaItemType !== SchemaItemType.Enumeration)\n throw new ECSchemaError(ECSchemaStatus.InvalidType, `The provided primitive type, ${primitiveType}, is not a valid PrimitiveType or Enumeration.`);\n\n return resolvedType;\n }\n\n return primitiveType;\n }\n\n /**\n *\n * @param primitiveType\n * @param schema\n * @returns\n *\n * @internal\n */\n protected loadPrimitiveTypeSync(primitiveType: string | PrimitiveType | Enumeration | undefined, schema: Schema): PrimitiveType | Enumeration {\n if (primitiveType === undefined)\n return PrimitiveType.Integer;\n\n if (typeof (primitiveType) === \"string\") {\n let resolvedType: (PrimitiveType | Enumeration | undefined) = parsePrimitiveType(primitiveType);\n if (!resolvedType) {\n resolvedType = schema.lookupItemSync(primitiveType, Enumeration);\n }\n\n if (resolvedType === undefined)\n throw new ECSchemaError(ECSchemaStatus.InvalidType, `The provided primitive type, ${primitiveType}, is not a valid PrimitiveType or Enumeration.`);\n\n return resolvedType;\n }\n\n return primitiveType;\n }\n\n /**\n * Save this Classes properties to an object for serializing to JSON.\n * @param standalone Serialization includes only this object (as opposed to the full schema).\n * @param includeSchemaVersion Include the Schema's version information in the serialized object.\n */\n public override toJSON(standalone: boolean = false, includeSchemaVersion: boolean = false): ClassProps {\n const schemaJson = super.toJSON(standalone, includeSchemaVersion) as any;\n const isMixin = SchemaItemType.Mixin === this.schemaItemType;\n const isRelationship = SchemaItemType.RelationshipClass === this.schemaItemType;\n if (!isMixin && (ECClassModifier.None !== this.modifier || isRelationship))\n schemaJson.modifier = classModifierToString(this.modifier);\n if (this.baseClass !== undefined)\n schemaJson.baseClass = this.baseClass.fullName;\n if (this._properties !== undefined && this._properties.size > 0)\n schemaJson.properties = [...this._properties.values()].map((prop) => prop.toJSON());\n\n const customAttributes = serializeCustomAttributes(this.customAttributes);\n if (customAttributes !== undefined)\n schemaJson.customAttributes = customAttributes;\n return schemaJson as ClassProps;\n }\n\n /** @internal */\n public override async toXml(schemaXml: Document): Promise<Element> {\n const itemElement = await super.toXml(schemaXml);\n\n if (undefined !== this.modifier)\n itemElement.setAttribute(\"modifier\", classModifierToString(this.modifier));\n\n if (undefined !== this.baseClass) {\n const baseClass = await this.baseClass;\n const baseClassElement = schemaXml.createElement(\"BaseClass\");\n const baseClassName = XmlSerializationUtils.createXmlTypedName(this.schema, baseClass.schema, baseClass.name);\n baseClassElement.textContent = baseClassName;\n itemElement.appendChild(baseClassElement);\n }\n\n if (undefined !== this._properties) {\n for (const prop of this._properties.values()) {\n const propXml = await prop.toXml(schemaXml);\n itemElement.appendChild(propXml);\n }\n }\n\n if (this._customAttributes) {\n const caContainerElement = schemaXml.createElement(\"ECCustomAttributes\");\n for (const [name, attribute] of this._customAttributes) {\n const caElement = await XmlSerializationUtils.writeCustomAttribute(name, attribute, schemaXml, this.schema);\n caContainerElement.appendChild(caElement);\n }\n itemElement.appendChild(caContainerElement);\n }\n\n return itemElement;\n }\n\n public override fromJSONSync(classProps: ClassProps) {\n super.fromJSONSync(classProps);\n\n if (undefined !== classProps.modifier) {\n const modifier = parseClassModifier(classProps.modifier);\n if (undefined === modifier) {\n if (SchemaReadHelper.isECSpecVersionNewer({ readVersion: classProps.originalECSpecMajorVersion, writeVersion: classProps.originalECSpecMinorVersion } as ECSpecVersion))\n this._modifier = ECClassModifier.None;\n else\n throw new ECSchemaError(ECSchemaStatus.InvalidModifier, `The string '${classProps.modifier}' is not a valid ECClassModifier.`);\n } else {\n this._modifier = modifier;\n }\n }\n\n if (undefined !== classProps.baseClass) {\n const ecClassSchemaItemKey = this.schema.getSchemaItemKey(classProps.baseClass);\n if (!ecClassSchemaItemKey)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `Unable to locate the baseClass ${classProps.baseClass}.`);\n\n const baseClass = this.schema.lookupItemSync(ecClassSchemaItemKey);\n\n let lazyBase: LazyLoadedECClass;\n if (!baseClass) {\n lazyBase = new DelayedPromiseWithProps<SchemaItemKey, ECClass>(ecClassSchemaItemKey,\n async () => {\n const baseItem = await this.schema.lookupItem(ecClassSchemaItemKey);\n if (undefined === baseItem || !ECClass.isECClass(baseItem))\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `Unable to locate the baseClass ${classProps.baseClass}.`);\n return baseItem;\n });\n } else {\n lazyBase = new DelayedPromiseWithProps<SchemaItemKey, ECClass>(ecClassSchemaItemKey,\n async () => {\n return baseClass as ECClass;\n });\n }\n\n this._baseClass = lazyBase;\n\n if (!baseClass)\n return;\n\n this.addDerivedClass(baseClass as ECClass, this);\n }\n }\n\n public override async fromJSON(classProps: ClassProps): Promise<void> {\n this.fromJSONSync(classProps);\n }\n\n /**\n *\n * @param customAttribute\n *\n * @internal\n */\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 * Iterates (recursively) over all base classes and mixins, in \"property override\" order.\n * This is essentially a depth-first traversal through the inheritance tree.\n */\n public async *getAllBaseClasses(): AsyncIterable<ECClass> {\n const baseClasses: ECClass[] = [this];\n const addBaseClasses = async (ecClass: AnyClass) => {\n if (SchemaItemType.EntityClass === ecClass.schemaItemType) {\n for (let i = (ecClass as HasMixins).mixins.length - 1; i >= 0; i--) {\n baseClasses.push(await (ecClass as HasMixins).mixins[i]);\n }\n }\n\n if (ecClass.baseClass)\n baseClasses.push(await ecClass.baseClass);\n };\n\n while (baseClasses.length > 0) {\n const baseClass = baseClasses.pop() as AnyClass;\n await addBaseClasses(baseClass);\n if (baseClass !== this)\n yield baseClass as ECClass;\n }\n }\n\n public *getAllBaseClassesSync(): Iterable<AnyClass> {\n const baseClasses: ECClass[] = [this];\n const addBaseClasses = (ecClass: AnyClass) => {\n if (ecClass.schemaItemType === SchemaItemType.EntityClass) { // cannot use EntityClass typeguard because of circular reference\n for (const m of Array.from((ecClass as HasMixins).getMixinsSync()).reverse()) {\n baseClasses.push(m);\n }\n }\n\n const baseClass = ecClass.getBaseClassSync();\n if (baseClass)\n baseClasses.push(baseClass);\n };\n\n while (baseClasses.length > 0) {\n const baseClass = baseClasses.pop() as AnyClass;\n addBaseClasses(baseClass);\n if (baseClass !== this)\n yield baseClass;\n }\n }\n\n /**\n *\n * @param target\n * @param existingValues\n * @param propertiesToMerge\n * @param overwriteExisting\n *\n * @internal\n */\n protected static mergeProperties(target: Property[], existingValues: Map<string, number>, propertiesToMerge: Iterable<Property>, overwriteExisting: boolean) {\n for (const property of propertiesToMerge) {\n const upperCaseName = property.name.toUpperCase();\n const existing = existingValues.get(upperCaseName);\n if (existing !== undefined) {\n if (overwriteExisting) {\n target[existing] = property;\n }\n } else {\n existingValues.set(upperCaseName, target.length);\n target.push(property);\n }\n }\n }\n\n /**\n *\n * @param result\n * @param existingValues\n * @returns\n *\n * @internal\n */\n protected async buildPropertyCache(result: Property[], existingValues?: Map<string, number>): Promise<void> {\n if (!existingValues) {\n existingValues = new Map<string, number>();\n }\n\n if (this.baseClass) {\n const baseClass = await this.baseClass;\n if (baseClass) {\n ECClass.mergeProperties(result, existingValues, await baseClass.getProperties(), false);\n }\n }\n\n if (!this._properties)\n return;\n\n ECClass.mergeProperties(result, existingValues, [...this._properties.values()], true);\n }\n\n /**\n *\n * @param result\n * @param existingValues\n * @returns\n *\n * @internal\n */\n protected buildPropertyCacheSync(result: Property[], existingValues?: Map<string, number>): void {\n if (!existingValues) {\n existingValues = new Map<string, number>();\n }\n\n const baseClass = this.getBaseClassSync();\n if (baseClass) {\n ECClass.mergeProperties(result, existingValues, baseClass.getPropertiesSync(), false);\n }\n\n if (!this._properties)\n return;\n\n ECClass.mergeProperties(result, existingValues, [...this._properties.values()], true);\n }\n\n /**\n * Clears all caches on this object. This is called implicitly for this class,\n * but needs to be called if derived classes have changed.\n * @internal\n */\n public cleanCache() {\n this._mergedPropertyCache = undefined;\n }\n\n /**\n * Returns the properties on this class and its base classes.\n * Since this is an expensive operation, results will be cached after first call.\n * @param excludeInherited If true, only properties defined directly on this class will be returned. Defaults to false.\n * @returns An array of properties, empty array if none exist.\n */\n public getPropertiesSync(excludeInherited?: boolean): Iterable<Property> {\n if (excludeInherited) {\n return this._properties && this._properties.size > 0 ? this._properties.values() : [];\n }\n\n if (!this._mergedPropertyCache) {\n this._mergedPropertyCache = [];\n this.buildPropertyCacheSync(this._mergedPropertyCache, undefined);\n }\n\n return this._mergedPropertyCache;\n }\n\n /**\n * Quick way to check whether this class has any local properties without having to use the iterable\n */\n public get hasLocalProperties(): boolean {\n return this._properties !== undefined && this._properties.size > 0;\n }\n\n /**\n * Returns the properties on this class and its base classes.\n * Since this is an expensive operation, results will be cached after first call.\n * @param excludeInherited If true, only properties defined directly on this class will be returned.\n * @returns An array of properties, empty array if none exist.\n */\n public async getProperties(excludeInherited?: boolean): Promise<Iterable<Property>> {\n // At the moment we do not lazy load properties, so this is the same as getPropertiesSync\n return this.getPropertiesSync(excludeInherited);\n }\n\n /**\n * Retrieve all custom attributes in the current class and its bases\n * This is the async version of getCustomAttributesSync()\n */\n public async getCustomAttributes(): Promise<CustomAttributeSet> {\n return this.getCustomAttributesSync();\n }\n\n /**\n * Retrieve all custom attributes in the current class and its bases.\n */\n public getCustomAttributesSync(): CustomAttributeSet {\n let customAttributes: Map<string, CustomAttribute> | undefined = this._customAttributes;\n if (undefined === customAttributes) {\n customAttributes = new Map<string, CustomAttribute>();\n }\n\n this.traverseBaseClassesSync((ecClass: ECClass) => {\n if (undefined === ecClass.customAttributes)\n return false;\n\n for (const [className, customAttribute] of ecClass.customAttributes) {\n if (customAttributes.has(className))\n continue;\n customAttributes.set(className, customAttribute);\n }\n\n return false;\n });\n\n return customAttributes;\n }\n\n /**\n * Asynchronously traverses through the inheritance tree, using depth-first traversal, calling the given callback\n * function for each base class encountered.\n * @param callback The function to call for each base class in the hierarchy.\n * @param arg An argument that will be passed as the second parameter to the callback function.\n */\n public async traverseBaseClasses(callback: (ecClass: ECClass, arg?: any) => boolean, arg?: any): Promise<boolean> {\n for await (const baseClass of this.getAllBaseClasses()) {\n if (callback(baseClass, arg))\n return true;\n }\n\n return false;\n }\n\n /**\n * Synchronously traverses through the inheritance tree, using depth-first traversal, calling the given callback\n * function for each base class encountered.\n * @param callback The function to call for each base class in the hierarchy.\n * @param arg An argument that will be passed as the second parameter to the callback function.\n */\n public traverseBaseClassesSync(callback: (ecClass: ECClass, arg?: any) => boolean, arg?: any): boolean {\n const baseClasses = this.getAllBaseClassesSync();\n if (!baseClasses)\n return false;\n\n for (const baseClass of baseClasses) {\n if (callback(baseClass, arg))\n return true;\n }\n\n return false;\n }\n\n /**\n * Indicates if the targetClass is of this type.\n * @param targetClass The ECClass or ECClass name to check.\n * @param schemaName The schema name. Required if targetClass is the ECClass name.\n */\n public async is(targetClass: string, schemaName: string): Promise<boolean>;\n public async is(targetClass: ECClass): Promise<boolean>;\n public async is(targetClass: ECClass | string, schemaName?: string): Promise<boolean> {\n if (schemaName !== undefined) {\n assert(typeof (targetClass) === \"string\", \"Expected targetClass of type string because schemaName was specified\");\n\n const key = new SchemaItemKey(targetClass, new SchemaKey(schemaName));\n if (SchemaItem.equalByKey(this, key))\n return true;\n\n return this.traverseBaseClasses((thisSchemaItem, thatSchemaItemOrKey) => SchemaItem.equalByKey(thisSchemaItem, thatSchemaItemOrKey), key);\n } else {\n assert(ECClass.isECClass(targetClass), \"Expected targetClass to be of type ECClass\");\n\n if (SchemaItem.equalByKey(this, targetClass))\n return true;\n\n return this.traverseBaseClasses((thisSchemaItem, thatSchemaItemOrKey) => SchemaItem.equalByKey(thisSchemaItem, thatSchemaItemOrKey), targetClass);\n }\n }\n\n /**\n * A synchronous version of the [[ECClass.is]], indicating if the targetClass is of this type.\n * @param targetClass The class to check.\n */\n public isSync(targetClass: ECClass): boolean {\n if (SchemaItem.equalByKey(this, targetClass))\n return true;\n\n return this.traverseBaseClassesSync((thisSchemaItem, thatSchemaItemOrKey) => SchemaItem.equalByKey(thisSchemaItem, thatSchemaItemOrKey), targetClass);\n }\n\n /**\n * @internal\n */\n public static isECClass(object: any): object is ECClass {\n if (!SchemaItem.isSchemaItem(object))\n return false;\n\n return object.schemaItemType === SchemaItemType.EntityClass || object.schemaItemType === SchemaItemType.Mixin || object.schemaItemType === SchemaItemType.RelationshipClass ||\n object.schemaItemType === SchemaItemType.StructClass || object.schemaItemType === SchemaItemType.CustomAttributeClass;\n }\n\n /**\n * A setter method for the ECClass modifier, used specifically for schema editing.\n * @param modifier\n * @internal\n */\n protected setModifier(modifier: ECClassModifier) {\n this._modifier = modifier;\n }\n\n /**\n * Adds an ECClass to the derived class collection. This method is only intended to update the local\n * cache of derived classes. For adding a class to the hierarchy, use the baseClass setter method.\n * @param prop The property to add.\n * @return The property that was added.\n */\n private addDerivedClass(baseClass: ECClass, derivedClass: ECClass) {\n if (!baseClass._derivedClasses)\n baseClass._derivedClasses = new Map<string, LazyLoadedECClass>();\n\n if (baseClass._derivedClasses.has(derivedClass.fullName))\n return;\n\n if (derivedClass.isSync(baseClass)) {\n const promise = new DelayedPromiseWithProps<SchemaItemKey, ECClass>(derivedClass.key, async () => derivedClass);\n baseClass._derivedClasses.set(derivedClass.fullName, promise);\n }\n }\n\n /**\n * Removes an ECClass from the derived class collection. This method is only intended to update the local\n * cache of derived classes. For updating the class hierarchy, use the baseClass setter method.\n * @param prop The property to add.\n * @return The property that was added.\n */\n private removeDerivedClass(baseClass: ECClass, derivedClass: ECClass) {\n if (!baseClass._derivedClasses)\n return;\n\n if (!baseClass._derivedClasses.has(derivedClass.fullName))\n return;\n\n baseClass._derivedClasses.delete(derivedClass.fullName);\n }\n}\n\n/**\n * A Typescript class representation of an ECStructClass.\n * @public @preview\n */\nexport class StructClass extends ECClass {\n /**\n * Get the type of item represented by this instance\n */\n public override readonly schemaItemType = StructClass.schemaItemType;\n\n /**\n * Get the type of item represented by this class\n * @internal\n */\n public static override get schemaItemType() { return SchemaItemType.StructClass; }\n /**\n * Type guard to check if the SchemaItem is of type StructClass.\n * @param item The SchemaItem to check.\n * @returns True if the item is a StructClass, false otherwise.\n */\n public static isStructClass(item?: SchemaItem): item is StructClass {\n if (item && item.schemaItemType === SchemaItemType.StructClass)\n return true;\n\n return false;\n }\n\n /**\n * Type assertion to check if the SchemaItem is of type StructClass.\n * @param item The SchemaItem to check.\n * @returns The item cast to StructClass if it is a StructClass, undefined otherwise.\n * @internal\n */\n public static assertIsStructClass(item?: SchemaItem): asserts item is StructClass {\n if (!this.isStructClass(item))\n throw new ECSchemaError(ECSchemaStatus.InvalidSchemaItemType, `Expected '${SchemaItemType.StructClass}' (StructClass)`);\n }\n}\n\n/**\n * @internal\n * An abstract class used for schema editing.\n */\nexport abstract class MutableStructClass extends StructClass {\n public abstract override setDisplayLabel(displayLabel: string): void;\n}\n\n/**\n * Hackish approach that works like a \"friend class\" so we can access protected members without making them public.\n * @internal\n */\nexport abstract class MutableClass extends ECClass {\n public abstract override setBaseClass(baseClass: LazyLoadedECClass | undefined): Promise<void>;\n public abstract override addCustomAttribute(customAttribute: CustomAttribute): void;\n public abstract override setModifier(modifier: ECClassModifier): void;\n public abstract override setName(name: string): void;\n public abstract override createPrimitiveProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveProperty>;\n public abstract override createPrimitiveProperty(name: string, primitiveType: Enumeration): Promise<EnumerationProperty>;\n public abstract override createPrimitiveProperty(name: string, primitiveType?: string | PrimitiveType | Enumeration): Promise<Property>;\n\n public abstract override createPrimitivePropertySync(name: string, primitiveType: PrimitiveType): PrimitiveProperty;\n public abstract override createPrimitivePropertySync(name: string, primitiveType: Enumeration): EnumerationProperty;\n public abstract override createPrimitivePropertySync(name: string, primitiveType?: string | PrimitiveType | Enumeration): Property;\n\n public abstract override createPrimitiveArrayProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveArrayProperty>;\n public abstract override createPrimitiveArrayProperty(name: string, primitiveType: Enumeration): Promise<EnumerationArrayProperty>;\n public abstract override createPrimitiveArrayProperty(name: string, primitiveType?: string | PrimitiveType | Enumeration): Promise<Property>;\n\n public abstract override createPrimitiveArrayPropertySync(name: string, primitiveType: PrimitiveType): PrimitiveArrayProperty;\n public abstract override createPrimitiveArrayPropertySync(name: string, primitiveType: Enumeration): EnumerationArrayProperty;\n public abstract override createPrimitiveArrayPropertySync(name: string, primitiveType?: string | PrimitiveType | Enumeration): Property;\n\n public abstract override createStructProperty(name: string, structType: string | StructClass): Promise<StructProperty>;\n public abstract override createStructPropertySync(name: string, structType: string | StructClass): StructProperty;\n\n public abstract override createStructArrayProperty(name: string, structType: string | StructClass): Promise<StructArrayProperty>;\n public abstract override createStructArrayPropertySync(name: string, structType: string | StructClass): StructArrayProperty;\n\n public abstract override deleteProperty(name: string): Promise<void>;\n public abstract override deletePropertySync(name: string): void;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Class.js","sourceRoot":"","sources":["../../../src/Metadata/Class.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA6C;AAC7C,sDAA4D;AAE5D,oFAAiF;AACjF,4CAA8L;AAC9L,4CAA6D;AAE7D,4CAAwD;AACxD,uDAAkI;AAClI,+CAA4C;AAC5C,yCAEoB;AAEpB,6CAA0C;AAC1C,sDAA4E;AAE5E;;;GAGG;AACH,MAAsB,OAAQ,SAAQ,uBAAU;IAC9C,gBAAgB;IACT,MAAM,KAAc,cAAc,KAA8B,OAAO,kCAAsB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,wDAAwD;IAC9J,SAAS,CAAkB;IAC3B,UAAU,CAAqB;IAC/B,eAAe,CAAkC;IACjD,WAAW,CAAyB;IACpC,iBAAiB,CAAgC;IACjD,oBAAoB,CAAyB;IAErD,IAAW,QAAQ,KAAK,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IAChD,IAAW,gBAAgB,KAAqC,OAAO,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAEhG,gBAAgB;IAChB,YAAY,MAAc,EAAE,IAAY,EAAE,QAA0B;QAClE,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAEpB,IAAI,QAAQ;YACV,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;;YAE1B,IAAI,CAAC,SAAS,GAAG,2BAAe,CAAC,IAAI,CAAC;IAC1C,CAAC;IAED;;OAEG;IACH,IAAW,SAAS;QAClB,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAEM,gBAAgB;QACrB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;YACpB,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,c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BAAqB,EAAE,aAAa,0BAAc,CAAC,WAAW,iBAAiB,CAAC,CAAC;IAC5H,CAAC;CACF;AAjCD,kCAiCC;AAED;;;GAGG;AACH,MAAsB,kBAAmB,SAAQ,WAAW;CAE3D;AAFD,gDAEC;AAED;;;GAGG;AACH,MAAsB,YAAa,SAAQ,OAAO;CA6BjD;AA7BD,oCA6BC","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 { assert } from \"@itwin/core-bentley\";\nimport { DelayedPromiseWithProps } from \"../DelayedPromise\";\nimport { ClassProps } from \"../Deserialization/JsonProps\";\nimport { XmlSerializationUtils } from \"../Deserialization/XmlSerializationUtils\";\nimport { AbstractSchemaItemType, classModifierToString, ECClassModifier, parseClassModifier, parsePrimitiveType, PrimitiveType, SchemaItemType, SupportedSchemaItemType } from \"../ECObjects\";\nimport { ECSchemaError, ECSchemaStatus } from \"../Exception\";\nimport { AnyClass, HasMixins, LazyLoadedECClass } from \"../Interfaces\";\nimport { SchemaItemKey, SchemaKey } from \"../SchemaKey\";\nimport { CustomAttribute, CustomAttributeContainerProps, CustomAttributeSet, serializeCustomAttributes } from \"./CustomAttribute\";\nimport { Enumeration } from \"./Enumeration\";\nimport {\n EnumerationArrayProperty, EnumerationProperty, PrimitiveArrayProperty, PrimitiveProperty, Property, StructArrayProperty, StructProperty,\n} from \"./Property\";\nimport { Schema } from \"./Schema\";\nimport { SchemaItem } from \"./SchemaItem\";\nimport { ECSpecVersion, SchemaReadHelper } from \"../Deserialization/Helper\";\n\n/**\n * A common abstract class for all of the ECClass types.\n * @public @preview\n */\nexport abstract class ECClass extends SchemaItem implements CustomAttributeContainerProps {\n /** @internal */\n public static override get schemaItemType(): SupportedSchemaItemType { return AbstractSchemaItemType.Class; } // need this so getItem(\"name\", ECClass) in schema works\n private _modifier: ECClassModifier;\n private _baseClass?: LazyLoadedECClass;\n private _derivedClasses?: Map<string, LazyLoadedECClass>;\n private _properties?: Map<string, Property>;\n private _customAttributes?: Map<string, CustomAttribute>;\n private _mergedPropertyCache?: Map<string, Property>;\n\n public get modifier() { return this._modifier; }\n public get customAttributes(): CustomAttributeSet | undefined { return this._customAttributes; }\n\n /** @internal */\n constructor(schema: Schema, name: string, modifier?: ECClassModifier) {\n super(schema, name);\n\n if (modifier)\n this._modifier = modifier;\n else\n this._modifier = ECClassModifier.None;\n }\n\n /**\n * Gets the base class if it exists, otherwise returns undefined.\n */\n public get baseClass(): LazyLoadedECClass | undefined {\n return this._baseClass;\n }\n\n public getBaseClassSync(): ECClass | undefined {\n if (!this.baseClass) {\n return undefined;\n }\n\n return this.schema.lookupItemSync(this.baseClass, ECClass);\n }\n\n /**\n * Sets the base class of the ECClass. Pass undefined to 'remove' the base class.\n *\n * @internal\n */\n protected async setBaseClass(baseClass: LazyLoadedECClass | undefined) {\n const oldBaseClass = this._baseClass;\n this._baseClass = baseClass;\n\n if (baseClass)\n this.addDerivedClass(await baseClass, this);\n else if (oldBaseClass)\n this.removeDerivedClass(await oldBaseClass, this);\n }\n\n /**\n * Gets the derived classes belonging to this class.\n * @returns An array of ECClasses or undefined if no derived classes exist.\n */\n public async getDerivedClasses(): Promise<ECClass[] | undefined> {\n if (!this._derivedClasses || this._derivedClasses.size === 0)\n return undefined;\n\n return Array.from(await Promise.all(this._derivedClasses.values()));\n }\n\n /**\n * Convenience method for adding an already loaded ECProperty used by create*Property methods.\n * @param prop The property to add.\n * @return The property that was added.\n *\n * @internal\n */\n protected addProperty<T extends Property>(prop: T): T {\n if (!this._properties)\n this._properties = new Map<string, Property>();\n\n this._properties.set(prop.name.toUpperCase(), prop);\n this.cleanCache();\n return prop;\n }\n\n /**\n * Deletes a property from within this class.\n * @param name The property name to delete, lookup is case-insensitive\n * @internal\n */\n protected async deleteProperty(name: string): Promise<void> {\n if (this._properties) {\n const property = await this.getProperty(name);\n if (property) {\n this._properties.delete(name.toUpperCase());\n this.cleanCache();\n }\n }\n }\n\n /**\n * Deletes a property from within this class.\n * @param name The property name to delete, lookup is case-insensitive\n * @internal\n */\n protected deletePropertySync(name: string): void {\n if (this._properties) {\n const property = this.getPropertySync(name);\n if (property) {\n this._properties.delete(name.toUpperCase());\n this.cleanCache();\n }\n }\n }\n\n\n /**\n * Searches, case-insensitive, for an ECProperty with given the name on this class and, by default, on\n * all base classes. Set excludeInherited to 'true' to only search the local class.\n * @param name The name of the property to retrieve.\n * @param excludeInherited If true, excludes inherited properties from the results. Defaults to false.\n */\n public async getProperty(name: string, excludeInherited?: boolean): Promise<Property | undefined> {\n const upperKey = name.toUpperCase();\n let property: Property | undefined;\n\n if (this._properties) {\n property = this._properties.get(upperKey);\n if (property) {\n return property;\n }\n }\n\n if (excludeInherited) {\n return undefined;\n }\n\n if (!this._mergedPropertyCache) {\n this._mergedPropertyCache = await this.buildPropertyCache();\n }\n\n return this._mergedPropertyCache.get(upperKey);\n }\n\n /**\n * Searches, case-insensitive, for a local ECProperty with the name provided.\n * @param name The name of the property to retrieve.\n * @param excludeInherited If true, excludes inherited properties from the results. Defaults to false.\n */\n public getPropertySync(name: string, excludeInherited?: boolean): Property | undefined {\n const upperKey = name.toUpperCase();\n let property: Property | undefined;\n\n if (this._properties) {\n property = this._properties.get(upperKey);\n if (property) {\n return property;\n }\n }\n\n if (excludeInherited) {\n return undefined;\n }\n\n if (!this._mergedPropertyCache) {\n this._mergedPropertyCache = this.buildPropertyCacheSync();\n }\n\n return this._mergedPropertyCache.get(upperKey);\n }\n\n /**\n * Searches the base class, if one exists, for the property with the name provided.\n * @param name The name of the inherited property to find.\n */\n public async getInheritedProperty(name: string): Promise<Property | undefined> {\n if (this.baseClass) {\n const baseClassObj = await this.baseClass;\n return baseClassObj.getProperty(name);\n }\n\n return undefined;\n }\n\n /**\n * Searches the base class, if one exists, for the property with the name provided.\n * @param name The name of the inherited property to find.\n */\n public getInheritedPropertySync(name: string): Property | undefined {\n const baseClassObj = this.getBaseClassSync();\n if (baseClassObj)\n return baseClassObj.getPropertySync(name);\n\n return undefined;\n }\n\n /**\n * Creates a PrimitiveECProperty.\n * @param name The name of property to create.\n * @param primitiveType The primitive type of property to create. If not provided the default is PrimitiveType.Integer\n * @throws ECSchemaStatus DuplicateProperty: thrown if a property with the same name already exists in the class.\n *\n * @internal\n */\n protected async createPrimitiveProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveProperty>;\n protected async createPrimitiveProperty(name: string, primitiveType: Enumeration): Promise<EnumerationProperty>;\n protected async createPrimitiveProperty(name: string, primitiveType?: string | PrimitiveType | Enumeration): Promise<Property> {\n if (await this.getProperty(name, true))\n throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);\n\n const propType = await this.loadPrimitiveType(primitiveType, this.schema);\n if (typeof (propType) === \"number\")\n return this.addProperty(new PrimitiveProperty(this, name, propType));\n\n return this.addProperty(new EnumerationProperty(this, name, new DelayedPromiseWithProps(propType.key, async () => propType)));\n }\n\n /**\n * Creates a PrimitiveECProperty.\n * @param name The name of property to create.\n * @param primitiveType The primitive type of property to create. If not provided the default is PrimitiveType.Integer\n * @throws ECSchemaStatus DuplicateProperty: thrown if a property with the same name already exists in the class.\n *\n * @internal\n */\n protected createPrimitivePropertySync(name: string, primitiveType: PrimitiveType): PrimitiveProperty;\n protected createPrimitivePropertySync(name: string, primitiveType: Enumeration): EnumerationProperty;\n protected createPrimitivePropertySync(name: string, primitiveType?: string | PrimitiveType | Enumeration): Property {\n if (this.getPropertySync(name, true))\n throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);\n\n const propType = this.loadPrimitiveTypeSync(primitiveType, this.schema);\n if (typeof (propType) === \"number\")\n return this.addProperty(new PrimitiveProperty(this, name, propType));\n\n return this.addProperty(new EnumerationProperty(this, name, new DelayedPromiseWithProps(propType.key, async () => propType)));\n }\n\n /**\n * Creates a PrimitiveArrayECProperty.\n * @param name The name of property to create.\n * @param primitiveType The primitive type of property to create. If not provided the default is PrimitiveType.Integer\n *\n * @internal\n */\n protected async createPrimitiveArrayProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveArrayProperty>;\n protected async createPrimitiveArrayProperty(name: string, primitiveType: Enumeration): Promise<EnumerationArrayProperty>;\n protected async createPrimitiveArrayProperty(name: string, primitiveType?: string | PrimitiveType | Enumeration): Promise<Property> {\n if (await this.getProperty(name, true))\n throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);\n\n const propType = await this.loadPrimitiveType(primitiveType, this.schema);\n if (typeof (propType) === \"number\")\n return this.addProperty(new PrimitiveArrayProperty(this, name, propType));\n\n return this.addProperty(new EnumerationArrayProperty(this, name, new DelayedPromiseWithProps(propType.key, async () => propType)));\n }\n\n /**\n * Creates a PrimitiveArrayECProperty.\n * @param name The name of property to create.\n * @param primitiveType The primitive type of property to create. If not provided the default is PrimitiveType.Integer\n *\n * @internal\n */\n protected createPrimitiveArrayPropertySync(name: string, primitiveType: PrimitiveType): PrimitiveArrayProperty;\n protected createPrimitiveArrayPropertySync(name: string, primitiveType: Enumeration): EnumerationArrayProperty;\n protected createPrimitiveArrayPropertySync(name: string, primitiveType?: string | PrimitiveType | Enumeration): Property {\n if (this.getPropertySync(name, true))\n throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);\n\n const propType = this.loadPrimitiveTypeSync(primitiveType, this.schema);\n if (typeof (propType) === \"number\")\n return this.addProperty(new PrimitiveArrayProperty(this, name, propType));\n\n return this.addProperty(new EnumerationArrayProperty(this, name, new DelayedPromiseWithProps(propType.key, async () => propType)));\n }\n\n /**\n *\n * @param name The name of property to create.\n * @param structType The struct type of property to create.\n *\n * @internal\n */\n protected async createStructProperty(name: string, structType: string | StructClass): Promise<StructProperty> {\n if (await this.getProperty(name, true))\n throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);\n\n return this.addProperty(new StructProperty(this, name, await this.loadStructType(structType, this.schema)));\n }\n\n /**\n *\n * @param name The name of property to create.\n * @param structType The struct type of property to create.\n *\n * @internal\n */\n protected createStructPropertySync(name: string, structType: string | StructClass): StructProperty {\n if (this.getPropertySync(name, true))\n throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);\n\n return this.addProperty(new StructProperty(this, name, this.loadStructTypeSync(structType, this.schema)));\n }\n\n /**\n *\n * @param name\n * @param type\n *\n * @internal\n */\n protected async createStructArrayProperty(name: string, structType: string | StructClass): Promise<StructArrayProperty> {\n if (await this.getProperty(name, true))\n throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);\n\n return this.addProperty(new StructArrayProperty(this, name, await this.loadStructType(structType, this.schema)));\n }\n\n /**\n *\n * @param name\n * @param type\n *\n * @internal\n */\n protected createStructArrayPropertySync(name: string, structType: string | StructClass): StructArrayProperty {\n if (this.getPropertySync(name, true))\n throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);\n\n return this.addProperty(new StructArrayProperty(this, name, this.loadStructTypeSync(structType, this.schema)));\n }\n\n /**\n *\n * @param structType\n * @param schema\n * @returns\n *\n * @internal\n */\n protected async loadStructType(structType: string | StructClass | undefined, schema: Schema): Promise<StructClass> {\n let correctType: StructClass | undefined;\n if (typeof (structType) === \"string\") {\n correctType = await schema.lookupItem(structType, StructClass);\n } else\n correctType = structType;\n\n if (!correctType)\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n throw new ECSchemaError(ECSchemaStatus.InvalidType, `The provided Struct type, ${structType}, is not a valid StructClass.`);\n\n return correctType;\n }\n\n /**\n *\n * @param structType\n * @param schema\n * @returns\n *\n * @internal\n */\n protected loadStructTypeSync(structType: string | StructClass | undefined, schema: Schema): StructClass {\n let correctType: StructClass | undefined;\n if (typeof (structType) === \"string\") {\n correctType = schema.lookupItemSync(structType, StructClass);\n } else\n correctType = structType;\n\n if (!correctType)\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n throw new ECSchemaError(ECSchemaStatus.InvalidType, `The provided Struct type, ${structType}, is not a valid StructClass.`);\n\n return correctType;\n }\n\n /**\n *\n * @param primitiveType\n * @param schema\n * @returns\n *\n * @internal\n */\n protected async loadPrimitiveType(primitiveType: string | PrimitiveType | Enumeration | undefined, schema: Schema): Promise<PrimitiveType | Enumeration> {\n if (primitiveType === undefined)\n return PrimitiveType.Integer;\n\n if (typeof (primitiveType) === \"string\") {\n let resolvedType: (PrimitiveType | Enumeration | undefined) = parsePrimitiveType(primitiveType);\n if (!resolvedType) {\n resolvedType = await schema.lookupItem(primitiveType, Enumeration);\n }\n\n if (resolvedType === undefined)\n throw new ECSchemaError(ECSchemaStatus.InvalidType, `The provided primitive type, ${primitiveType}, is not a valid PrimitiveType or Enumeration.`);\n\n // If resolvedType is a SchemaItem, make sure it is an Enumeration- if not, throw an error\n if (typeof (resolvedType) !== \"number\" && resolvedType.schemaItemType !== SchemaItemType.Enumeration)\n throw new ECSchemaError(ECSchemaStatus.InvalidType, `The provided primitive type, ${primitiveType}, is not a valid PrimitiveType or Enumeration.`);\n\n return resolvedType;\n }\n\n return primitiveType;\n }\n\n /**\n *\n * @param primitiveType\n * @param schema\n * @returns\n *\n * @internal\n */\n protected loadPrimitiveTypeSync(primitiveType: string | PrimitiveType | Enumeration | undefined, schema: Schema): PrimitiveType | Enumeration {\n if (primitiveType === undefined)\n return PrimitiveType.Integer;\n\n if (typeof (primitiveType) === \"string\") {\n let resolvedType: (PrimitiveType | Enumeration | undefined) = parsePrimitiveType(primitiveType);\n if (!resolvedType) {\n resolvedType = schema.lookupItemSync(primitiveType, Enumeration);\n }\n\n if (resolvedType === undefined)\n throw new ECSchemaError(ECSchemaStatus.InvalidType, `The provided primitive type, ${primitiveType}, is not a valid PrimitiveType or Enumeration.`);\n\n return resolvedType;\n }\n\n return primitiveType;\n }\n\n /**\n * Save this Classes properties to an object for serializing to JSON.\n * @param standalone Serialization includes only this object (as opposed to the full schema).\n * @param includeSchemaVersion Include the Schema's version information in the serialized object.\n */\n public override toJSON(standalone: boolean = false, includeSchemaVersion: boolean = false): ClassProps {\n const schemaJson = super.toJSON(standalone, includeSchemaVersion) as any;\n const isMixin = SchemaItemType.Mixin === this.schemaItemType;\n const isRelationship = SchemaItemType.RelationshipClass === this.schemaItemType;\n if (!isMixin && (ECClassModifier.None !== this.modifier || isRelationship))\n schemaJson.modifier = classModifierToString(this.modifier);\n if (this.baseClass !== undefined)\n schemaJson.baseClass = this.baseClass.fullName;\n if (this._properties !== undefined && this._properties.size > 0)\n schemaJson.properties = [...this._properties.values()].map((prop) => prop.toJSON());\n\n const customAttributes = serializeCustomAttributes(this.customAttributes);\n if (customAttributes !== undefined)\n schemaJson.customAttributes = customAttributes;\n return schemaJson as ClassProps;\n }\n\n /** @internal */\n public override async toXml(schemaXml: Document): Promise<Element> {\n const itemElement = await super.toXml(schemaXml);\n\n if (undefined !== this.modifier)\n itemElement.setAttribute(\"modifier\", classModifierToString(this.modifier));\n\n if (undefined !== this.baseClass) {\n const baseClass = await this.baseClass;\n const baseClassElement = schemaXml.createElement(\"BaseClass\");\n const baseClassName = XmlSerializationUtils.createXmlTypedName(this.schema, baseClass.schema, baseClass.name);\n baseClassElement.textContent = baseClassName;\n itemElement.appendChild(baseClassElement);\n }\n\n if (this._properties) {\n for (const prop of this._properties.values()) {\n const propXml = await prop.toXml(schemaXml);\n itemElement.appendChild(propXml);\n }\n }\n\n if (this._customAttributes) {\n const caContainerElement = schemaXml.createElement(\"ECCustomAttributes\");\n for (const [name, attribute] of this._customAttributes) {\n const caElement = await XmlSerializationUtils.writeCustomAttribute(name, attribute, schemaXml, this.schema);\n caContainerElement.appendChild(caElement);\n }\n itemElement.appendChild(caContainerElement);\n }\n\n return itemElement;\n }\n\n public override fromJSONSync(classProps: ClassProps) {\n super.fromJSONSync(classProps);\n\n if (undefined !== classProps.modifier) {\n const modifier = parseClassModifier(classProps.modifier);\n if (undefined === modifier) {\n if (SchemaReadHelper.isECSpecVersionNewer({ readVersion: classProps.originalECSpecMajorVersion, writeVersion: classProps.originalECSpecMinorVersion } as ECSpecVersion))\n this._modifier = ECClassModifier.None;\n else\n throw new ECSchemaError(ECSchemaStatus.InvalidModifier, `The string '${classProps.modifier}' is not a valid ECClassModifier.`);\n } else {\n this._modifier = modifier;\n }\n }\n\n if (undefined !== classProps.baseClass) {\n const ecClassSchemaItemKey = this.schema.getSchemaItemKey(classProps.baseClass);\n if (!ecClassSchemaItemKey)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `Unable to locate the baseClass ${classProps.baseClass}.`);\n\n const baseClass = this.schema.lookupItemSync(ecClassSchemaItemKey);\n\n let lazyBase: LazyLoadedECClass;\n if (!baseClass) {\n lazyBase = new DelayedPromiseWithProps<SchemaItemKey, ECClass>(ecClassSchemaItemKey,\n async () => {\n const baseItem = await this.schema.lookupItem(ecClassSchemaItemKey);\n if (undefined === baseItem || !ECClass.isECClass(baseItem))\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `Unable to locate the baseClass ${classProps.baseClass}.`);\n return baseItem;\n });\n } else {\n lazyBase = new DelayedPromiseWithProps<SchemaItemKey, ECClass>(ecClassSchemaItemKey,\n async () => {\n return baseClass as ECClass;\n });\n }\n\n this._baseClass = lazyBase;\n\n if (!baseClass)\n return;\n\n this.addDerivedClass(baseClass as ECClass, this);\n }\n }\n\n public override async fromJSON(classProps: ClassProps): Promise<void> {\n this.fromJSONSync(classProps);\n }\n\n /**\n *\n * @param customAttribute\n *\n * @internal\n */\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 * Iterates (recursively) over all base classes and mixins, in \"property override\" order.\n * This is essentially a depth-first traversal through the inheritance tree.\n */\n public async *getAllBaseClasses(): AsyncIterable<ECClass> {\n const baseClasses: ECClass[] = [this];\n const addBaseClasses = async (ecClass: AnyClass) => {\n if (SchemaItemType.EntityClass === ecClass.schemaItemType) {\n for (let i = (ecClass as HasMixins).mixins.length - 1; i >= 0; i--) {\n baseClasses.push(await (ecClass as HasMixins).mixins[i]);\n }\n }\n\n if (ecClass.baseClass)\n baseClasses.push(await ecClass.baseClass);\n };\n\n while (baseClasses.length > 0) {\n const baseClass = baseClasses.pop() as AnyClass;\n await addBaseClasses(baseClass);\n if (baseClass !== this)\n yield baseClass as ECClass;\n }\n }\n\n public *getAllBaseClassesSync(): Iterable<AnyClass> {\n const baseClasses: ECClass[] = [this];\n const addBaseClasses = (ecClass: AnyClass) => {\n if (ecClass.schemaItemType === SchemaItemType.EntityClass) { // cannot use EntityClass typeguard because of circular reference\n for (const m of Array.from((ecClass as HasMixins).getMixinsSync()).reverse()) {\n baseClasses.push(m);\n }\n }\n\n const baseClass = ecClass.getBaseClassSync();\n if (baseClass)\n baseClasses.push(baseClass);\n };\n\n while (baseClasses.length > 0) {\n const baseClass = baseClasses.pop() as AnyClass;\n addBaseClasses(baseClass);\n if (baseClass !== this)\n yield baseClass;\n }\n }\n\n /**\n *\n * @param cache\n * @returns\n *\n * @internal\n */\nprotected async buildPropertyCache(): Promise<Map<string, Property>> {\n const cache = new Map<string, Property>();\n const baseClass = await this.baseClass;\n if (baseClass) {\n for (const property of await baseClass.getProperties()) {\n if (!cache.has(property.name.toUpperCase())) {\n cache.set(property.name.toUpperCase(), property);\n }\n }\n }\n\n if (this._properties) {\n this._properties.forEach(property => {\n cache.set(property.name.toUpperCase(), property);\n });\n }\n return cache;\n}\n\n /**\n *\n * @param cache\n * @returns\n *\n * @internal\n */\n protected buildPropertyCacheSync(): Map<string, Property> {\n const cache = new Map<string, Property>();\n const baseClass = this.getBaseClassSync();\n if (baseClass) {\n for (const property of baseClass.getPropertiesSync()) {\n if (!cache.has(property.name.toUpperCase())) {\n cache.set(property.name.toUpperCase(), property);\n }\n }\n }\n\n if (this._properties) {\n this._properties.forEach(property => {\n cache.set(property.name.toUpperCase(), property);\n });\n }\n return cache;\n }\n\n /**\n * Clears all caches on this object. This is called implicitly for this class,\n * but needs to be called if derived classes have changed.\n * @internal\n */\n public cleanCache() {\n this._mergedPropertyCache = undefined;\n }\n\n /**\n * Returns the properties on this class and its base classes.\n * Since this is an expensive operation, results will be cached after first call.\n * @param excludeInherited If true, only properties defined directly on this class will be returned. Defaults to false.\n * @returns An array of properties, empty array if none exist.\n */\n public getPropertiesSync(excludeInherited?: boolean): Iterable<Property> {\n if (excludeInherited) {\n return this._properties && this._properties.size > 0 ? this._properties.values() : [];\n }\n\n if (!this._mergedPropertyCache) {\n this._mergedPropertyCache = this.buildPropertyCacheSync();\n }\n\n return this._mergedPropertyCache.values();\n }\n\n /**\n * Quick way to check whether this class has any local properties without having to use the iterable\n */\n public get hasLocalProperties(): boolean {\n return this._properties !== undefined && this._properties.size > 0;\n }\n\n /**\n * Returns the properties on this class and its base classes.\n * Since this is an expensive operation, results will be cached after first call.\n * @param excludeInherited If true, only properties defined directly on this class will be returned.\n * @returns An array of properties, empty array if none exist.\n */\n public async getProperties(excludeInherited?: boolean): Promise<Iterable<Property>> {\n // At the moment we do not lazy load properties, so this is the same as getPropertiesSync\n return this.getPropertiesSync(excludeInherited);\n }\n\n /**\n * Retrieve all custom attributes in the current class and its bases\n * This is the async version of getCustomAttributesSync()\n */\n public async getCustomAttributes(): Promise<CustomAttributeSet> {\n return this.getCustomAttributesSync();\n }\n\n /**\n * Retrieve all custom attributes in the current class and its bases.\n */\n public getCustomAttributesSync(): CustomAttributeSet {\n let customAttributes: Map<string, CustomAttribute> | undefined = this._customAttributes;\n if (undefined === customAttributes) {\n customAttributes = new Map<string, CustomAttribute>();\n }\n\n this.traverseBaseClassesSync((ecClass: ECClass) => {\n if (undefined === ecClass.customAttributes)\n return false;\n\n for (const [className, customAttribute] of ecClass.customAttributes) {\n if (customAttributes.has(className))\n continue;\n customAttributes.set(className, customAttribute);\n }\n\n return false;\n });\n\n return customAttributes;\n }\n\n /**\n * Asynchronously traverses through the inheritance tree, using depth-first traversal, calling the given callback\n * function for each base class encountered.\n * @param callback The function to call for each base class in the hierarchy.\n * @param arg An argument that will be passed as the second parameter to the callback function.\n */\n public async traverseBaseClasses(callback: (ecClass: ECClass, arg?: any) => boolean, arg?: any): Promise<boolean> {\n for await (const baseClass of this.getAllBaseClasses()) {\n if (callback(baseClass, arg))\n return true;\n }\n\n return false;\n }\n\n /**\n * Synchronously traverses through the inheritance tree, using depth-first traversal, calling the given callback\n * function for each base class encountered.\n * @param callback The function to call for each base class in the hierarchy.\n * @param arg An argument that will be passed as the second parameter to the callback function.\n */\n public traverseBaseClassesSync(callback: (ecClass: ECClass, arg?: any) => boolean, arg?: any): boolean {\n const baseClasses = this.getAllBaseClassesSync();\n if (!baseClasses)\n return false;\n\n for (const baseClass of baseClasses) {\n if (callback(baseClass, arg))\n return true;\n }\n\n return false;\n }\n\n /**\n * Indicates if the targetClass is of this type.\n * @param targetClass The ECClass or ECClass name to check.\n * @param schemaName The schema name. Required if targetClass is the ECClass name.\n */\n public async is(targetClass: string, schemaName: string): Promise<boolean>;\n public async is(targetClass: ECClass): Promise<boolean>;\n public async is(targetClass: ECClass | string, schemaName?: string): Promise<boolean> {\n if (schemaName !== undefined) {\n assert(typeof (targetClass) === \"string\", \"Expected targetClass of type string because schemaName was specified\");\n\n const key = new SchemaItemKey(targetClass, new SchemaKey(schemaName));\n if (SchemaItem.equalByKey(this, key))\n return true;\n\n return this.traverseBaseClasses((thisSchemaItem, thatSchemaItemOrKey) => SchemaItem.equalByKey(thisSchemaItem, thatSchemaItemOrKey), key);\n } else {\n assert(ECClass.isECClass(targetClass), \"Expected targetClass to be of type ECClass\");\n\n if (SchemaItem.equalByKey(this, targetClass))\n return true;\n\n return this.traverseBaseClasses((thisSchemaItem, thatSchemaItemOrKey) => SchemaItem.equalByKey(thisSchemaItem, thatSchemaItemOrKey), targetClass);\n }\n }\n\n /**\n * A synchronous version of the [[ECClass.is]], indicating if the targetClass is of this type.\n * @param targetClass The class to check.\n */\n public isSync(targetClass: ECClass): boolean;\n public isSync(targetClass: string, schemaName: string): boolean;\n\n /** @internal */\n public isSync(targetClass: ECClass | string, schemaName?: string): boolean {\n if (schemaName !== undefined) {\n assert(typeof (targetClass) === \"string\", \"Expected targetClass of type string because schemaName was specified\");\n\n const key = new SchemaItemKey(targetClass, new SchemaKey(schemaName));\n if (SchemaItem.equalByKey(this, key))\n return true;\n\n return this.traverseBaseClassesSync((thisSchemaItem, thatSchemaItemOrKey) => SchemaItem.equalByKey(thisSchemaItem, thatSchemaItemOrKey), key);\n } else {\n assert(ECClass.isECClass(targetClass), \"Expected targetClass to be of type ECClass\");\n\n if (SchemaItem.equalByKey(this, targetClass))\n return true;\n\n return this.traverseBaseClassesSync((thisSchemaItem, thatSchemaItemOrKey) => SchemaItem.equalByKey(thisSchemaItem, thatSchemaItemOrKey), targetClass);\n }\n }\n\n /**\n * @internal\n */\n public static isECClass(object: any): object is ECClass {\n if (!SchemaItem.isSchemaItem(object))\n return false;\n\n return object.schemaItemType === SchemaItemType.EntityClass || object.schemaItemType === SchemaItemType.Mixin || object.schemaItemType === SchemaItemType.RelationshipClass ||\n object.schemaItemType === SchemaItemType.StructClass || object.schemaItemType === SchemaItemType.CustomAttributeClass;\n }\n\n /**\n * A setter method for the ECClass modifier, used specifically for schema editing.\n * @param modifier\n * @internal\n */\n protected setModifier(modifier: ECClassModifier) {\n this._modifier = modifier;\n }\n\n /**\n * Adds an ECClass to the derived class collection. This method is only intended to update the local\n * cache of derived classes. For adding a class to the hierarchy, use the baseClass setter method.\n * @param prop The property to add.\n * @return The property that was added.\n */\n private addDerivedClass(baseClass: ECClass, derivedClass: ECClass) {\n if (!baseClass._derivedClasses)\n baseClass._derivedClasses = new Map<string, LazyLoadedECClass>();\n\n if (baseClass._derivedClasses.has(derivedClass.fullName))\n return;\n\n if (derivedClass.isSync(baseClass)) {\n const promise = new DelayedPromiseWithProps<SchemaItemKey, ECClass>(derivedClass.key, async () => derivedClass);\n baseClass._derivedClasses.set(derivedClass.fullName, promise);\n }\n }\n\n /**\n * Removes an ECClass from the derived class collection. This method is only intended to update the local\n * cache of derived classes. For updating the class hierarchy, use the baseClass setter method.\n * @param prop The property to add.\n * @return The property that was added.\n */\n private removeDerivedClass(baseClass: ECClass, derivedClass: ECClass) {\n if (!baseClass._derivedClasses)\n return;\n\n if (!baseClass._derivedClasses.has(derivedClass.fullName))\n return;\n\n baseClass._derivedClasses.delete(derivedClass.fullName);\n }\n}\n\n/**\n * A Typescript class representation of an ECStructClass.\n * @public @preview\n */\nexport class StructClass extends ECClass {\n /**\n * Get the type of item represented by this instance\n */\n public override readonly schemaItemType = StructClass.schemaItemType;\n\n /**\n * Get the type of item represented by this class\n * @internal\n */\n public static override get schemaItemType() { return SchemaItemType.StructClass; }\n /**\n * Type guard to check if the SchemaItem is of type StructClass.\n * @param item The SchemaItem to check.\n * @returns True if the item is a StructClass, false otherwise.\n */\n public static isStructClass(item?: SchemaItem): item is StructClass {\n if (item && item.schemaItemType === SchemaItemType.StructClass)\n return true;\n\n return false;\n }\n\n /**\n * Type assertion to check if the SchemaItem is of type StructClass.\n * @param item The SchemaItem to check.\n * @returns The item cast to StructClass if it is a StructClass, undefined otherwise.\n * @internal\n */\n public static assertIsStructClass(item?: SchemaItem): asserts item is StructClass {\n if (!this.isStructClass(item))\n throw new ECSchemaError(ECSchemaStatus.InvalidSchemaItemType, `Expected '${SchemaItemType.StructClass}' (StructClass)`);\n }\n}\n\n/**\n * @internal\n * An abstract class used for schema editing.\n */\nexport abstract class MutableStructClass extends StructClass {\n public abstract override setDisplayLabel(displayLabel: string): void;\n}\n\n/**\n * Hackish approach that works like a \"friend class\" so we can access protected members without making them public.\n * @internal\n */\nexport abstract class MutableClass extends ECClass {\n public abstract override setBaseClass(baseClass: LazyLoadedECClass | undefined): Promise<void>;\n public abstract override addCustomAttribute(customAttribute: CustomAttribute): void;\n public abstract override setModifier(modifier: ECClassModifier): void;\n public abstract override setName(name: string): void;\n public abstract override createPrimitiveProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveProperty>;\n public abstract override createPrimitiveProperty(name: string, primitiveType: Enumeration): Promise<EnumerationProperty>;\n public abstract override createPrimitiveProperty(name: string, primitiveType?: string | PrimitiveType | Enumeration): Promise<Property>;\n\n public abstract override createPrimitivePropertySync(name: string, primitiveType: PrimitiveType): PrimitiveProperty;\n public abstract override createPrimitivePropertySync(name: string, primitiveType: Enumeration): EnumerationProperty;\n public abstract override createPrimitivePropertySync(name: string, primitiveType?: string | PrimitiveType | Enumeration): Property;\n\n public abstract override createPrimitiveArrayProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveArrayProperty>;\n public abstract override createPrimitiveArrayProperty(name: string, primitiveType: Enumeration): Promise<EnumerationArrayProperty>;\n public abstract override createPrimitiveArrayProperty(name: string, primitiveType?: string | PrimitiveType | Enumeration): Promise<Property>;\n\n public abstract override createPrimitiveArrayPropertySync(name: string, primitiveType: PrimitiveType): PrimitiveArrayProperty;\n public abstract override createPrimitiveArrayPropertySync(name: string, primitiveType: Enumeration): EnumerationArrayProperty;\n public abstract override createPrimitiveArrayPropertySync(name: string, primitiveType?: string | PrimitiveType | Enumeration): Property;\n\n public abstract override createStructProperty(name: string, structType: string | StructClass): Promise<StructProperty>;\n public abstract override createStructPropertySync(name: string, structType: string | StructClass): StructProperty;\n\n public abstract override createStructArrayProperty(name: string, structType: string | StructClass): Promise<StructArrayProperty>;\n public abstract override createStructArrayPropertySync(name: string, structType: string | StructClass): StructArrayProperty;\n\n public abstract override deleteProperty(name: string): Promise<void>;\n public abstract override deletePropertySync(name: string): void;\n}\n"]}
|
|
@@ -7,7 +7,13 @@ export interface CustomAttribute {
|
|
|
7
7
|
className: string;
|
|
8
8
|
[propName: string]: any;
|
|
9
9
|
}
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* A collection of custom attributes, accessed by full class names in the format `SchemaName.ClassName`.
|
|
12
|
+
* Iterates over, checks, and retrieves attributes. Class names are case-insensitive, separated by a dot (`.`).
|
|
13
|
+
* @param className - The full class name.
|
|
14
|
+
* @returns Iterator, boolean, or custom attribute.
|
|
15
|
+
* @public @preview
|
|
16
|
+
*/
|
|
11
17
|
export interface CustomAttributeSet {
|
|
12
18
|
[Symbol.iterator]: () => IterableIterator<[string, CustomAttribute]>;
|
|
13
19
|
has(className: string): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomAttribute.d.ts","sourceRoot":"","sources":["../../../src/Metadata/CustomAttribute.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,uBAAuB;AACvB,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG,CAAC;CACzB;AAED
|
|
1
|
+
{"version":3,"file":"CustomAttribute.d.ts","sourceRoot":"","sources":["../../../src/Metadata/CustomAttribute.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,uBAAuB;AACvB,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG,CAAC;CACzB;AAED;;;;;;EAME;AACF,MAAM,WAAW,kBAAkB;IACjC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,MAAM,gBAAgB,CAAC,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC;IACrE,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAAC;CACrD;AAED,uBAAuB;AACvB,MAAM,WAAW,6BAA6B;IAC5C,gBAAgB,CAAC,EAAE,kBAAkB,CAAC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,gBAAgB;AAChB,wBAAgB,yBAAyB,CAAC,gBAAgB,EAAE,kBAAkB,GAAG,SAAS,GAAG,GAAG,EAAE,GAAG,SAAS,CAc7G"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomAttribute.js","sourceRoot":"","sources":["../../../src/Metadata/CustomAttribute.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;
|
|
1
|
+
{"version":3,"file":"CustomAttribute.js","sourceRoot":"","sources":["../../../src/Metadata/CustomAttribute.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AA+BH,8DAcC;AAfD,gBAAgB;AAChB,SAAgB,yBAAyB,CAAC,gBAAgD;IACxF,IAAI,SAAS,KAAK,gBAAgB,EAAE,CAAC,CAAC,gCAAgC;QACpE,MAAM,UAAU,GAAU,EAAE,CAAC;QAC7B,KAAK,MAAM,CAAC,EAAE,eAAe,CAAC,IAAI,gBAAgB,EAAE,CAAC;YACnD,MAAM,SAAS,GAA6B,EAAE,CAAC;YAC/C,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,CAAC,QAAa,EAAE,EAAE;gBACjD,MAAM,YAAY,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAC;gBACzC,SAAS,CAAC,YAAY,CAAC,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;YACtD,CAAC,CAAC,CAAC;YACH,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC7B,CAAC;QACD,OAAO,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC;IAC1D,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Metadata\n */\n\nimport { Schema } from \"./Schema\";\n\n/** @public @preview */\nexport interface CustomAttribute {\n className: string;\n [propName: string]: any;\n}\n\n/**\n* A collection of custom attributes, accessed by full class names in the format `SchemaName.ClassName`.\n* Iterates over, checks, and retrieves attributes. Class names are case-insensitive, separated by a dot (`.`).\n* @param className - The full class name.\n* @returns Iterator, boolean, or custom attribute.\n* @public @preview\n*/\nexport interface CustomAttributeSet {\n [Symbol.iterator]: () => IterableIterator<[string, CustomAttribute]>;\n has(className: string): boolean;\n get(className: string): CustomAttribute | undefined;\n}\n\n/** @public @preview */\nexport interface CustomAttributeContainerProps {\n customAttributes?: CustomAttributeSet;\n fullName: string;\n schema: Schema;\n}\n\n/** @internal */\nexport function serializeCustomAttributes(customAttributes: CustomAttributeSet | undefined): any[] | undefined {\n if (undefined !== customAttributes) { // custom attributes is optional\n const attributes: any[] = [];\n for (const [, customAttribute] of customAttributes) {\n const attribute: { [value: string]: any } = {};\n Object.keys(customAttribute).map((property: any) => {\n const propertyName = property.toString();\n attribute[propertyName] = customAttribute[property];\n });\n attributes.push(attribute);\n }\n return (attributes.length > 0) ? attributes : undefined;\n }\n return undefined;\n}\n"]}
|
|
@@ -15,7 +15,7 @@ export declare class CustomAttributeClass extends ECClass {
|
|
|
15
15
|
static get schemaItemType(): SchemaItemType;
|
|
16
16
|
private _appliesTo?;
|
|
17
17
|
/**
|
|
18
|
-
* @deprecated in 4.8
|
|
18
|
+
* @deprecated in 4.8 - will not be removed until after 2026-06-13. Use [[appliesTo]]
|
|
19
19
|
* */
|
|
20
20
|
get containerType(): CustomAttributeContainerType;
|
|
21
21
|
get appliesTo(): CustomAttributeContainerType;
|
|
@@ -21,7 +21,7 @@ class CustomAttributeClass extends Class_1.ECClass {
|
|
|
21
21
|
static get schemaItemType() { return ECObjects_1.SchemaItemType.CustomAttributeClass; }
|
|
22
22
|
_appliesTo;
|
|
23
23
|
/**
|
|
24
|
-
* @deprecated in 4.8
|
|
24
|
+
* @deprecated in 4.8 - will not be removed until after 2026-06-13. Use [[appliesTo]]
|
|
25
25
|
* */
|
|
26
26
|
get containerType() {
|
|
27
27
|
return this.appliesTo;
|