@itwin/ecschema-metadata 3.6.0-dev.35 → 3.6.0-dev.36

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.
Files changed (141) hide show
  1. package/LICENSE.md +1 -1
  2. package/lib/cjs/Constants.d.ts +23 -23
  3. package/lib/cjs/Constants.js +33 -33
  4. package/lib/cjs/Constants.js.map +1 -1
  5. package/lib/cjs/Context.d.ts +139 -139
  6. package/lib/cjs/Context.js +204 -204
  7. package/lib/cjs/DelayedPromise.d.ts +88 -88
  8. package/lib/cjs/DelayedPromise.js +91 -91
  9. package/lib/cjs/DelayedPromise.js.map +1 -1
  10. package/lib/cjs/Deserialization/AbstractParser.d.ts +45 -45
  11. package/lib/cjs/Deserialization/AbstractParser.js +11 -11
  12. package/lib/cjs/Deserialization/AbstractParser.js.map +1 -1
  13. package/lib/cjs/Deserialization/Helper.d.ts +251 -251
  14. package/lib/cjs/Deserialization/Helper.js +843 -843
  15. package/lib/cjs/Deserialization/Helper.js.map +1 -1
  16. package/lib/cjs/Deserialization/JsonParser.d.ts +165 -165
  17. package/lib/cjs/Deserialization/JsonParser.js +680 -680
  18. package/lib/cjs/Deserialization/JsonParser.js.map +1 -1
  19. package/lib/cjs/Deserialization/JsonProps.d.ts +282 -282
  20. package/lib/cjs/Deserialization/JsonProps.js +9 -9
  21. package/lib/cjs/Deserialization/JsonProps.js.map +1 -1
  22. package/lib/cjs/Deserialization/SchemaGraphUtil.d.ts +34 -34
  23. package/lib/cjs/Deserialization/SchemaGraphUtil.js +77 -77
  24. package/lib/cjs/Deserialization/SchemaGraphUtil.js.map +1 -1
  25. package/lib/cjs/Deserialization/XmlParser.d.ts +85 -85
  26. package/lib/cjs/Deserialization/XmlParser.js +973 -973
  27. package/lib/cjs/Deserialization/XmlParser.js.map +1 -1
  28. package/lib/cjs/Deserialization/XmlSerializationUtils.d.ts +54 -54
  29. package/lib/cjs/Deserialization/XmlSerializationUtils.js +174 -174
  30. package/lib/cjs/Deserialization/XmlSerializationUtils.js.map +1 -1
  31. package/lib/cjs/ECName.d.ts +30 -30
  32. package/lib/cjs/ECName.js +85 -85
  33. package/lib/cjs/ECName.js.map +1 -1
  34. package/lib/cjs/ECObjects.d.ts +162 -162
  35. package/lib/cjs/ECObjects.js +453 -453
  36. package/lib/cjs/ECObjects.js.map +1 -1
  37. package/lib/cjs/Exception.d.ts +43 -43
  38. package/lib/cjs/Exception.js +86 -86
  39. package/lib/cjs/Exception.js.map +1 -1
  40. package/lib/cjs/Interfaces.d.ts +66 -66
  41. package/lib/cjs/Interfaces.js +9 -9
  42. package/lib/cjs/Interfaces.js.map +1 -1
  43. package/lib/cjs/Metadata/Class.d.ts +243 -243
  44. package/lib/cjs/Metadata/Class.js +558 -558
  45. package/lib/cjs/Metadata/Class.js.map +1 -1
  46. package/lib/cjs/Metadata/Constant.d.ts +64 -64
  47. package/lib/cjs/Metadata/Constant.js +123 -123
  48. package/lib/cjs/Metadata/Constant.js.map +1 -1
  49. package/lib/cjs/Metadata/CustomAttribute.d.ts +23 -23
  50. package/lib/cjs/Metadata/CustomAttribute.js +27 -27
  51. package/lib/cjs/Metadata/CustomAttribute.js.map +1 -1
  52. package/lib/cjs/Metadata/CustomAttributeClass.d.ts +39 -39
  53. package/lib/cjs/Metadata/CustomAttributeClass.js +68 -68
  54. package/lib/cjs/Metadata/CustomAttributeClass.js.map +1 -1
  55. package/lib/cjs/Metadata/EntityClass.d.ts +77 -77
  56. package/lib/cjs/Metadata/EntityClass.js +230 -230
  57. package/lib/cjs/Metadata/EntityClass.js.map +1 -1
  58. package/lib/cjs/Metadata/Enumeration.d.ts +86 -86
  59. package/lib/cjs/Metadata/Enumeration.js +159 -159
  60. package/lib/cjs/Metadata/Enumeration.js.map +1 -1
  61. package/lib/cjs/Metadata/Format.d.ts +98 -98
  62. package/lib/cjs/Metadata/Format.js +242 -242
  63. package/lib/cjs/Metadata/Format.js.map +1 -1
  64. package/lib/cjs/Metadata/InvertedUnit.d.ts +49 -49
  65. package/lib/cjs/Metadata/InvertedUnit.js +97 -97
  66. package/lib/cjs/Metadata/InvertedUnit.js.map +1 -1
  67. package/lib/cjs/Metadata/KindOfQuantity.d.ts +65 -65
  68. package/lib/cjs/Metadata/KindOfQuantity.js +225 -225
  69. package/lib/cjs/Metadata/KindOfQuantity.js.map +1 -1
  70. package/lib/cjs/Metadata/Mixin.d.ts +54 -54
  71. package/lib/cjs/Metadata/Mixin.js +113 -113
  72. package/lib/cjs/Metadata/Mixin.js.map +1 -1
  73. package/lib/cjs/Metadata/OverrideFormat.d.ts +55 -55
  74. package/lib/cjs/Metadata/OverrideFormat.js +88 -88
  75. package/lib/cjs/Metadata/OverrideFormat.js.map +1 -1
  76. package/lib/cjs/Metadata/Phenomenon.d.ts +33 -33
  77. package/lib/cjs/Metadata/Phenomenon.js +59 -59
  78. package/lib/cjs/Metadata/Phenomenon.js.map +1 -1
  79. package/lib/cjs/Metadata/Property.d.ts +197 -197
  80. package/lib/cjs/Metadata/Property.js +491 -491
  81. package/lib/cjs/Metadata/Property.js.map +1 -1
  82. package/lib/cjs/Metadata/PropertyCategory.d.ts +39 -39
  83. package/lib/cjs/Metadata/PropertyCategory.js +61 -61
  84. package/lib/cjs/Metadata/PropertyCategory.js.map +1 -1
  85. package/lib/cjs/Metadata/RelationshipClass.d.ts +152 -152
  86. package/lib/cjs/Metadata/RelationshipClass.js +349 -349
  87. package/lib/cjs/Metadata/RelationshipClass.js.map +1 -1
  88. package/lib/cjs/Metadata/Schema.d.ts +291 -291
  89. package/lib/cjs/Metadata/Schema.js +520 -520
  90. package/lib/cjs/Metadata/Schema.js.map +1 -1
  91. package/lib/cjs/Metadata/SchemaItem.d.ts +61 -61
  92. package/lib/cjs/Metadata/SchemaItem.js +136 -136
  93. package/lib/cjs/Metadata/SchemaItem.js.map +1 -1
  94. package/lib/cjs/Metadata/Unit.d.ts +76 -76
  95. package/lib/cjs/Metadata/Unit.js +162 -162
  96. package/lib/cjs/Metadata/UnitSystem.d.ts +20 -20
  97. package/lib/cjs/Metadata/UnitSystem.js +29 -29
  98. package/lib/cjs/Metadata/UnitSystem.js.map +1 -1
  99. package/lib/cjs/PropertyTypes.d.ts +49 -49
  100. package/lib/cjs/PropertyTypes.js +91 -91
  101. package/lib/cjs/PropertyTypes.js.map +1 -1
  102. package/lib/cjs/SchemaJsonLocater.d.ts +34 -34
  103. package/lib/cjs/SchemaJsonLocater.js +42 -42
  104. package/lib/cjs/SchemaJsonLocater.js.map +1 -1
  105. package/lib/cjs/SchemaKey.d.ts +110 -110
  106. package/lib/cjs/SchemaKey.js +219 -219
  107. package/lib/cjs/SchemaKey.js.map +1 -1
  108. package/lib/cjs/SchemaLoader.d.ts +23 -23
  109. package/lib/cjs/SchemaLoader.js +47 -47
  110. package/lib/cjs/SchemaLoader.js.map +1 -1
  111. package/lib/cjs/SchemaPartVisitorDelegate.d.ts +274 -274
  112. package/lib/cjs/SchemaPartVisitorDelegate.js +212 -212
  113. package/lib/cjs/SchemaPartVisitorDelegate.js.map +1 -1
  114. package/lib/cjs/UnitConversion/Graph.d.ts +34 -34
  115. package/lib/cjs/UnitConversion/Graph.js +83 -83
  116. package/lib/cjs/UnitConversion/Graph.js.map +1 -1
  117. package/lib/cjs/UnitConversion/Parser.d.ts +8 -8
  118. package/lib/cjs/UnitConversion/Parser.js +42 -42
  119. package/lib/cjs/UnitConversion/Parser.js.map +1 -1
  120. package/lib/cjs/UnitConversion/UnitConversion.d.ts +45 -45
  121. package/lib/cjs/UnitConversion/UnitConversion.js +77 -77
  122. package/lib/cjs/UnitConversion/UnitConversion.js.map +1 -1
  123. package/lib/cjs/UnitConversion/UnitConverter.d.ts +39 -39
  124. package/lib/cjs/UnitConversion/UnitConverter.js +116 -116
  125. package/lib/cjs/UnitConversion/UnitConverter.js.map +1 -1
  126. package/lib/cjs/UnitConversion/UnitTree.d.ts +43 -43
  127. package/lib/cjs/UnitConversion/UnitTree.js +169 -169
  128. package/lib/cjs/UnitConversion/UnitTree.js.map +1 -1
  129. package/lib/cjs/UnitProvider/SchemaUnitProvider.d.ts +77 -77
  130. package/lib/cjs/UnitProvider/SchemaUnitProvider.js +236 -236
  131. package/lib/cjs/UnitProvider/SchemaUnitProvider.js.map +1 -1
  132. package/lib/cjs/Validation/SchemaWalker.d.ts +23 -23
  133. package/lib/cjs/Validation/SchemaWalker.js +53 -53
  134. package/lib/cjs/Validation/SchemaWalker.js.map +1 -1
  135. package/lib/cjs/ecschema-metadata.d.ts +51 -51
  136. package/lib/cjs/ecschema-metadata.js +96 -96
  137. package/lib/cjs/ecschema-metadata.js.map +1 -1
  138. package/lib/cjs/utils/SchemaGraph.d.ts +25 -25
  139. package/lib/cjs/utils/SchemaGraph.js +65 -65
  140. package/lib/cjs/utils/SchemaGraph.js.map +1 -1
  141. package/package.json +7 -7
