@itwin/ecschema-metadata 5.0.0-dev.106 → 5.0.0-dev.109
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/lib/cjs/Context.d.ts +3 -3
- package/lib/cjs/Context.d.ts.map +1 -1
- package/lib/cjs/Context.js +6 -6
- package/lib/cjs/Context.js.map +1 -1
- package/lib/cjs/DelayedPromise.d.ts +9 -8
- package/lib/cjs/DelayedPromise.d.ts.map +1 -1
- package/lib/cjs/DelayedPromise.js +2 -2
- package/lib/cjs/DelayedPromise.js.map +1 -1
- package/lib/cjs/Deserialization/Helper.d.ts.map +1 -1
- package/lib/cjs/Deserialization/Helper.js +27 -26
- package/lib/cjs/Deserialization/Helper.js.map +1 -1
- package/lib/cjs/Deserialization/JsonParser.js +150 -150
- package/lib/cjs/Deserialization/JsonParser.js.map +1 -1
- package/lib/cjs/Deserialization/JsonProps.d.ts +34 -34
- package/lib/cjs/Deserialization/JsonProps.d.ts.map +1 -1
- package/lib/cjs/Deserialization/JsonProps.js +3 -3
- package/lib/cjs/Deserialization/JsonProps.js.map +1 -1
- package/lib/cjs/Deserialization/XmlParser.js +49 -49
- package/lib/cjs/Deserialization/XmlParser.js.map +1 -1
- package/lib/cjs/Deserialization/XmlSerializationUtils.d.ts +0 -5
- package/lib/cjs/Deserialization/XmlSerializationUtils.d.ts.map +1 -1
- package/lib/cjs/Deserialization/XmlSerializationUtils.js +6 -11
- package/lib/cjs/Deserialization/XmlSerializationUtils.js.map +1 -1
- package/lib/cjs/ECName.d.ts +2 -2
- package/lib/cjs/ECName.js +4 -4
- package/lib/cjs/ECName.js.map +1 -1
- package/lib/cjs/ECObjects.d.ts +23 -11
- package/lib/cjs/ECObjects.d.ts.map +1 -1
- package/lib/cjs/ECObjects.js +47 -24
- package/lib/cjs/ECObjects.js.map +1 -1
- package/lib/cjs/Exception.d.ts +4 -4
- package/lib/cjs/Exception.d.ts.map +1 -1
- package/lib/cjs/Exception.js +60 -60
- package/lib/cjs/Exception.js.map +1 -1
- package/lib/cjs/Interfaces.d.ts +30 -35
- package/lib/cjs/Interfaces.d.ts.map +1 -1
- package/lib/cjs/Interfaces.js.map +1 -1
- package/lib/cjs/Metadata/Class.d.ts +99 -14
- package/lib/cjs/Metadata/Class.d.ts.map +1 -1
- package/lib/cjs/Metadata/Class.js +107 -30
- package/lib/cjs/Metadata/Class.js.map +1 -1
- package/lib/cjs/Metadata/Constant.d.ts +12 -9
- package/lib/cjs/Metadata/Constant.d.ts.map +1 -1
- package/lib/cjs/Metadata/Constant.js +12 -9
- package/lib/cjs/Metadata/Constant.js.map +1 -1
- package/lib/cjs/Metadata/CustomAttribute.d.ts +2 -2
- 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 +5 -3
- package/lib/cjs/Metadata/CustomAttributeClass.d.ts.map +1 -1
- package/lib/cjs/Metadata/CustomAttributeClass.js +7 -5
- package/lib/cjs/Metadata/CustomAttributeClass.js.map +1 -1
- package/lib/cjs/Metadata/EntityClass.d.ts +20 -3
- package/lib/cjs/Metadata/EntityClass.d.ts.map +1 -1
- package/lib/cjs/Metadata/EntityClass.js +30 -12
- package/lib/cjs/Metadata/EntityClass.js.map +1 -1
- package/lib/cjs/Metadata/Enumeration.d.ts +16 -9
- package/lib/cjs/Metadata/Enumeration.d.ts.map +1 -1
- package/lib/cjs/Metadata/Enumeration.js +20 -13
- package/lib/cjs/Metadata/Enumeration.js.map +1 -1
- package/lib/cjs/Metadata/Format.d.ts +32 -24
- package/lib/cjs/Metadata/Format.d.ts.map +1 -1
- package/lib/cjs/Metadata/Format.js +47 -27
- package/lib/cjs/Metadata/Format.js.map +1 -1
- package/lib/cjs/Metadata/InvertedUnit.d.ts +11 -7
- package/lib/cjs/Metadata/InvertedUnit.d.ts.map +1 -1
- package/lib/cjs/Metadata/InvertedUnit.js +16 -10
- package/lib/cjs/Metadata/InvertedUnit.js.map +1 -1
- package/lib/cjs/Metadata/KindOfQuantity.d.ts +24 -15
- package/lib/cjs/Metadata/KindOfQuantity.d.ts.map +1 -1
- package/lib/cjs/Metadata/KindOfQuantity.js +54 -29
- package/lib/cjs/Metadata/KindOfQuantity.js.map +1 -1
- package/lib/cjs/Metadata/Mixin.d.ts +16 -3
- package/lib/cjs/Metadata/Mixin.d.ts.map +1 -1
- package/lib/cjs/Metadata/Mixin.js +20 -7
- package/lib/cjs/Metadata/Mixin.js.map +1 -1
- package/lib/cjs/Metadata/OverrideFormat.d.ts +12 -12
- package/lib/cjs/Metadata/OverrideFormat.d.ts.map +1 -1
- package/lib/cjs/Metadata/OverrideFormat.js +27 -19
- package/lib/cjs/Metadata/OverrideFormat.js.map +1 -1
- package/lib/cjs/Metadata/Phenomenon.d.ts +10 -2
- package/lib/cjs/Metadata/Phenomenon.d.ts.map +1 -1
- package/lib/cjs/Metadata/Phenomenon.js +11 -3
- package/lib/cjs/Metadata/Phenomenon.js.map +1 -1
- package/lib/cjs/Metadata/Property.d.ts +46 -28
- package/lib/cjs/Metadata/Property.d.ts.map +1 -1
- package/lib/cjs/Metadata/Property.js +46 -22
- package/lib/cjs/Metadata/Property.js.map +1 -1
- package/lib/cjs/Metadata/PropertyCategory.d.ts +6 -3
- package/lib/cjs/Metadata/PropertyCategory.d.ts.map +1 -1
- package/lib/cjs/Metadata/PropertyCategory.js +12 -5
- package/lib/cjs/Metadata/PropertyCategory.js.map +1 -1
- package/lib/cjs/Metadata/RelationshipClass.d.ts +48 -25
- package/lib/cjs/Metadata/RelationshipClass.d.ts.map +1 -1
- package/lib/cjs/Metadata/RelationshipClass.js +54 -34
- package/lib/cjs/Metadata/RelationshipClass.js.map +1 -1
- package/lib/cjs/Metadata/Schema.d.ts +50 -28
- package/lib/cjs/Metadata/Schema.d.ts.map +1 -1
- package/lib/cjs/Metadata/Schema.js +64 -42
- package/lib/cjs/Metadata/Schema.js.map +1 -1
- package/lib/cjs/Metadata/SchemaItem.d.ts +10 -19
- package/lib/cjs/Metadata/SchemaItem.d.ts.map +1 -1
- package/lib/cjs/Metadata/SchemaItem.js +12 -20
- package/lib/cjs/Metadata/SchemaItem.js.map +1 -1
- package/lib/cjs/Metadata/Unit.d.ts +17 -21
- package/lib/cjs/Metadata/Unit.d.ts.map +1 -1
- package/lib/cjs/Metadata/Unit.js +20 -22
- package/lib/cjs/Metadata/Unit.js.map +1 -1
- package/lib/cjs/Metadata/UnitSystem.d.ts +3 -1
- package/lib/cjs/Metadata/UnitSystem.d.ts.map +1 -1
- package/lib/cjs/Metadata/UnitSystem.js +4 -2
- package/lib/cjs/Metadata/UnitSystem.js.map +1 -1
- package/lib/cjs/PropertyTypes.d.ts +11 -11
- package/lib/cjs/PropertyTypes.d.ts.map +1 -1
- package/lib/cjs/PropertyTypes.js +28 -20
- package/lib/cjs/PropertyTypes.js.map +1 -1
- package/lib/cjs/SchemaFormatsProvider.d.ts.map +1 -1
- package/lib/cjs/SchemaFormatsProvider.js +5 -4
- package/lib/cjs/SchemaFormatsProvider.js.map +1 -1
- package/lib/cjs/SchemaJsonLocater.d.ts +5 -5
- package/lib/cjs/SchemaJsonLocater.js +4 -4
- package/lib/cjs/SchemaJsonLocater.js.map +1 -1
- package/lib/cjs/SchemaKey.d.ts +6 -6
- package/lib/cjs/SchemaKey.d.ts.map +1 -1
- package/lib/cjs/SchemaKey.js +9 -9
- package/lib/cjs/SchemaKey.js.map +1 -1
- package/lib/cjs/SchemaLoader.d.ts +3 -3
- package/lib/cjs/SchemaLoader.js +4 -4
- package/lib/cjs/SchemaLoader.js.map +1 -1
- package/lib/cjs/SchemaPartVisitorDelegate.d.ts +2 -2
- package/lib/cjs/SchemaPartVisitorDelegate.js +1 -1
- package/lib/cjs/SchemaPartVisitorDelegate.js.map +1 -1
- package/lib/cjs/UnitProvider/SchemaUnitProvider.js.map +1 -1
- package/lib/cjs/ecschema-metadata.d.ts +1 -1
- package/lib/cjs/ecschema-metadata.d.ts.map +1 -1
- package/lib/cjs/ecschema-metadata.js.map +1 -1
- package/lib/cjs/utils/SchemaGraph.js +3 -3
- package/lib/cjs/utils/SchemaGraph.js.map +1 -1
- package/lib/esm/Context.d.ts +3 -3
- package/lib/esm/Context.d.ts.map +1 -1
- package/lib/esm/Context.js +7 -7
- package/lib/esm/Context.js.map +1 -1
- package/lib/esm/DelayedPromise.d.ts +9 -8
- package/lib/esm/DelayedPromise.d.ts.map +1 -1
- package/lib/esm/DelayedPromise.js +2 -2
- package/lib/esm/DelayedPromise.js.map +1 -1
- package/lib/esm/Deserialization/Helper.d.ts.map +1 -1
- package/lib/esm/Deserialization/Helper.js +28 -27
- package/lib/esm/Deserialization/Helper.js.map +1 -1
- package/lib/esm/Deserialization/JsonParser.js +151 -151
- package/lib/esm/Deserialization/JsonParser.js.map +1 -1
- package/lib/esm/Deserialization/JsonProps.d.ts +34 -34
- package/lib/esm/Deserialization/JsonProps.d.ts.map +1 -1
- package/lib/esm/Deserialization/JsonProps.js +3 -3
- package/lib/esm/Deserialization/JsonProps.js.map +1 -1
- package/lib/esm/Deserialization/XmlParser.js +50 -50
- package/lib/esm/Deserialization/XmlParser.js.map +1 -1
- package/lib/esm/Deserialization/XmlSerializationUtils.d.ts +0 -5
- package/lib/esm/Deserialization/XmlSerializationUtils.d.ts.map +1 -1
- package/lib/esm/Deserialization/XmlSerializationUtils.js +7 -12
- package/lib/esm/Deserialization/XmlSerializationUtils.js.map +1 -1
- package/lib/esm/ECName.d.ts +2 -2
- package/lib/esm/ECName.js +5 -5
- package/lib/esm/ECName.js.map +1 -1
- package/lib/esm/ECObjects.d.ts +23 -11
- package/lib/esm/ECObjects.d.ts.map +1 -1
- package/lib/esm/ECObjects.js +48 -25
- package/lib/esm/ECObjects.js.map +1 -1
- package/lib/esm/Exception.d.ts +4 -4
- package/lib/esm/Exception.d.ts.map +1 -1
- package/lib/esm/Exception.js +58 -58
- package/lib/esm/Exception.js.map +1 -1
- package/lib/esm/Interfaces.d.ts +30 -35
- package/lib/esm/Interfaces.d.ts.map +1 -1
- package/lib/esm/Interfaces.js.map +1 -1
- package/lib/esm/Metadata/Class.d.ts +99 -14
- package/lib/esm/Metadata/Class.d.ts.map +1 -1
- package/lib/esm/Metadata/Class.js +108 -31
- package/lib/esm/Metadata/Class.js.map +1 -1
- package/lib/esm/Metadata/Constant.d.ts +12 -9
- package/lib/esm/Metadata/Constant.d.ts.map +1 -1
- package/lib/esm/Metadata/Constant.js +13 -10
- package/lib/esm/Metadata/Constant.js.map +1 -1
- package/lib/esm/Metadata/CustomAttribute.d.ts +2 -2
- 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 +5 -3
- package/lib/esm/Metadata/CustomAttributeClass.d.ts.map +1 -1
- package/lib/esm/Metadata/CustomAttributeClass.js +8 -6
- package/lib/esm/Metadata/CustomAttributeClass.js.map +1 -1
- package/lib/esm/Metadata/EntityClass.d.ts +20 -3
- package/lib/esm/Metadata/EntityClass.d.ts.map +1 -1
- package/lib/esm/Metadata/EntityClass.js +31 -13
- package/lib/esm/Metadata/EntityClass.js.map +1 -1
- package/lib/esm/Metadata/Enumeration.d.ts +16 -9
- package/lib/esm/Metadata/Enumeration.d.ts.map +1 -1
- package/lib/esm/Metadata/Enumeration.js +21 -14
- package/lib/esm/Metadata/Enumeration.js.map +1 -1
- package/lib/esm/Metadata/Format.d.ts +32 -24
- package/lib/esm/Metadata/Format.d.ts.map +1 -1
- package/lib/esm/Metadata/Format.js +48 -28
- package/lib/esm/Metadata/Format.js.map +1 -1
- package/lib/esm/Metadata/InvertedUnit.d.ts +11 -7
- package/lib/esm/Metadata/InvertedUnit.d.ts.map +1 -1
- package/lib/esm/Metadata/InvertedUnit.js +17 -11
- package/lib/esm/Metadata/InvertedUnit.js.map +1 -1
- package/lib/esm/Metadata/KindOfQuantity.d.ts +24 -15
- package/lib/esm/Metadata/KindOfQuantity.d.ts.map +1 -1
- package/lib/esm/Metadata/KindOfQuantity.js +55 -30
- package/lib/esm/Metadata/KindOfQuantity.js.map +1 -1
- package/lib/esm/Metadata/Mixin.d.ts +16 -3
- package/lib/esm/Metadata/Mixin.d.ts.map +1 -1
- package/lib/esm/Metadata/Mixin.js +21 -8
- package/lib/esm/Metadata/Mixin.js.map +1 -1
- package/lib/esm/Metadata/OverrideFormat.d.ts +12 -12
- package/lib/esm/Metadata/OverrideFormat.d.ts.map +1 -1
- package/lib/esm/Metadata/OverrideFormat.js +28 -20
- package/lib/esm/Metadata/OverrideFormat.js.map +1 -1
- package/lib/esm/Metadata/Phenomenon.d.ts +10 -2
- package/lib/esm/Metadata/Phenomenon.d.ts.map +1 -1
- package/lib/esm/Metadata/Phenomenon.js +12 -4
- package/lib/esm/Metadata/Phenomenon.js.map +1 -1
- package/lib/esm/Metadata/Property.d.ts +46 -28
- package/lib/esm/Metadata/Property.d.ts.map +1 -1
- package/lib/esm/Metadata/Property.js +47 -23
- package/lib/esm/Metadata/Property.js.map +1 -1
- package/lib/esm/Metadata/PropertyCategory.d.ts +6 -3
- package/lib/esm/Metadata/PropertyCategory.d.ts.map +1 -1
- package/lib/esm/Metadata/PropertyCategory.js +13 -6
- package/lib/esm/Metadata/PropertyCategory.js.map +1 -1
- package/lib/esm/Metadata/RelationshipClass.d.ts +48 -25
- package/lib/esm/Metadata/RelationshipClass.d.ts.map +1 -1
- package/lib/esm/Metadata/RelationshipClass.js +55 -35
- package/lib/esm/Metadata/RelationshipClass.js.map +1 -1
- package/lib/esm/Metadata/Schema.d.ts +50 -28
- package/lib/esm/Metadata/Schema.d.ts.map +1 -1
- package/lib/esm/Metadata/Schema.js +65 -43
- package/lib/esm/Metadata/Schema.js.map +1 -1
- package/lib/esm/Metadata/SchemaItem.d.ts +10 -19
- package/lib/esm/Metadata/SchemaItem.d.ts.map +1 -1
- package/lib/esm/Metadata/SchemaItem.js +13 -21
- package/lib/esm/Metadata/SchemaItem.js.map +1 -1
- package/lib/esm/Metadata/Unit.d.ts +17 -21
- package/lib/esm/Metadata/Unit.d.ts.map +1 -1
- package/lib/esm/Metadata/Unit.js +21 -23
- package/lib/esm/Metadata/Unit.js.map +1 -1
- package/lib/esm/Metadata/UnitSystem.d.ts +3 -1
- package/lib/esm/Metadata/UnitSystem.d.ts.map +1 -1
- package/lib/esm/Metadata/UnitSystem.js +5 -3
- package/lib/esm/Metadata/UnitSystem.js.map +1 -1
- package/lib/esm/PropertyTypes.d.ts +11 -11
- package/lib/esm/PropertyTypes.d.ts.map +1 -1
- package/lib/esm/PropertyTypes.js +29 -21
- package/lib/esm/PropertyTypes.js.map +1 -1
- package/lib/esm/SchemaFormatsProvider.d.ts.map +1 -1
- package/lib/esm/SchemaFormatsProvider.js +5 -4
- package/lib/esm/SchemaFormatsProvider.js.map +1 -1
- package/lib/esm/SchemaJsonLocater.d.ts +5 -5
- package/lib/esm/SchemaJsonLocater.js +4 -4
- package/lib/esm/SchemaJsonLocater.js.map +1 -1
- package/lib/esm/SchemaKey.d.ts +6 -6
- package/lib/esm/SchemaKey.d.ts.map +1 -1
- package/lib/esm/SchemaKey.js +10 -10
- package/lib/esm/SchemaKey.js.map +1 -1
- package/lib/esm/SchemaLoader.d.ts +3 -3
- package/lib/esm/SchemaLoader.js +5 -5
- package/lib/esm/SchemaLoader.js.map +1 -1
- package/lib/esm/SchemaPartVisitorDelegate.d.ts +2 -2
- package/lib/esm/SchemaPartVisitorDelegate.js +1 -1
- package/lib/esm/SchemaPartVisitorDelegate.js.map +1 -1
- package/lib/esm/UnitProvider/SchemaUnitProvider.js.map +1 -1
- package/lib/esm/ecschema-metadata.d.ts +1 -1
- package/lib/esm/ecschema-metadata.d.ts.map +1 -1
- package/lib/esm/ecschema-metadata.js.map +1 -1
- package/lib/esm/utils/SchemaGraph.js +4 -4
- package/lib/esm/utils/SchemaGraph.js.map +1 -1
- package/package.json +6 -6
|
@@ -11,25 +11,30 @@ import { Schema } from "./Schema";
|
|
|
11
11
|
import { SchemaItem } from "./SchemaItem";
|
|
12
12
|
/**
|
|
13
13
|
* A common abstract class for all of the ECClass types.
|
|
14
|
-
* @
|
|
14
|
+
* @public @preview
|
|
15
15
|
*/
|
|
16
16
|
export declare abstract class ECClass extends SchemaItem implements CustomAttributeContainerProps {
|
|
17
|
+
/** @internal */
|
|
17
18
|
static get schemaItemType(): SupportedSchemaItemType;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
private _modifier;
|
|
20
|
+
private _baseClass?;
|
|
21
|
+
private _derivedClasses?;
|
|
22
|
+
private _properties?;
|
|
22
23
|
private _customAttributes?;
|
|
23
24
|
private _mergedPropertyCache?;
|
|
24
25
|
get modifier(): ECClassModifier;
|
|
25
26
|
get customAttributes(): CustomAttributeSet | undefined;
|
|
27
|
+
/** @internal */
|
|
26
28
|
constructor(schema: Schema, name: string, modifier?: ECClassModifier);
|
|
27
29
|
/**
|
|
28
30
|
* Gets the base class if it exists, otherwise returns undefined.
|
|
29
31
|
*/
|
|
30
32
|
get baseClass(): LazyLoadedECClass | undefined;
|
|
33
|
+
getBaseClassSync(): ECClass | undefined;
|
|
31
34
|
/**
|
|
32
35
|
* Sets the base class of the ECClass. Pass undefined to 'remove' the base class.
|
|
36
|
+
*
|
|
37
|
+
* @internal
|
|
33
38
|
*/
|
|
34
39
|
protected setBaseClass(baseClass: LazyLoadedECClass | undefined): Promise<void>;
|
|
35
40
|
/**
|
|
@@ -41,21 +46,22 @@ export declare abstract class ECClass extends SchemaItem implements CustomAttrib
|
|
|
41
46
|
* Convenience method for adding an already loaded ECProperty used by create*Property methods.
|
|
42
47
|
* @param prop The property to add.
|
|
43
48
|
* @return The property that was added.
|
|
49
|
+
*
|
|
50
|
+
* @internal
|
|
44
51
|
*/
|
|
45
52
|
protected addProperty<T extends Property>(prop: T): T;
|
|
46
53
|
/**
|
|
47
54
|
* Deletes a property from within this class.
|
|
48
55
|
* @param name The property name to delete, lookup is case-insensitive
|
|
49
|
-
* @
|
|
56
|
+
* @internal
|
|
50
57
|
*/
|
|
51
58
|
protected deleteProperty(name: string): Promise<void>;
|
|
52
59
|
/**
|
|
53
60
|
* Deletes a property from within this class.
|
|
54
61
|
* @param name The property name to delete, lookup is case-insensitive
|
|
55
|
-
* @
|
|
62
|
+
* @internal
|
|
56
63
|
*/
|
|
57
64
|
protected deletePropertySync(name: string): void;
|
|
58
|
-
getBaseClassSync(): ECClass | undefined;
|
|
59
65
|
/**
|
|
60
66
|
* Searches, case-insensitive, for an ECProperty with given the name on this class and, by default, on
|
|
61
67
|
* all base classes. Set excludeInherited to 'true' to only search the local class.
|
|
@@ -83,7 +89,9 @@ export declare abstract class ECClass extends SchemaItem implements CustomAttrib
|
|
|
83
89
|
* Creates a PrimitiveECProperty.
|
|
84
90
|
* @param name The name of property to create.
|
|
85
91
|
* @param primitiveType The primitive type of property to create. If not provided the default is PrimitiveType.Integer
|
|
86
|
-
* @throws
|
|
92
|
+
* @throws ECSchemaStatus DuplicateProperty: thrown if a property with the same name already exists in the class.
|
|
93
|
+
*
|
|
94
|
+
* @internal
|
|
87
95
|
*/
|
|
88
96
|
protected createPrimitiveProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveProperty>;
|
|
89
97
|
protected createPrimitiveProperty(name: string, primitiveType: Enumeration): Promise<EnumerationProperty>;
|
|
@@ -91,7 +99,9 @@ export declare abstract class ECClass extends SchemaItem implements CustomAttrib
|
|
|
91
99
|
* Creates a PrimitiveECProperty.
|
|
92
100
|
* @param name The name of property to create.
|
|
93
101
|
* @param primitiveType The primitive type of property to create. If not provided the default is PrimitiveType.Integer
|
|
94
|
-
* @throws
|
|
102
|
+
* @throws ECSchemaStatus DuplicateProperty: thrown if a property with the same name already exists in the class.
|
|
103
|
+
*
|
|
104
|
+
* @internal
|
|
95
105
|
*/
|
|
96
106
|
protected createPrimitivePropertySync(name: string, primitiveType: PrimitiveType): PrimitiveProperty;
|
|
97
107
|
protected createPrimitivePropertySync(name: string, primitiveType: Enumeration): EnumerationProperty;
|
|
@@ -99,6 +109,8 @@ export declare abstract class ECClass extends SchemaItem implements CustomAttrib
|
|
|
99
109
|
* Creates a PrimitiveArrayECProperty.
|
|
100
110
|
* @param name The name of property to create.
|
|
101
111
|
* @param primitiveType The primitive type of property to create. If not provided the default is PrimitiveType.Integer
|
|
112
|
+
*
|
|
113
|
+
* @internal
|
|
102
114
|
*/
|
|
103
115
|
protected createPrimitiveArrayProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveArrayProperty>;
|
|
104
116
|
protected createPrimitiveArrayProperty(name: string, primitiveType: Enumeration): Promise<EnumerationArrayProperty>;
|
|
@@ -106,6 +118,8 @@ export declare abstract class ECClass extends SchemaItem implements CustomAttrib
|
|
|
106
118
|
* Creates a PrimitiveArrayECProperty.
|
|
107
119
|
* @param name The name of property to create.
|
|
108
120
|
* @param primitiveType The primitive type of property to create. If not provided the default is PrimitiveType.Integer
|
|
121
|
+
*
|
|
122
|
+
* @internal
|
|
109
123
|
*/
|
|
110
124
|
protected createPrimitiveArrayPropertySync(name: string, primitiveType: PrimitiveType): PrimitiveArrayProperty;
|
|
111
125
|
protected createPrimitiveArrayPropertySync(name: string, primitiveType: Enumeration): EnumerationArrayProperty;
|
|
@@ -113,29 +127,69 @@ export declare abstract class ECClass extends SchemaItem implements CustomAttrib
|
|
|
113
127
|
*
|
|
114
128
|
* @param name The name of property to create.
|
|
115
129
|
* @param structType The struct type of property to create.
|
|
130
|
+
*
|
|
131
|
+
* @internal
|
|
116
132
|
*/
|
|
117
133
|
protected createStructProperty(name: string, structType: string | StructClass): Promise<StructProperty>;
|
|
118
134
|
/**
|
|
119
135
|
*
|
|
120
136
|
* @param name The name of property to create.
|
|
121
137
|
* @param structType The struct type of property to create.
|
|
138
|
+
*
|
|
139
|
+
* @internal
|
|
122
140
|
*/
|
|
123
141
|
protected createStructPropertySync(name: string, structType: string | StructClass): StructProperty;
|
|
124
142
|
/**
|
|
125
143
|
*
|
|
126
144
|
* @param name
|
|
127
145
|
* @param type
|
|
146
|
+
*
|
|
147
|
+
* @internal
|
|
128
148
|
*/
|
|
129
149
|
protected createStructArrayProperty(name: string, structType: string | StructClass): Promise<StructArrayProperty>;
|
|
130
150
|
/**
|
|
131
151
|
*
|
|
132
152
|
* @param name
|
|
133
153
|
* @param type
|
|
154
|
+
*
|
|
155
|
+
* @internal
|
|
134
156
|
*/
|
|
135
157
|
protected createStructArrayPropertySync(name: string, structType: string | StructClass): StructArrayProperty;
|
|
158
|
+
/**
|
|
159
|
+
*
|
|
160
|
+
* @param structType
|
|
161
|
+
* @param schema
|
|
162
|
+
* @returns
|
|
163
|
+
*
|
|
164
|
+
* @internal
|
|
165
|
+
*/
|
|
136
166
|
protected loadStructType(structType: string | StructClass | undefined, schema: Schema): Promise<StructClass>;
|
|
167
|
+
/**
|
|
168
|
+
*
|
|
169
|
+
* @param structType
|
|
170
|
+
* @param schema
|
|
171
|
+
* @returns
|
|
172
|
+
*
|
|
173
|
+
* @internal
|
|
174
|
+
*/
|
|
137
175
|
protected loadStructTypeSync(structType: string | StructClass | undefined, schema: Schema): StructClass;
|
|
176
|
+
/**
|
|
177
|
+
*
|
|
178
|
+
* @param primitiveType
|
|
179
|
+
* @param schema
|
|
180
|
+
* @returns
|
|
181
|
+
*
|
|
182
|
+
* @internal
|
|
183
|
+
*/
|
|
138
184
|
protected loadPrimitiveType(primitiveType: string | PrimitiveType | Enumeration | undefined, schema: Schema): Promise<PrimitiveType | Enumeration>;
|
|
185
|
+
/**
|
|
186
|
+
*
|
|
187
|
+
* @param primitiveType
|
|
188
|
+
* @param schema
|
|
189
|
+
* @returns
|
|
190
|
+
*
|
|
191
|
+
* @internal
|
|
192
|
+
*/
|
|
139
193
|
protected loadPrimitiveTypeSync(primitiveType: string | PrimitiveType | Enumeration | undefined, schema: Schema): PrimitiveType | Enumeration;
|
|
140
194
|
/**
|
|
141
195
|
* Save this Classes properties to an object for serializing to JSON.
|
|
@@ -147,6 +201,12 @@ export declare abstract class ECClass extends SchemaItem implements CustomAttrib
|
|
|
147
201
|
toXml(schemaXml: Document): Promise<Element>;
|
|
148
202
|
fromJSONSync(classProps: ClassProps): void;
|
|
149
203
|
fromJSON(classProps: ClassProps): Promise<void>;
|
|
204
|
+
/**
|
|
205
|
+
*
|
|
206
|
+
* @param customAttribute
|
|
207
|
+
*
|
|
208
|
+
* @internal
|
|
209
|
+
*/
|
|
150
210
|
protected addCustomAttribute(customAttribute: CustomAttribute): void;
|
|
151
211
|
/**
|
|
152
212
|
* Iterates (recursively) over all base classes and mixins, in "property override" order.
|
|
@@ -154,8 +214,33 @@ export declare abstract class ECClass extends SchemaItem implements CustomAttrib
|
|
|
154
214
|
*/
|
|
155
215
|
getAllBaseClasses(): AsyncIterable<ECClass>;
|
|
156
216
|
getAllBaseClassesSync(): Iterable<AnyClass>;
|
|
217
|
+
/**
|
|
218
|
+
*
|
|
219
|
+
* @param target
|
|
220
|
+
* @param existingValues
|
|
221
|
+
* @param propertiesToMerge
|
|
222
|
+
* @param overwriteExisting
|
|
223
|
+
*
|
|
224
|
+
* @internal
|
|
225
|
+
*/
|
|
157
226
|
protected static mergeProperties(target: Property[], existingValues: Map<string, number>, propertiesToMerge: Iterable<Property>, overwriteExisting: boolean): void;
|
|
227
|
+
/**
|
|
228
|
+
*
|
|
229
|
+
* @param result
|
|
230
|
+
* @param existingValues
|
|
231
|
+
* @returns
|
|
232
|
+
*
|
|
233
|
+
* @internal
|
|
234
|
+
*/
|
|
158
235
|
protected buildPropertyCache(result: Property[], existingValues?: Map<string, number>): Promise<void>;
|
|
236
|
+
/**
|
|
237
|
+
*
|
|
238
|
+
* @param result
|
|
239
|
+
* @param existingValues
|
|
240
|
+
* @returns
|
|
241
|
+
*
|
|
242
|
+
* @internal
|
|
243
|
+
*/
|
|
159
244
|
protected buildPropertyCacheSync(result: Property[], existingValues?: Map<string, number>): void;
|
|
160
245
|
/**
|
|
161
246
|
* Clears all caches on this object. This is called implicitly for this class,
|
|
@@ -221,9 +306,9 @@ export declare abstract class ECClass extends SchemaItem implements CustomAttrib
|
|
|
221
306
|
*/
|
|
222
307
|
static isECClass(object: any): object is ECClass;
|
|
223
308
|
/**
|
|
224
|
-
* @alpha
|
|
225
309
|
* A setter method for the ECClass modifier, used specifically for schema editing.
|
|
226
310
|
* @param modifier
|
|
311
|
+
* @internal
|
|
227
312
|
*/
|
|
228
313
|
protected setModifier(modifier: ECClassModifier): void;
|
|
229
314
|
/**
|
|
@@ -243,17 +328,16 @@ export declare abstract class ECClass extends SchemaItem implements CustomAttrib
|
|
|
243
328
|
}
|
|
244
329
|
/**
|
|
245
330
|
* A Typescript class representation of an ECStructClass.
|
|
246
|
-
* @
|
|
331
|
+
* @public @preview
|
|
247
332
|
*/
|
|
248
333
|
export declare class StructClass extends ECClass {
|
|
249
334
|
/**
|
|
250
335
|
* Get the type of item represented by this instance
|
|
251
|
-
* @beta
|
|
252
336
|
*/
|
|
253
337
|
readonly schemaItemType: SchemaItemType;
|
|
254
338
|
/**
|
|
255
339
|
* Get the type of item represented by this class
|
|
256
|
-
* @
|
|
340
|
+
* @internal
|
|
257
341
|
*/
|
|
258
342
|
static get schemaItemType(): SchemaItemType;
|
|
259
343
|
/**
|
|
@@ -266,6 +350,7 @@ export declare class StructClass extends ECClass {
|
|
|
266
350
|
* Type assertion to check if the SchemaItem is of type StructClass.
|
|
267
351
|
* @param item The SchemaItem to check.
|
|
268
352
|
* @returns The item cast to StructClass if it is a StructClass, undefined otherwise.
|
|
353
|
+
* @internal
|
|
269
354
|
*/
|
|
270
355
|
static assertIsStructClass(item?: SchemaItem): asserts item is StructClass;
|
|
271
356
|
}
|
|
@@ -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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,UAAU,EAAE,MAAM,GAAG,WAAW,GAAG,OAAO,CAAC,cAAc,CAAC;aAC7F,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,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"}
|
|
@@ -9,7 +9,7 @@ import { assert } from "@itwin/core-bentley";
|
|
|
9
9
|
import { DelayedPromiseWithProps } from "../DelayedPromise";
|
|
10
10
|
import { XmlSerializationUtils } from "../Deserialization/XmlSerializationUtils";
|
|
11
11
|
import { AbstractSchemaItemType, classModifierToString, ECClassModifier, parseClassModifier, parsePrimitiveType, PrimitiveType, SchemaItemType } from "../ECObjects";
|
|
12
|
-
import {
|
|
12
|
+
import { ECSchemaError, ECSchemaStatus } from "../Exception";
|
|
13
13
|
import { SchemaItemKey, SchemaKey } from "../SchemaKey";
|
|
14
14
|
import { serializeCustomAttributes } from "./CustomAttribute";
|
|
15
15
|
import { Enumeration } from "./Enumeration";
|
|
@@ -18,9 +18,10 @@ import { SchemaItem } from "./SchemaItem";
|
|
|
18
18
|
import { SchemaReadHelper } from "../Deserialization/Helper";
|
|
19
19
|
/**
|
|
20
20
|
* A common abstract class for all of the ECClass types.
|
|
21
|
-
* @
|
|
21
|
+
* @public @preview
|
|
22
22
|
*/
|
|
23
23
|
export class ECClass extends SchemaItem {
|
|
24
|
+
/** @internal */
|
|
24
25
|
static get schemaItemType() { return AbstractSchemaItemType.Class; } // need this so getItem("name", ECClass) in schema works
|
|
25
26
|
_modifier;
|
|
26
27
|
_baseClass;
|
|
@@ -30,6 +31,7 @@ export class ECClass extends SchemaItem {
|
|
|
30
31
|
_mergedPropertyCache;
|
|
31
32
|
get modifier() { return this._modifier; }
|
|
32
33
|
get customAttributes() { return this._customAttributes; }
|
|
34
|
+
/** @internal */
|
|
33
35
|
constructor(schema, name, modifier) {
|
|
34
36
|
super(schema, name);
|
|
35
37
|
if (modifier)
|
|
@@ -43,8 +45,16 @@ export class ECClass extends SchemaItem {
|
|
|
43
45
|
get baseClass() {
|
|
44
46
|
return this._baseClass;
|
|
45
47
|
}
|
|
48
|
+
getBaseClassSync() {
|
|
49
|
+
if (!this.baseClass) {
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|
|
52
|
+
return this.schema.lookupItemSync(this.baseClass, ECClass);
|
|
53
|
+
}
|
|
46
54
|
/**
|
|
47
55
|
* Sets the base class of the ECClass. Pass undefined to 'remove' the base class.
|
|
56
|
+
*
|
|
57
|
+
* @internal
|
|
48
58
|
*/
|
|
49
59
|
async setBaseClass(baseClass) {
|
|
50
60
|
const oldBaseClass = this._baseClass;
|
|
@@ -67,6 +77,8 @@ export class ECClass extends SchemaItem {
|
|
|
67
77
|
* Convenience method for adding an already loaded ECProperty used by create*Property methods.
|
|
68
78
|
* @param prop The property to add.
|
|
69
79
|
* @return The property that was added.
|
|
80
|
+
*
|
|
81
|
+
* @internal
|
|
70
82
|
*/
|
|
71
83
|
addProperty(prop) {
|
|
72
84
|
if (!this._properties)
|
|
@@ -78,7 +90,7 @@ export class ECClass extends SchemaItem {
|
|
|
78
90
|
/**
|
|
79
91
|
* Deletes a property from within this class.
|
|
80
92
|
* @param name The property name to delete, lookup is case-insensitive
|
|
81
|
-
* @
|
|
93
|
+
* @internal
|
|
82
94
|
*/
|
|
83
95
|
async deleteProperty(name) {
|
|
84
96
|
if (this._properties) {
|
|
@@ -92,7 +104,7 @@ export class ECClass extends SchemaItem {
|
|
|
92
104
|
/**
|
|
93
105
|
* Deletes a property from within this class.
|
|
94
106
|
* @param name The property name to delete, lookup is case-insensitive
|
|
95
|
-
* @
|
|
107
|
+
* @internal
|
|
96
108
|
*/
|
|
97
109
|
deletePropertySync(name) {
|
|
98
110
|
if (this._properties) {
|
|
@@ -103,12 +115,6 @@ export class ECClass extends SchemaItem {
|
|
|
103
115
|
}
|
|
104
116
|
}
|
|
105
117
|
}
|
|
106
|
-
getBaseClassSync() {
|
|
107
|
-
if (!this.baseClass) {
|
|
108
|
-
return undefined;
|
|
109
|
-
}
|
|
110
|
-
return this.schema.lookupItemSync(this.baseClass, ECClass);
|
|
111
|
-
}
|
|
112
118
|
/**
|
|
113
119
|
* Searches, case-insensitive, for an ECProperty with given the name on this class and, by default, on
|
|
114
120
|
* all base classes. Set excludeInherited to 'true' to only search the local class.
|
|
@@ -167,7 +173,7 @@ export class ECClass extends SchemaItem {
|
|
|
167
173
|
}
|
|
168
174
|
async createPrimitiveProperty(name, primitiveType) {
|
|
169
175
|
if (await this.getProperty(name, true))
|
|
170
|
-
throw new
|
|
176
|
+
throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);
|
|
171
177
|
const propType = await this.loadPrimitiveType(primitiveType, this.schema);
|
|
172
178
|
if (typeof (propType) === "number")
|
|
173
179
|
return this.addProperty(new PrimitiveProperty(this, name, propType));
|
|
@@ -175,7 +181,7 @@ export class ECClass extends SchemaItem {
|
|
|
175
181
|
}
|
|
176
182
|
createPrimitivePropertySync(name, primitiveType) {
|
|
177
183
|
if (this.getPropertySync(name, true))
|
|
178
|
-
throw new
|
|
184
|
+
throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);
|
|
179
185
|
const propType = this.loadPrimitiveTypeSync(primitiveType, this.schema);
|
|
180
186
|
if (typeof (propType) === "number")
|
|
181
187
|
return this.addProperty(new PrimitiveProperty(this, name, propType));
|
|
@@ -183,7 +189,7 @@ export class ECClass extends SchemaItem {
|
|
|
183
189
|
}
|
|
184
190
|
async createPrimitiveArrayProperty(name, primitiveType) {
|
|
185
191
|
if (await this.getProperty(name, true))
|
|
186
|
-
throw new
|
|
192
|
+
throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);
|
|
187
193
|
const propType = await this.loadPrimitiveType(primitiveType, this.schema);
|
|
188
194
|
if (typeof (propType) === "number")
|
|
189
195
|
return this.addProperty(new PrimitiveArrayProperty(this, name, propType));
|
|
@@ -191,7 +197,7 @@ export class ECClass extends SchemaItem {
|
|
|
191
197
|
}
|
|
192
198
|
createPrimitiveArrayPropertySync(name, primitiveType) {
|
|
193
199
|
if (this.getPropertySync(name, true))
|
|
194
|
-
throw new
|
|
200
|
+
throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);
|
|
195
201
|
const propType = this.loadPrimitiveTypeSync(primitiveType, this.schema);
|
|
196
202
|
if (typeof (propType) === "number")
|
|
197
203
|
return this.addProperty(new PrimitiveArrayProperty(this, name, propType));
|
|
@@ -201,42 +207,58 @@ export class ECClass extends SchemaItem {
|
|
|
201
207
|
*
|
|
202
208
|
* @param name The name of property to create.
|
|
203
209
|
* @param structType The struct type of property to create.
|
|
210
|
+
*
|
|
211
|
+
* @internal
|
|
204
212
|
*/
|
|
205
213
|
async createStructProperty(name, structType) {
|
|
206
214
|
if (await this.getProperty(name, true))
|
|
207
|
-
throw new
|
|
215
|
+
throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);
|
|
208
216
|
return this.addProperty(new StructProperty(this, name, await this.loadStructType(structType, this.schema)));
|
|
209
217
|
}
|
|
210
218
|
/**
|
|
211
219
|
*
|
|
212
220
|
* @param name The name of property to create.
|
|
213
221
|
* @param structType The struct type of property to create.
|
|
222
|
+
*
|
|
223
|
+
* @internal
|
|
214
224
|
*/
|
|
215
225
|
createStructPropertySync(name, structType) {
|
|
216
226
|
if (this.getPropertySync(name, true))
|
|
217
|
-
throw new
|
|
227
|
+
throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);
|
|
218
228
|
return this.addProperty(new StructProperty(this, name, this.loadStructTypeSync(structType, this.schema)));
|
|
219
229
|
}
|
|
220
230
|
/**
|
|
221
231
|
*
|
|
222
232
|
* @param name
|
|
223
233
|
* @param type
|
|
234
|
+
*
|
|
235
|
+
* @internal
|
|
224
236
|
*/
|
|
225
237
|
async createStructArrayProperty(name, structType) {
|
|
226
238
|
if (await this.getProperty(name, true))
|
|
227
|
-
throw new
|
|
239
|
+
throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);
|
|
228
240
|
return this.addProperty(new StructArrayProperty(this, name, await this.loadStructType(structType, this.schema)));
|
|
229
241
|
}
|
|
230
242
|
/**
|
|
231
243
|
*
|
|
232
244
|
* @param name
|
|
233
245
|
* @param type
|
|
246
|
+
*
|
|
247
|
+
* @internal
|
|
234
248
|
*/
|
|
235
249
|
createStructArrayPropertySync(name, structType) {
|
|
236
250
|
if (this.getPropertySync(name, true))
|
|
237
|
-
throw new
|
|
251
|
+
throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);
|
|
238
252
|
return this.addProperty(new StructArrayProperty(this, name, this.loadStructTypeSync(structType, this.schema)));
|
|
239
253
|
}
|
|
254
|
+
/**
|
|
255
|
+
*
|
|
256
|
+
* @param structType
|
|
257
|
+
* @param schema
|
|
258
|
+
* @returns
|
|
259
|
+
*
|
|
260
|
+
* @internal
|
|
261
|
+
*/
|
|
240
262
|
async loadStructType(structType, schema) {
|
|
241
263
|
let correctType;
|
|
242
264
|
if (typeof (structType) === "string") {
|
|
@@ -245,9 +267,17 @@ export class ECClass extends SchemaItem {
|
|
|
245
267
|
else
|
|
246
268
|
correctType = structType;
|
|
247
269
|
if (!correctType)
|
|
248
|
-
throw new
|
|
270
|
+
throw new ECSchemaError(ECSchemaStatus.InvalidType, `The provided Struct type, ${structType}, is not a valid StructClass.`);
|
|
249
271
|
return correctType;
|
|
250
272
|
}
|
|
273
|
+
/**
|
|
274
|
+
*
|
|
275
|
+
* @param structType
|
|
276
|
+
* @param schema
|
|
277
|
+
* @returns
|
|
278
|
+
*
|
|
279
|
+
* @internal
|
|
280
|
+
*/
|
|
251
281
|
loadStructTypeSync(structType, schema) {
|
|
252
282
|
let correctType;
|
|
253
283
|
if (typeof (structType) === "string") {
|
|
@@ -256,9 +286,17 @@ export class ECClass extends SchemaItem {
|
|
|
256
286
|
else
|
|
257
287
|
correctType = structType;
|
|
258
288
|
if (!correctType)
|
|
259
|
-
throw new
|
|
289
|
+
throw new ECSchemaError(ECSchemaStatus.InvalidType, `The provided Struct type, ${structType}, is not a valid StructClass.`);
|
|
260
290
|
return correctType;
|
|
261
291
|
}
|
|
292
|
+
/**
|
|
293
|
+
*
|
|
294
|
+
* @param primitiveType
|
|
295
|
+
* @param schema
|
|
296
|
+
* @returns
|
|
297
|
+
*
|
|
298
|
+
* @internal
|
|
299
|
+
*/
|
|
262
300
|
async loadPrimitiveType(primitiveType, schema) {
|
|
263
301
|
if (primitiveType === undefined)
|
|
264
302
|
return PrimitiveType.Integer;
|
|
@@ -268,14 +306,22 @@ export class ECClass extends SchemaItem {
|
|
|
268
306
|
resolvedType = await schema.lookupItem(primitiveType, Enumeration);
|
|
269
307
|
}
|
|
270
308
|
if (resolvedType === undefined)
|
|
271
|
-
throw new
|
|
309
|
+
throw new ECSchemaError(ECSchemaStatus.InvalidType, `The provided primitive type, ${primitiveType}, is not a valid PrimitiveType or Enumeration.`);
|
|
272
310
|
// If resolvedType is a SchemaItem, make sure it is an Enumeration- if not, throw an error
|
|
273
311
|
if (typeof (resolvedType) !== "number" && resolvedType.schemaItemType !== SchemaItemType.Enumeration)
|
|
274
|
-
throw new
|
|
312
|
+
throw new ECSchemaError(ECSchemaStatus.InvalidType, `The provided primitive type, ${primitiveType}, is not a valid PrimitiveType or Enumeration.`);
|
|
275
313
|
return resolvedType;
|
|
276
314
|
}
|
|
277
315
|
return primitiveType;
|
|
278
316
|
}
|
|
317
|
+
/**
|
|
318
|
+
*
|
|
319
|
+
* @param primitiveType
|
|
320
|
+
* @param schema
|
|
321
|
+
* @returns
|
|
322
|
+
*
|
|
323
|
+
* @internal
|
|
324
|
+
*/
|
|
279
325
|
loadPrimitiveTypeSync(primitiveType, schema) {
|
|
280
326
|
if (primitiveType === undefined)
|
|
281
327
|
return PrimitiveType.Integer;
|
|
@@ -285,7 +331,7 @@ export class ECClass extends SchemaItem {
|
|
|
285
331
|
resolvedType = schema.lookupItemSync(primitiveType, Enumeration);
|
|
286
332
|
}
|
|
287
333
|
if (resolvedType === undefined)
|
|
288
|
-
throw new
|
|
334
|
+
throw new ECSchemaError(ECSchemaStatus.InvalidType, `The provided primitive type, ${primitiveType}, is not a valid PrimitiveType or Enumeration.`);
|
|
289
335
|
return resolvedType;
|
|
290
336
|
}
|
|
291
337
|
return primitiveType;
|
|
@@ -346,7 +392,7 @@ export class ECClass extends SchemaItem {
|
|
|
346
392
|
if (SchemaReadHelper.isECSpecVersionNewer({ readVersion: classProps.originalECSpecMajorVersion, writeVersion: classProps.originalECSpecMinorVersion }))
|
|
347
393
|
this._modifier = ECClassModifier.None;
|
|
348
394
|
else
|
|
349
|
-
throw new
|
|
395
|
+
throw new ECSchemaError(ECSchemaStatus.InvalidModifier, `The string '${classProps.modifier}' is not a valid ECClassModifier.`);
|
|
350
396
|
}
|
|
351
397
|
else {
|
|
352
398
|
this._modifier = modifier;
|
|
@@ -355,14 +401,14 @@ export class ECClass extends SchemaItem {
|
|
|
355
401
|
if (undefined !== classProps.baseClass) {
|
|
356
402
|
const ecClassSchemaItemKey = this.schema.getSchemaItemKey(classProps.baseClass);
|
|
357
403
|
if (!ecClassSchemaItemKey)
|
|
358
|
-
throw new
|
|
404
|
+
throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `Unable to locate the baseClass ${classProps.baseClass}.`);
|
|
359
405
|
const baseClass = this.schema.lookupItemSync(ecClassSchemaItemKey);
|
|
360
406
|
let lazyBase;
|
|
361
407
|
if (!baseClass) {
|
|
362
408
|
lazyBase = new DelayedPromiseWithProps(ecClassSchemaItemKey, async () => {
|
|
363
409
|
const baseItem = await this.schema.lookupItem(ecClassSchemaItemKey);
|
|
364
410
|
if (undefined === baseItem || !ECClass.isECClass(baseItem))
|
|
365
|
-
throw new
|
|
411
|
+
throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `Unable to locate the baseClass ${classProps.baseClass}.`);
|
|
366
412
|
return baseItem;
|
|
367
413
|
});
|
|
368
414
|
}
|
|
@@ -380,6 +426,12 @@ export class ECClass extends SchemaItem {
|
|
|
380
426
|
async fromJSON(classProps) {
|
|
381
427
|
this.fromJSONSync(classProps);
|
|
382
428
|
}
|
|
429
|
+
/**
|
|
430
|
+
*
|
|
431
|
+
* @param customAttribute
|
|
432
|
+
*
|
|
433
|
+
* @internal
|
|
434
|
+
*/
|
|
383
435
|
addCustomAttribute(customAttribute) {
|
|
384
436
|
if (!this._customAttributes)
|
|
385
437
|
this._customAttributes = new Map();
|
|
@@ -426,6 +478,15 @@ export class ECClass extends SchemaItem {
|
|
|
426
478
|
yield baseClass;
|
|
427
479
|
}
|
|
428
480
|
}
|
|
481
|
+
/**
|
|
482
|
+
*
|
|
483
|
+
* @param target
|
|
484
|
+
* @param existingValues
|
|
485
|
+
* @param propertiesToMerge
|
|
486
|
+
* @param overwriteExisting
|
|
487
|
+
*
|
|
488
|
+
* @internal
|
|
489
|
+
*/
|
|
429
490
|
static mergeProperties(target, existingValues, propertiesToMerge, overwriteExisting) {
|
|
430
491
|
for (const property of propertiesToMerge) {
|
|
431
492
|
const upperCaseName = property.name.toUpperCase();
|
|
@@ -441,6 +502,14 @@ export class ECClass extends SchemaItem {
|
|
|
441
502
|
}
|
|
442
503
|
}
|
|
443
504
|
}
|
|
505
|
+
/**
|
|
506
|
+
*
|
|
507
|
+
* @param result
|
|
508
|
+
* @param existingValues
|
|
509
|
+
* @returns
|
|
510
|
+
*
|
|
511
|
+
* @internal
|
|
512
|
+
*/
|
|
444
513
|
async buildPropertyCache(result, existingValues) {
|
|
445
514
|
if (!existingValues) {
|
|
446
515
|
existingValues = new Map();
|
|
@@ -455,6 +524,14 @@ export class ECClass extends SchemaItem {
|
|
|
455
524
|
return;
|
|
456
525
|
ECClass.mergeProperties(result, existingValues, [...this._properties.values()], true);
|
|
457
526
|
}
|
|
527
|
+
/**
|
|
528
|
+
*
|
|
529
|
+
* @param result
|
|
530
|
+
* @param existingValues
|
|
531
|
+
* @returns
|
|
532
|
+
*
|
|
533
|
+
* @internal
|
|
534
|
+
*/
|
|
458
535
|
buildPropertyCacheSync(result, existingValues) {
|
|
459
536
|
if (!existingValues) {
|
|
460
537
|
existingValues = new Map();
|
|
@@ -597,9 +674,9 @@ export class ECClass extends SchemaItem {
|
|
|
597
674
|
object.schemaItemType === SchemaItemType.StructClass || object.schemaItemType === SchemaItemType.CustomAttributeClass;
|
|
598
675
|
}
|
|
599
676
|
/**
|
|
600
|
-
* @alpha
|
|
601
677
|
* A setter method for the ECClass modifier, used specifically for schema editing.
|
|
602
678
|
* @param modifier
|
|
679
|
+
* @internal
|
|
603
680
|
*/
|
|
604
681
|
setModifier(modifier) {
|
|
605
682
|
this._modifier = modifier;
|
|
@@ -636,17 +713,16 @@ export class ECClass extends SchemaItem {
|
|
|
636
713
|
}
|
|
637
714
|
/**
|
|
638
715
|
* A Typescript class representation of an ECStructClass.
|
|
639
|
-
* @
|
|
716
|
+
* @public @preview
|
|
640
717
|
*/
|
|
641
718
|
export class StructClass extends ECClass {
|
|
642
719
|
/**
|
|
643
720
|
* Get the type of item represented by this instance
|
|
644
|
-
* @beta
|
|
645
721
|
*/
|
|
646
722
|
schemaItemType = StructClass.schemaItemType;
|
|
647
723
|
/**
|
|
648
724
|
* Get the type of item represented by this class
|
|
649
|
-
* @
|
|
725
|
+
* @internal
|
|
650
726
|
*/
|
|
651
727
|
static get schemaItemType() { return SchemaItemType.StructClass; }
|
|
652
728
|
/**
|
|
@@ -663,10 +739,11 @@ export class StructClass extends ECClass {
|
|
|
663
739
|
* Type assertion to check if the SchemaItem is of type StructClass.
|
|
664
740
|
* @param item The SchemaItem to check.
|
|
665
741
|
* @returns The item cast to StructClass if it is a StructClass, undefined otherwise.
|
|
742
|
+
* @internal
|
|
666
743
|
*/
|
|
667
744
|
static assertIsStructClass(item) {
|
|
668
745
|
if (!this.isStructClass(item))
|
|
669
|
-
throw new
|
|
746
|
+
throw new ECSchemaError(ECSchemaStatus.InvalidSchemaItemType, `Expected '${SchemaItemType.StructClass}' (StructClass)`);
|
|
670
747
|
}
|
|
671
748
|
}
|
|
672
749
|
/**
|