@itwin/ecschema-metadata 5.0.0-dev.8 → 5.0.0-dev.83
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 +46 -1
- package/lib/cjs/Constants.js +20 -20
- package/lib/cjs/Constants.js.map +1 -1
- package/lib/cjs/Context.d.ts +60 -20
- package/lib/cjs/Context.d.ts.map +1 -1
- package/lib/cjs/Context.js +43 -19
- package/lib/cjs/Context.js.map +1 -1
- package/lib/cjs/DelayedPromise.js +6 -4
- package/lib/cjs/DelayedPromise.js.map +1 -1
- package/lib/cjs/Deserialization/AbstractParser.js +1 -0
- package/lib/cjs/Deserialization/AbstractParser.js.map +1 -1
- package/lib/cjs/Deserialization/Helper.d.ts +3 -3
- package/lib/cjs/Deserialization/Helper.d.ts.map +1 -1
- package/lib/cjs/Deserialization/Helper.js +8 -0
- package/lib/cjs/Deserialization/Helper.js.map +1 -1
- package/lib/cjs/Deserialization/JsonParser.js +3 -0
- package/lib/cjs/Deserialization/JsonParser.js.map +1 -1
- package/lib/cjs/Deserialization/JsonProps.d.ts +3 -0
- package/lib/cjs/Deserialization/JsonProps.d.ts.map +1 -1
- package/lib/cjs/Deserialization/JsonProps.js.map +1 -1
- package/lib/cjs/Deserialization/XmlParser.js +11 -1
- package/lib/cjs/Deserialization/XmlParser.js.map +1 -1
- package/lib/cjs/ECName.js +1 -0
- package/lib/cjs/ECName.js.map +1 -1
- package/lib/cjs/ECObjects.d.ts +21 -1
- package/lib/cjs/ECObjects.d.ts.map +1 -1
- package/lib/cjs/ECObjects.js +34 -2
- package/lib/cjs/ECObjects.js.map +1 -1
- package/lib/cjs/Exception.js +1 -0
- package/lib/cjs/Exception.js.map +1 -1
- package/lib/cjs/Interfaces.d.ts +10 -3
- package/lib/cjs/Interfaces.d.ts.map +1 -1
- package/lib/cjs/Interfaces.js.map +1 -1
- package/lib/cjs/Metadata/Class.d.ts +53 -5
- package/lib/cjs/Metadata/Class.d.ts.map +1 -1
- package/lib/cjs/Metadata/Class.js +118 -19
- package/lib/cjs/Metadata/Class.js.map +1 -1
- package/lib/cjs/Metadata/Constant.d.ts +14 -1
- package/lib/cjs/Metadata/Constant.d.ts.map +1 -1
- package/lib/cjs/Metadata/Constant.js +27 -2
- package/lib/cjs/Metadata/Constant.js.map +1 -1
- package/lib/cjs/Metadata/CustomAttributeClass.d.ts +16 -4
- package/lib/cjs/Metadata/CustomAttributeClass.d.ts.map +1 -1
- package/lib/cjs/Metadata/CustomAttributeClass.js +22 -4
- package/lib/cjs/Metadata/CustomAttributeClass.js.map +1 -1
- package/lib/cjs/Metadata/EntityClass.d.ts +18 -6
- package/lib/cjs/Metadata/EntityClass.d.ts.map +1 -1
- package/lib/cjs/Metadata/EntityClass.js +29 -9
- package/lib/cjs/Metadata/EntityClass.js.map +1 -1
- package/lib/cjs/Metadata/Enumeration.d.ts +14 -1
- package/lib/cjs/Metadata/Enumeration.d.ts.map +1 -1
- package/lib/cjs/Metadata/Enumeration.js +22 -1
- package/lib/cjs/Metadata/Enumeration.js.map +1 -1
- package/lib/cjs/Metadata/Format.d.ts +41 -1
- package/lib/cjs/Metadata/Format.d.ts.map +1 -1
- package/lib/cjs/Metadata/Format.js +68 -3
- package/lib/cjs/Metadata/Format.js.map +1 -1
- package/lib/cjs/Metadata/InvertedUnit.d.ts +8 -3
- package/lib/cjs/Metadata/InvertedUnit.d.ts.map +1 -1
- package/lib/cjs/Metadata/InvertedUnit.js +17 -6
- package/lib/cjs/Metadata/InvertedUnit.js.map +1 -1
- package/lib/cjs/Metadata/KindOfQuantity.d.ts +14 -3
- package/lib/cjs/Metadata/KindOfQuantity.d.ts.map +1 -1
- package/lib/cjs/Metadata/KindOfQuantity.js +43 -18
- package/lib/cjs/Metadata/KindOfQuantity.js.map +1 -1
- package/lib/cjs/Metadata/Mixin.d.ts +15 -1
- package/lib/cjs/Metadata/Mixin.d.ts.map +1 -1
- package/lib/cjs/Metadata/Mixin.js +23 -2
- package/lib/cjs/Metadata/Mixin.js.map +1 -1
- package/lib/cjs/Metadata/OverrideFormat.js +9 -0
- package/lib/cjs/Metadata/OverrideFormat.js.map +1 -1
- package/lib/cjs/Metadata/Phenomenon.d.ts +14 -1
- package/lib/cjs/Metadata/Phenomenon.d.ts.map +1 -1
- package/lib/cjs/Metadata/Phenomenon.js +22 -1
- package/lib/cjs/Metadata/Phenomenon.js.map +1 -1
- package/lib/cjs/Metadata/Property.d.ts +1 -1
- package/lib/cjs/Metadata/Property.d.ts.map +1 -1
- package/lib/cjs/Metadata/Property.js +83 -28
- package/lib/cjs/Metadata/Property.js.map +1 -1
- package/lib/cjs/Metadata/PropertyCategory.d.ts +14 -1
- package/lib/cjs/Metadata/PropertyCategory.d.ts.map +1 -1
- package/lib/cjs/Metadata/PropertyCategory.js +21 -1
- package/lib/cjs/Metadata/PropertyCategory.js.map +1 -1
- package/lib/cjs/Metadata/RelationshipClass.d.ts +15 -2
- package/lib/cjs/Metadata/RelationshipClass.d.ts.map +1 -1
- package/lib/cjs/Metadata/RelationshipClass.js +47 -10
- package/lib/cjs/Metadata/RelationshipClass.js.map +1 -1
- package/lib/cjs/Metadata/Schema.d.ts +116 -11
- package/lib/cjs/Metadata/Schema.d.ts.map +1 -1
- package/lib/cjs/Metadata/Schema.js +135 -33
- package/lib/cjs/Metadata/Schema.js.map +1 -1
- package/lib/cjs/Metadata/SchemaItem.d.ts +11 -2
- package/lib/cjs/Metadata/SchemaItem.d.ts.map +1 -1
- package/lib/cjs/Metadata/SchemaItem.js +10 -0
- package/lib/cjs/Metadata/SchemaItem.js.map +1 -1
- package/lib/cjs/Metadata/Unit.d.ts +8 -1
- package/lib/cjs/Metadata/Unit.d.ts.map +1 -1
- package/lib/cjs/Metadata/Unit.js +21 -3
- package/lib/cjs/Metadata/Unit.js.map +1 -1
- package/lib/cjs/Metadata/UnitSystem.d.ts +14 -3
- package/lib/cjs/Metadata/UnitSystem.d.ts.map +1 -1
- package/lib/cjs/Metadata/UnitSystem.js +21 -3
- package/lib/cjs/Metadata/UnitSystem.js.map +1 -1
- package/lib/cjs/SchemaJsonLocater.d.ts +3 -3
- package/lib/cjs/SchemaJsonLocater.d.ts.map +1 -1
- package/lib/cjs/SchemaJsonLocater.js +3 -3
- package/lib/cjs/SchemaJsonLocater.js.map +1 -1
- package/lib/cjs/SchemaKey.d.ts +7 -1
- package/lib/cjs/SchemaKey.d.ts.map +1 -1
- package/lib/cjs/SchemaKey.js +13 -3
- package/lib/cjs/SchemaKey.js.map +1 -1
- package/lib/cjs/SchemaLoader.d.ts +2 -2
- package/lib/cjs/SchemaLoader.d.ts.map +1 -1
- package/lib/cjs/SchemaLoader.js +1 -0
- package/lib/cjs/SchemaLoader.js.map +1 -1
- package/lib/cjs/SchemaPartVisitorDelegate.js +1 -0
- package/lib/cjs/SchemaPartVisitorDelegate.js.map +1 -1
- package/lib/cjs/UnitConversion/Graph.js +69 -65
- package/lib/cjs/UnitConversion/Graph.js.map +1 -1
- package/lib/cjs/UnitConversion/UnitConversion.d.ts +1 -1
- package/lib/cjs/UnitConversion/UnitConversion.d.ts.map +1 -1
- package/lib/cjs/UnitConversion/UnitConversion.js +9 -7
- package/lib/cjs/UnitConversion/UnitConversion.js.map +1 -1
- package/lib/cjs/UnitConversion/UnitConverter.js +2 -0
- package/lib/cjs/UnitConversion/UnitConverter.js.map +1 -1
- package/lib/cjs/UnitConversion/UnitTree.d.ts +2 -0
- package/lib/cjs/UnitConversion/UnitTree.d.ts.map +1 -1
- package/lib/cjs/UnitConversion/UnitTree.js +11 -1
- package/lib/cjs/UnitConversion/UnitTree.js.map +1 -1
- package/lib/cjs/UnitProvider/SchemaUnitProvider.js +6 -3
- package/lib/cjs/UnitProvider/SchemaUnitProvider.js.map +1 -1
- package/lib/cjs/Validation/SchemaWalker.d.ts +1 -1
- package/lib/cjs/Validation/SchemaWalker.d.ts.map +1 -1
- package/lib/cjs/Validation/SchemaWalker.js +4 -0
- package/lib/cjs/Validation/SchemaWalker.js.map +1 -1
- package/lib/cjs/utils/SchemaGraph.js +2 -3
- package/lib/cjs/utils/SchemaGraph.js.map +1 -1
- package/lib/esm/Constants.js +20 -20
- package/lib/esm/Constants.js.map +1 -1
- package/lib/esm/Context.d.ts +60 -20
- package/lib/esm/Context.d.ts.map +1 -1
- package/lib/esm/Context.js +41 -17
- package/lib/esm/Context.js.map +1 -1
- package/lib/esm/DelayedPromise.js +6 -4
- package/lib/esm/DelayedPromise.js.map +1 -1
- package/lib/esm/Deserialization/AbstractParser.js +1 -0
- package/lib/esm/Deserialization/AbstractParser.js.map +1 -1
- package/lib/esm/Deserialization/Helper.d.ts +3 -3
- package/lib/esm/Deserialization/Helper.d.ts.map +1 -1
- package/lib/esm/Deserialization/Helper.js +8 -0
- package/lib/esm/Deserialization/Helper.js.map +1 -1
- package/lib/esm/Deserialization/JsonParser.js +3 -0
- package/lib/esm/Deserialization/JsonParser.js.map +1 -1
- package/lib/esm/Deserialization/JsonProps.d.ts +3 -0
- package/lib/esm/Deserialization/JsonProps.d.ts.map +1 -1
- package/lib/esm/Deserialization/JsonProps.js.map +1 -1
- package/lib/esm/Deserialization/XmlParser.js +11 -1
- package/lib/esm/Deserialization/XmlParser.js.map +1 -1
- package/lib/esm/ECName.js +1 -0
- package/lib/esm/ECName.js.map +1 -1
- package/lib/esm/ECObjects.d.ts +21 -1
- package/lib/esm/ECObjects.d.ts.map +1 -1
- package/lib/esm/ECObjects.js +32 -1
- package/lib/esm/ECObjects.js.map +1 -1
- package/lib/esm/Exception.js +1 -0
- package/lib/esm/Exception.js.map +1 -1
- package/lib/esm/Interfaces.d.ts +10 -3
- package/lib/esm/Interfaces.d.ts.map +1 -1
- package/lib/esm/Interfaces.js.map +1 -1
- package/lib/esm/Metadata/Class.d.ts +53 -5
- package/lib/esm/Metadata/Class.d.ts.map +1 -1
- package/lib/esm/Metadata/Class.js +119 -20
- package/lib/esm/Metadata/Class.js.map +1 -1
- package/lib/esm/Metadata/Constant.d.ts +14 -1
- package/lib/esm/Metadata/Constant.d.ts.map +1 -1
- package/lib/esm/Metadata/Constant.js +27 -2
- package/lib/esm/Metadata/Constant.js.map +1 -1
- package/lib/esm/Metadata/CustomAttributeClass.d.ts +16 -4
- package/lib/esm/Metadata/CustomAttributeClass.d.ts.map +1 -1
- package/lib/esm/Metadata/CustomAttributeClass.js +22 -4
- package/lib/esm/Metadata/CustomAttributeClass.js.map +1 -1
- package/lib/esm/Metadata/EntityClass.d.ts +18 -6
- package/lib/esm/Metadata/EntityClass.d.ts.map +1 -1
- package/lib/esm/Metadata/EntityClass.js +29 -9
- package/lib/esm/Metadata/EntityClass.js.map +1 -1
- package/lib/esm/Metadata/Enumeration.d.ts +14 -1
- package/lib/esm/Metadata/Enumeration.d.ts.map +1 -1
- package/lib/esm/Metadata/Enumeration.js +22 -1
- package/lib/esm/Metadata/Enumeration.js.map +1 -1
- package/lib/esm/Metadata/Format.d.ts +41 -1
- package/lib/esm/Metadata/Format.d.ts.map +1 -1
- package/lib/esm/Metadata/Format.js +68 -3
- package/lib/esm/Metadata/Format.js.map +1 -1
- package/lib/esm/Metadata/InvertedUnit.d.ts +8 -3
- package/lib/esm/Metadata/InvertedUnit.d.ts.map +1 -1
- package/lib/esm/Metadata/InvertedUnit.js +17 -6
- package/lib/esm/Metadata/InvertedUnit.js.map +1 -1
- package/lib/esm/Metadata/KindOfQuantity.d.ts +14 -3
- package/lib/esm/Metadata/KindOfQuantity.d.ts.map +1 -1
- package/lib/esm/Metadata/KindOfQuantity.js +43 -18
- package/lib/esm/Metadata/KindOfQuantity.js.map +1 -1
- package/lib/esm/Metadata/Mixin.d.ts +15 -1
- package/lib/esm/Metadata/Mixin.d.ts.map +1 -1
- package/lib/esm/Metadata/Mixin.js +24 -3
- package/lib/esm/Metadata/Mixin.js.map +1 -1
- package/lib/esm/Metadata/OverrideFormat.js +9 -0
- package/lib/esm/Metadata/OverrideFormat.js.map +1 -1
- package/lib/esm/Metadata/Phenomenon.d.ts +14 -1
- package/lib/esm/Metadata/Phenomenon.d.ts.map +1 -1
- package/lib/esm/Metadata/Phenomenon.js +22 -1
- package/lib/esm/Metadata/Phenomenon.js.map +1 -1
- package/lib/esm/Metadata/Property.d.ts +1 -1
- package/lib/esm/Metadata/Property.d.ts.map +1 -1
- package/lib/esm/Metadata/Property.js +84 -29
- package/lib/esm/Metadata/Property.js.map +1 -1
- package/lib/esm/Metadata/PropertyCategory.d.ts +14 -1
- package/lib/esm/Metadata/PropertyCategory.d.ts.map +1 -1
- package/lib/esm/Metadata/PropertyCategory.js +21 -1
- package/lib/esm/Metadata/PropertyCategory.js.map +1 -1
- package/lib/esm/Metadata/RelationshipClass.d.ts +15 -2
- package/lib/esm/Metadata/RelationshipClass.d.ts.map +1 -1
- package/lib/esm/Metadata/RelationshipClass.js +48 -11
- package/lib/esm/Metadata/RelationshipClass.js.map +1 -1
- package/lib/esm/Metadata/Schema.d.ts +116 -11
- package/lib/esm/Metadata/Schema.d.ts.map +1 -1
- package/lib/esm/Metadata/Schema.js +135 -33
- package/lib/esm/Metadata/Schema.js.map +1 -1
- package/lib/esm/Metadata/SchemaItem.d.ts +11 -2
- package/lib/esm/Metadata/SchemaItem.d.ts.map +1 -1
- package/lib/esm/Metadata/SchemaItem.js +11 -1
- package/lib/esm/Metadata/SchemaItem.js.map +1 -1
- package/lib/esm/Metadata/Unit.d.ts +8 -1
- package/lib/esm/Metadata/Unit.d.ts.map +1 -1
- package/lib/esm/Metadata/Unit.js +21 -3
- package/lib/esm/Metadata/Unit.js.map +1 -1
- package/lib/esm/Metadata/UnitSystem.d.ts +14 -3
- package/lib/esm/Metadata/UnitSystem.d.ts.map +1 -1
- package/lib/esm/Metadata/UnitSystem.js +21 -3
- package/lib/esm/Metadata/UnitSystem.js.map +1 -1
- package/lib/esm/SchemaJsonLocater.d.ts +3 -3
- package/lib/esm/SchemaJsonLocater.d.ts.map +1 -1
- package/lib/esm/SchemaJsonLocater.js +3 -3
- package/lib/esm/SchemaJsonLocater.js.map +1 -1
- package/lib/esm/SchemaKey.d.ts +7 -1
- package/lib/esm/SchemaKey.d.ts.map +1 -1
- package/lib/esm/SchemaKey.js +13 -3
- package/lib/esm/SchemaKey.js.map +1 -1
- package/lib/esm/SchemaLoader.d.ts +2 -2
- package/lib/esm/SchemaLoader.d.ts.map +1 -1
- package/lib/esm/SchemaLoader.js +1 -0
- package/lib/esm/SchemaLoader.js.map +1 -1
- package/lib/esm/SchemaPartVisitorDelegate.js +1 -0
- package/lib/esm/SchemaPartVisitorDelegate.js.map +1 -1
- package/lib/esm/UnitConversion/Graph.js +69 -65
- package/lib/esm/UnitConversion/Graph.js.map +1 -1
- package/lib/esm/UnitConversion/UnitConversion.d.ts +1 -1
- package/lib/esm/UnitConversion/UnitConversion.d.ts.map +1 -1
- package/lib/esm/UnitConversion/UnitConversion.js +9 -7
- package/lib/esm/UnitConversion/UnitConversion.js.map +1 -1
- package/lib/esm/UnitConversion/UnitConverter.js +2 -0
- package/lib/esm/UnitConversion/UnitConverter.js.map +1 -1
- package/lib/esm/UnitConversion/UnitTree.d.ts +2 -0
- package/lib/esm/UnitConversion/UnitTree.d.ts.map +1 -1
- package/lib/esm/UnitConversion/UnitTree.js +11 -1
- package/lib/esm/UnitConversion/UnitTree.js.map +1 -1
- package/lib/esm/UnitProvider/SchemaUnitProvider.js +6 -3
- package/lib/esm/UnitProvider/SchemaUnitProvider.js.map +1 -1
- package/lib/esm/Validation/SchemaWalker.d.ts +1 -1
- package/lib/esm/Validation/SchemaWalker.d.ts.map +1 -1
- package/lib/esm/Validation/SchemaWalker.js +4 -0
- package/lib/esm/Validation/SchemaWalker.js.map +1 -1
- package/lib/esm/utils/SchemaGraph.js +2 -3
- package/lib/esm/utils/SchemaGraph.js.map +1 -1
- package/package.json +14 -14
|
@@ -7,16 +7,29 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { DelayedPromiseWithProps } from "../DelayedPromise";
|
|
9
9
|
import { XmlSerializationUtils } from "../Deserialization/XmlSerializationUtils";
|
|
10
|
-
import { parsePrimitiveType, PrimitiveType, primitiveTypeToString, StrengthDirection, strengthDirectionToString } from "../ECObjects";
|
|
10
|
+
import { parsePrimitiveType, PrimitiveType, primitiveTypeToString, SchemaItemType, StrengthDirection, strengthDirectionToString } from "../ECObjects";
|
|
11
11
|
import { ECObjectsError, ECObjectsStatus } from "../Exception";
|
|
12
12
|
import { PropertyType, propertyTypeToString, PropertyTypeUtils } from "../PropertyTypes";
|
|
13
13
|
import { ECName } from "../ECName";
|
|
14
14
|
import { serializeCustomAttributes } from "./CustomAttribute";
|
|
15
|
+
import { Enumeration } from "./Enumeration";
|
|
16
|
+
import { KindOfQuantity } from "./KindOfQuantity";
|
|
17
|
+
import { PropertyCategory } from "./PropertyCategory";
|
|
15
18
|
/**
|
|
16
19
|
* A common abstract class for all ECProperty types.
|
|
17
20
|
* @beta
|
|
18
21
|
*/
|
|
19
22
|
export class Property {
|
|
23
|
+
_name;
|
|
24
|
+
_type;
|
|
25
|
+
_class; // TODO: class seems to be unused?
|
|
26
|
+
_description;
|
|
27
|
+
_label;
|
|
28
|
+
_isReadOnly;
|
|
29
|
+
_priority;
|
|
30
|
+
_category;
|
|
31
|
+
_kindOfQuantity;
|
|
32
|
+
_customAttributes;
|
|
20
33
|
constructor(ecClass, name, type) {
|
|
21
34
|
this._class = ecClass;
|
|
22
35
|
this._name = new ECName(name);
|
|
@@ -32,9 +45,33 @@ export class Property {
|
|
|
32
45
|
get label() { return this._label; }
|
|
33
46
|
get description() { return this._description; }
|
|
34
47
|
get isReadOnly() { return this._isReadOnly || false; }
|
|
35
|
-
get priority() {
|
|
36
|
-
|
|
37
|
-
|
|
48
|
+
get priority() {
|
|
49
|
+
if (this._priority === undefined) {
|
|
50
|
+
const baseProperty = this.class.getInheritedPropertySync(this.name);
|
|
51
|
+
if (undefined !== baseProperty) {
|
|
52
|
+
return baseProperty.priority;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return this._priority || 0;
|
|
56
|
+
}
|
|
57
|
+
get category() {
|
|
58
|
+
if (this._category === undefined) {
|
|
59
|
+
const baseProperty = this.class.getInheritedPropertySync(this.name);
|
|
60
|
+
if (undefined !== baseProperty) {
|
|
61
|
+
return baseProperty.category;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return this._category;
|
|
65
|
+
}
|
|
66
|
+
get kindOfQuantity() {
|
|
67
|
+
if (this._kindOfQuantity === undefined) {
|
|
68
|
+
const baseProperty = this.class.getInheritedPropertySync(this.name);
|
|
69
|
+
if (undefined !== baseProperty) {
|
|
70
|
+
return baseProperty.kindOfQuantity;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return this._kindOfQuantity;
|
|
74
|
+
}
|
|
38
75
|
get propertyType() { return this._type; }
|
|
39
76
|
get customAttributes() { return this._customAttributes; }
|
|
40
77
|
/** Returns the name in the format 'ClassName.PropertyName'. */
|
|
@@ -42,14 +79,24 @@ export class Property {
|
|
|
42
79
|
/** Returns the schema of the class holding the property. */
|
|
43
80
|
get schema() { return this._class.schema; }
|
|
44
81
|
getCategorySync() {
|
|
45
|
-
if (!this._category)
|
|
82
|
+
if (!this._category) {
|
|
83
|
+
const baseProperty = this.class.getInheritedPropertySync(this.name);
|
|
84
|
+
if (undefined !== baseProperty) {
|
|
85
|
+
return baseProperty.getCategorySync();
|
|
86
|
+
}
|
|
46
87
|
return undefined;
|
|
47
|
-
|
|
88
|
+
}
|
|
89
|
+
return this.class.schema.lookupItemSync(this._category, PropertyCategory);
|
|
48
90
|
}
|
|
49
91
|
getKindOfQuantitySync() {
|
|
50
|
-
if (!this._kindOfQuantity)
|
|
92
|
+
if (!this._kindOfQuantity) {
|
|
93
|
+
const baseProperty = this.class.getInheritedPropertySync(this.name);
|
|
94
|
+
if (undefined !== baseProperty) {
|
|
95
|
+
return baseProperty.getKindOfQuantitySync();
|
|
96
|
+
}
|
|
51
97
|
return undefined;
|
|
52
|
-
|
|
98
|
+
}
|
|
99
|
+
return this.class.schema.lookupItemSync(this._kindOfQuantity, KindOfQuantity);
|
|
53
100
|
}
|
|
54
101
|
/**
|
|
55
102
|
* Save this Property's properties to an object for serializing to JSON.
|
|
@@ -64,12 +111,12 @@ export class Property {
|
|
|
64
111
|
schemaJson.label = this.label;
|
|
65
112
|
if (this._isReadOnly !== undefined)
|
|
66
113
|
schemaJson.isReadOnly = this._isReadOnly;
|
|
67
|
-
if (this.
|
|
68
|
-
schemaJson.category = this.
|
|
114
|
+
if (this._category !== undefined)
|
|
115
|
+
schemaJson.category = this._category.fullName; // needs to be fully qualified name
|
|
69
116
|
if (this._priority !== undefined)
|
|
70
117
|
schemaJson.priority = this._priority;
|
|
71
|
-
if (this.
|
|
72
|
-
schemaJson.kindOfQuantity = this.
|
|
118
|
+
if (this._kindOfQuantity !== undefined)
|
|
119
|
+
schemaJson.kindOfQuantity = this._kindOfQuantity.fullName;
|
|
73
120
|
const customAttributes = serializeCustomAttributes(this.customAttributes);
|
|
74
121
|
if (customAttributes !== undefined)
|
|
75
122
|
schemaJson.customAttributes = customAttributes;
|
|
@@ -86,15 +133,15 @@ export class Property {
|
|
|
86
133
|
itemElement.setAttribute("displayLabel", this.label);
|
|
87
134
|
if (undefined !== this.isReadOnly)
|
|
88
135
|
itemElement.setAttribute("readOnly", String(this.isReadOnly));
|
|
89
|
-
if (undefined !== this.
|
|
90
|
-
const category = await this.
|
|
136
|
+
if (undefined !== this._category) {
|
|
137
|
+
const category = await this._category;
|
|
91
138
|
const categoryName = XmlSerializationUtils.createXmlTypedName(this.schema, category.schema, category.name);
|
|
92
139
|
itemElement.setAttribute("category", categoryName);
|
|
93
140
|
}
|
|
94
|
-
if (undefined !== this.
|
|
95
|
-
itemElement.setAttribute("priority", this.
|
|
96
|
-
if (undefined !== this.
|
|
97
|
-
const kindOfQuantity = await this.
|
|
141
|
+
if (undefined !== this._priority)
|
|
142
|
+
itemElement.setAttribute("priority", this._priority.toString());
|
|
143
|
+
if (undefined !== this._kindOfQuantity) {
|
|
144
|
+
const kindOfQuantity = await this._kindOfQuantity;
|
|
98
145
|
const kindOfQuantityName = XmlSerializationUtils.createXmlTypedName(this.schema, kindOfQuantity.schema, kindOfQuantity.name);
|
|
99
146
|
itemElement.setAttribute("kindOfQuantity", kindOfQuantityName);
|
|
100
147
|
}
|
|
@@ -126,7 +173,7 @@ export class Property {
|
|
|
126
173
|
if (!propertyCategorySchemaItemKey)
|
|
127
174
|
throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Property ${this.name} has a 'category' ("${propertyProps.category}") that cannot be found.`);
|
|
128
175
|
this._category = new DelayedPromiseWithProps(propertyCategorySchemaItemKey, async () => {
|
|
129
|
-
const category = await this.class.schema.lookupItem(propertyCategorySchemaItemKey);
|
|
176
|
+
const category = await this.class.schema.lookupItem(propertyCategorySchemaItemKey, PropertyCategory);
|
|
130
177
|
if (undefined === category)
|
|
131
178
|
throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Property ${this.name} has a 'category' ("${propertyProps.category}") that cannot be found.`);
|
|
132
179
|
return category;
|
|
@@ -137,7 +184,7 @@ export class Property {
|
|
|
137
184
|
if (!koqSchemaItemKey)
|
|
138
185
|
throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Property ${this.name} has a 'kindOfQuantity' ("${propertyProps.kindOfQuantity}") that cannot be found.`);
|
|
139
186
|
this._kindOfQuantity = new DelayedPromiseWithProps(koqSchemaItemKey, async () => {
|
|
140
|
-
const koq = await this.class.schema.lookupItem(koqSchemaItemKey);
|
|
187
|
+
const koq = await this.class.schema.lookupItem(koqSchemaItemKey, KindOfQuantity);
|
|
141
188
|
if (undefined === koq)
|
|
142
189
|
throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Property ${this.name} has a 'kindOfQuantity' ("${propertyProps.kindOfQuantity}") that cannot be found.`);
|
|
143
190
|
return koq;
|
|
@@ -226,6 +273,11 @@ export class Property {
|
|
|
226
273
|
}
|
|
227
274
|
/** @beta */
|
|
228
275
|
export class PrimitiveOrEnumPropertyBase extends Property {
|
|
276
|
+
_extendedTypeName;
|
|
277
|
+
_minLength;
|
|
278
|
+
_maxLength;
|
|
279
|
+
_minValue;
|
|
280
|
+
_maxValue;
|
|
229
281
|
get extendedTypeName() { return this._extendedTypeName; }
|
|
230
282
|
get minLength() { return this._minLength; }
|
|
231
283
|
get maxLength() { return this._maxLength; }
|
|
@@ -351,6 +403,7 @@ export class PrimitiveProperty extends PrimitiveOrEnumPropertyBase {
|
|
|
351
403
|
}
|
|
352
404
|
/** @beta */
|
|
353
405
|
export class EnumerationProperty extends PrimitiveOrEnumPropertyBase {
|
|
406
|
+
_enumeration;
|
|
354
407
|
get enumeration() { return this._enumeration; }
|
|
355
408
|
/**
|
|
356
409
|
* Save this EnumerationProperty's properties to an object for serializing to JSON.
|
|
@@ -374,7 +427,7 @@ export class EnumerationProperty extends PrimitiveOrEnumPropertyBase {
|
|
|
374
427
|
if (!enumSchemaItemKey)
|
|
375
428
|
throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `Unable to locate the enumeration ${enumerationPropertyProps.typeName}.`);
|
|
376
429
|
this._enumeration = new DelayedPromiseWithProps(enumSchemaItemKey, async () => {
|
|
377
|
-
const enumeration = await this.class.schema.lookupItem(enumSchemaItemKey);
|
|
430
|
+
const enumeration = await this.class.schema.lookupItem(enumSchemaItemKey, Enumeration);
|
|
378
431
|
if (undefined === enumeration)
|
|
379
432
|
throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `Unable to locate the enumeration ${enumerationPropertyProps.typeName}.`);
|
|
380
433
|
return enumeration;
|
|
@@ -395,6 +448,7 @@ export class EnumerationProperty extends PrimitiveOrEnumPropertyBase {
|
|
|
395
448
|
}
|
|
396
449
|
/** @beta */
|
|
397
450
|
export class StructProperty extends Property {
|
|
451
|
+
_structClass;
|
|
398
452
|
get structClass() { return this._structClass; }
|
|
399
453
|
constructor(ecClass, name, type) {
|
|
400
454
|
super(ecClass, name, PropertyType.Struct);
|
|
@@ -428,11 +482,15 @@ export class StructProperty extends Property {
|
|
|
428
482
|
}
|
|
429
483
|
/** @beta */
|
|
430
484
|
export class NavigationProperty extends Property {
|
|
485
|
+
_relationshipClass;
|
|
486
|
+
_direction;
|
|
431
487
|
get relationshipClass() { return this._relationshipClass; }
|
|
432
488
|
getRelationshipClassSync() {
|
|
433
489
|
if (!this._relationshipClass) // eslint-disable-line @typescript-eslint/no-misused-promises
|
|
434
490
|
return undefined;
|
|
435
|
-
|
|
491
|
+
// We cannot use the type guard here to avoid a circular dependency
|
|
492
|
+
const result = this.class.schema.lookupItemSync(this._relationshipClass);
|
|
493
|
+
return result?.schemaItemType === SchemaItemType.RelationshipClass ? result : undefined;
|
|
436
494
|
}
|
|
437
495
|
get direction() { return this._direction; }
|
|
438
496
|
/**
|
|
@@ -463,11 +521,8 @@ export class NavigationProperty extends Property {
|
|
|
463
521
|
const INT32_MAX = 2147483647;
|
|
464
522
|
/** @beta */
|
|
465
523
|
export class ArrayProperty extends Property {
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
this._minOccurs = 0;
|
|
469
|
-
this._maxOccurs = INT32_MAX;
|
|
470
|
-
}
|
|
524
|
+
_minOccurs = 0;
|
|
525
|
+
_maxOccurs = INT32_MAX;
|
|
471
526
|
get minOccurs() { return this._minOccurs; }
|
|
472
527
|
get maxOccurs() { return this._maxOccurs; }
|
|
473
528
|
/**
|
|
@@ -486,12 +541,12 @@ export class ArrayProperty extends Property {
|
|
|
486
541
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
487
542
|
const ArrayPropertyMixin = (Base) => {
|
|
488
543
|
return class extends Base {
|
|
544
|
+
_minOccurs = 0;
|
|
545
|
+
_maxOccurs = INT32_MAX;
|
|
489
546
|
get minOccurs() { return this._minOccurs; }
|
|
490
547
|
get maxOccurs() { return this._maxOccurs; }
|
|
491
548
|
constructor(...args) {
|
|
492
549
|
super(...args);
|
|
493
|
-
this._minOccurs = 0;
|
|
494
|
-
this._maxOccurs = INT32_MAX;
|
|
495
550
|
this._type = PropertyTypeUtils.asArray(this._type);
|
|
496
551
|
}
|
|
497
552
|
fromJSONSync(arrayPropertyProps) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Property.js","sourceRoot":"","sources":["../../../src/Metadata/Property.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAK5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACtI,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/D,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAEzF,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,OAAO,EAAsE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAOlI;;;GAGG;AACH,MAAM,OAAgB,QAAQ;IAa5B,YAAY,OAAgB,EAAE,IAAY,EAAE,IAAkB;QAC5D,IAAI,CAAC,MAAM,GAAG,OAAmB,CAAC;QAClC,IAAI,CAAC,KAAK,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC;QAC9B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC;IAEM,OAAO,KAA+B,OAAO,iBAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACrF,WAAW,KAAmC,OAAO,iBAAiB,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACjG,QAAQ,KAAgC,OAAO,iBAAiB,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACxF,aAAa,KAAqC,OAAO,iBAAiB,CAAC,aAA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,CAAC;AAEF,YAAY;AACZ,MAAM,OAAO,sBAAuB,SAAQ,kBAAkB,CAAC,iBAAiB,CAAC;IAC/E,YAAY,OAAgB,EAAE,IAAY,EAAE,gBAA+B,aAAa,CAAC,OAAO;QAC9F,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC;IACtC,CAAC;IAED;;OAEG;IACa,MAAM;QACpB,OAAO,KAAK,CAAC,MAAM,EAAE,CAAC;IACxB,CAAC;CAEF;AAED,YAAY;AACZ,MAAM,OAAO,wBAAyB,SAAQ,kBAAkB,CAAC,mBAAmB,CAAC;IACnF,YAAY,OAAgB,EAAE,IAAY,EAAE,IAA2B;QACrE,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC7B,CAAC;CACF;AAED,YAAY;AACZ,MAAM,OAAO,mBAAoB,SAAQ,kBAAkB,CAAC,cAAc,CAAC;IACzE,YAAY,OAAgB,EAAE,IAAY,EAAE,IAAiB;QAC3D,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC7B,CAAC;CACF;AAaD;;;GAGG;AACH,MAAM,OAAgB,eAAgB,SAAQ,QAAQ;CAErD","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Metadata\n */\n\nimport { DelayedPromiseWithProps } from \"../DelayedPromise\";\nimport {\n ArrayPropertyProps, EnumerationPropertyProps, NavigationPropertyProps, PrimitiveArrayPropertyProps, PrimitiveOrEnumPropertyBaseProps,\n PrimitivePropertyProps, PropertyProps, StructPropertyProps,\n} from \"../Deserialization/JsonProps\";\nimport { XmlSerializationUtils } from \"../Deserialization/XmlSerializationUtils\";\nimport { parsePrimitiveType, PrimitiveType, primitiveTypeToString, StrengthDirection, strengthDirectionToString } from \"../ECObjects\";\nimport { ECObjectsError, ECObjectsStatus } from \"../Exception\";\nimport { AnyClass, LazyLoadedEnumeration, LazyLoadedKindOfQuantity, LazyLoadedPropertyCategory, LazyLoadedRelationshipClass } from \"../Interfaces\";\nimport { PropertyType, propertyTypeToString, PropertyTypeUtils } from \"../PropertyTypes\";\nimport { SchemaItemKey } from \"../SchemaKey\";\nimport { ECName } from \"../ECName\";\nimport { ECClass, StructClass } from \"./Class\";\nimport { CustomAttribute, CustomAttributeContainerProps, CustomAttributeSet, serializeCustomAttributes } from \"./CustomAttribute\";\nimport { Enumeration } from \"./Enumeration\";\nimport { KindOfQuantity } from \"./KindOfQuantity\";\nimport { PropertyCategory } from \"./PropertyCategory\";\nimport { RelationshipClass } from \"./RelationshipClass\";\nimport { Schema } from \"./Schema\";\n\n/**\n * A common abstract class for all ECProperty types.\n * @beta\n */\nexport abstract class Property implements CustomAttributeContainerProps {\n protected _name: ECName;\n protected _type: PropertyType;\n\n protected _class: AnyClass; // TODO: class seems to be unused?\n protected _description?: string;\n protected _label?: string;\n protected _isReadOnly?: boolean;\n protected _priority?: number;\n protected _category?: LazyLoadedPropertyCategory;\n protected _kindOfQuantity?: LazyLoadedKindOfQuantity;\n private _customAttributes?: Map<string, CustomAttribute>;\n\n constructor(ecClass: ECClass, name: string, type: PropertyType) {\n this._class = ecClass as AnyClass;\n this._name = new ECName(name);\n this._type = type;\n }\n\n public isArray(): this is AnyArrayProperty { return PropertyTypeUtils.isArray(this._type); }\n public isPrimitive(): this is AnyPrimitiveProperty { return PropertyTypeUtils.isPrimitive(this._type); }\n public isStruct(): this is AnyStructProperty { return PropertyTypeUtils.isStruct(this._type); }\n public isEnumeration(): this is AnyEnumerationProperty { return PropertyTypeUtils.isEnumeration(this._type); }\n public isNavigation(): this is NavigationProperty { return PropertyTypeUtils.isNavigation(this._type); }\n\n public get name() { return this._name.name; }\n\n public get class() { return this._class; }\n\n public get label() { return this._label; }\n\n public get description() { return this._description; }\n\n public get isReadOnly() { return this._isReadOnly || false; }\n\n public get priority() { return this._priority || 0; }\n\n public get category(): LazyLoadedPropertyCategory | undefined { return this._category; }\n\n public get kindOfQuantity(): LazyLoadedKindOfQuantity | undefined { return this._kindOfQuantity; }\n\n public get propertyType() { return this._type; }\n\n public get customAttributes(): CustomAttributeSet | undefined { return this._customAttributes; }\n\n /** Returns the name in the format 'ClassName.PropertyName'. */\n public get fullName(): string { return `${this._class.name}.${this.name}`; }\n\n /** Returns the schema of the class holding the property. */\n public get schema(): Schema { return this._class.schema; }\n\n public getCategorySync(): PropertyCategory | undefined {\n if (!this._category)\n return undefined;\n\n return this.class.schema.lookupItemSync(this._category);\n }\n\n public getKindOfQuantitySync(): KindOfQuantity | undefined {\n if (!this._kindOfQuantity)\n return undefined;\n\n return this.class.schema.lookupItemSync(this._kindOfQuantity);\n }\n\n /**\n * Save this Property's properties to an object for serializing to JSON.\n */\n public toJSON(): PropertyProps {\n const schemaJson: any = {};\n schemaJson.name = this.name;\n schemaJson.type = propertyTypeToString(this._type);\n if (this.description !== undefined)\n schemaJson.description = this.description;\n if (this.label !== undefined)\n schemaJson.label = this.label;\n if (this._isReadOnly !== undefined)\n schemaJson.isReadOnly = this._isReadOnly;\n if (this.category !== undefined)\n schemaJson.category = this.category.fullName; // needs to be fully qualified name\n if (this._priority !== undefined)\n schemaJson.priority = this._priority;\n if (this.kindOfQuantity !== undefined)\n schemaJson.kindOfQuantity = this.kindOfQuantity.fullName;\n const customAttributes = serializeCustomAttributes(this.customAttributes);\n if (customAttributes !== undefined)\n schemaJson.customAttributes = customAttributes;\n return schemaJson;\n }\n\n /** @internal */\n public async toXml(schemaXml: Document): Promise<Element> {\n const propType = `EC${propertyTypeToString(this._type)}`.replace(\"Primitive\", \"\");\n const itemElement = schemaXml.createElement(propType);\n itemElement.setAttribute(\"propertyName\", this.name);\n if (undefined !== this.description)\n itemElement.setAttribute(\"description\", this.description);\n if (undefined !== this.label)\n itemElement.setAttribute(\"displayLabel\", this.label);\n if (undefined !== this.isReadOnly)\n itemElement.setAttribute(\"readOnly\", String(this.isReadOnly));\n\n if (undefined !== this.category) {\n const category = await this.category;\n const categoryName = XmlSerializationUtils.createXmlTypedName(this.schema, category.schema, category.name);\n itemElement.setAttribute(\"category\", categoryName);\n }\n\n if (undefined !== this.priority)\n itemElement.setAttribute(\"priority\", this.priority.toString());\n\n if (undefined !== this.kindOfQuantity) {\n const kindOfQuantity = await this.kindOfQuantity;\n const kindOfQuantityName = XmlSerializationUtils.createXmlTypedName(this.schema, kindOfQuantity.schema, kindOfQuantity.name);\n itemElement.setAttribute(\"kindOfQuantity\", kindOfQuantityName);\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 fromJSONSync(propertyProps: PropertyProps) {\n if (undefined !== propertyProps.label) {\n this._label = propertyProps.label;\n }\n\n if (undefined !== propertyProps.description) {\n this._description = propertyProps.description;\n }\n\n if (undefined !== propertyProps.priority) {\n this._priority = propertyProps.priority;\n }\n\n if (undefined !== propertyProps.isReadOnly) {\n this._isReadOnly = propertyProps.isReadOnly;\n }\n\n if (undefined !== propertyProps.category) {\n const propertyCategorySchemaItemKey = this.class.schema.getSchemaItemKey(propertyProps.category);\n if (!propertyCategorySchemaItemKey)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Property ${this.name} has a 'category' (\"${propertyProps.category}\") that cannot be found.`);\n this._category = new DelayedPromiseWithProps<SchemaItemKey, PropertyCategory>(propertyCategorySchemaItemKey,\n async () => {\n const category = await this.class.schema.lookupItem<PropertyCategory>(propertyCategorySchemaItemKey);\n if (undefined === category)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Property ${this.name} has a 'category' (\"${propertyProps.category}\") that cannot be found.`);\n return category;\n });\n }\n\n if (undefined !== propertyProps.kindOfQuantity) {\n const koqSchemaItemKey = this.class.schema.getSchemaItemKey(propertyProps.kindOfQuantity);\n if (!koqSchemaItemKey)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Property ${this.name} has a 'kindOfQuantity' (\"${propertyProps.kindOfQuantity}\") that cannot be found.`);\n this._kindOfQuantity = new DelayedPromiseWithProps<SchemaItemKey, KindOfQuantity>(koqSchemaItemKey,\n async () => {\n const koq = await this.class.schema.lookupItem<KindOfQuantity>(koqSchemaItemKey);\n if (undefined === koq)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Property ${this.name} has a 'kindOfQuantity' (\"${propertyProps.kindOfQuantity}\") that cannot be found.`);\n return koq;\n });\n }\n }\n\n public async fromJSON(propertyProps: PropertyProps) {\n this.fromJSONSync(propertyProps);\n }\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 protected setName(name: ECName) {\n this._name = name;\n }\n\n /**\n * @internal Used in schema editing.\n */\n protected setDescription(description: string) {\n this._description = description;\n }\n\n /**\n * @internal Used in schema editing.\n */\n protected setLabel(label: string) {\n this._label = label;\n }\n\n /**\n * @internal Used in schema editing.\n */\n protected setIsReadOnly(isReadOnly: boolean) {\n this._isReadOnly = isReadOnly;\n }\n\n /**\n * @internal Used in schema editing.\n */\n protected setPriority(priority: number) {\n this._priority = priority;\n }\n\n /**\n * @internal Used in schema editing.\n */\n protected setCategory(category: LazyLoadedPropertyCategory) {\n this._category = category;\n }\n\n /**\n * @internal Used in schema editing.\n */\n protected setKindOfQuantity(kindOfQuantity: LazyLoadedKindOfQuantity) {\n this._kindOfQuantity = kindOfQuantity;\n }\n\n /**\n * Retrieve all custom attributes in the current property and its base\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 property and its base.\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 const baseProperty = this.class.getInheritedPropertySync(this.name);\n let baseCustomAttributes;\n if (undefined !== baseProperty)\n baseCustomAttributes = baseProperty.getCustomAttributesSync();\n if (undefined !== baseCustomAttributes) {\n customAttributes = new Map<string, CustomAttribute>([...baseCustomAttributes, ...customAttributes]);\n }\n\n return customAttributes;\n }\n /**\n * @internal\n */\n public static isProperty(object: any): object is AnyProperty {\n const property = object as Property;\n\n return property !== undefined && property.class !== undefined && property.name !== undefined\n && property.propertyType !== undefined;\n }\n}\n\n/** @beta */\nexport abstract class PrimitiveOrEnumPropertyBase extends Property {\n protected _extendedTypeName?: string;\n protected _minLength?: number;\n protected _maxLength?: number;\n protected _minValue?: number;\n protected _maxValue?: number;\n\n public get extendedTypeName() { return this._extendedTypeName; }\n public get minLength() { return this._minLength; }\n public get maxLength() { return this._maxLength; }\n public get minValue() { return this._minValue; }\n public get maxValue() { return this._maxValue; }\n\n constructor(ecClass: ECClass, name: string, type: PropertyType) {\n super(ecClass, name, type);\n }\n\n /**\n * Save this PrimitiveOrEnumPropertyBase's properties to an object for serializing to JSON.\n */\n public override toJSON(): PrimitiveOrEnumPropertyBaseProps {\n const schemaJson = super.toJSON() as any;\n if (this.extendedTypeName !== undefined)\n schemaJson.extendedTypeName = this.extendedTypeName;\n if (this._minLength !== undefined)\n schemaJson.minLength = this.minLength;\n if (this._maxLength !== undefined)\n schemaJson.maxLength = this.maxLength;\n if (this._minValue !== undefined)\n schemaJson.minValue = this.minValue;\n if (this._maxValue !== undefined)\n schemaJson.maxValue = this.maxValue;\n return schemaJson;\n }\n\n /** @internal */\n public override async toXml(schemaXml: Document): Promise<Element> {\n const itemElement = await super.toXml(schemaXml);\n if (undefined !== this.extendedTypeName)\n itemElement.setAttribute(\"extendedTypeName\", this.extendedTypeName);\n if (undefined !== this.minValue)\n itemElement.setAttribute(\"minimumValue\", this.minValue.toString());\n if (undefined !== this.maxValue)\n itemElement.setAttribute(\"maximumValue\", this.maxValue.toString());\n if (undefined !== this.minLength)\n itemElement.setAttribute(\"minimumLength\", this.minLength.toString());\n if (undefined !== this.maxLength)\n itemElement.setAttribute(\"maximumLength\", this.maxLength.toString());\n\n return itemElement;\n }\n\n public override fromJSONSync(propertyBaseProps: PrimitiveOrEnumPropertyBaseProps) {\n super.fromJSONSync(propertyBaseProps);\n\n if (undefined !== propertyBaseProps.minLength) {\n this._minLength = propertyBaseProps.minLength;\n }\n\n if (undefined !== propertyBaseProps.maxLength) {\n this._maxLength = propertyBaseProps.maxLength;\n }\n\n if (undefined !== propertyBaseProps.minValue) {\n this._minValue = propertyBaseProps.minValue;\n }\n\n if (undefined !== propertyBaseProps.maxValue) {\n this._maxValue = propertyBaseProps.maxValue;\n }\n\n if (undefined !== propertyBaseProps.extendedTypeName) {\n this._extendedTypeName = propertyBaseProps.extendedTypeName;\n }\n }\n /**\n * @internal Used in schema editing.\n */\n protected setExtendedTypeName(extendedTypeName: string) {\n this._extendedTypeName = extendedTypeName;\n }\n\n /**\n * @internal Used in schema editing.\n */\n protected setMinLength(minLength: number) {\n this._minLength = minLength;\n }\n\n /**\n * @internal Used in schema editing.\n */\n protected setMaxLength(maxLength: number) {\n this._maxLength = maxLength;\n }\n\n /**\n * @internal Used in schema editing.\n */\n protected setMinValue(minValue: number) {\n this._minValue = minValue;\n }\n\n /**\n * @internal Used in schema editing.\n */\n protected setMaxValue(maxValue: number) {\n this._maxValue = maxValue;\n }\n\n public override async fromJSON(propertyBaseProps: PrimitiveOrEnumPropertyBaseProps) {\n this.fromJSONSync(propertyBaseProps);\n }\n}\n\n/** @beta */\nexport class PrimitiveProperty extends PrimitiveOrEnumPropertyBase {\n public get primitiveType(): PrimitiveType { return PropertyTypeUtils.getPrimitiveType(this._type); }\n\n constructor(ecClass: ECClass, name: string, primitiveType: PrimitiveType = PrimitiveType.Integer) {\n super(ecClass, name, PropertyTypeUtils.fromPrimitiveType(primitiveType));\n }\n\n public override fromJSONSync(primitivePropertyProps: PrimitivePropertyProps) {\n super.fromJSONSync(primitivePropertyProps);\n if (undefined !== primitivePropertyProps.typeName) {\n if (this.primitiveType !== parsePrimitiveType(primitivePropertyProps.typeName))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, ``);\n }\n }\n\n public override async fromJSON(primitivePropertyProps: PrimitivePropertyProps) {\n this.fromJSONSync(primitivePropertyProps);\n }\n\n /**\n * Save this PrimitiveProperty's properties to an object for serializing to JSON.\n */\n public override toJSON(): PrimitivePropertyProps {\n const schemaJson = super.toJSON() as any;\n schemaJson.typeName = primitiveTypeToString(this.primitiveType);\n return schemaJson;\n }\n\n /** @internal */\n public override async toXml(schemaXml: Document): Promise<Element> {\n const itemElement = await super.toXml(schemaXml);\n itemElement.setAttribute(\"typeName\", primitiveTypeToString(this.primitiveType));\n return itemElement;\n }\n}\n\n/** @beta */\nexport class EnumerationProperty extends PrimitiveOrEnumPropertyBase {\n protected _enumeration?: LazyLoadedEnumeration;\n\n public get enumeration(): LazyLoadedEnumeration | undefined { return this._enumeration; }\n\n /**\n * Save this EnumerationProperty's properties to an object for serializing to JSON.\n */\n public override toJSON(): EnumerationPropertyProps {\n const schemaJson = super.toJSON() as any;\n schemaJson.typeName = this.enumeration!.fullName;\n return schemaJson;\n }\n\n constructor(ecClass: ECClass, name: string, type: LazyLoadedEnumeration) {\n // TODO: Should we allow specifying the backing type?\n super(ecClass, name, PropertyType.Integer_Enumeration);\n this._enumeration = type;\n }\n\n public override fromJSONSync(enumerationPropertyProps: EnumerationPropertyProps) {\n super.fromJSONSync(enumerationPropertyProps);\n if (undefined !== enumerationPropertyProps.typeName) {\n if (!(this.enumeration!.fullName).match(enumerationPropertyProps.typeName)) // need to match {schema}.{version}.{itemName} on typeName\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, ``);\n const enumSchemaItemKey = this.class.schema.getSchemaItemKey(this.enumeration!.fullName);\n if (!enumSchemaItemKey)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `Unable to locate the enumeration ${enumerationPropertyProps.typeName}.`);\n this._enumeration = new DelayedPromiseWithProps<SchemaItemKey, Enumeration>(enumSchemaItemKey,\n async () => {\n const enumeration = await this.class.schema.lookupItem<Enumeration>(enumSchemaItemKey);\n if (undefined === enumeration)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `Unable to locate the enumeration ${enumerationPropertyProps.typeName}.`);\n return enumeration;\n });\n }\n }\n\n /** @internal */\n public override async toXml(schemaXml: Document): Promise<Element> {\n const itemElement = await super.toXml(schemaXml);\n const enumeration = await this.enumeration;\n const enumerationName = XmlSerializationUtils.createXmlTypedName(this.schema, enumeration!.schema, enumeration!.name);\n itemElement.setAttribute(\"typeName\", enumerationName);\n return itemElement;\n }\n\n public override async fromJSON(enumerationPropertyProps: EnumerationPropertyProps) {\n this.fromJSONSync(enumerationPropertyProps);\n }\n\n}\n\n/** @beta */\nexport class StructProperty extends Property {\n protected _structClass: StructClass;\n\n public get structClass(): StructClass { return this._structClass; }\n\n constructor(ecClass: ECClass, name: string, type: StructClass) {\n super(ecClass, name, PropertyType.Struct);\n this._structClass = type;\n }\n\n /**\n * Save this StructProperty's properties to an object for serializing to JSON.\n */\n public override toJSON(): StructPropertyProps {\n const schemaJson = super.toJSON() as any;\n schemaJson.typeName = this.structClass.fullName;\n return schemaJson;\n }\n\n /** @internal */\n public override async toXml(schemaXml: Document): Promise<Element> {\n const itemElement = await super.toXml(schemaXml);\n const structClassName = XmlSerializationUtils.createXmlTypedName(this.schema, this.structClass.schema, this.structClass.name);\n itemElement.setAttribute(\"typeName\", structClassName);\n return itemElement;\n }\n\n public override fromJSONSync(structPropertyProps: StructPropertyProps) {\n super.fromJSONSync(structPropertyProps);\n if (undefined !== structPropertyProps.typeName) {\n if (!this.structClass.key.matchesFullName(structPropertyProps.typeName))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, ``);\n }\n }\n\n public override async fromJSON(structPropertyProps: StructPropertyProps) {\n this.fromJSONSync(structPropertyProps);\n }\n}\n\n/** @beta */\nexport class NavigationProperty extends Property {\n protected _relationshipClass: LazyLoadedRelationshipClass;\n protected _direction: StrengthDirection;\n\n public get relationshipClass(): LazyLoadedRelationshipClass { return this._relationshipClass; }\n\n public getRelationshipClassSync(): RelationshipClass | undefined {\n if (!this._relationshipClass) // eslint-disable-line @typescript-eslint/no-misused-promises\n return undefined;\n\n return this.class.schema.lookupItemSync(this._relationshipClass);\n }\n\n public get direction() { return this._direction; }\n\n /**\n * Save this NavigationProperty's properties to an object for serializing to JSON.\n */\n public override toJSON(): NavigationPropertyProps {\n const schemaJson = super.toJSON() as any;\n schemaJson.relationshipName = this.relationshipClass.fullName;\n schemaJson.direction = strengthDirectionToString(this.direction);\n return schemaJson;\n }\n\n /** @internal */\n public override async toXml(schemaXml: Document): Promise<Element> {\n const itemElement = await super.toXml(schemaXml);\n const relationshipClass = await this.relationshipClass;\n const relationshipClassName = XmlSerializationUtils.createXmlTypedName(this.schema, relationshipClass.schema, relationshipClass.name);\n itemElement.setAttribute(\"relationshipName\", relationshipClassName);\n itemElement.setAttribute(\"direction\", strengthDirectionToString(this.direction));\n\n return itemElement;\n }\n\n constructor(ecClass: ECClass, name: string, relationship: LazyLoadedRelationshipClass, direction?: StrengthDirection) {\n super(ecClass, name, PropertyType.Navigation);\n this._relationshipClass = relationship;\n\n this._direction = (direction !== undefined) ? direction : StrengthDirection.Forward;\n }\n}\n\ntype Constructor<T> = new (...args: any[]) => T;\n\n// TODO: Consolidate all of the INT32_MAX variables.\nconst INT32_MAX = 2147483647;\n\n/** @beta */\nexport abstract class ArrayProperty extends Property {\n protected _minOccurs: number = 0;\n protected _maxOccurs?: number = INT32_MAX;\n\n public get minOccurs() { return this._minOccurs; }\n public get maxOccurs() { return this._maxOccurs; }\n\n /**\n * @internal Used in schema editing.\n */\n protected setMinOccurs(minOccurs: number) {\n this._minOccurs = minOccurs;\n }\n\n /**\n * @internal Used in schema editing.\n */\n protected setMaxOccurs(maxOccurs: number) {\n this._maxOccurs = maxOccurs;\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nconst ArrayPropertyMixin = <T extends Constructor<Property>>(Base: T) => {\n return class extends Base {\n protected _minOccurs: number = 0;\n protected _maxOccurs: number = INT32_MAX;\n\n public get minOccurs() { return this._minOccurs; }\n public get maxOccurs() { return this._maxOccurs; }\n\n constructor(...args: any[]) {\n super(...args);\n this._type = PropertyTypeUtils.asArray(this._type);\n }\n\n public override fromJSONSync(arrayPropertyProps: PrimitiveArrayPropertyProps) {\n super.fromJSONSync(arrayPropertyProps);\n if (undefined !== arrayPropertyProps.minOccurs) {\n this._minOccurs = arrayPropertyProps.minOccurs;\n }\n\n if (undefined !== arrayPropertyProps.maxOccurs) {\n this._maxOccurs = arrayPropertyProps.maxOccurs;\n }\n }\n\n public override async fromJSON(arrayPropertyProps: PrimitiveArrayPropertyProps) {\n this.fromJSONSync(arrayPropertyProps);\n }\n\n /**\n * Save this ArrayProperty's properties to an object for serializing to JSON.\n */\n public override toJSON(): ArrayPropertyProps {\n const schemaJson = super.toJSON() as any;\n schemaJson.minOccurs = this.minOccurs;\n if (this.maxOccurs !== undefined)\n schemaJson.maxOccurs = this.maxOccurs;\n return schemaJson;\n }\n\n /** @internal */\n public override async toXml(schemaXml: Document): Promise<Element> {\n const itemElement = await super.toXml(schemaXml);\n itemElement.setAttribute(\"minOccurs\", this.minOccurs.toString());\n if (this.maxOccurs)\n itemElement.setAttribute(\"maxOccurs\", this.maxOccurs.toString());\n\n return itemElement;\n }\n\n /**\n * @internal Used in schema editing.\n */\n protected setMinOccurs(minOccurs: number) {\n this._minOccurs = minOccurs;\n }\n\n /**\n * @internal Used in schema editing.\n */\n protected setMaxOccurs(maxOccurs: number) {\n this._maxOccurs = maxOccurs;\n }\n } as Constructor<Property> as typeof Base & Constructor<ArrayProperty>;\n};\n\n/** @beta */\nexport class PrimitiveArrayProperty extends ArrayPropertyMixin(PrimitiveProperty) {\n constructor(ecClass: ECClass, name: string, primitiveType: PrimitiveType = PrimitiveType.Integer) {\n super(ecClass, name, primitiveType);\n }\n\n /**\n * Save this PrimitiveArrayProperty's properties to an object for serializing to JSON.\n */\n public override toJSON(): PrimitiveArrayPropertyProps {\n return super.toJSON();\n }\n\n}\n\n/** @beta */\nexport class EnumerationArrayProperty extends ArrayPropertyMixin(EnumerationProperty) {\n constructor(ecClass: ECClass, name: string, type: LazyLoadedEnumeration) {\n super(ecClass, name, type);\n }\n}\n\n/** @beta */\nexport class StructArrayProperty extends ArrayPropertyMixin(StructProperty) {\n constructor(ecClass: ECClass, name: string, type: StructClass) {\n super(ecClass, name, type);\n }\n}\n\n/** @beta */\nexport type AnyArrayProperty = PrimitiveArrayProperty | EnumerationArrayProperty | StructArrayProperty;\n/** @beta */\nexport type AnyPrimitiveProperty = PrimitiveProperty | PrimitiveArrayProperty;\n/** @beta */\nexport type AnyEnumerationProperty = EnumerationProperty | EnumerationArrayProperty;\n/** @beta */\nexport type AnyStructProperty = StructProperty | StructArrayProperty;\n/** @beta */\nexport type AnyProperty = AnyPrimitiveProperty | AnyEnumerationProperty | AnyStructProperty | NavigationProperty;\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 MutableProperty extends Property {\n public abstract override addCustomAttribute(customAttribute: CustomAttribute): void;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Property.js","sourceRoot":"","sources":["../../../src/Metadata/Property.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAK5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,qBAAqB,EAAE,cAAc,EAAE,iBAAiB,EAAE,yB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EAAE,CAAC,CAAC;YAEnE,OAAO,WAAW,CAAC;QACrB,CAAC;QAED;;WAEG;QACO,YAAY,CAAC,SAAiB;YACtC,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC9B,CAAC;QAED;;UAEE;QACQ,YAAY,CAAC,SAAiB;YACtC,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC9B,CAAC;KACmE,CAAC;AACzE,CAAC,CAAC;AAEF,YAAY;AACZ,MAAM,OAAO,sBAAuB,SAAQ,kBAAkB,CAAC,iBAAiB,CAAC;IAC/E,YAAY,OAAgB,EAAE,IAAY,EAAE,gBAA+B,aAAa,CAAC,OAAO;QAC9F,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC;IACtC,CAAC;IAED;;OAEG;IACa,MAAM;QACpB,OAAO,KAAK,CAAC,MAAM,EAAE,CAAC;IACxB,CAAC;CAEF;AAED,YAAY;AACZ,MAAM,OAAO,wBAAyB,SAAQ,kBAAkB,CAAC,mBAAmB,CAAC;IACnF,YAAY,OAAgB,EAAE,IAAY,EAAE,IAA2B;QACrE,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC7B,CAAC;CACF;AAED,YAAY;AACZ,MAAM,OAAO,mBAAoB,SAAQ,kBAAkB,CAAC,cAAc,CAAC;IACzE,YAAY,OAAgB,EAAE,IAAY,EAAE,IAAiB;QAC3D,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC7B,CAAC;CACF;AAaD;;;GAGG;AACH,MAAM,OAAgB,eAAgB,SAAQ,QAAQ;CAErD","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Metadata\n */\n\nimport { DelayedPromiseWithProps } from \"../DelayedPromise\";\nimport {\n ArrayPropertyProps, EnumerationPropertyProps, NavigationPropertyProps, PrimitiveArrayPropertyProps, PrimitiveOrEnumPropertyBaseProps,\n PrimitivePropertyProps, PropertyProps, StructPropertyProps,\n} from \"../Deserialization/JsonProps\";\nimport { XmlSerializationUtils } from \"../Deserialization/XmlSerializationUtils\";\nimport { parsePrimitiveType, PrimitiveType, primitiveTypeToString, SchemaItemType, StrengthDirection, strengthDirectionToString } from \"../ECObjects\";\nimport { ECObjectsError, ECObjectsStatus } from \"../Exception\";\nimport { AnyClass, LazyLoadedEnumeration, LazyLoadedKindOfQuantity, LazyLoadedPropertyCategory, LazyLoadedRelationshipClass } from \"../Interfaces\";\nimport { PropertyType, propertyTypeToString, PropertyTypeUtils } from \"../PropertyTypes\";\nimport { SchemaItemKey } from \"../SchemaKey\";\nimport { ECName } from \"../ECName\";\nimport { ECClass, StructClass } from \"./Class\";\nimport { CustomAttribute, CustomAttributeContainerProps, CustomAttributeSet, serializeCustomAttributes } from \"./CustomAttribute\";\nimport { Enumeration } from \"./Enumeration\";\nimport { KindOfQuantity } from \"./KindOfQuantity\";\nimport { PropertyCategory } from \"./PropertyCategory\";\nimport { type RelationshipClass } from \"./RelationshipClass\";\nimport { Schema } from \"./Schema\";\n\n/**\n * A common abstract class for all ECProperty types.\n * @beta\n */\nexport abstract class Property implements CustomAttributeContainerProps {\n protected _name: ECName;\n protected _type: PropertyType;\n\n protected _class: AnyClass; // TODO: class seems to be unused?\n protected _description?: string;\n protected _label?: string;\n protected _isReadOnly?: boolean;\n protected _priority?: number;\n protected _category?: LazyLoadedPropertyCategory;\n protected _kindOfQuantity?: LazyLoadedKindOfQuantity;\n private _customAttributes?: Map<string, CustomAttribute>;\n\n constructor(ecClass: ECClass, name: string, type: PropertyType) {\n this._class = ecClass as AnyClass;\n this._name = new ECName(name);\n this._type = type;\n }\n\n public isArray(): this is AnyArrayProperty { return PropertyTypeUtils.isArray(this._type); }\n public isPrimitive(): this is AnyPrimitiveProperty { return PropertyTypeUtils.isPrimitive(this._type); }\n public isStruct(): this is AnyStructProperty { return PropertyTypeUtils.isStruct(this._type); }\n public isEnumeration(): this is AnyEnumerationProperty { return PropertyTypeUtils.isEnumeration(this._type); }\n public isNavigation(): this is NavigationProperty { return PropertyTypeUtils.isNavigation(this._type); }\n\n public get name() { return this._name.name; }\n\n public get class() { return this._class; }\n\n public get label() { return this._label; }\n\n public get description() { return this._description; }\n\n public get isReadOnly() { return this._isReadOnly || false; }\n\n public get priority(): number {\n if (this._priority === undefined) {\n const baseProperty = this.class.getInheritedPropertySync(this.name);\n if (undefined !== baseProperty) {\n return baseProperty.priority;\n }\n }\n\n return this._priority || 0;\n }\n\n public get category(): LazyLoadedPropertyCategory | undefined {\n if (this._category === undefined) {\n const baseProperty = this.class.getInheritedPropertySync(this.name);\n if (undefined !== baseProperty) {\n return baseProperty.category;\n }\n }\n\n return this._category;\n }\n\n public get kindOfQuantity(): LazyLoadedKindOfQuantity | undefined {\n if (this._kindOfQuantity === undefined) {\n const baseProperty = this.class.getInheritedPropertySync(this.name);\n if (undefined !== baseProperty) {\n return baseProperty.kindOfQuantity;\n }\n }\n\n return this._kindOfQuantity;\n }\n\n public get propertyType() { return this._type; }\n\n public get customAttributes(): CustomAttributeSet | undefined { return this._customAttributes; }\n\n /** Returns the name in the format 'ClassName.PropertyName'. */\n public get fullName(): string { return `${this._class.name}.${this.name}`; }\n\n /** Returns the schema of the class holding the property. */\n public get schema(): Schema { return this._class.schema; }\n\n public getCategorySync(): PropertyCategory | undefined {\n if (!this._category){\n const baseProperty = this.class.getInheritedPropertySync(this.name);\n if (undefined !== baseProperty){\n return baseProperty.getCategorySync();\n }\n\n return undefined;\n }\n\n return this.class.schema.lookupItemSync(this._category, PropertyCategory);\n }\n\n public getKindOfQuantitySync(): KindOfQuantity | undefined {\n if (!this._kindOfQuantity){\n const baseProperty = this.class.getInheritedPropertySync(this.name);\n if (undefined !== baseProperty){\n return baseProperty.getKindOfQuantitySync();\n }\n\n return undefined;\n }\n\n return this.class.schema.lookupItemSync(this._kindOfQuantity, KindOfQuantity);\n }\n\n /**\n * Save this Property's properties to an object for serializing to JSON.\n */\n public toJSON(): PropertyProps {\n const schemaJson: any = {};\n schemaJson.name = this.name;\n schemaJson.type = propertyTypeToString(this._type);\n if (this.description !== undefined)\n schemaJson.description = this.description;\n if (this.label !== undefined)\n schemaJson.label = this.label;\n if (this._isReadOnly !== undefined)\n schemaJson.isReadOnly = this._isReadOnly;\n if (this._category !== undefined)\n schemaJson.category = this._category.fullName; // needs to be fully qualified name\n if (this._priority !== undefined)\n schemaJson.priority = this._priority;\n if (this._kindOfQuantity !== undefined)\n schemaJson.kindOfQuantity = this._kindOfQuantity.fullName;\n const customAttributes = serializeCustomAttributes(this.customAttributes);\n if (customAttributes !== undefined)\n schemaJson.customAttributes = customAttributes;\n return schemaJson;\n }\n\n /** @internal */\n public async toXml(schemaXml: Document): Promise<Element> {\n const propType = `EC${propertyTypeToString(this._type)}`.replace(\"Primitive\", \"\");\n const itemElement = schemaXml.createElement(propType);\n itemElement.setAttribute(\"propertyName\", this.name);\n if (undefined !== this.description)\n itemElement.setAttribute(\"description\", this.description);\n if (undefined !== this.label)\n itemElement.setAttribute(\"displayLabel\", this.label);\n if (undefined !== this.isReadOnly)\n itemElement.setAttribute(\"readOnly\", String(this.isReadOnly));\n\n if (undefined !== this._category) {\n const category = await this._category;\n const categoryName = XmlSerializationUtils.createXmlTypedName(this.schema, category.schema, category.name);\n itemElement.setAttribute(\"category\", categoryName);\n }\n\n if (undefined !== this._priority)\n itemElement.setAttribute(\"priority\", this._priority.toString());\n\n if (undefined !== this._kindOfQuantity) {\n const kindOfQuantity = await this._kindOfQuantity;\n const kindOfQuantityName = XmlSerializationUtils.createXmlTypedName(this.schema, kindOfQuantity.schema, kindOfQuantity.name);\n itemElement.setAttribute(\"kindOfQuantity\", kindOfQuantityName);\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 fromJSONSync(propertyProps: PropertyProps) {\n if (undefined !== propertyProps.label) {\n this._label = propertyProps.label;\n }\n\n if (undefined !== propertyProps.description) {\n this._description = propertyProps.description;\n }\n\n if (undefined !== propertyProps.priority) {\n this._priority = propertyProps.priority;\n }\n\n if (undefined !== propertyProps.isReadOnly) {\n this._isReadOnly = propertyProps.isReadOnly;\n }\n\n if (undefined !== propertyProps.category) {\n const propertyCategorySchemaItemKey = this.class.schema.getSchemaItemKey(propertyProps.category);\n if (!propertyCategorySchemaItemKey)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Property ${this.name} has a 'category' (\"${propertyProps.category}\") that cannot be found.`);\n this._category = new DelayedPromiseWithProps<SchemaItemKey, PropertyCategory>(propertyCategorySchemaItemKey,\n async () => {\n const category = await this.class.schema.lookupItem(propertyCategorySchemaItemKey, PropertyCategory);\n if (undefined === category)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Property ${this.name} has a 'category' (\"${propertyProps.category}\") that cannot be found.`);\n return category;\n });\n }\n\n if (undefined !== propertyProps.kindOfQuantity) {\n const koqSchemaItemKey = this.class.schema.getSchemaItemKey(propertyProps.kindOfQuantity);\n if (!koqSchemaItemKey)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Property ${this.name} has a 'kindOfQuantity' (\"${propertyProps.kindOfQuantity}\") that cannot be found.`);\n this._kindOfQuantity = new DelayedPromiseWithProps<SchemaItemKey, KindOfQuantity>(koqSchemaItemKey,\n async () => {\n const koq = await this.class.schema.lookupItem(koqSchemaItemKey, KindOfQuantity);\n if (undefined === koq)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Property ${this.name} has a 'kindOfQuantity' (\"${propertyProps.kindOfQuantity}\") that cannot be found.`);\n return koq;\n });\n }\n }\n\n public async fromJSON(propertyProps: PropertyProps) {\n this.fromJSONSync(propertyProps);\n }\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 protected setName(name: ECName) {\n this._name = name;\n }\n\n /**\n * @internal Used in schema editing.\n */\n protected setDescription(description: string) {\n this._description = description;\n }\n\n /**\n * @internal Used in schema editing.\n */\n protected setLabel(label: string) {\n this._label = label;\n }\n\n /**\n * @internal Used in schema editing.\n */\n protected setIsReadOnly(isReadOnly: boolean) {\n this._isReadOnly = isReadOnly;\n }\n\n /**\n * @internal Used in schema editing.\n */\n protected setPriority(priority: number) {\n this._priority = priority;\n }\n\n /**\n * @internal Used in schema editing.\n */\n protected setCategory(category: LazyLoadedPropertyCategory) {\n this._category = category;\n }\n\n /**\n * @internal Used in schema editing.\n */\n protected setKindOfQuantity(kindOfQuantity: LazyLoadedKindOfQuantity) {\n this._kindOfQuantity = kindOfQuantity;\n }\n\n /**\n * Retrieve all custom attributes in the current property and its base\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 property and its base.\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 const baseProperty = this.class.getInheritedPropertySync(this.name);\n let baseCustomAttributes;\n if (undefined !== baseProperty)\n baseCustomAttributes = baseProperty.getCustomAttributesSync();\n if (undefined !== baseCustomAttributes) {\n customAttributes = new Map<string, CustomAttribute>([...baseCustomAttributes, ...customAttributes]);\n }\n\n return customAttributes;\n }\n /**\n * @internal\n */\n public static isProperty(object: any): object is AnyProperty {\n const property = object as Property;\n\n return property !== undefined && property.class !== undefined && property.name !== undefined\n && property.propertyType !== undefined;\n }\n}\n\n/** @beta */\nexport abstract class PrimitiveOrEnumPropertyBase extends Property {\n protected _extendedTypeName?: string;\n protected _minLength?: number;\n protected _maxLength?: number;\n protected _minValue?: number;\n protected _maxValue?: number;\n\n public get extendedTypeName() { return this._extendedTypeName; }\n public get minLength() { return this._minLength; }\n public get maxLength() { return this._maxLength; }\n public get minValue() { return this._minValue; }\n public get maxValue() { return this._maxValue; }\n\n constructor(ecClass: ECClass, name: string, type: PropertyType) {\n super(ecClass, name, type);\n }\n\n /**\n * Save this PrimitiveOrEnumPropertyBase's properties to an object for serializing to JSON.\n */\n public override toJSON(): PrimitiveOrEnumPropertyBaseProps {\n const schemaJson = super.toJSON() as any;\n if (this.extendedTypeName !== undefined)\n schemaJson.extendedTypeName = this.extendedTypeName;\n if (this._minLength !== undefined)\n schemaJson.minLength = this.minLength;\n if (this._maxLength !== undefined)\n schemaJson.maxLength = this.maxLength;\n if (this._minValue !== undefined)\n schemaJson.minValue = this.minValue;\n if (this._maxValue !== undefined)\n schemaJson.maxValue = this.maxValue;\n return schemaJson;\n }\n\n /** @internal */\n public override async toXml(schemaXml: Document): Promise<Element> {\n const itemElement = await super.toXml(schemaXml);\n if (undefined !== this.extendedTypeName)\n itemElement.setAttribute(\"extendedTypeName\", this.extendedTypeName);\n if (undefined !== this.minValue)\n itemElement.setAttribute(\"minimumValue\", this.minValue.toString());\n if (undefined !== this.maxValue)\n itemElement.setAttribute(\"maximumValue\", this.maxValue.toString());\n if (undefined !== this.minLength)\n itemElement.setAttribute(\"minimumLength\", this.minLength.toString());\n if (undefined !== this.maxLength)\n itemElement.setAttribute(\"maximumLength\", this.maxLength.toString());\n\n return itemElement;\n }\n\n public override fromJSONSync(propertyBaseProps: PrimitiveOrEnumPropertyBaseProps) {\n super.fromJSONSync(propertyBaseProps);\n\n if (undefined !== propertyBaseProps.minLength) {\n this._minLength = propertyBaseProps.minLength;\n }\n\n if (undefined !== propertyBaseProps.maxLength) {\n this._maxLength = propertyBaseProps.maxLength;\n }\n\n if (undefined !== propertyBaseProps.minValue) {\n this._minValue = propertyBaseProps.minValue;\n }\n\n if (undefined !== propertyBaseProps.maxValue) {\n this._maxValue = propertyBaseProps.maxValue;\n }\n\n if (undefined !== propertyBaseProps.extendedTypeName) {\n this._extendedTypeName = propertyBaseProps.extendedTypeName;\n }\n }\n /**\n * @internal Used in schema editing.\n */\n protected setExtendedTypeName(extendedTypeName: string) {\n this._extendedTypeName = extendedTypeName;\n }\n\n /**\n * @internal Used in schema editing.\n */\n protected setMinLength(minLength: number) {\n this._minLength = minLength;\n }\n\n /**\n * @internal Used in schema editing.\n */\n protected setMaxLength(maxLength: number) {\n this._maxLength = maxLength;\n }\n\n /**\n * @internal Used in schema editing.\n */\n protected setMinValue(minValue: number) {\n this._minValue = minValue;\n }\n\n /**\n * @internal Used in schema editing.\n */\n protected setMaxValue(maxValue: number) {\n this._maxValue = maxValue;\n }\n\n public override async fromJSON(propertyBaseProps: PrimitiveOrEnumPropertyBaseProps) {\n this.fromJSONSync(propertyBaseProps);\n }\n}\n\n/** @beta */\nexport class PrimitiveProperty extends PrimitiveOrEnumPropertyBase {\n public get primitiveType(): PrimitiveType { return PropertyTypeUtils.getPrimitiveType(this._type); }\n\n constructor(ecClass: ECClass, name: string, primitiveType: PrimitiveType = PrimitiveType.Integer) {\n super(ecClass, name, PropertyTypeUtils.fromPrimitiveType(primitiveType));\n }\n\n public override fromJSONSync(primitivePropertyProps: PrimitivePropertyProps) {\n super.fromJSONSync(primitivePropertyProps);\n if (undefined !== primitivePropertyProps.typeName) {\n if (this.primitiveType !== parsePrimitiveType(primitivePropertyProps.typeName))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, ``);\n }\n }\n\n public override async fromJSON(primitivePropertyProps: PrimitivePropertyProps) {\n this.fromJSONSync(primitivePropertyProps);\n }\n\n /**\n * Save this PrimitiveProperty's properties to an object for serializing to JSON.\n */\n public override toJSON(): PrimitivePropertyProps {\n const schemaJson = super.toJSON() as any;\n schemaJson.typeName = primitiveTypeToString(this.primitiveType);\n return schemaJson;\n }\n\n /** @internal */\n public override async toXml(schemaXml: Document): Promise<Element> {\n const itemElement = await super.toXml(schemaXml);\n itemElement.setAttribute(\"typeName\", primitiveTypeToString(this.primitiveType));\n return itemElement;\n }\n}\n\n/** @beta */\nexport class EnumerationProperty extends PrimitiveOrEnumPropertyBase {\n protected _enumeration?: LazyLoadedEnumeration;\n\n public get enumeration(): LazyLoadedEnumeration | undefined { return this._enumeration; }\n\n /**\n * Save this EnumerationProperty's properties to an object for serializing to JSON.\n */\n public override toJSON(): EnumerationPropertyProps {\n const schemaJson = super.toJSON() as any;\n schemaJson.typeName = this.enumeration!.fullName;\n return schemaJson;\n }\n\n constructor(ecClass: ECClass, name: string, type: LazyLoadedEnumeration) {\n // TODO: Should we allow specifying the backing type?\n super(ecClass, name, PropertyType.Integer_Enumeration);\n this._enumeration = type;\n }\n\n public override fromJSONSync(enumerationPropertyProps: EnumerationPropertyProps) {\n super.fromJSONSync(enumerationPropertyProps);\n if (undefined !== enumerationPropertyProps.typeName) {\n if (!(this.enumeration!.fullName).match(enumerationPropertyProps.typeName)) // need to match {schema}.{version}.{itemName} on typeName\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, ``);\n const enumSchemaItemKey = this.class.schema.getSchemaItemKey(this.enumeration!.fullName);\n if (!enumSchemaItemKey)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `Unable to locate the enumeration ${enumerationPropertyProps.typeName}.`);\n this._enumeration = new DelayedPromiseWithProps<SchemaItemKey, Enumeration>(enumSchemaItemKey,\n async () => {\n const enumeration = await this.class.schema.lookupItem(enumSchemaItemKey, Enumeration);\n if (undefined === enumeration)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `Unable to locate the enumeration ${enumerationPropertyProps.typeName}.`);\n return enumeration;\n });\n }\n }\n\n /** @internal */\n public override async toXml(schemaXml: Document): Promise<Element> {\n const itemElement = await super.toXml(schemaXml);\n const enumeration = await this.enumeration;\n const enumerationName = XmlSerializationUtils.createXmlTypedName(this.schema, enumeration!.schema, enumeration!.name);\n itemElement.setAttribute(\"typeName\", enumerationName);\n return itemElement;\n }\n\n public override async fromJSON(enumerationPropertyProps: EnumerationPropertyProps) {\n this.fromJSONSync(enumerationPropertyProps);\n }\n\n}\n\n/** @beta */\nexport class StructProperty extends Property {\n protected _structClass: StructClass;\n\n public get structClass(): StructClass { return this._structClass; }\n\n constructor(ecClass: ECClass, name: string, type: StructClass) {\n super(ecClass, name, PropertyType.Struct);\n this._structClass = type;\n }\n\n /**\n * Save this StructProperty's properties to an object for serializing to JSON.\n */\n public override toJSON(): StructPropertyProps {\n const schemaJson = super.toJSON() as any;\n schemaJson.typeName = this.structClass.fullName;\n return schemaJson;\n }\n\n /** @internal */\n public override async toXml(schemaXml: Document): Promise<Element> {\n const itemElement = await super.toXml(schemaXml);\n const structClassName = XmlSerializationUtils.createXmlTypedName(this.schema, this.structClass.schema, this.structClass.name);\n itemElement.setAttribute(\"typeName\", structClassName);\n return itemElement;\n }\n\n public override fromJSONSync(structPropertyProps: StructPropertyProps) {\n super.fromJSONSync(structPropertyProps);\n if (undefined !== structPropertyProps.typeName) {\n if (!this.structClass.key.matchesFullName(structPropertyProps.typeName))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, ``);\n }\n }\n\n public override async fromJSON(structPropertyProps: StructPropertyProps) {\n this.fromJSONSync(structPropertyProps);\n }\n}\n\n/** @beta */\nexport class NavigationProperty extends Property {\n protected _relationshipClass: LazyLoadedRelationshipClass;\n protected _direction: StrengthDirection;\n\n public get relationshipClass(): LazyLoadedRelationshipClass { return this._relationshipClass; }\n\n public getRelationshipClassSync(): RelationshipClass | undefined {\n if (!this._relationshipClass) // eslint-disable-line @typescript-eslint/no-misused-promises\n return undefined;\n\n // We cannot use the type guard here to avoid a circular dependency\n const result = this.class.schema.lookupItemSync(this._relationshipClass);\n return result?.schemaItemType === SchemaItemType.RelationshipClass ? result as RelationshipClass : undefined\n }\n\n public get direction() { return this._direction; }\n\n /**\n * Save this NavigationProperty's properties to an object for serializing to JSON.\n */\n public override toJSON(): NavigationPropertyProps {\n const schemaJson = super.toJSON() as any;\n schemaJson.relationshipName = this.relationshipClass.fullName;\n schemaJson.direction = strengthDirectionToString(this.direction);\n return schemaJson;\n }\n\n /** @internal */\n public override async toXml(schemaXml: Document): Promise<Element> {\n const itemElement = await super.toXml(schemaXml);\n const relationshipClass = await this.relationshipClass;\n const relationshipClassName = XmlSerializationUtils.createXmlTypedName(this.schema, relationshipClass.schema, relationshipClass.name);\n itemElement.setAttribute(\"relationshipName\", relationshipClassName);\n itemElement.setAttribute(\"direction\", strengthDirectionToString(this.direction));\n\n return itemElement;\n }\n\n constructor(ecClass: ECClass, name: string, relationship: LazyLoadedRelationshipClass, direction?: StrengthDirection) {\n super(ecClass, name, PropertyType.Navigation);\n this._relationshipClass = relationship;\n\n this._direction = (direction !== undefined) ? direction : StrengthDirection.Forward;\n }\n}\n\ntype Constructor<T> = new (...args: any[]) => T;\n\n// TODO: Consolidate all of the INT32_MAX variables.\nconst INT32_MAX = 2147483647;\n\n/** @beta */\nexport abstract class ArrayProperty extends Property {\n protected _minOccurs: number = 0;\n protected _maxOccurs?: number = INT32_MAX;\n\n public get minOccurs() { return this._minOccurs; }\n public get maxOccurs() { return this._maxOccurs; }\n\n /**\n * @internal Used in schema editing.\n */\n protected setMinOccurs(minOccurs: number) {\n this._minOccurs = minOccurs;\n }\n\n /**\n * @internal Used in schema editing.\n */\n protected setMaxOccurs(maxOccurs: number) {\n this._maxOccurs = maxOccurs;\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nconst ArrayPropertyMixin = <T extends Constructor<Property>>(Base: T) => {\n return class extends Base {\n protected _minOccurs: number = 0;\n protected _maxOccurs: number = INT32_MAX;\n\n public get minOccurs() { return this._minOccurs; }\n public get maxOccurs() { return this._maxOccurs; }\n\n constructor(...args: any[]) {\n super(...args);\n this._type = PropertyTypeUtils.asArray(this._type);\n }\n\n public override fromJSONSync(arrayPropertyProps: PrimitiveArrayPropertyProps) {\n super.fromJSONSync(arrayPropertyProps);\n if (undefined !== arrayPropertyProps.minOccurs) {\n this._minOccurs = arrayPropertyProps.minOccurs;\n }\n\n if (undefined !== arrayPropertyProps.maxOccurs) {\n this._maxOccurs = arrayPropertyProps.maxOccurs;\n }\n }\n\n public override async fromJSON(arrayPropertyProps: PrimitiveArrayPropertyProps) {\n this.fromJSONSync(arrayPropertyProps);\n }\n\n /**\n * Save this ArrayProperty's properties to an object for serializing to JSON.\n */\n public override toJSON(): ArrayPropertyProps {\n const schemaJson = super.toJSON() as any;\n schemaJson.minOccurs = this.minOccurs;\n if (this.maxOccurs !== undefined)\n schemaJson.maxOccurs = this.maxOccurs;\n return schemaJson;\n }\n\n /** @internal */\n public override async toXml(schemaXml: Document): Promise<Element> {\n const itemElement = await super.toXml(schemaXml);\n itemElement.setAttribute(\"minOccurs\", this.minOccurs.toString());\n if (this.maxOccurs)\n itemElement.setAttribute(\"maxOccurs\", this.maxOccurs.toString());\n\n return itemElement;\n }\n\n /**\n * @internal Used in schema editing.\n */\n protected setMinOccurs(minOccurs: number) {\n this._minOccurs = minOccurs;\n }\n\n /**\n * @internal Used in schema editing.\n */\n protected setMaxOccurs(maxOccurs: number) {\n this._maxOccurs = maxOccurs;\n }\n } as Constructor<Property> as typeof Base & Constructor<ArrayProperty>;\n};\n\n/** @beta */\nexport class PrimitiveArrayProperty extends ArrayPropertyMixin(PrimitiveProperty) {\n constructor(ecClass: ECClass, name: string, primitiveType: PrimitiveType = PrimitiveType.Integer) {\n super(ecClass, name, primitiveType);\n }\n\n /**\n * Save this PrimitiveArrayProperty's properties to an object for serializing to JSON.\n */\n public override toJSON(): PrimitiveArrayPropertyProps {\n return super.toJSON();\n }\n\n}\n\n/** @beta */\nexport class EnumerationArrayProperty extends ArrayPropertyMixin(EnumerationProperty) {\n constructor(ecClass: ECClass, name: string, type: LazyLoadedEnumeration) {\n super(ecClass, name, type);\n }\n}\n\n/** @beta */\nexport class StructArrayProperty extends ArrayPropertyMixin(StructProperty) {\n constructor(ecClass: ECClass, name: string, type: StructClass) {\n super(ecClass, name, type);\n }\n}\n\n/** @beta */\nexport type AnyArrayProperty = PrimitiveArrayProperty | EnumerationArrayProperty | StructArrayProperty;\n/** @beta */\nexport type AnyPrimitiveProperty = PrimitiveProperty | PrimitiveArrayProperty;\n/** @beta */\nexport type AnyEnumerationProperty = EnumerationProperty | EnumerationArrayProperty;\n/** @beta */\nexport type AnyStructProperty = StructProperty | StructArrayProperty;\n/** @beta */\nexport type AnyProperty = AnyPrimitiveProperty | AnyEnumerationProperty | AnyStructProperty | NavigationProperty;\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 MutableProperty extends Property {\n public abstract override addCustomAttribute(customAttribute: CustomAttribute): void;\n}\n"]}
|
|
@@ -9,7 +9,8 @@ import { SchemaItem } from "./SchemaItem";
|
|
|
9
9
|
* @beta
|
|
10
10
|
*/
|
|
11
11
|
export declare class PropertyCategory extends SchemaItem {
|
|
12
|
-
readonly schemaItemType: SchemaItemType
|
|
12
|
+
readonly schemaItemType: SchemaItemType;
|
|
13
|
+
static get schemaItemType(): SchemaItemType;
|
|
13
14
|
protected _priority: number;
|
|
14
15
|
get priority(): number;
|
|
15
16
|
constructor(schema: Schema, name: string);
|
|
@@ -28,6 +29,18 @@ export declare class PropertyCategory extends SchemaItem {
|
|
|
28
29
|
* Used for schema editing.
|
|
29
30
|
*/
|
|
30
31
|
protected setPriority(priority: number): void;
|
|
32
|
+
/**
|
|
33
|
+
* Type guard to check if the SchemaItem is of type PropertyCategory.
|
|
34
|
+
* @param item The SchemaItem to check.
|
|
35
|
+
* @returns True if the item is a PropertyCategory, false otherwise.
|
|
36
|
+
*/
|
|
37
|
+
static isPropertyCategory(item?: SchemaItem): item is PropertyCategory;
|
|
38
|
+
/**
|
|
39
|
+
* Type assertion to check if the SchemaItem is of type PropertyCategory.
|
|
40
|
+
* @param item The SchemaItem to check.
|
|
41
|
+
* @returns The item cast to PropertyCategory if it is a PropertyCategory, undefined otherwise.
|
|
42
|
+
*/
|
|
43
|
+
static assertIsPropertyCategory(item?: SchemaItem): asserts item is PropertyCategory;
|
|
31
44
|
}
|
|
32
45
|
/**
|
|
33
46
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyCategory.d.ts","sourceRoot":"","sources":["../../../src/Metadata/PropertyCategory.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"PropertyCategory.d.ts","sourceRoot":"","sources":["../../../src/Metadata/PropertyCategory.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,UAAU;IAC9C,SAAyB,cAAc,iBAAmC;IAC1E,WAA2B,cAAc,mBAA8C;IACvF,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC;IAE5B,IAAW,QAAQ,WAA6B;gBAEpC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAKxC;;;;OAIG;IACa,MAAM,CAAC,UAAU,GAAE,OAAe,EAAE,oBAAoB,GAAE,OAAe,GAAG,qBAAqB;IAMjH,gBAAgB;IACM,KAAK,CAAC,SAAS,EAAE,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC;IAMlD,YAAY,CAAC,qBAAqB,EAAE,qBAAqB;IAKnD,QAAQ,CAAC,qBAAqB,EAAE,qBAAqB;IAG3E;;;OAGG;IACH,SAAS,CAAC,WAAW,CAAC,QAAQ,EAAE,MAAM;IAItC;;;;OAIG;WACW,kBAAkB,CAAC,IAAI,CAAC,EAAE,UAAU,GAAG,IAAI,IAAI,gBAAgB;IAI7E;;;;OAIG;WACW,wBAAwB,CAAC,IAAI,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,IAAI,gBAAgB;CAI5F;AAED;;;GAGG;AACH,8BAAsB,uBAAwB,SAAQ,gBAAgB;aAC3C,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;aACnC,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI;CACrE"}
|
|
@@ -6,15 +6,18 @@
|
|
|
6
6
|
* @module Metadata
|
|
7
7
|
*/
|
|
8
8
|
import { SchemaItemType } from "../ECObjects";
|
|
9
|
+
import { ECObjectsError, ECObjectsStatus } from "../Exception";
|
|
9
10
|
import { SchemaItem } from "./SchemaItem";
|
|
10
11
|
/**
|
|
11
12
|
* @beta
|
|
12
13
|
*/
|
|
13
14
|
export class PropertyCategory extends SchemaItem {
|
|
15
|
+
schemaItemType = PropertyCategory.schemaItemType;
|
|
16
|
+
static get schemaItemType() { return SchemaItemType.PropertyCategory; }
|
|
17
|
+
_priority;
|
|
14
18
|
get priority() { return this._priority; }
|
|
15
19
|
constructor(schema, name) {
|
|
16
20
|
super(schema, name);
|
|
17
|
-
this.schemaItemType = SchemaItemType.PropertyCategory;
|
|
18
21
|
this._priority = 0;
|
|
19
22
|
}
|
|
20
23
|
/**
|
|
@@ -47,6 +50,23 @@ export class PropertyCategory extends SchemaItem {
|
|
|
47
50
|
setPriority(priority) {
|
|
48
51
|
this._priority = priority;
|
|
49
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Type guard to check if the SchemaItem is of type PropertyCategory.
|
|
55
|
+
* @param item The SchemaItem to check.
|
|
56
|
+
* @returns True if the item is a PropertyCategory, false otherwise.
|
|
57
|
+
*/
|
|
58
|
+
static isPropertyCategory(item) {
|
|
59
|
+
return item?.schemaItemType === SchemaItemType.PropertyCategory;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Type assertion to check if the SchemaItem is of type PropertyCategory.
|
|
63
|
+
* @param item The SchemaItem to check.
|
|
64
|
+
* @returns The item cast to PropertyCategory if it is a PropertyCategory, undefined otherwise.
|
|
65
|
+
*/
|
|
66
|
+
static assertIsPropertyCategory(item) {
|
|
67
|
+
if (!this.isPropertyCategory(item))
|
|
68
|
+
throw new ECObjectsError(ECObjectsStatus.InvalidSchemaItemType, `Expected '${SchemaItemType.PropertyCategory}' (PropertyCategory)`);
|
|
69
|
+
}
|
|
50
70
|
}
|
|
51
71
|
/**
|
|
52
72
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyCategory.js","sourceRoot":"","sources":["../../../src/Metadata/PropertyCategory.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"PropertyCategory.js","sourceRoot":"","sources":["../../../src/Metadata/PropertyCategory.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;;GAEG;AACH,MAAM,OAAO,gBAAiB,SAAQ,UAAU;IACrB,cAAc,GAAG,gBAAgB,CAAC,cAAc,CAAC;IACnE,MAAM,KAAc,cAAc,KAAK,OAAO,cAAc,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAC7E,SAAS,CAAS;IAE5B,IAAW,QAAQ,KAAK,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IAEhD,YAAY,MAAc,EAAE,IAAY;QACtC,KAAK,CAAC,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,gBAAgB,sBAAsB,CAAC,CAAC;IACxI,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,OAAgB,uBAAwB,SAAQ,gBAAgB;CAGrE","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 { PropertyCategoryProps } from \"../Deserialization/JsonProps\";\nimport { SchemaItemType } from \"../ECObjects\";\nimport { ECObjectsError, ECObjectsStatus } from \"../Exception\";\nimport { Schema } from \"./Schema\";\nimport { SchemaItem } from \"./SchemaItem\";\n\n/**\n * @beta\n */\nexport class PropertyCategory extends SchemaItem {\n public override readonly schemaItemType = PropertyCategory.schemaItemType;\n public static override get schemaItemType() { return SchemaItemType.PropertyCategory; }\n protected _priority: number;\n\n public get priority() { return this._priority; }\n\n constructor(schema: Schema, name: string) {\n super(schema, name);\n this._priority = 0;\n }\n\n /**\n * Save this PropertyCategory's properties to an object for serializing to JSON.\n * @param standalone Serialization includes only this object (as opposed to the full schema).\n * @param includeSchemaVersion Include the Schema's version information in the serialized object.\n */\n public override toJSON(standalone: boolean = false, includeSchemaVersion: boolean = false): PropertyCategoryProps {\n const schemaJson = super.toJSON(standalone, includeSchemaVersion) as any;\n schemaJson.priority = this.priority;\n return schemaJson;\n }\n\n /** @internal */\n public override async toXml(schemaXml: Document): Promise<Element> {\n const itemElement = await super.toXml(schemaXml);\n itemElement.setAttribute(\"priority\", this.priority.toString());\n return itemElement;\n }\n\n public override fromJSONSync(propertyCategoryProps: PropertyCategoryProps) {\n super.fromJSONSync(propertyCategoryProps);\n this._priority = propertyCategoryProps.priority;\n }\n\n public override async fromJSON(propertyCategoryProps: PropertyCategoryProps) {\n this.fromJSONSync(propertyCategoryProps);\n }\n /**\n * @alpha\n * Used for schema editing.\n */\n protected setPriority(priority: number) {\n this._priority = priority;\n }\n\n /**\n * Type guard to check if the SchemaItem is of type PropertyCategory.\n * @param item The SchemaItem to check.\n * @returns True if the item is a PropertyCategory, false otherwise.\n */\n public static isPropertyCategory(item?: SchemaItem): item is PropertyCategory {\n return item?.schemaItemType === SchemaItemType.PropertyCategory;\n }\n\n /**\n * Type assertion to check if the SchemaItem is of type PropertyCategory.\n * @param item The SchemaItem to check.\n * @returns The item cast to PropertyCategory if it is a PropertyCategory, undefined otherwise.\n */\n public static assertIsPropertyCategory(item?: SchemaItem): asserts item is PropertyCategory {\n if (!this.isPropertyCategory(item))\n throw new ECObjectsError(ECObjectsStatus.InvalidSchemaItemType, `Expected '${SchemaItemType.PropertyCategory}' (PropertyCategory)`);\n }\n}\n\n/**\n * @internal\n * An abstract class used for schema editing.\n */\nexport abstract class MutablePropertyCategory extends PropertyCategory {\n public abstract override setPriority(priority: number): void;\n public abstract override setDisplayLabel(displayLabel: string): void;\n}\n"]}
|
|
@@ -10,13 +10,14 @@ import { EntityClass } from "./EntityClass";
|
|
|
10
10
|
import { Mixin } from "./Mixin";
|
|
11
11
|
import { NavigationProperty } from "./Property";
|
|
12
12
|
import { Schema } from "./Schema";
|
|
13
|
+
import { SchemaItem } from "./SchemaItem";
|
|
13
14
|
/**
|
|
14
15
|
* A Typescript class representation of a ECRelationshipClass.
|
|
15
16
|
* @beta
|
|
16
17
|
*/
|
|
17
18
|
export declare class RelationshipClass extends ECClass {
|
|
18
|
-
readonly
|
|
19
|
-
|
|
19
|
+
readonly schemaItemType: SchemaItemType;
|
|
20
|
+
static get schemaItemType(): SchemaItemType;
|
|
20
21
|
protected _strength: StrengthType;
|
|
21
22
|
protected _strengthDirection: StrengthDirection;
|
|
22
23
|
protected _source: RelationshipConstraint;
|
|
@@ -60,6 +61,18 @@ export declare class RelationshipClass extends ECClass {
|
|
|
60
61
|
toXml(schemaXml: Document): Promise<Element>;
|
|
61
62
|
fromJSONSync(relationshipClassProps: RelationshipClassProps): void;
|
|
62
63
|
fromJSON(relationshipClassProps: RelationshipClassProps): Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* Type guard to check if the SchemaItem is of type RelationshipClass.
|
|
66
|
+
* @param item The SchemaItem to check.
|
|
67
|
+
* @returns True if the item is a RelationshipClass, false otherwise.
|
|
68
|
+
*/
|
|
69
|
+
static isRelationshipClass(item?: SchemaItem): item is RelationshipClass;
|
|
70
|
+
/**
|
|
71
|
+
* Type assertion to check if the SchemaItem is of type RelationshipClass.
|
|
72
|
+
* @param item The SchemaItem to check.
|
|
73
|
+
* @returns The item cast to RelationshipClass if it is a RelationshipClass, undefined otherwise.
|
|
74
|
+
*/
|
|
75
|
+
static assertIsRelationshipClass(item?: SchemaItem): asserts item is RelationshipClass;
|
|
63
76
|
}
|
|
64
77
|
/**
|
|
65
78
|
* A Typescript class representation of a ECRelationshipConstraint.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RelationshipClass.d.ts","sourceRoot":"","sources":["../../../src/Metadata/RelationshipClass.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EAAE,sBAAsB,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAEnG,OAAO,EACL,eAAe,EAAyC,eAAe,EAAE,cAAc,EAAE,iBAAiB,EACxF,YAAY,EAC/B,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,qCAAqC,EAAE,MAAM,eAAe,CAAC;AAEtE,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,6BAA6B,EAAE,kBAAkB,EAA6B,MAAM,mBAAmB,CAAC;AAClI,OAAO,EAA0D,WAAW,EAAE,MAAM,eAAe,CAAC;AACpG,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"RelationshipClass.d.ts","sourceRoot":"","sources":["../../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