@@ -1,10 +1,10 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- /** @packageDocumentation
7
- * @module Metadata
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ /** @packageDocumentation
7
+ * @module Metadata
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  //# sourceMappingURL=Interfaces.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Interfaces.js","sourceRoot":"","sources":["../../src/Interfaces.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Metadata\r\n */\r\n\r\nimport { DelayedPromise } from \"./DelayedPromise\";\r\nimport { ECClass, StructClass } from \"./Metadata/Class\";\r\nimport { Constant } from \"./Metadata/Constant\";\r\nimport { CustomAttribute, CustomAttributeContainerProps } from \"./Metadata/CustomAttribute\";\r\nimport { CustomAttributeClass } from \"./Metadata/CustomAttributeClass\";\r\nimport { EntityClass } from \"./Metadata/EntityClass\";\r\nimport { AnyEnumerator, Enumeration } from \"./Metadata/Enumeration\";\r\nimport { Format } from \"./Metadata/Format\";\r\nimport { InvertedUnit } from \"./Metadata/InvertedUnit\";\r\nimport { KindOfQuantity } from \"./Metadata/KindOfQuantity\";\r\nimport { Mixin } from \"./Metadata/Mixin\";\r\nimport { OverrideFormat } from \"./Metadata/OverrideFormat\";\r\nimport { Phenomenon } from \"./Metadata/Phenomenon\";\r\nimport { AnyProperty } from \"./Metadata/Property\";\r\nimport { PropertyCategory } from \"./Metadata/PropertyCategory\";\r\nimport { RelationshipClass, RelationshipConstraint } from \"./Metadata/RelationshipClass\";\r\nimport { Schema } from \"./Metadata/Schema\";\r\nimport { SchemaItem } from \"./Metadata/SchemaItem\";\r\nimport { Unit } from \"./Metadata/Unit\";\r\nimport { UnitSystem } from \"./Metadata/UnitSystem\";\r\nimport { SchemaItemKey, SchemaKey } from \"./SchemaKey\";\r\n\r\n/** @beta */\r\nexport type LazyLoadedSchema = Readonly<SchemaKey> & DelayedPromise<Schema> & Promise<Schema>;\r\n\r\n/** @beta */\r\nexport type LazyLoadedSchemaItem<T extends SchemaItem> = Readonly<SchemaItemKey> & DelayedPromise<T> & Promise<T>;\r\n/** @beta */\r\nexport type LazyLoadedECClass = LazyLoadedSchemaItem<ECClass>;\r\n/** @beta */\r\nexport type LazyLoadedEntityClass = LazyLoadedSchemaItem<EntityClass>;\r\n/** @beta */\r\nexport type LazyLoadedMixin = LazyLoadedSchemaItem<Mixin>;\r\n/** @beta */\r\nexport type LazyLoadedStructClass = LazyLoadedSchemaItem<StructClass>;\r\n/** @beta */\r\nexport type LazyLoadedCustomAttributeClass = LazyLoadedSchemaItem<CustomAttributeClass>;\r\n/** @beta */\r\nexport type LazyLoadedRelationshipClass = LazyLoadedSchemaItem<RelationshipClass>;\r\n/** @beta */\r\nexport type LazyLoadedEnumeration = LazyLoadedSchemaItem<Enumeration>;\r\n/** @beta */\r\nexport type LazyLoadedKindOfQuantity = LazyLoadedSchemaItem<KindOfQuantity>;\r\n/** @beta */\r\nexport type LazyLoadedPropertyCategory = LazyLoadedSchemaItem<PropertyCategory>;\r\n/** @beta */\r\nexport type LazyLoadedRelationshipConstraintClass = LazyLoadedSchemaItem<EntityClass | Mixin | RelationshipClass>;\r\n/** @beta */\r\nexport type LazyLoadedUnit = LazyLoadedSchemaItem<Unit>;\r\n/** @beta */\r\nexport type LazyLoadedInvertedUnit = LazyLoadedSchemaItem<InvertedUnit>;\r\n/** @beta */\r\nexport type LazyLoadedConstant = LazyLoadedSchemaItem<Constant>;\r\n/** @beta */\r\nexport type LazyLoadedPhenomenon = LazyLoadedSchemaItem<Phenomenon>;\r\n/** @beta */\r\nexport type LazyLoadedUnitSystem = LazyLoadedSchemaItem<UnitSystem>;\r\n/** @beta */\r\nexport type LazyLoadedFormat = LazyLoadedSchemaItem<Format>;\r\n\r\n/** @beta */\r\nexport type AnyClass = EntityClass | Mixin | StructClass | CustomAttributeClass | RelationshipClass;\r\n/** @beta */\r\nexport type AnySchemaItem = AnyClass | Enumeration | KindOfQuantity | PropertyCategory | Unit | InvertedUnit | Constant | Phenomenon | UnitSystem | Format;\r\n/** @beta */\r\nexport type AnyECType = Schema | SchemaItem | AnyProperty | RelationshipConstraint | CustomAttributeContainerProps | CustomAttribute | OverrideFormat | AnyEnumerator;\r\n"]}
1
+ {"version":3,"file":"Interfaces.js","sourceRoot":"","sources":["../../src/Interfaces.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Metadata\n */\n\nimport { DelayedPromise } from \"./DelayedPromise\";\nimport { ECClass, StructClass } from \"./Metadata/Class\";\nimport { Constant } from \"./Metadata/Constant\";\nimport { CustomAttribute, CustomAttributeContainerProps } from \"./Metadata/CustomAttribute\";\nimport { CustomAttributeClass } from \"./Metadata/CustomAttributeClass\";\nimport { EntityClass } from \"./Metadata/EntityClass\";\nimport { AnyEnumerator, Enumeration } from \"./Metadata/Enumeration\";\nimport { Format } from \"./Metadata/Format\";\nimport { InvertedUnit } from \"./Metadata/InvertedUnit\";\nimport { KindOfQuantity } from \"./Metadata/KindOfQuantity\";\nimport { Mixin } from \"./Metadata/Mixin\";\nimport { OverrideFormat } from \"./Metadata/OverrideFormat\";\nimport { Phenomenon } from \"./Metadata/Phenomenon\";\nimport { AnyProperty } from \"./Metadata/Property\";\nimport { PropertyCategory } from \"./Metadata/PropertyCategory\";\nimport { RelationshipClass, RelationshipConstraint } from \"./Metadata/RelationshipClass\";\nimport { Schema } from \"./Metadata/Schema\";\nimport { SchemaItem } from \"./Metadata/SchemaItem\";\nimport { Unit } from \"./Metadata/Unit\";\nimport { UnitSystem } from \"./Metadata/UnitSystem\";\nimport { SchemaItemKey, SchemaKey } from \"./SchemaKey\";\n\n/** @beta */\nexport type LazyLoadedSchema = Readonly<SchemaKey> & DelayedPromise<Schema> & Promise<Schema>;\n\n/** @beta */\nexport type LazyLoadedSchemaItem<T extends SchemaItem> = Readonly<SchemaItemKey> & DelayedPromise<T> & Promise<T>;\n/** @beta */\nexport type LazyLoadedECClass = LazyLoadedSchemaItem<ECClass>;\n/** @beta */\nexport type LazyLoadedEntityClass = LazyLoadedSchemaItem<EntityClass>;\n/** @beta */\nexport type LazyLoadedMixin = LazyLoadedSchemaItem<Mixin>;\n/** @beta */\nexport type LazyLoadedStructClass = LazyLoadedSchemaItem<StructClass>;\n/** @beta */\nexport type LazyLoadedCustomAttributeClass = LazyLoadedSchemaItem<CustomAttributeClass>;\n/** @beta */\nexport type LazyLoadedRelationshipClass = LazyLoadedSchemaItem<RelationshipClass>;\n/** @beta */\nexport type LazyLoadedEnumeration = LazyLoadedSchemaItem<Enumeration>;\n/** @beta */\nexport type LazyLoadedKindOfQuantity = LazyLoadedSchemaItem<KindOfQuantity>;\n/** @beta */\nexport type LazyLoadedPropertyCategory = LazyLoadedSchemaItem<PropertyCategory>;\n/** @beta */\nexport type LazyLoadedRelationshipConstraintClass = LazyLoadedSchemaItem<EntityClass | Mixin | RelationshipClass>;\n/** @beta */\nexport type LazyLoadedUnit = LazyLoadedSchemaItem<Unit>;\n/** @beta */\nexport type LazyLoadedInvertedUnit = LazyLoadedSchemaItem<InvertedUnit>;\n/** @beta */\nexport type LazyLoadedConstant = LazyLoadedSchemaItem<Constant>;\n/** @beta */\nexport type LazyLoadedPhenomenon = LazyLoadedSchemaItem<Phenomenon>;\n/** @beta */\nexport type LazyLoadedUnitSystem = LazyLoadedSchemaItem<UnitSystem>;\n/** @beta */\nexport type LazyLoadedFormat = LazyLoadedSchemaItem<Format>;\n\n/** @beta */\nexport type AnyClass = EntityClass | Mixin | StructClass | CustomAttributeClass | RelationshipClass;\n/** @beta */\nexport type AnySchemaItem = AnyClass | Enumeration | KindOfQuantity | PropertyCategory | Unit | InvertedUnit | Constant | Phenomenon | UnitSystem | Format;\n/** @beta */\nexport type AnyECType = Schema | SchemaItem | AnyProperty | RelationshipConstraint | CustomAttributeContainerProps | CustomAttribute | OverrideFormat | AnyEnumerator;\n"]}
@@ -1,244 +1,244 @@
1
- /** @packageDocumentation
2
- * @module Metadata
3
- */
4
- import { ClassProps } from "../Deserialization/JsonProps";
5
- import { ECClassModifier, PrimitiveType, SchemaItemType } from "../ECObjects";
6
- import { AnyClass, LazyLoadedECClass } from "../Interfaces";
7
- import { CustomAttribute, CustomAttributeContainerProps, CustomAttributeSet } from "./CustomAttribute";
8
- import { Enumeration } from "./Enumeration";
9
- import { EnumerationArrayProperty, EnumerationProperty, PrimitiveArrayProperty, PrimitiveProperty, Property, StructArrayProperty, StructProperty } from "./Property";
10
- import { Schema } from "./Schema";
11
- import { SchemaItem } from "./SchemaItem";
12
- /**
13
- * A common abstract class for all of the ECClass types.
14
- * @beta
15
- */
16
- export declare abstract class ECClass extends SchemaItem implements CustomAttributeContainerProps {
17
- protected _modifier: ECClassModifier;
18
- protected _baseClass?: LazyLoadedECClass;
19
- protected _properties?: Map<string, Property>;
20
- private _customAttributes?;
21
- private _mergedPropertyCache?;
22
- get modifier(): ECClassModifier;
23
- get baseClass(): LazyLoadedECClass | undefined;
24
- set baseClass(baseClass: LazyLoadedECClass | undefined);
25
- get properties(): IterableIterator<Property> | undefined;
26
- get customAttributes(): CustomAttributeSet | undefined;
27
- constructor(schema: Schema, name: string, modifier?: ECClassModifier);
28
- /**
29
- * Convenience method for adding an already loaded ECProperty used by create*Property methods.
30
- * @param prop The property to add.
31
- * @return The property that was added.
32
- */
33
- protected addProperty<T extends Property>(prop: T): T;
34
- /**
35
- * Deletes a property from within this class.
36
- * @param name The property name to delete, lookup is case-insensitive
37
- * @alpha
38
- */
39
- protected deleteProperty(name: string): Promise<void>;
40
- /**
41
- * Deletes a property from within this class.
42
- * @param name The property name to delete, lookup is case-insensitive
43
- * @alpha
44
- */
45
- protected deletePropertySync(name: string): void;
46
- getBaseClassSync(): ECClass | undefined;
47
- /**
48
- * Searches, case-insensitive, for a local ECProperty with the name provided.
49
- * @param name
50
- */
51
- getProperty(name: string, includeInherited?: boolean): Promise<Property | undefined>;
52
- /**
53
- * Searches, case-insensitive, for a local ECProperty with the name provided.
54
- * @param name
55
- */
56
- getPropertySync(name: string, includeInherited?: boolean): Property | undefined;
57
- /**
58
- * Searches the base class, if one exists, for the property with the name provided.
59
- * @param name The name of the inherited property to find.
60
- */
61
- getInheritedProperty(name: string): Promise<Property | undefined>;
62
- /**
63
- * Searches the base class, if one exists, for the property with the name provided.
64
- * @param name The name of the inherited property to find.
65
- */
66
- getInheritedPropertySync(name: string): Property | undefined;
67
- /**
68
- * Creates a PrimitiveECProperty.
69
- * @param name The name of property to create.
70
- * @param primitiveType The primitive type of property to create. If not provided the default is PrimitiveType.Integer
71
- * @throws ECObjectsStatus DuplicateProperty: thrown if a property with the same name already exists in the class.
72
- */
73
- protected createPrimitiveProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveProperty>;
74
- protected createPrimitiveProperty(name: string, primitiveType: Enumeration): Promise<EnumerationProperty>;
75
- /**
76
- * Creates a PrimitiveECProperty.
77
- * @param name The name of property to create.
78
- * @param primitiveType The primitive type of property to create. If not provided the default is PrimitiveType.Integer
79
- * @throws ECObjectsStatus DuplicateProperty: thrown if a property with the same name already exists in the class.
80
- */
81
- protected createPrimitivePropertySync(name: string, primitiveType: PrimitiveType): PrimitiveProperty;
82
- protected createPrimitivePropertySync(name: string, primitiveType: Enumeration): EnumerationProperty;
83
- /**
84
- * Creates a PrimitiveArrayECProperty.
85
- * @param name The name of property to create.
86
- * @param primitiveType The primitive type of property to create. If not provided the default is PrimitiveType.Integer
87
- */
88
- protected createPrimitiveArrayProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveArrayProperty>;
89
- protected createPrimitiveArrayProperty(name: string, primitiveType: Enumeration): Promise<EnumerationArrayProperty>;
90
- /**
91
- * Creates a PrimitiveArrayECProperty.
92
- * @param name The name of property to create.
93
- * @param primitiveType The primitive type of property to create. If not provided the default is PrimitiveType.Integer
94
- */
95
- protected createPrimitiveArrayPropertySync(name: string, primitiveType: PrimitiveType): PrimitiveArrayProperty;
96
- protected createPrimitiveArrayPropertySync(name: string, primitiveType: Enumeration): EnumerationArrayProperty;
97
- /**
98
- *
99
- * @param name The name of property to create.
100
- * @param structType The struct type of property to create.
101
- */
102
- protected createStructProperty(name: string, structType: string | StructClass): Promise<StructProperty>;
103
- /**
104
- *
105
- * @param name The name of property to create.
106
- * @param structType The struct type of property to create.
107
- */
108
- protected createStructPropertySync(name: string, structType: string | StructClass): StructProperty;
109
- /**
110
- *
111
- * @param name
112
- * @param type
113
- */
114
- protected createStructArrayProperty(name: string, structType: string | StructClass): Promise<StructArrayProperty>;
115
- /**
116
- *
117
- * @param name
118
- * @param type
119
- */
120
- protected createStructArrayPropertySync(name: string, structType: string | StructClass): StructArrayProperty;
121
- protected loadStructType(structType: string | StructClass | undefined, schema: Schema): Promise<StructClass>;
122
- protected loadStructTypeSync(structType: string | StructClass | undefined, schema: Schema): StructClass;
123
- protected loadPrimitiveType(primitiveType: string | PrimitiveType | Enumeration | undefined, schema: Schema): Promise<PrimitiveType | Enumeration>;
124
- protected loadPrimitiveTypeSync(primitiveType: string | PrimitiveType | Enumeration | undefined, schema: Schema): PrimitiveType | Enumeration;
125
- /**
126
- * Save this Classes properties to an object for serializing to JSON.
127
- * @param standalone Serialization includes only this object (as opposed to the full schema).
128
- * @param includeSchemaVersion Include the Schema's version information in the serialized object.
129
- */
130
- toJSON(standalone?: boolean, includeSchemaVersion?: boolean): ClassProps;
131
- /** @internal */
132
- toXml(schemaXml: Document): Promise<Element>;
133
- fromJSONSync(classProps: ClassProps): void;
134
- fromJSON(classProps: ClassProps): Promise<void>;
135
- protected addCustomAttribute(customAttribute: CustomAttribute): void;
136
- /**
137
- * Iterates (recursively) over all base classes and mixins, in "property override" order.
138
- * This is essentially a depth-first traversal through the inheritance tree.
139
- */
140
- getAllBaseClasses(): AsyncIterableIterator<ECClass>;
141
- getAllBaseClassesSync(): Iterable<AnyClass>;
142
- protected static mergeProperties(target: Property[], existingValues: Map<string, number>, propertiesToMerge: Property[], overwriteExisting: boolean): void;
143
- protected buildPropertyCache(result: Property[], existingValues?: Map<string, number>, resetBaseCaches?: boolean): Promise<void>;
144
- protected buildPropertyCacheSync(result: Property[], existingValues?: Map<string, number>, resetBaseCaches?: boolean): void;
145
- /**
146
- * Iterates all properties, including the ones merged from base classes and mixins. To obtain only local properties, use the 'properties' field.
147
- * Since this is an expensive operation, results will be cached after first call.
148
- * @param resetCache if true, any previously cached results will be dropped and cache will be rebuilt
149
- */
150
- getPropertiesSync(resetCache?: boolean): Property[];
151
- /**
152
- * Iterates all properties, including the ones merged from base classes and mixins. To obtain only local properties, use the 'properties' field.
153
- * Since this is an expensive operation, results will be cached after first call.
154
- * @param resetCache if true, any previously cached results will be dropped and cache will be rebuilt
155
- */
156
- getProperties(resetCache?: boolean): Promise<Property[]>;
157
- /**
158
- * Retrieve all custom attributes in the current class and its bases
159
- * This is the async version of getCustomAttributesSync()
160
- */
161
- getCustomAttributes(): Promise<CustomAttributeSet>;
162
- /**
163
- * Retrieve all custom attributes in the current class and its bases.
164
- */
165
- getCustomAttributesSync(): CustomAttributeSet;
166
- /**
167
- * Asynchronously traverses through the inheritance tree, using depth-first traversal, calling the given callback
168
- * function for each base class encountered.
169
- * @param callback The function to call for each base class in the hierarchy.
170
- * @param arg An argument that will be passed as the second parameter to the callback function.
171
- */
172
- traverseBaseClasses(callback: (ecClass: ECClass, arg?: any) => boolean, arg?: any): Promise<boolean>;
173
- /**
174
- * Synchronously traverses through the inheritance tree, using depth-first traversal, calling the given callback
175
- * function for each base class encountered.
176
- * @param callback The function to call for each base class in the hierarchy.
177
- * @param arg An argument that will be passed as the second parameter to the callback function.
178
- */
179
- traverseBaseClassesSync(callback: (ecClass: ECClass, arg?: any) => boolean, arg?: any): boolean;
180
- /**
181
- * Indicates if the targetClass is of this type.
182
- * @param targetClass The ECClass or ECClass name to check.
183
- * @param schemaName The schema name. Required if targetClass is the ECClass name.
184
- */
185
- is(targetClass: string, schemaName: string): Promise<boolean>;
186
- is(targetClass: ECClass): Promise<boolean>;
187
- /**
188
- * A synchronous version of the [[ECClass.is]], indicating if the targetClass is of this type.
189
- * @param targetClass The class to check.
190
- */
191
- isSync(targetClass: ECClass): boolean;
192
- /**
193
- * @internal
194
- */
195
- static isECClass(object: any): object is ECClass;
196
- /**
197
- * @alpha
198
- * A setter method used specifically for schema editing.
199
- * @param modifier
200
- */
201
- protected setModifier(modifier: ECClassModifier): void;
202
- }
203
- /**
204
- * A Typescript class representation of an ECStructClass.
205
- * @beta
206
- */
207
- export declare class StructClass extends ECClass {
208
- readonly schemaItemType: SchemaItemType.StructClass;
209
- constructor(schema: Schema, name: string, modifier?: ECClassModifier);
210
- }
211
- /**
212
- * @internal
213
- * An abstract class used for schema editing.
214
- */
215
- export declare abstract class MutableStructClass extends StructClass {
216
- abstract setDisplayLabel(displayLabel: string): void;
217
- }
218
- /**
219
- * Hackish approach that works like a "friend class" so we can access protected members without making them public.
220
- * @internal
221
- */
222
- export declare abstract class MutableClass extends ECClass {
223
- abstract addCustomAttribute(customAttribute: CustomAttribute): void;
224
- abstract setModifier(modifier: ECClassModifier): void;
225
- abstract createPrimitiveProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveProperty>;
226
- abstract createPrimitiveProperty(name: string, primitiveType: Enumeration): Promise<EnumerationProperty>;
227
- abstract createPrimitiveProperty(name: string, primitiveType?: string | PrimitiveType | Enumeration): Promise<Property>;
228
- abstract createPrimitivePropertySync(name: string, primitiveType: PrimitiveType): PrimitiveProperty;
229
- abstract createPrimitivePropertySync(name: string, primitiveType: Enumeration): EnumerationProperty;
230
- abstract createPrimitivePropertySync(name: string, primitiveType?: string | PrimitiveType | Enumeration): Property;
231
- abstract createPrimitiveArrayProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveArrayProperty>;
232
- abstract createPrimitiveArrayProperty(name: string, primitiveType: Enumeration): Promise<EnumerationArrayProperty>;
233
- abstract createPrimitiveArrayProperty(name: string, primitiveType?: string | PrimitiveType | Enumeration): Promise<Property>;
234
- abstract createPrimitiveArrayPropertySync(name: string, primitiveType: PrimitiveType): PrimitiveArrayProperty;
235
- abstract createPrimitiveArrayPropertySync(name: string, primitiveType: Enumeration): EnumerationArrayProperty;
236
- abstract createPrimitiveArrayPropertySync(name: string, primitiveType?: string | PrimitiveType | Enumeration): Property;
237
- abstract createStructProperty(name: string, structType: string | StructClass): Promise<StructProperty>;
238
- abstract createStructPropertySync(name: string, structType: string | StructClass): StructProperty;
239
- abstract createStructArrayProperty(name: string, structType: string | StructClass): Promise<StructArrayProperty>;
240
- abstract createStructArrayPropertySync(name: string, structType: string | StructClass): StructArrayProperty;
241
- abstract deleteProperty(name: string): Promise<void>;
242
- abstract deletePropertySync(name: string): void;
243
- }
1
+ /** @packageDocumentation
2
+ * @module Metadata
3
+ */
4
+ import { ClassProps } from "../Deserialization/JsonProps";
5
+ import { ECClassModifier, PrimitiveType, SchemaItemType } from "../ECObjects";
6
+ import { AnyClass, LazyLoadedECClass } from "../Interfaces";
7
+ import { CustomAttribute, CustomAttributeContainerProps, CustomAttributeSet } from "./CustomAttribute";
8
+ import { Enumeration } from "./Enumeration";
9
+ import { EnumerationArrayProperty, EnumerationProperty, PrimitiveArrayProperty, PrimitiveProperty, Property, StructArrayProperty, StructProperty } from "./Property";
10
+ import { Schema } from "./Schema";
11
+ import { SchemaItem } from "./SchemaItem";
12
+ /**
13
+ * A common abstract class for all of the ECClass types.
14
+ * @beta
15
+ */
16
+ export declare abstract class ECClass extends SchemaItem implements CustomAttributeContainerProps {
17
+ protected _modifier: ECClassModifier;
18
+ protected _baseClass?: LazyLoadedECClass;
19
+ protected _properties?: Map<string, Property>;
20
+ private _customAttributes?;
21
+ private _mergedPropertyCache?;
22
+ get modifier(): ECClassModifier;
23
+ get baseClass(): LazyLoadedECClass | undefined;
24
+ set baseClass(baseClass: LazyLoadedECClass | undefined);
25
+ get properties(): IterableIterator<Property> | undefined;
26
+ get customAttributes(): CustomAttributeSet | undefined;
27
+ constructor(schema: Schema, name: string, modifier?: ECClassModifier);
28
+ /**
29
+ * Convenience method for adding an already loaded ECProperty used by create*Property methods.
30
+ * @param prop The property to add.
31
+ * @return The property that was added.
32
+ */
33
+ protected addProperty<T extends Property>(prop: T): T;
34
+ /**
35
+ * Deletes a property from within this class.
36
+ * @param name The property name to delete, lookup is case-insensitive
37
+ * @alpha
38
+ */
39
+ protected deleteProperty(name: string): Promise<void>;
40
+ /**
41
+ * Deletes a property from within this class.
42
+ * @param name The property name to delete, lookup is case-insensitive
43
+ * @alpha
44
+ */
45
+ protected deletePropertySync(name: string): void;
46
+ getBaseClassSync(): ECClass | undefined;
47
+ /**
48
+ * Searches, case-insensitive, for a local ECProperty with the name provided.
49
+ * @param name
50
+ */
51
+ getProperty(name: string, includeInherited?: boolean): Promise<Property | undefined>;
52
+ /**
53
+ * Searches, case-insensitive, for a local ECProperty with the name provided.
54
+ * @param name
55
+ */
56
+ getPropertySync(name: string, includeInherited?: boolean): Property | undefined;
57
+ /**
58
+ * Searches the base class, if one exists, for the property with the name provided.
59
+ * @param name The name of the inherited property to find.
60
+ */
61
+ getInheritedProperty(name: string): Promise<Property | undefined>;
62
+ /**
63
+ * Searches the base class, if one exists, for the property with the name provided.
64
+ * @param name The name of the inherited property to find.
65
+ */
66
+ getInheritedPropertySync(name: string): Property | undefined;
67
+ /**
68
+ * Creates a PrimitiveECProperty.
69
+ * @param name The name of property to create.
70
+ * @param primitiveType The primitive type of property to create. If not provided the default is PrimitiveType.Integer
71
+ * @throws ECObjectsStatus DuplicateProperty: thrown if a property with the same name already exists in the class.
72
+ */
73
+ protected createPrimitiveProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveProperty>;
74
+ protected createPrimitiveProperty(name: string, primitiveType: Enumeration): Promise<EnumerationProperty>;
75
+ /**
76
+ * Creates a PrimitiveECProperty.
77
+ * @param name The name of property to create.
78
+ * @param primitiveType The primitive type of property to create. If not provided the default is PrimitiveType.Integer
79
+ * @throws ECObjectsStatus DuplicateProperty: thrown if a property with the same name already exists in the class.
80
+ */
81
+ protected createPrimitivePropertySync(name: string, primitiveType: PrimitiveType): PrimitiveProperty;
82
+ protected createPrimitivePropertySync(name: string, primitiveType: Enumeration): EnumerationProperty;
83
+ /**
84
+ * Creates a PrimitiveArrayECProperty.
85
+ * @param name The name of property to create.
86
+ * @param primitiveType The primitive type of property to create. If not provided the default is PrimitiveType.Integer
87
+ */
88
+ protected createPrimitiveArrayProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveArrayProperty>;
89
+ protected createPrimitiveArrayProperty(name: string, primitiveType: Enumeration): Promise<EnumerationArrayProperty>;
90
+ /**
91
+ * Creates a PrimitiveArrayECProperty.
92
+ * @param name The name of property to create.
93
+ * @param primitiveType The primitive type of property to create. If not provided the default is PrimitiveType.Integer
94
+ */
95
+ protected createPrimitiveArrayPropertySync(name: string, primitiveType: PrimitiveType): PrimitiveArrayProperty;
96
+ protected createPrimitiveArrayPropertySync(name: string, primitiveType: Enumeration): EnumerationArrayProperty;
97
+ /**
98
+ *
99
+ * @param name The name of property to create.
100
+ * @param structType The struct type of property to create.
101
+ */
102
+ protected createStructProperty(name: string, structType: string | StructClass): Promise<StructProperty>;
103
+ /**
104
+ *
105
+ * @param name The name of property to create.
106
+ * @param structType The struct type of property to create.
107
+ */
108
+ protected createStructPropertySync(name: string, structType: string | StructClass): StructProperty;
109
+ /**
110
+ *
111
+ * @param name
112
+ * @param type
113
+ */
114
+ protected createStructArrayProperty(name: string, structType: string | StructClass): Promise<StructArrayProperty>;
115
+ /**
116
+ *
117
+ * @param name
118
+ * @param type
119
+ */
120
+ protected createStructArrayPropertySync(name: string, structType: string | StructClass): StructArrayProperty;
121
+ protected loadStructType(structType: string | StructClass | undefined, schema: Schema): Promise<StructClass>;
122
+ protected loadStructTypeSync(structType: string | StructClass | undefined, schema: Schema): StructClass;
123
+ protected loadPrimitiveType(primitiveType: string | PrimitiveType | Enumeration | undefined, schema: Schema): Promise<PrimitiveType | Enumeration>;
124
+ protected loadPrimitiveTypeSync(primitiveType: string | PrimitiveType | Enumeration | undefined, schema: Schema): PrimitiveType | Enumeration;
125
+ /**
126
+ * Save this Classes properties to an object for serializing to JSON.
127
+ * @param standalone Serialization includes only this object (as opposed to the full schema).
128
+ * @param includeSchemaVersion Include the Schema's version information in the serialized object.
129
+ */
130
+ toJSON(standalone?: boolean, includeSchemaVersion?: boolean): ClassProps;
131
+ /** @internal */
132
+ toXml(schemaXml: Document): Promise<Element>;
133
+ fromJSONSync(classProps: ClassProps): void;
134
+ fromJSON(classProps: ClassProps): Promise<void>;
135
+ protected addCustomAttribute(customAttribute: CustomAttribute): void;
136
+ /**
137
+ * Iterates (recursively) over all base classes and mixins, in "property override" order.
138
+ * This is essentially a depth-first traversal through the inheritance tree.
139
+ */
140
+ getAllBaseClasses(): AsyncIterableIterator<ECClass>;
141
+ getAllBaseClassesSync(): Iterable<AnyClass>;
142
+ protected static mergeProperties(target: Property[], existingValues: Map<string, number>, propertiesToMerge: Property[], overwriteExisting: boolean): void;
143
+ protected buildPropertyCache(result: Property[], existingValues?: Map<string, number>, resetBaseCaches?: boolean): Promise<void>;
144
+ protected buildPropertyCacheSync(result: Property[], existingValues?: Map<string, number>, resetBaseCaches?: boolean): void;
145
+ /**
146
+ * Iterates all properties, including the ones merged from base classes and mixins. To obtain only local properties, use the 'properties' field.
147
+ * Since this is an expensive operation, results will be cached after first call.
148
+ * @param resetCache if true, any previously cached results will be dropped and cache will be rebuilt
149
+ */
150
+ getPropertiesSync(resetCache?: boolean): Property[];
151
+ /**
152
+ * Iterates all properties, including the ones merged from base classes and mixins. To obtain only local properties, use the 'properties' field.
153
+ * Since this is an expensive operation, results will be cached after first call.
154
+ * @param resetCache if true, any previously cached results will be dropped and cache will be rebuilt
155
+ */
156
+ getProperties(resetCache?: boolean): Promise<Property[]>;
157
+ /**
158
+ * Retrieve all custom attributes in the current class and its bases
159
+ * This is the async version of getCustomAttributesSync()
160
+ */
161
+ getCustomAttributes(): Promise<CustomAttributeSet>;
162
+ /**
163
+ * Retrieve all custom attributes in the current class and its bases.
164
+ */
165
+ getCustomAttributesSync(): CustomAttributeSet;
166
+ /**
167
+ * Asynchronously traverses through the inheritance tree, using depth-first traversal, calling the given callback
168
+ * function for each base class encountered.
169
+ * @param callback The function to call for each base class in the hierarchy.
170
+ * @param arg An argument that will be passed as the second parameter to the callback function.
171
+ */
172
+ traverseBaseClasses(callback: (ecClass: ECClass, arg?: any) => boolean, arg?: any): Promise<boolean>;
173
+ /**
174
+ * Synchronously traverses through the inheritance tree, using depth-first traversal, calling the given callback
175
+ * function for each base class encountered.
176
+ * @param callback The function to call for each base class in the hierarchy.
177
+ * @param arg An argument that will be passed as the second parameter to the callback function.
178
+ */
179
+ traverseBaseClassesSync(callback: (ecClass: ECClass, arg?: any) => boolean, arg?: any): boolean;
180
+ /**
181
+ * Indicates if the targetClass is of this type.
182
+ * @param targetClass The ECClass or ECClass name to check.
183
+ * @param schemaName The schema name. Required if targetClass is the ECClass name.
184
+ */
185
+ is(targetClass: string, schemaName: string): Promise<boolean>;
186
+ is(targetClass: ECClass): Promise<boolean>;
187
+ /**
188
+ * A synchronous version of the [[ECClass.is]], indicating if the targetClass is of this type.
189
+ * @param targetClass The class to check.
190
+ */
191
+ isSync(targetClass: ECClass): boolean;
192
+ /**
193
+ * @internal
194
+ */
195
+ static isECClass(object: any): object is ECClass;
196
+ /**
197
+ * @alpha
198
+ * A setter method used specifically for schema editing.
199
+ * @param modifier
200
+ */
201
+ protected setModifier(modifier: ECClassModifier): void;
202
+ }
203
+ /**
204
+ * A Typescript class representation of an ECStructClass.
205
+ * @beta
206
+ */
207
+ export declare class StructClass extends ECClass {
208
+ readonly schemaItemType: SchemaItemType.StructClass;
209
+ constructor(schema: Schema, name: string, modifier?: ECClassModifier);
210
+ }
211
+ /**
212
+ * @internal
213
+ * An abstract class used for schema editing.
214
+ */
215
+ export declare abstract class MutableStructClass extends StructClass {
216
+ abstract setDisplayLabel(displayLabel: string): void;
217
+ }
218
+ /**
219
+ * Hackish approach that works like a "friend class" so we can access protected members without making them public.
220
+ * @internal
221
+ */
222
+ export declare abstract class MutableClass extends ECClass {
223
+ abstract addCustomAttribute(customAttribute: CustomAttribute): void;
224
+ abstract setModifier(modifier: ECClassModifier): void;
225
+ abstract createPrimitiveProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveProperty>;
226
+ abstract createPrimitiveProperty(name: string, primitiveType: Enumeration): Promise<EnumerationProperty>;
227
+ abstract createPrimitiveProperty(name: string, primitiveType?: string | PrimitiveType | Enumeration): Promise<Property>;
228
+ abstract createPrimitivePropertySync(name: string, primitiveType: PrimitiveType): PrimitiveProperty;
229
+ abstract createPrimitivePropertySync(name: string, primitiveType: Enumeration): EnumerationProperty;
230
+ abstract createPrimitivePropertySync(name: string, primitiveType?: string | PrimitiveType | Enumeration): Property;
231
+ abstract createPrimitiveArrayProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveArrayProperty>;
232
+ abstract createPrimitiveArrayProperty(name: string, primitiveType: Enumeration): Promise<EnumerationArrayProperty>;
233
+ abstract createPrimitiveArrayProperty(name: string, primitiveType?: string | PrimitiveType | Enumeration): Promise<Property>;
234
+ abstract createPrimitiveArrayPropertySync(name: string, primitiveType: PrimitiveType): PrimitiveArrayProperty;
235
+ abstract createPrimitiveArrayPropertySync(name: string, primitiveType: Enumeration): EnumerationArrayProperty;
236
+ abstract createPrimitiveArrayPropertySync(name: string, primitiveType?: string | PrimitiveType | Enumeration): Property;
237
+ abstract createStructProperty(name: string, structType: string | StructClass): Promise<StructProperty>;
238
+ abstract createStructPropertySync(name: string, structType: string | StructClass): StructProperty;
239
+ abstract createStructArrayProperty(name: string, structType: string | StructClass): Promise<StructArrayProperty>;
240
+ abstract createStructArrayPropertySync(name: string, structType: string | StructClass): StructArrayProperty;
241
+ abstract deleteProperty(name: string): Promise<void>;
242
+ abstract deletePropertySync(name: string): void;
243
+ }
244
244
  //# sourceMappingURL=Class.d.ts.map