@itwin/ecschema-metadata 5.0.0-dev.9 → 5.0.0-dev.90
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 +51 -1
- package/lib/cjs/Constants.js +20 -20
- package/lib/cjs/Constants.js.map +1 -1
- package/lib/cjs/Context.d.ts +83 -34
- package/lib/cjs/Context.d.ts.map +1 -1
- package/lib/cjs/Context.js +73 -23
- 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/SchemaGraphUtil.js.map +1 -1
- package/lib/cjs/Deserialization/XmlParser.d.ts.map +1 -1
- package/lib/cjs/Deserialization/XmlParser.js +11 -3
- package/lib/cjs/Deserialization/XmlParser.js.map +1 -1
- package/lib/cjs/Deserialization/XmlSerializationUtils.d.ts.map +1 -1
- package/lib/cjs/Deserialization/XmlSerializationUtils.js +2 -6
- package/lib/cjs/Deserialization/XmlSerializationUtils.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 +33 -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 +75 -16
- package/lib/cjs/Metadata/Class.d.ts.map +1 -1
- package/lib/cjs/Metadata/Class.js +168 -46
- 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/CustomAttribute.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 +20 -8
- package/lib/cjs/Metadata/EntityClass.d.ts.map +1 -1
- package/lib/cjs/Metadata/EntityClass.js +42 -22
- 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 +5 -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/PropertyTypes.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/Parser.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.d.ts.map +1 -1
- package/lib/cjs/UnitProvider/SchemaUnitProvider.js +8 -9
- 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 +6 -4
- package/lib/cjs/Validation/SchemaWalker.js.map +1 -1
- package/lib/cjs/ecschema-metadata.d.ts +1 -1
- package/lib/cjs/ecschema-metadata.d.ts.map +1 -1
- package/lib/cjs/ecschema-metadata.js.map +1 -1
- package/lib/cjs/utils/SchemaGraph.js +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 +83 -34
- package/lib/esm/Context.d.ts.map +1 -1
- package/lib/esm/Context.js +71 -21
- 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/SchemaGraphUtil.js.map +1 -1
- package/lib/esm/Deserialization/XmlParser.d.ts.map +1 -1
- package/lib/esm/Deserialization/XmlParser.js +11 -3
- package/lib/esm/Deserialization/XmlParser.js.map +1 -1
- package/lib/esm/Deserialization/XmlSerializationUtils.d.ts.map +1 -1
- package/lib/esm/Deserialization/XmlSerializationUtils.js +2 -6
- package/lib/esm/Deserialization/XmlSerializationUtils.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 +31 -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 +75 -16
- package/lib/esm/Metadata/Class.d.ts.map +1 -1
- package/lib/esm/Metadata/Class.js +169 -47
- 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/CustomAttribute.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 +20 -8
- package/lib/esm/Metadata/EntityClass.d.ts.map +1 -1
- package/lib/esm/Metadata/EntityClass.js +42 -22
- 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 +5 -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/PropertyTypes.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/Parser.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.d.ts.map +1 -1
- package/lib/esm/UnitProvider/SchemaUnitProvider.js +8 -9
- 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 +6 -4
- package/lib/esm/Validation/SchemaWalker.js.map +1 -1
- package/lib/esm/ecschema-metadata.d.ts +1 -1
- package/lib/esm/ecschema-metadata.d.ts.map +1 -1
- package/lib/esm/ecschema-metadata.js.map +1 -1
- package/lib/esm/utils/SchemaGraph.js +2 -3
- package/lib/esm/utils/SchemaGraph.js.map +1 -1
- package/package.json +14 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../../src/Metadata/Schema.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG3C,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAG3D,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE9D,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,EAAa,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEnE,OAAO,EAAE,OAAO,EA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AC9C,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;aAC3C,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;aACtC,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;aACnD,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU;aAC9C,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;aAC/D,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB;aAC1D,OAAO,CAAC,CAAC,SAAS,UAAU,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI;aAC5C,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;aAC9C,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;aACzC,UAAU,CAAC,aAAa,EAAE,aAAa,GAAG,IAAI;aAC9C,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;aACxC,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;aACnC,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;aAC7C,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;aACxC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;CACvD"}
|
|
@@ -9,6 +9,7 @@ import { SchemaReadHelper } from "../Deserialization/Helper";
|
|
|
9
9
|
import { JsonParser } from "../Deserialization/JsonParser";
|
|
10
10
|
import { XmlParser } from "../Deserialization/XmlParser";
|
|
11
11
|
import { XmlSerializationUtils } from "../Deserialization/XmlSerializationUtils";
|
|
12
|
+
import { isSupportedSchemaItemType } from "../ECObjects";
|
|
12
13
|
import { ECObjectsError, ECObjectsStatus } from "../Exception";
|
|
13
14
|
import { ECVersion, SchemaItemKey, SchemaKey } from "../SchemaKey";
|
|
14
15
|
import { ECName } from "../ECName";
|
|
@@ -34,6 +35,17 @@ const SCHEMAURL3_2_XML = "http://www.bentley.com/schemas/Bentley.ECXML.3.2";
|
|
|
34
35
|
* @beta
|
|
35
36
|
*/
|
|
36
37
|
export class Schema {
|
|
38
|
+
static _currentECSpecVersion = "3.2";
|
|
39
|
+
_context;
|
|
40
|
+
_schemaKey;
|
|
41
|
+
_alias;
|
|
42
|
+
_label;
|
|
43
|
+
_description;
|
|
44
|
+
references;
|
|
45
|
+
_items;
|
|
46
|
+
_customAttributes;
|
|
47
|
+
_originalECSpecMajorVersion;
|
|
48
|
+
_originalECSpecMinorVersion;
|
|
37
49
|
/** @internal */
|
|
38
50
|
constructor(context, nameOrKey, alias, readVer, writeVer, minorVer) {
|
|
39
51
|
this._schemaKey = (typeof (nameOrKey) === "string") ? new SchemaKey(nameOrKey, new ECVersion(readVer, writeVer, minorVer)) : nameOrKey;
|
|
@@ -350,26 +362,104 @@ export class Schema {
|
|
|
350
362
|
this._schemaKey = new SchemaKey(this._schemaKey.name, newVersion);
|
|
351
363
|
}
|
|
352
364
|
/**
|
|
353
|
-
*
|
|
354
|
-
* @param
|
|
365
|
+
* Shortcut for calling getItem with EntityClass.
|
|
366
|
+
* @param name The local (unqualified) name of the item to return.
|
|
367
|
+
* @returns The requested EntityClass or undefined if not found.
|
|
355
368
|
*/
|
|
356
|
-
async getItem(name)
|
|
357
|
-
// this method exists so we can rewire it later when we load partial schemas, for now it is identical to the sync version
|
|
358
|
-
return this.getItemSync(name);
|
|
359
|
-
}
|
|
369
|
+
async getEntityClass(name) { return this.getItem(name, EntityClass); }
|
|
360
370
|
/**
|
|
361
|
-
*
|
|
362
|
-
* @param
|
|
371
|
+
* Shortcut for calling getItem with Mixin.
|
|
372
|
+
* @param name The local (unqualified) name of the item to return.
|
|
373
|
+
* @returns The requested Mixin or undefined if not found.
|
|
363
374
|
*/
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
375
|
+
async getMixin(name) { return this.getItem(name, Mixin); }
|
|
376
|
+
/**
|
|
377
|
+
* Shortcut for calling getItem with StructClass.
|
|
378
|
+
* @param name The local (unqualified) name of the item to return.
|
|
379
|
+
* @returns The requested StructClass or undefined if not found.
|
|
380
|
+
*/
|
|
381
|
+
async getStructClass(name) { return this.getItem(name, StructClass); }
|
|
382
|
+
/**
|
|
383
|
+
* Shortcut for calling getItem with CustomAttributeClass.
|
|
384
|
+
* @param name The local (unqualified) name of the item to return.
|
|
385
|
+
* @returns The requested CustomAttributeClass or undefined if not found.
|
|
386
|
+
*/
|
|
387
|
+
async getCustomAttributeClass(name) { return this.getItem(name, CustomAttributeClass); }
|
|
388
|
+
/**
|
|
389
|
+
* Shortcut for calling getItem with RelationshipClass.
|
|
390
|
+
* @param name The local (unqualified) name of the item to return.
|
|
391
|
+
* @returns The requested RelationshipClass or undefined if not found.
|
|
392
|
+
*/
|
|
393
|
+
async getRelationshipClass(name) { return this.getItem(name, RelationshipClass); }
|
|
368
394
|
/**
|
|
369
|
-
*
|
|
370
|
-
* @param
|
|
395
|
+
* Shortcut for calling getItem with Enumeration.
|
|
396
|
+
* @param name The local (unqualified) name of the item to return.
|
|
397
|
+
* @returns The requested Enumeration or undefined if not found.
|
|
371
398
|
*/
|
|
372
|
-
async
|
|
399
|
+
async getEnumeration(name) { return this.getItem(name, Enumeration); }
|
|
400
|
+
/**
|
|
401
|
+
* Shortcut for calling getItem with KindOfQuantity.
|
|
402
|
+
* @param name The local (unqualified) name of the item to return.
|
|
403
|
+
* @returns The requested KindOfQuantity or undefined if not found.
|
|
404
|
+
*/
|
|
405
|
+
async getKindOfQuantity(name) { return this.getItem(name, KindOfQuantity); }
|
|
406
|
+
/**
|
|
407
|
+
* Shortcut for calling getItem with PropertyCategory.
|
|
408
|
+
* @param name The local (unqualified) name of the item to return.
|
|
409
|
+
* @returns The requested PropertyCategory or undefined if not found.
|
|
410
|
+
*/
|
|
411
|
+
async getPropertyCategory(name) { return this.getItem(name, PropertyCategory); }
|
|
412
|
+
/**
|
|
413
|
+
* Shortcut for calling getItem with Unit.
|
|
414
|
+
* @param name The local (unqualified) name of the item to return.
|
|
415
|
+
* @returns The requested Unit or undefined if not found.
|
|
416
|
+
*/
|
|
417
|
+
async getUnit(name) { return this.getItem(name, Unit); }
|
|
418
|
+
/**
|
|
419
|
+
* Shortcut for calling getItem with InvertedUnit.
|
|
420
|
+
* @param name The local (unqualified) name of the item to return.
|
|
421
|
+
* @returns The requested InvertedUnit or undefined if not found.
|
|
422
|
+
*/
|
|
423
|
+
async getInvertedUnit(name) { return this.getItem(name, InvertedUnit); }
|
|
424
|
+
/**
|
|
425
|
+
* Shortcut for calling getItem with Constant.
|
|
426
|
+
* @param name The local (unqualified) name of the item to return.
|
|
427
|
+
* @returns The requested Constant or undefined if not found.
|
|
428
|
+
*/
|
|
429
|
+
async getConstant(name) { return this.getItem(name, Constant); }
|
|
430
|
+
/**
|
|
431
|
+
* Shortcut for calling getItem with Phenomenon.
|
|
432
|
+
* @param name The local (unqualified) name of the item to return.
|
|
433
|
+
* @returns The requested Phenomenon or undefined if not found.
|
|
434
|
+
*/
|
|
435
|
+
async getPhenomenon(name) { return this.getItem(name, Phenomenon); }
|
|
436
|
+
/**
|
|
437
|
+
* Shortcut for calling getItem with UnitSystem.
|
|
438
|
+
* @param name The local (unqualified) name of the item to return.
|
|
439
|
+
* @returns The requested UnitSystem or undefined if not found.
|
|
440
|
+
*/
|
|
441
|
+
async getUnitSystem(name) { return this.getItem(name, UnitSystem); }
|
|
442
|
+
/**
|
|
443
|
+
* Shortcut for calling getItem with Format.
|
|
444
|
+
* @param name The local (unqualified) name of the item to return.
|
|
445
|
+
* @returns The requested Format or undefined if not found.
|
|
446
|
+
*/
|
|
447
|
+
async getFormat(name) { return this.getItem(name, Format); }
|
|
448
|
+
async getItem(name, itemConstructor) {
|
|
449
|
+
// this method exists so we can rewire it later when we load partial schemas, for now it is identical to the sync version
|
|
450
|
+
if (itemConstructor === undefined)
|
|
451
|
+
return this.getItemSync(name);
|
|
452
|
+
return this.getItemSync(name, itemConstructor);
|
|
453
|
+
}
|
|
454
|
+
getItemSync(name, itemConstructor) {
|
|
455
|
+
const value = this._items.get(name.toUpperCase());
|
|
456
|
+
if (value === undefined || itemConstructor === undefined)
|
|
457
|
+
return value;
|
|
458
|
+
if (isSupportedSchemaItemType(value.schemaItemType, itemConstructor.schemaItemType))
|
|
459
|
+
return value;
|
|
460
|
+
return undefined;
|
|
461
|
+
}
|
|
462
|
+
async lookupItem(key, itemConstructor) {
|
|
373
463
|
let schemaName, itemName;
|
|
374
464
|
if (typeof (key) === "string") {
|
|
375
465
|
[schemaName, itemName] = SchemaItem.parseFullName(key);
|
|
@@ -379,18 +469,18 @@ export class Schema {
|
|
|
379
469
|
schemaName = key.schemaName;
|
|
380
470
|
}
|
|
381
471
|
if (!schemaName || schemaName.toUpperCase() === this.name.toUpperCase()) {
|
|
382
|
-
return
|
|
472
|
+
return itemConstructor
|
|
473
|
+
? this.getItem(itemName, itemConstructor)
|
|
474
|
+
: this.getItem(itemName);
|
|
383
475
|
}
|
|
384
476
|
const refSchema = await this.getReference(schemaName);
|
|
385
477
|
if (!refSchema)
|
|
386
478
|
return undefined;
|
|
387
|
-
return
|
|
479
|
+
return itemConstructor
|
|
480
|
+
? refSchema.getItem(itemName, itemConstructor)
|
|
481
|
+
: refSchema.getItem(itemName);
|
|
388
482
|
}
|
|
389
|
-
|
|
390
|
-
* Attempts to find a schema item within this schema or a (directly) referenced schema
|
|
391
|
-
* @param key The full name or a SchemaItemKey identifying the desired item.
|
|
392
|
-
*/
|
|
393
|
-
lookupItemSync(key) {
|
|
483
|
+
lookupItemSync(key, itemConstructor) {
|
|
394
484
|
let schemaName, itemName;
|
|
395
485
|
if (typeof (key) === "string") {
|
|
396
486
|
[schemaName, itemName] = SchemaItem.parseFullName(key);
|
|
@@ -400,35 +490,48 @@ export class Schema {
|
|
|
400
490
|
schemaName = key.schemaName;
|
|
401
491
|
}
|
|
402
492
|
if (!schemaName || schemaName.toUpperCase() === this.name.toUpperCase()) {
|
|
403
|
-
return
|
|
493
|
+
return itemConstructor
|
|
494
|
+
? this.getItemSync(itemName, itemConstructor)
|
|
495
|
+
: this.getItemSync(itemName);
|
|
404
496
|
}
|
|
405
497
|
const refSchema = this.getReferenceSync(schemaName);
|
|
406
498
|
if (!refSchema)
|
|
407
499
|
return undefined;
|
|
408
|
-
return
|
|
500
|
+
return itemConstructor
|
|
501
|
+
? refSchema.getItemSync(itemName, itemConstructor)
|
|
502
|
+
: refSchema.getItemSync(itemName);
|
|
409
503
|
}
|
|
410
|
-
getItems() {
|
|
504
|
+
*getItems(itemConstructor) {
|
|
411
505
|
if (!this._items)
|
|
412
|
-
return
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
for (const [, value] of this._items) {
|
|
417
|
-
if (ECClass.isECClass(value))
|
|
418
|
-
yield value;
|
|
506
|
+
return;
|
|
507
|
+
for (const item of this._items.values()) {
|
|
508
|
+
if (itemConstructor === undefined || isSupportedSchemaItemType(item.schemaItemType, itemConstructor.schemaItemType))
|
|
509
|
+
yield item;
|
|
419
510
|
}
|
|
420
511
|
}
|
|
512
|
+
/**
|
|
513
|
+
* Gets a referenced schema by name
|
|
514
|
+
* @param refSchemaName schema name to find
|
|
515
|
+
*/
|
|
421
516
|
async getReference(refSchemaName) {
|
|
422
517
|
if (this.references.length === 0)
|
|
423
518
|
return undefined;
|
|
424
519
|
return this.references.find((ref) => ref.name.toLowerCase() === refSchemaName.toLowerCase());
|
|
425
520
|
}
|
|
521
|
+
/**
|
|
522
|
+
* Gets a referenced schema by alias
|
|
523
|
+
* @param alias alias to find
|
|
524
|
+
*/
|
|
426
525
|
getReferenceNameByAlias(alias) {
|
|
427
526
|
if (this.references.length === 0)
|
|
428
527
|
return undefined;
|
|
429
528
|
const schema = this.references.find((ref) => ref.alias ? ref.alias.toLowerCase() === alias.toLowerCase() : false);
|
|
430
529
|
return schema ? schema.name : undefined;
|
|
431
530
|
}
|
|
531
|
+
/**
|
|
532
|
+
* Gets a referenced schema by name
|
|
533
|
+
* @param refSchemaName schema name to find
|
|
534
|
+
*/
|
|
432
535
|
getReferenceSync(refSchemaName) {
|
|
433
536
|
if (this.references.length === 0)
|
|
434
537
|
return undefined;
|
|
@@ -635,7 +738,6 @@ export class Schema {
|
|
|
635
738
|
this._alias = alias;
|
|
636
739
|
}
|
|
637
740
|
}
|
|
638
|
-
Schema._currentECSpecVersion = "3.2";
|
|
639
741
|
/**
|
|
640
742
|
* Hackish approach that works like a "friend class" so we can access protected members without making them public.
|
|
641
743
|
* We cannot put this into Helper.ts and make it non-export, because we are importing Helper.ts from this file, and the circular import
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Schema.js","sourceRoot":"","sources":["../../../src/Metadata/Schema.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAiB,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AAEjF,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/D,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAsE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAClI,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC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,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;QAC9E,MAAM,GAAG,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QAElD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,QAAQ,CAAC,MAAW;QAChC,MAAM,MAAM,GAAG,MAAgB,CAAC;QAEhC,OAAO,MAAM,KAAK,SAAS,IAAI,MAAM,CAAC,SAAS,KAAK,SAAS,IAAI,MAAM,CAAC,OAAO,KAAK,SAAS,CAAC;IAChG,CAAC;IAED;;;OAGG;IACO,eAAe,CAAC,YAAoB;QAC5C,IAAI,CAAC,MAAM,GAAG,YAAY,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACO,cAAc,CAAC,WAAmB;QAC1C,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;IAClC,CAAC;IAED;;;OAGG;IACO,QAAQ,CAAC,KAAa;QAC9B,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YAC5B,MAAM,IAAI,cAAc,CAAC,eAAe,CAAC,aAAa,EAAE,wCAAwC,CAAC,CAAC;QACpG,CAAC;QACD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;;AA9tBc,4BAAqB,GAAG,KAAK,CAAC;AAiuB/C;;;;;GAKG;AACH,MAAM,OAAgB,aAAc,SAAQ,MAAM;CAuCjD","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Metadata\r\n */\r\n\r\nimport { SchemaContext } from \"../Context\";\r\nimport { ECSpecVersion, SchemaReadHelper } from \"../Deserialization/Helper\";\r\nimport { JsonParser } from \"../Deserialization/JsonParser\";\r\nimport { SchemaProps } from \"../Deserialization/JsonProps\";\r\nimport { XmlParser } from \"../Deserialization/XmlParser\";\r\nimport { XmlSerializationUtils } from \"../Deserialization/XmlSerializationUtils\";\r\nimport { ECClassModifier, PrimitiveType } from \"../ECObjects\";\r\nimport { ECObjectsError, ECObjectsStatus } from \"../Exception\";\r\nimport { AnyClass, AnySchemaItem, SchemaInfo } from \"../Interfaces\";\r\nimport { ECVersion, SchemaItemKey, SchemaKey } from \"../SchemaKey\";\r\nimport { ECName } from \"../ECName\";\r\nimport { ECClass, StructClass } from \"./Class\";\r\nimport { Constant } from \"./Constant\";\r\nimport { CustomAttribute, CustomAttributeContainerProps, CustomAttributeSet, serializeCustomAttributes } from \"./CustomAttribute\";\r\nimport { CustomAttributeClass } from \"./CustomAttributeClass\";\r\nimport { EntityClass } from \"./EntityClass\";\r\nimport { Enumeration } from \"./Enumeration\";\r\nimport { Format } from \"./Format\";\r\nimport { InvertedUnit } from \"./InvertedUnit\";\r\nimport { KindOfQuantity } from \"./KindOfQuantity\";\r\nimport { Mixin } from \"./Mixin\";\r\nimport { Phenomenon } from \"./Phenomenon\";\r\nimport { PropertyCategory } from \"./PropertyCategory\";\r\nimport { RelationshipClass } from \"./RelationshipClass\";\r\nimport { SchemaItem } from \"./SchemaItem\";\r\nimport { Unit } from \"./Unit\";\r\nimport { UnitSystem } from \"./UnitSystem\";\r\n\r\nconst SCHEMAURL3_2_JSON = \"https://dev.bentley.com/json_schemas/ec/32/ecschema\";\r\nconst SCHEMAURL3_2_XML = \"http://www.bentley.com/schemas/Bentley.ECXML.3.2\";\r\n\r\n/**\r\n * @beta\r\n */\r\nexport class Schema implements CustomAttributeContainerProps {\r\n private static _currentECSpecVersion = \"3.2\";\r\n private _context: SchemaContext;\r\n protected _schemaKey?: SchemaKey;\r\n protected _alias?: string;\r\n protected _label?: string;\r\n protected _description?: string;\r\n public readonly references: Schema[];\r\n private readonly _items: Map<string, SchemaItem>;\r\n private _customAttributes?: Map<string, CustomAttribute>;\r\n private _originalECSpecMajorVersion?: number;\r\n private _originalECSpecMinorVersion?: number;\r\n /**\r\n * Constructs an empty Schema with the given name and version in the provided context.\r\n * @param context The SchemaContext that will control the lifetime of the schema\r\n * @param name The schema's name\r\n * @param readVersion The integer read (major) version of the schema\r\n * @param writeVersion The integer write version of the schema\r\n * @param minorVersion The integer minor version of the schema\r\n */\r\n constructor(context: SchemaContext, name: string, alias: string, readVersion: number, writeVersion: number, minorVersion: number);\r\n /**\r\n * Constructs an empty Schema with the given key in the provided context.\r\n * @param context The SchemaContext that will control the lifetime of the schema\r\n * @param key A SchemaKey that uniquely identifies the schema\r\n */\r\n constructor(context: SchemaContext, key: SchemaKey, alias: string);\r\n /**\r\n * Constructs an empty Schema (without a SchemaKey) in the provided context.\r\n * This should only be used when the schema name and version will be deserialized (via `fromJson()`) immediately after this Schema is instantiated.\r\n * @param context The SchemaContext that will control the lifetime of the schema\r\n * @internal\r\n */\r\n constructor(context: SchemaContext);\r\n /** @internal */\r\n constructor(context: SchemaContext, nameOrKey?: SchemaKey | string, alias?: string, readVer?: number, writeVer?: number, minorVer?: number) {\r\n this._schemaKey = (typeof (nameOrKey) === \"string\") ? new SchemaKey(nameOrKey, new ECVersion(readVer as number, writeVer, minorVer)) : nameOrKey;\r\n this._context = context;\r\n this.references = [];\r\n this._items = new Map<string, SchemaItem>();\r\n\r\n if (alias !== undefined && ECName.validate(alias)) {\r\n this._alias = alias;\r\n } else if (nameOrKey !== undefined) {\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Schema ${this.name} does not have the required 'alias' attribute.`);\r\n }\r\n\r\n this._originalECSpecMajorVersion = Schema.currentECSpecMajorVersion;\r\n this._originalECSpecMinorVersion = Schema.currentECSpecMinorVersion;\r\n }\r\n\r\n public get schemaKey() {\r\n if (undefined === this._schemaKey)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema has an invalid or missing SchemaKey.`);\r\n return this._schemaKey;\r\n }\r\n\r\n public get name() {\r\n if (this._schemaKey === undefined)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema has an invalid or missing SchemaKey.`);\r\n return this.schemaKey.name;\r\n }\r\n\r\n public get readVersion() {\r\n if (this._schemaKey === undefined)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema has an invalid or missing SchemaKey.`);\r\n return this.schemaKey.readVersion;\r\n }\r\n\r\n public get writeVersion() {\r\n if (this._schemaKey === undefined)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema has an invalid or missing SchemaKey.`);\r\n return this.schemaKey.writeVersion;\r\n }\r\n\r\n public get minorVersion() {\r\n if (this._schemaKey === undefined)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema has an invalid or missing SchemaKey.`);\r\n return this.schemaKey.minorVersion;\r\n }\r\n\r\n public get originalECSpecMajorVersion() { return this._originalECSpecMajorVersion; }\r\n public get originalECSpecMinorVersion() { return this._originalECSpecMinorVersion; }\r\n public static get currentECSpecMajorVersion(): number { return parseInt(Schema._currentECSpecVersion.split(\".\")[0], 10); }\r\n public static get currentECSpecMinorVersion(): number { return parseInt(Schema._currentECSpecVersion.split(\".\")[1], 10); }\r\n\r\n public get alias() {\r\n if (this._alias === undefined || this._alias === null) {\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Schema ${this.name} does not have the required 'alias' attribute.`);\r\n } else { return this._alias; }\r\n }\r\n\r\n public get label() { return this._label; }\r\n\r\n public get description() { return this._description; }\r\n\r\n public get customAttributes(): CustomAttributeSet | undefined { return this._customAttributes; }\r\n\r\n /** Returns the schema name. */\r\n public get fullName() { return this.schemaKey.name; }\r\n\r\n /** Returns the schema. */\r\n public get schema(): Schema { return this; }\r\n\r\n /** Returns the schema context this schema is within. */\r\n public get context(): SchemaContext { return this._context; }\r\n\r\n /**\r\n * Returns a SchemaItemKey given the item name and the schema it belongs to\r\n * @param fullName fully qualified name {Schema name}.{Item Name}\r\n */\r\n public getSchemaItemKey(fullName: string): SchemaItemKey {\r\n const [schemaName, itemName] = SchemaItem.parseFullName(fullName);\r\n let schemaKey = this.schemaKey;\r\n if (this.name !== schemaName) {\r\n const newSchemaRef = this.getReferenceSync(schemaName);\r\n if (undefined === newSchemaRef)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `Unable to find the referenced SchemaItem ${itemName}.`);\r\n schemaKey = newSchemaRef.schemaKey;\r\n }\r\n return new SchemaItemKey(itemName, schemaKey);\r\n }\r\n\r\n protected addItem<T extends SchemaItem>(item: T): void {\r\n if (undefined !== this.getItemSync(item.name))\r\n throw new ECObjectsError(ECObjectsStatus.DuplicateItem, `The SchemaItem ${item.name} cannot be added to the schema ${this.name} because it already exists`);\r\n\r\n this._items.set(item.name.toUpperCase(), item);\r\n }\r\n\r\n /**\r\n * @alpha\r\n */\r\n protected createClass<T extends AnyClass>(type: (new (_schema: Schema, _name: string, _modifier?: ECClassModifier) => T), name: string, modifier?: ECClassModifier): T {\r\n const item = new type(this, name, modifier);\r\n this.addItem(item);\r\n return item;\r\n }\r\n\r\n /**\r\n * Deletes a class from within this schema.\r\n * @param name the local (unqualified) class name, lookup is case-insensitive\r\n * @alpha\r\n */\r\n protected async deleteClass(name: string): Promise<void> {\r\n const schemaItem = await this.getItem(name);\r\n if (ECClass.isECClass(schemaItem)) {\r\n this._items.delete(name.toUpperCase());\r\n }\r\n }\r\n\r\n /**\r\n * Deletes a class from within this schema.\r\n * @param name the local (unqualified) class name, lookup is case-insensitive\r\n * @alpha\r\n */\r\n protected deleteClassSync(name: string): void {\r\n const schemaItem = this.getItemSync(name);\r\n if (ECClass.isECClass(schemaItem))\r\n this._items.delete(name.toUpperCase());\r\n }\r\n\r\n /**\r\n * Deletes a SchemaItem from within this schema.\r\n * @param name the local (unqualified) class name, lookup is case-insensitive\r\n * @alpha\r\n */\r\n protected async deleteSchemaItem(name: string): Promise<void> {\r\n const schemaItem = await this.getItem(name);\r\n if (SchemaItem.isSchemaItem(schemaItem)) {\r\n this._items.delete(name.toUpperCase());\r\n }\r\n }\r\n\r\n /**\r\n * Deletes a SchemaItem from within this schema.\r\n * @param name the local (unqualified) class name, lookup is case-insensitive\r\n * @alpha\r\n */\r\n protected deleteSchemaItemSync(name: string): void {\r\n const schemaItem = this.getItemSync(name);\r\n if (SchemaItem.isSchemaItem(schemaItem))\r\n this._items.delete(name.toUpperCase());\r\n }\r\n\r\n /**\r\n * @alpha\r\n */\r\n protected createItem<T extends AnySchemaItem>(type: (new (_schema: Schema, _name: string) => T), name: string): T {\r\n const item = new type(this, name);\r\n this.addItem(item);\r\n return item;\r\n }\r\n\r\n protected addCustomAttribute(customAttribute: CustomAttribute) {\r\n if (!this._customAttributes)\r\n this._customAttributes = new Map<string, CustomAttribute>();\r\n\r\n this._customAttributes.set(customAttribute.className, customAttribute);\r\n }\r\n\r\n /**\r\n * Creates a EntityClass with the provided name in this schema.\r\n * @param name\r\n * @param modifier\r\n */\r\n protected async createEntityClass(name: string, modifier?: ECClassModifier): Promise<EntityClass> {\r\n return this.createClass<EntityClass>(EntityClass, name, modifier);\r\n }\r\n\r\n protected createEntityClassSync(name: string, modifier?: ECClassModifier): EntityClass {\r\n return this.createClass<EntityClass>(EntityClass, name, modifier);\r\n }\r\n\r\n /**\r\n * Creates a Mixin with the provided name in this schema.\r\n * @param name\r\n */\r\n protected async createMixinClass(name: string): Promise<Mixin> { return this.createClass<Mixin>(Mixin, name); }\r\n protected createMixinClassSync(name: string): Mixin { return this.createClass<Mixin>(Mixin, name); }\r\n\r\n /**\r\n * Creates a StructClass with the provided name in this schema.\r\n * @param name\r\n * @param modifier\r\n */\r\n protected async createStructClass(name: string, modifier?: ECClassModifier): Promise<StructClass> {\r\n return this.createClass<StructClass>(StructClass, name, modifier);\r\n }\r\n\r\n protected createStructClassSync(name: string, modifier?: ECClassModifier): StructClass {\r\n return this.createClass<StructClass>(StructClass, name, modifier);\r\n }\r\n\r\n /**\r\n * Creates a CustomAttributeClass with the provided name in this schema.\r\n * @param name\r\n * @param modifier\r\n */\r\n protected async createCustomAttributeClass(name: string, modifier?: ECClassModifier): Promise<CustomAttributeClass> {\r\n return this.createClass<CustomAttributeClass>(CustomAttributeClass, name, modifier);\r\n }\r\n\r\n protected createCustomAttributeClassSync(name: string, modifier?: ECClassModifier): CustomAttributeClass {\r\n return this.createClass<CustomAttributeClass>(CustomAttributeClass, name, modifier);\r\n }\r\n\r\n /**\r\n * Creates a RelationshipClass with the provided name in this schema.\r\n * @param name\r\n * @param modifier\r\n */\r\n protected async createRelationshipClass(name: string, modifier?: ECClassModifier): Promise<RelationshipClass> {\r\n return this.createRelationshipClassSync(name, modifier);\r\n }\r\n\r\n protected createRelationshipClassSync(name: string, modifier?: ECClassModifier): RelationshipClass {\r\n return this.createClass<RelationshipClass>(RelationshipClass, name, modifier);\r\n }\r\n\r\n /**\r\n * Creates an Enumeration with the provided name in this schema.\r\n * @param name\r\n */\r\n protected async createEnumeration(name: string, primitiveType?: PrimitiveType.Integer | PrimitiveType.String): Promise<Enumeration> {\r\n return this.createEnumerationSync(name, primitiveType);\r\n }\r\n\r\n protected createEnumerationSync(name: string, primitiveType?: PrimitiveType.Integer | PrimitiveType.String): Enumeration {\r\n const item = new Enumeration(this, name, primitiveType);\r\n this.addItem(item);\r\n return item;\r\n }\r\n\r\n /**\r\n * Creates an KindOfQuantity with the provided name in this schema.\r\n * @param name\r\n */\r\n protected async createKindOfQuantity(name: string): Promise<KindOfQuantity> {\r\n return this.createKindOfQuantitySync(name);\r\n }\r\n\r\n protected createKindOfQuantitySync(name: string): KindOfQuantity {\r\n return this.createItem<KindOfQuantity>(KindOfQuantity, name);\r\n }\r\n\r\n /**\r\n * Creates a Constant with the provided name in this schema.\r\n * @param name\r\n */\r\n protected async createConstant(name: string): Promise<Constant> {\r\n return this.createItem<Constant>(Constant, name);\r\n }\r\n\r\n protected createConstantSync(name: string): Constant {\r\n return this.createItem<Constant>(Constant, name);\r\n }\r\n\r\n /**\r\n * Creates a Inverted Unit with the provided name in this schema.\r\n * @param name\r\n */\r\n protected async createInvertedUnit(name: string): Promise<InvertedUnit> {\r\n return this.createItem<InvertedUnit>(InvertedUnit, name);\r\n }\r\n\r\n protected createInvertedUnitSync(name: string): InvertedUnit {\r\n return this.createItem<InvertedUnit>(InvertedUnit, name);\r\n }\r\n\r\n /**\r\n * Creates an Format with the provided name in this schema.\r\n * @param name\r\n */\r\n protected async createFormat(name: string): Promise<Format> {\r\n return this.createItem<Format>(Format, name);\r\n }\r\n\r\n protected createFormatSync(name: string): Format {\r\n return this.createItem<Format>(Format, name);\r\n }\r\n\r\n /**\r\n * Creates a UnitSystem with the provided name in this schema.\r\n * @param name\r\n */\r\n protected async createUnitSystem(name: string): Promise<UnitSystem> {\r\n return this.createItem<UnitSystem>(UnitSystem, name);\r\n }\r\n\r\n protected createUnitSystemSync(name: string): UnitSystem {\r\n return this.createItem<UnitSystem>(UnitSystem, name);\r\n }\r\n\r\n /**\r\n * Creates a Phenomenon with the provided name in this schema.\r\n * @param name\r\n */\r\n protected async createPhenomenon(name: string): Promise<Phenomenon> {\r\n return this.createItem<Phenomenon>(Phenomenon, name);\r\n }\r\n\r\n protected createPhenomenonSync(name: string): Phenomenon {\r\n return this.createItem<Phenomenon>(Phenomenon, name);\r\n }\r\n\r\n /**\r\n * Creates a Unit with the provided name in this schema.\r\n * @param name\r\n */\r\n protected async createUnit(name: string): Promise<Unit> {\r\n return this.createItem<Unit>(Unit, name);\r\n }\r\n\r\n protected createUnitSync(name: string): Unit {\r\n return this.createItem<Unit>(Unit, name);\r\n }\r\n\r\n /**\r\n * Creates an PropertyCategory with the provided name in this schema.\r\n * @param name\r\n */\r\n protected async createPropertyCategory(name: string): Promise<PropertyCategory> {\r\n return this.createItem<PropertyCategory>(PropertyCategory, name);\r\n }\r\n\r\n protected createPropertyCategorySync(name: string): PropertyCategory {\r\n return this.createItem<PropertyCategory>(PropertyCategory, name);\r\n }\r\n /**\r\n *\r\n * @param refSchema\r\n */\r\n protected async addReference(refSchema: Schema): Promise<void> {\r\n // TODO validation of reference schema. For now just adding\r\n this.addReferenceSync(refSchema);\r\n }\r\n\r\n protected addReferenceSync(refSchema: Schema): void {\r\n this.references.push(refSchema);\r\n }\r\n\r\n /**\r\n * @alpha Used for schema editing.\r\n */\r\n protected setContext(context: SchemaContext): void {\r\n this._context = context;\r\n }\r\n\r\n /**\r\n * Sets the version of the SchemaKey identifying the schema.\r\n * @param readVersion The read version of the schema. If undefined, the value from the existing SchemaKey will be used.\r\n * @param writeVersion The write version of the schema. If undefined, the value from the existing SchemaKey will be used.\r\n * @param minorVersion The minor version of the schema. If undefined, the value from the existing SchemaKey will be used.\r\n */\r\n public setVersion(readVersion?: number, writeVersion?: number, minorVersion?: number): void {\r\n if (!this._schemaKey)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidSchemaKey, `The schema '${this.name}' has an invalid SchemaKey.`);\r\n\r\n const newVersion = new ECVersion(readVersion ?? this._schemaKey.readVersion, writeVersion ?? this._schemaKey.writeVersion, minorVersion ?? this._schemaKey.minorVersion);\r\n this._schemaKey = new SchemaKey(this._schemaKey.name, newVersion);\r\n }\r\n\r\n /**\r\n * Gets an item from within this schema. To get by full name use lookupItem instead.\r\n * @param key the local (unqualified) name, lookup is case-insensitive\r\n */\r\n public async getItem<T extends SchemaItem>(name: string): Promise<T | undefined> {\r\n // this method exists so we can rewire it later when we load partial schemas, for now it is identical to the sync version\r\n return this.getItemSync<T>(name);\r\n }\r\n\r\n /**\r\n * Gets an item from within this schema. To get by full name use lookupItem instead.\r\n * @param key the local (unqualified) name, lookup is case-insensitive\r\n */\r\n public getItemSync<T extends SchemaItem>(name: string): T | undefined {\r\n // Case-insensitive search\r\n return this._items.get(name.toUpperCase()) as T;\r\n }\r\n\r\n /**\r\n * Attempts to find a schema item within this schema or a (directly) referenced schema\r\n * @param key The full name or a SchemaItemKey identifying the desired item.\r\n */\r\n public async lookupItem<T extends SchemaItem>(key: Readonly<SchemaItemKey> | string): Promise<T | undefined> {\r\n let schemaName, itemName: string;\r\n if (typeof (key) === \"string\") {\r\n [schemaName, itemName] = SchemaItem.parseFullName(key);\r\n } else {\r\n itemName = key.name;\r\n schemaName = key.schemaName;\r\n }\r\n\r\n if (!schemaName || schemaName.toUpperCase() === this.name.toUpperCase()) {\r\n return this.getItem<T>(itemName);\r\n }\r\n\r\n const refSchema = await this.getReference(schemaName);\r\n if (!refSchema)\r\n return undefined;\r\n\r\n return refSchema.getItem<T>(itemName);\r\n }\r\n\r\n /**\r\n * Attempts to find a schema item within this schema or a (directly) referenced schema\r\n * @param key The full name or a SchemaItemKey identifying the desired item.\r\n */\r\n public lookupItemSync<T extends SchemaItem>(key: Readonly<SchemaItemKey> | string): T | undefined {\r\n let schemaName, itemName: string;\r\n if (typeof (key) === \"string\") {\r\n [schemaName, itemName] = SchemaItem.parseFullName(key);\r\n } else {\r\n itemName = key.name;\r\n schemaName = key.schemaName;\r\n }\r\n\r\n if (!schemaName || schemaName.toUpperCase() === this.name.toUpperCase()) {\r\n return this.getItemSync<T>(itemName);\r\n }\r\n\r\n const refSchema = this.getReferenceSync(schemaName);\r\n if (!refSchema)\r\n return undefined;\r\n\r\n return refSchema.getItemSync<T>(itemName);\r\n }\r\n\r\n public getItems<T extends AnySchemaItem>(): IterableIterator<T> {\r\n if (!this._items)\r\n return new Map<string, SchemaItem>().values() as IterableIterator<T>;\r\n\r\n return this._items.values() as IterableIterator<T>;\r\n }\r\n\r\n public *getClasses(): IterableIterator<ECClass> {\r\n for (const [, value] of this._items) {\r\n if (ECClass.isECClass(value))\r\n yield value;\r\n }\r\n }\r\n\r\n public async getReference<T extends Schema>(refSchemaName: string): Promise<T | undefined> {\r\n if (this.references.length === 0)\r\n return undefined;\r\n\r\n return this.references.find((ref) => ref.name.toLowerCase() === refSchemaName.toLowerCase()) as T;\r\n }\r\n\r\n public getReferenceNameByAlias(alias: string): string | undefined {\r\n if (this.references.length === 0)\r\n return undefined;\r\n\r\n const schema = this.references.find((ref) => ref.alias ? ref.alias.toLowerCase() === alias.toLowerCase() : false);\r\n return schema ? schema.name : undefined;\r\n }\r\n\r\n public getReferenceSync<T extends Schema>(refSchemaName: string): T | undefined {\r\n if (this.references.length === 0)\r\n return undefined;\r\n\r\n return this.references.find((ref) => ref.name.toLowerCase() === refSchemaName.toLowerCase()) as T;\r\n }\r\n\r\n /**\r\n * Save this Schema's properties to an object for serializing to JSON.\r\n */\r\n public toJSON(): SchemaProps {\r\n if (!this.isECSpecVersionSupported())\r\n throw new ECObjectsError(ECObjectsStatus.NewerECSpecVersion, `The Schema '${this.name}' has an unsupported ECSpecVersion and cannot be serialized.`);\r\n\r\n const schemaJson: { [value: string]: any } = {};\r\n schemaJson.$schema = SCHEMAURL3_2_JSON; // $schema is required\r\n schemaJson.name = this.name; // name is required\r\n schemaJson.version = this.schemaKey.version.toString(true);\r\n schemaJson.alias = this.alias; // alias is required\r\n if (undefined !== this.label) // label is optional\r\n schemaJson.label = this.label;\r\n if (undefined !== this.description) // description is optional\r\n schemaJson.description = this.description;\r\n if (undefined !== this.references && this.references.length > 0) // references is optional\r\n schemaJson.references = this.references.map(({ name, schemaKey }) => ({ name, version: schemaKey.version.toString() }));\r\n\r\n const customAttributes = serializeCustomAttributes(this.customAttributes);\r\n if (undefined !== customAttributes)\r\n schemaJson.customAttributes = customAttributes;\r\n if (this._items.size > 0) {\r\n schemaJson.items = {};\r\n this._items.forEach((schemaItem: SchemaItem) => {\r\n schemaJson.items[schemaItem.name] = schemaItem.toJSON(false, true);\r\n });\r\n }\r\n return schemaJson as SchemaProps;\r\n }\r\n\r\n /**\r\n * Converts the schema to a DOM XML Document.\r\n * @param schemaXml An empty DOM document to which the schema will be written\r\n */\r\n public async toXml(schemaXml: Document): Promise<Document> {\r\n if (!this.isECSpecVersionSupported())\r\n throw new ECObjectsError(ECObjectsStatus.NewerECSpecVersion, `The Schema '${this.name}' has an unsupported ECSpecVersion and cannot be serialized.`);\r\n\r\n const schemaMetadata = schemaXml.createElement(\"ECSchema\");\r\n schemaMetadata.setAttribute(\"xmlns\", SCHEMAURL3_2_XML);\r\n schemaMetadata.setAttribute(\"version\", this.schemaKey.version.toString());\r\n schemaMetadata.setAttribute(\"schemaName\", this.name);\r\n schemaMetadata.setAttribute(\"alias\", this.alias ? this.alias : \"\");\r\n if (undefined !== this.label)\r\n schemaMetadata.setAttribute(\"displayLabel\", this.label);\r\n if (undefined !== this.description)\r\n schemaMetadata.setAttribute(\"description\", this.description);\r\n\r\n // Map used for CA serialization\r\n const refSchemaMap = new Map<string, string>();\r\n\r\n this.references.forEach(({ name, schemaKey, alias }) => {\r\n const schemaRef = schemaXml.createElement(\"ECSchemaReference\");\r\n schemaRef.setAttribute(\"name\", name);\r\n schemaRef.setAttribute(\"version\", schemaKey.version.toString());\r\n schemaRef.setAttribute(\"alias\", alias ? alias : \"\");\r\n schemaMetadata.appendChild(schemaRef);\r\n refSchemaMap.set(name, schemaKey.version.toString());\r\n });\r\n\r\n if (this._customAttributes) {\r\n const parentElem = schemaXml.createElement(\"ECCustomAttributes\");\r\n for (const [name, attribute] of this._customAttributes) {\r\n const caElem = await XmlSerializationUtils.writeCustomAttribute(name, attribute, schemaXml, this);\r\n parentElem.appendChild(caElem);\r\n }\r\n schemaMetadata.appendChild(parentElem);\r\n }\r\n\r\n for (const [, item] of this._items) {\r\n const itemXml = await item.toXml(schemaXml);\r\n schemaMetadata.appendChild(itemXml);\r\n }\r\n\r\n schemaXml.appendChild(schemaMetadata);\r\n return schemaXml;\r\n }\r\n\r\n // Check if the ECSpecVersion read-version is greater than the current ECSpecVersion supported.\r\n // If a specific ECSpecVersion is given, check against that version.\r\n // If no argument is given, check against the original ECSpecVersion of the schema.\r\n private isECSpecMajorVersionSupported(ecSpecMajorVersionToCheck?: number): boolean {\r\n // If argument is supplied, check the argument against the current ECSpecVersion supported\r\n if (ecSpecMajorVersionToCheck !== undefined)\r\n return (Schema.currentECSpecMajorVersion >= ecSpecMajorVersionToCheck);\r\n\r\n // If argument is not supplied, check against the original ECSpecVersion of the schema\r\n if (this.originalECSpecMajorVersion === undefined)\r\n return false;\r\n return (Schema.currentECSpecMajorVersion >= this.originalECSpecMajorVersion);\r\n }\r\n\r\n // Check if the full ECSpecVersion is greater than the current ECSpecVersion supported.\r\n // If a specific ECSpecVersion is given, check against that version.\r\n // If no argument is given, check against the original ECSpecVersion of the schema.\r\n private isECSpecVersionSupported(ecSpecMajorVersionToCheck?: number, ecSpecMinorVersionToCheck?: number): boolean {\r\n // If arguments are supplied, check the arguments against the current ECSpecVersion supported\r\n if (ecSpecMajorVersionToCheck !== undefined && ecSpecMinorVersionToCheck !== undefined) {\r\n if (!this.isECSpecMajorVersionSupported(ecSpecMajorVersionToCheck))\r\n return false;\r\n return (Schema.currentECSpecMinorVersion >= ecSpecMinorVersionToCheck);\r\n }\r\n // If arguments are not supplied, check against the original ECSpecVersion of the schema\r\n if (!this.isECSpecMajorVersionSupported() || this.originalECSpecMinorVersion === undefined)\r\n return false;\r\n return (Schema.currentECSpecMinorVersion >= this.originalECSpecMinorVersion);\r\n }\r\n\r\n /**\r\n * Loads the schema header (name, version alias, label and description) from the input SchemaProps\r\n */\r\n public fromJSONSync(schemaProps: SchemaProps) {\r\n if (undefined === this._schemaKey) {\r\n const schemaName = schemaProps.name;\r\n const version = ECVersion.fromString(schemaProps.version);\r\n this._schemaKey = new SchemaKey(schemaName, version);\r\n } else {\r\n if (schemaProps.name.toLowerCase() !== this.name.toLowerCase())\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Schema ${this.name} does not match the provided name, '${schemaProps.name}'.`);\r\n if (this.schemaKey.version.compare(ECVersion.fromString(schemaProps.version)))\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Schema ${this.name} has the version '${this.schemaKey.version}' that does not match the provided version '${schemaProps.version}'.`);\r\n }\r\n\r\n if (schemaProps.$schema.match(`https://dev\\\\.bentley\\\\.com/json_schemas/ec/([0-9]+)/ecschema`) == null && schemaProps.$schema.match(`http://www\\\\.bentley\\\\.com/schemas/Bentley\\\\.ECXML\\\\.([0-9]+)`) == null)\r\n throw new ECObjectsError(ECObjectsStatus.MissingSchemaUrl, `The Schema '${this.name}' has an unsupported namespace '${schemaProps.$schema}'.`);\r\n\r\n // The schema props have not been parsed. Parse the ECXml version from the $schema attribute\r\n let ecVersion: ECSpecVersion;\r\n if (schemaProps.ecSpecMajorVersion === undefined || schemaProps.ecSpecMinorVersion === undefined) {\r\n ecVersion = ((schemaProps.$schema.search(\"ECXML\") !== -1) ? XmlParser.parseXmlNamespace(schemaProps.$schema) : JsonParser.parseJSUri(schemaProps.$schema)) as ECSpecVersion;\r\n } else {\r\n ecVersion = { readVersion: schemaProps.ecSpecMajorVersion, writeVersion: schemaProps.ecSpecMinorVersion } as ECSpecVersion;\r\n }\r\n\r\n this._originalECSpecMajorVersion = ecVersion?.readVersion;\r\n this._originalECSpecMinorVersion = ecVersion?.writeVersion;\r\n\r\n if (!this.isECSpecMajorVersionSupported(ecVersion?.readVersion))\r\n throw new ECObjectsError(ECObjectsStatus.NewerECSpecVersion, `The Schema '${this.name}' has an unsupported ECVersion and cannot be loaded.`);\r\n\r\n if (ECName.validate(schemaProps.alias)) {\r\n this._alias = schemaProps.alias;\r\n } else {\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Schema ${schemaProps.name} does not have the required 'alias' attribute.`);\r\n }\r\n\r\n if (undefined !== schemaProps.label)\r\n this._label = schemaProps.label;\r\n\r\n if (undefined !== schemaProps.description)\r\n this._description = schemaProps.description;\r\n }\r\n\r\n /**\r\n * Loads the schema header (name, version alias, label and description) from the input SchemaProps\r\n */\r\n public async fromJSON(schemaProps: SchemaProps) {\r\n this.fromJSONSync(schemaProps);\r\n }\r\n\r\n /**\r\n * Completely loads the SchemaInfo from the input json and starts loading the entire schema. The complete schema can be retrieved from the\r\n * schema context using the getCachedSchema method\r\n */\r\n public static async startLoadingFromJson(jsonObj: object | string, context: SchemaContext): Promise<SchemaInfo> {\r\n const schema = new Schema(context);\r\n\r\n const reader = new SchemaReadHelper(JsonParser, context);\r\n const rawSchema = typeof jsonObj === \"string\" ? JSON.parse(jsonObj) : jsonObj;\r\n return reader.readSchemaInfo(schema, rawSchema);\r\n }\r\n\r\n public static async fromJson(jsonObj: object | string, context: SchemaContext): Promise<Schema> {\r\n let schema: Schema = new Schema(context);\r\n\r\n const reader = new SchemaReadHelper(JsonParser, context);\r\n const rawSchema = typeof jsonObj === \"string\" ? JSON.parse(jsonObj) : jsonObj;\r\n schema = await reader.readSchema(schema, rawSchema);\r\n\r\n return schema;\r\n }\r\n\r\n /**\r\n * Completely loads the Schema from the input json. The schema is cached in the schema context.\r\n */\r\n public static fromJsonSync(jsonObj: object | string, context: SchemaContext): Schema {\r\n let schema: Schema = new Schema(context);\r\n\r\n const reader = new SchemaReadHelper(JsonParser, context);\r\n const rawSchema = typeof jsonObj === \"string\" ? JSON.parse(jsonObj) : jsonObj;\r\n schema = reader.readSchemaSync(schema, rawSchema);\r\n\r\n return schema;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public static isSchema(object: any): object is Schema {\r\n const schema = object as Schema;\r\n\r\n return schema !== undefined && schema.schemaKey !== undefined && schema.context !== undefined;\r\n }\r\n\r\n /**\r\n * @alpha\r\n * Used for schema editing.\r\n */\r\n protected setDisplayLabel(displayLabel: string) {\r\n this._label = displayLabel;\r\n }\r\n\r\n /**\r\n * @alpha\r\n * Used for schema editing.\r\n */\r\n protected setDescription(description: string) {\r\n this._description = description;\r\n }\r\n\r\n /**\r\n * @alpha\r\n * Used for schema editing.\r\n */\r\n protected setAlias(alias: string) {\r\n if (!ECName.validate(alias)) {\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECName, \"The specified schema alias is invalid.\");\r\n }\r\n this._alias = alias;\r\n }\r\n}\r\n\r\n/**\r\n * Hackish approach that works like a \"friend class\" so we can access protected members without making them public.\r\n * We cannot put this into Helper.ts and make it non-export, because we are importing Helper.ts from this file, and the circular import\r\n * would prevent this class from extending Schema.\r\n * @internal\r\n */\r\nexport abstract class MutableSchema extends Schema {\r\n public abstract override addCustomAttribute(customAttribute: CustomAttribute): void;\r\n public abstract override createEntityClass(name: string, modifier?: ECClassModifier): Promise<EntityClass>;\r\n public abstract override createEntityClassSync(name: string, modifier?: ECClassModifier): EntityClass;\r\n public abstract override createMixinClass(name: string): Promise<Mixin>;\r\n public abstract override createMixinClassSync(name: string): Mixin;\r\n public abstract override createStructClass(name: string, modifier?: ECClassModifier): Promise<StructClass>;\r\n public abstract override createStructClassSync(name: string, modifier?: ECClassModifier): StructClass;\r\n public abstract override createCustomAttributeClass(name: string, modifier?: ECClassModifier): Promise<CustomAttributeClass>;\r\n public abstract override createCustomAttributeClassSync(name: string, modifier?: ECClassModifier): CustomAttributeClass;\r\n public abstract override createRelationshipClass(name: string, modifier?: ECClassModifier): Promise<RelationshipClass>;\r\n public abstract override createRelationshipClassSync(name: string, modifier?: ECClassModifier): RelationshipClass;\r\n public abstract override createEnumeration(name: string, primitiveType?: PrimitiveType.Integer | PrimitiveType.String): Promise<Enumeration>;\r\n public abstract override createEnumerationSync(name: string, primitiveType?: PrimitiveType.Integer | PrimitiveType.String): Enumeration;\r\n public abstract override createKindOfQuantity(name: string): Promise<KindOfQuantity>;\r\n public abstract override createKindOfQuantitySync(name: string): KindOfQuantity;\r\n public abstract override createUnit(name: string): Promise<Unit>;\r\n public abstract override createUnitSync(name: string): Unit;\r\n public abstract override createConstant(name: string): Promise<Constant>;\r\n public abstract override createConstantSync(name: string): Constant;\r\n public abstract override createInvertedUnit(name: string): Promise<InvertedUnit>;\r\n public abstract override createInvertedUnitSync(name: string): InvertedUnit;\r\n public abstract override createPhenomenon(name: string): Promise<Phenomenon>;\r\n public abstract override createPhenomenonSync(name: string): Phenomenon;\r\n public abstract override createFormat(name: string): Promise<Format>;\r\n public abstract override createFormatSync(name: string): Format;\r\n public abstract override createUnitSystem(name: string): Promise<UnitSystem>;\r\n public abstract override createUnitSystemSync(name: string): UnitSystem;\r\n public abstract override createPropertyCategory(name: string): Promise<PropertyCategory>;\r\n public abstract override createPropertyCategorySync(name: string): PropertyCategory;\r\n public abstract override addItem<T extends SchemaItem>(item: T): void;\r\n public abstract override addReference(refSchema: Schema): Promise<void>;\r\n public abstract override addReferenceSync(refSchema: Schema): void;\r\n public abstract override setContext(schemaContext: SchemaContext): void;\r\n public abstract override deleteClass(name: string): Promise<void>;\r\n public abstract override deleteClassSync(name: string): void;\r\n public abstract override deleteSchemaItem(name: string): Promise<void>;\r\n public abstract override deleteSchemaItemSync(name: string): void;\r\n public abstract override setAlias(alias: string): void;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"Schema.js","sourceRoot":"","sources":["../../../src/Metadata/Schema.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAiB,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,EAAmB,yBAAyB,EAAiB,MAAM,cAAc,CAAC;AACzF,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/D,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAsE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAClI,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AA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------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Metadata\n */\n\nimport { SchemaContext } from \"../Context\";\nimport { ECSpecVersion, SchemaReadHelper } from \"../Deserialization/Helper\";\nimport { JsonParser } from \"../Deserialization/JsonParser\";\nimport { SchemaProps } from \"../Deserialization/JsonProps\";\nimport { XmlParser } from \"../Deserialization/XmlParser\";\nimport { XmlSerializationUtils } from \"../Deserialization/XmlSerializationUtils\";\nimport { ECClassModifier, isSupportedSchemaItemType, PrimitiveType } from \"../ECObjects\";\nimport { ECObjectsError, ECObjectsStatus } from \"../Exception\";\nimport { AnyClass, SchemaInfo } from \"../Interfaces\";\nimport { ECVersion, SchemaItemKey, SchemaKey } from \"../SchemaKey\";\nimport { ECName } from \"../ECName\";\nimport { ECClass, StructClass } from \"./Class\";\nimport { Constant } from \"./Constant\";\nimport { CustomAttribute, CustomAttributeContainerProps, CustomAttributeSet, serializeCustomAttributes } from \"./CustomAttribute\";\nimport { CustomAttributeClass } from \"./CustomAttributeClass\";\nimport { EntityClass } from \"./EntityClass\";\nimport { Enumeration } from \"./Enumeration\";\nimport { Format } from \"./Format\";\nimport { InvertedUnit } from \"./InvertedUnit\";\nimport { KindOfQuantity } from \"./KindOfQuantity\";\nimport { Mixin } from \"./Mixin\";\nimport { Phenomenon } from \"./Phenomenon\";\nimport { PropertyCategory } from \"./PropertyCategory\";\nimport { RelationshipClass } from \"./RelationshipClass\";\nimport { SchemaItem } from \"./SchemaItem\";\nimport { Unit } from \"./Unit\";\nimport { UnitSystem } from \"./UnitSystem\";\n\nconst SCHEMAURL3_2_JSON = \"https://dev.bentley.com/json_schemas/ec/32/ecschema\";\nconst SCHEMAURL3_2_XML = \"http://www.bentley.com/schemas/Bentley.ECXML.3.2\";\n\n/**\n * @beta\n */\nexport class Schema implements CustomAttributeContainerProps {\n private static _currentECSpecVersion = \"3.2\";\n private _context: SchemaContext;\n protected _schemaKey?: SchemaKey;\n protected _alias?: string;\n protected _label?: string;\n protected _description?: string;\n public readonly references: Schema[];\n private readonly _items: Map<string, SchemaItem>;\n private _customAttributes?: Map<string, CustomAttribute>;\n private _originalECSpecMajorVersion?: number;\n private _originalECSpecMinorVersion?: number;\n /**\n * Constructs an empty Schema with the given name and version in the provided context.\n * @param context The SchemaContext that will control the lifetime of the schema\n * @param name The schema's name\n * @param readVersion The integer read (major) version of the schema\n * @param writeVersion The integer write version of the schema\n * @param minorVersion The integer minor version of the schema\n */\n constructor(context: SchemaContext, name: string, alias: string, readVersion: number, writeVersion: number, minorVersion: number);\n /**\n * Constructs an empty Schema with the given key in the provided context.\n * @param context The SchemaContext that will control the lifetime of the schema\n * @param key A SchemaKey that uniquely identifies the schema\n */\n constructor(context: SchemaContext, key: SchemaKey, alias: string);\n /**\n * Constructs an empty Schema (without a SchemaKey) in the provided context.\n * This should only be used when the schema name and version will be deserialized (via `fromJson()`) immediately after this Schema is instantiated.\n * @param context The SchemaContext that will control the lifetime of the schema\n * @internal\n */\n constructor(context: SchemaContext);\n /** @internal */\n constructor(context: SchemaContext, nameOrKey?: SchemaKey | string, alias?: string, readVer?: number, writeVer?: number, minorVer?: number) {\n this._schemaKey = (typeof (nameOrKey) === \"string\") ? new SchemaKey(nameOrKey, new ECVersion(readVer as number, writeVer, minorVer)) : nameOrKey;\n this._context = context;\n this.references = [];\n this._items = new Map<string, SchemaItem>();\n\n if (alias !== undefined && ECName.validate(alias)) {\n this._alias = alias;\n } else if (nameOrKey !== undefined) {\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Schema ${this.name} does not have the required 'alias' attribute.`);\n }\n\n this._originalECSpecMajorVersion = Schema.currentECSpecMajorVersion;\n this._originalECSpecMinorVersion = Schema.currentECSpecMinorVersion;\n }\n\n public get schemaKey() {\n if (undefined === this._schemaKey)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema has an invalid or missing SchemaKey.`);\n return this._schemaKey;\n }\n\n public get name() {\n if (this._schemaKey === undefined)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema has an invalid or missing SchemaKey.`);\n return this.schemaKey.name;\n }\n\n public get readVersion() {\n if (this._schemaKey === undefined)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema has an invalid or missing SchemaKey.`);\n return this.schemaKey.readVersion;\n }\n\n public get writeVersion() {\n if (this._schemaKey === undefined)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema has an invalid or missing SchemaKey.`);\n return this.schemaKey.writeVersion;\n }\n\n public get minorVersion() {\n if (this._schemaKey === undefined)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema has an invalid or missing SchemaKey.`);\n return this.schemaKey.minorVersion;\n }\n\n public get originalECSpecMajorVersion() { return this._originalECSpecMajorVersion; }\n public get originalECSpecMinorVersion() { return this._originalECSpecMinorVersion; }\n public static get currentECSpecMajorVersion(): number { return parseInt(Schema._currentECSpecVersion.split(\".\")[0], 10); }\n public static get currentECSpecMinorVersion(): number { return parseInt(Schema._currentECSpecVersion.split(\".\")[1], 10); }\n\n public get alias() {\n if (this._alias === undefined || this._alias === null) {\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Schema ${this.name} does not have the required 'alias' attribute.`);\n } else { return this._alias; }\n }\n\n public get label() { return this._label; }\n\n public get description() { return this._description; }\n\n public get customAttributes(): CustomAttributeSet | undefined { return this._customAttributes; }\n\n /** Returns the schema name. */\n public get fullName() { return this.schemaKey.name; }\n\n /** Returns the schema. */\n public get schema(): Schema { return this; }\n\n /** Returns the schema context this schema is within. */\n public get context(): SchemaContext { return this._context; }\n\n /**\n * Returns a SchemaItemKey given the item name and the schema it belongs to\n * @param fullName fully qualified name {Schema name}.{Item Name}\n */\n public getSchemaItemKey(fullName: string): SchemaItemKey {\n const [schemaName, itemName] = SchemaItem.parseFullName(fullName);\n let schemaKey = this.schemaKey;\n if (this.name !== schemaName) {\n const newSchemaRef = this.getReferenceSync(schemaName);\n if (undefined === newSchemaRef)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `Unable to find the referenced SchemaItem ${itemName}.`);\n schemaKey = newSchemaRef.schemaKey;\n }\n return new SchemaItemKey(itemName, schemaKey);\n }\n\n protected addItem<T extends SchemaItem>(item: T): void {\n if (undefined !== this.getItemSync(item.name))\n throw new ECObjectsError(ECObjectsStatus.DuplicateItem, `The SchemaItem ${item.name} cannot be added to the schema ${this.name} because it already exists`);\n\n this._items.set(item.name.toUpperCase(), item);\n }\n\n /**\n * @alpha\n */\n protected createClass<T extends AnyClass>(type: (new (_schema: Schema, _name: string, _modifier?: ECClassModifier) => T), name: string, modifier?: ECClassModifier): T {\n const item = new type(this, name, modifier);\n this.addItem(item);\n return item;\n }\n\n /**\n * Deletes a class from within this schema.\n * @param name the local (unqualified) class name, lookup is case-insensitive\n * @alpha\n */\n protected async deleteClass(name: string): Promise<void> {\n const schemaItem = await this.getItem(name);\n if (ECClass.isECClass(schemaItem)) {\n this._items.delete(name.toUpperCase());\n }\n }\n\n /**\n * Deletes a class from within this schema.\n * @param name the local (unqualified) class name, lookup is case-insensitive\n * @alpha\n */\n protected deleteClassSync(name: string): void {\n const schemaItem = this.getItemSync(name);\n if (ECClass.isECClass(schemaItem))\n this._items.delete(name.toUpperCase());\n }\n\n /**\n * Deletes a SchemaItem from within this schema.\n * @param name the local (unqualified) class name, lookup is case-insensitive\n * @alpha\n */\n protected async deleteSchemaItem(name: string): Promise<void> {\n const schemaItem = await this.getItem(name);\n if (SchemaItem.isSchemaItem(schemaItem)) {\n this._items.delete(name.toUpperCase());\n }\n }\n\n /**\n * Deletes a SchemaItem from within this schema.\n * @param name the local (unqualified) class name, lookup is case-insensitive\n * @alpha\n */\n protected deleteSchemaItemSync(name: string): void {\n const schemaItem = this.getItemSync(name);\n if (SchemaItem.isSchemaItem(schemaItem))\n this._items.delete(name.toUpperCase());\n }\n\n /**\n * @alpha\n */\n protected createItem<T extends SchemaItem>(type: (new (_schema: Schema, _name: string) => T), name: string): T {\n const item = new type(this, name);\n this.addItem(item);\n return item;\n }\n\n protected addCustomAttribute(customAttribute: CustomAttribute) {\n if (!this._customAttributes)\n this._customAttributes = new Map<string, CustomAttribute>();\n\n this._customAttributes.set(customAttribute.className, customAttribute);\n }\n\n /**\n * Creates a EntityClass with the provided name in this schema.\n * @param name\n * @param modifier\n */\n protected async createEntityClass(name: string, modifier?: ECClassModifier): Promise<EntityClass> {\n return this.createClass<EntityClass>(EntityClass, name, modifier);\n }\n\n protected createEntityClassSync(name: string, modifier?: ECClassModifier): EntityClass {\n return this.createClass<EntityClass>(EntityClass, name, modifier);\n }\n\n /**\n * Creates a Mixin with the provided name in this schema.\n * @param name\n */\n protected async createMixinClass(name: string): Promise<Mixin> { return this.createClass<Mixin>(Mixin, name); }\n protected createMixinClassSync(name: string): Mixin { return this.createClass<Mixin>(Mixin, name); }\n\n /**\n * Creates a StructClass with the provided name in this schema.\n * @param name\n * @param modifier\n */\n protected async createStructClass(name: string, modifier?: ECClassModifier): Promise<StructClass> {\n return this.createClass<StructClass>(StructClass, name, modifier);\n }\n\n protected createStructClassSync(name: string, modifier?: ECClassModifier): StructClass {\n return this.createClass<StructClass>(StructClass, name, modifier);\n }\n\n /**\n * Creates a CustomAttributeClass with the provided name in this schema.\n * @param name\n * @param modifier\n */\n protected async createCustomAttributeClass(name: string, modifier?: ECClassModifier): Promise<CustomAttributeClass> {\n return this.createClass<CustomAttributeClass>(CustomAttributeClass, name, modifier);\n }\n\n protected createCustomAttributeClassSync(name: string, modifier?: ECClassModifier): CustomAttributeClass {\n return this.createClass<CustomAttributeClass>(CustomAttributeClass, name, modifier);\n }\n\n /**\n * Creates a RelationshipClass with the provided name in this schema.\n * @param name\n * @param modifier\n */\n protected async createRelationshipClass(name: string, modifier?: ECClassModifier): Promise<RelationshipClass> {\n return this.createRelationshipClassSync(name, modifier);\n }\n\n protected createRelationshipClassSync(name: string, modifier?: ECClassModifier): RelationshipClass {\n return this.createClass<RelationshipClass>(RelationshipClass, name, modifier);\n }\n\n /**\n * Creates an Enumeration with the provided name in this schema.\n * @param name\n */\n protected async createEnumeration(name: string, primitiveType?: PrimitiveType.Integer | PrimitiveType.String): Promise<Enumeration> {\n return this.createEnumerationSync(name, primitiveType);\n }\n\n protected createEnumerationSync(name: string, primitiveType?: PrimitiveType.Integer | PrimitiveType.String): Enumeration {\n const item = new Enumeration(this, name, primitiveType);\n this.addItem(item);\n return item;\n }\n\n /**\n * Creates an KindOfQuantity with the provided name in this schema.\n * @param name\n */\n protected async createKindOfQuantity(name: string): Promise<KindOfQuantity> {\n return this.createKindOfQuantitySync(name);\n }\n\n protected createKindOfQuantitySync(name: string): KindOfQuantity {\n return this.createItem<KindOfQuantity>(KindOfQuantity, name);\n }\n\n /**\n * Creates a Constant with the provided name in this schema.\n * @param name\n */\n protected async createConstant(name: string): Promise<Constant> {\n return this.createItem<Constant>(Constant, name);\n }\n\n protected createConstantSync(name: string): Constant {\n return this.createItem<Constant>(Constant, name);\n }\n\n /**\n * Creates a Inverted Unit with the provided name in this schema.\n * @param name\n */\n protected async createInvertedUnit(name: string): Promise<InvertedUnit> {\n return this.createItem<InvertedUnit>(InvertedUnit, name);\n }\n\n protected createInvertedUnitSync(name: string): InvertedUnit {\n return this.createItem<InvertedUnit>(InvertedUnit, name);\n }\n\n /**\n * Creates an Format with the provided name in this schema.\n * @param name\n */\n protected async createFormat(name: string): Promise<Format> {\n return this.createItem<Format>(Format, name);\n }\n\n protected createFormatSync(name: string): Format {\n return this.createItem<Format>(Format, name);\n }\n\n /**\n * Creates a UnitSystem with the provided name in this schema.\n * @param name\n */\n protected async createUnitSystem(name: string): Promise<UnitSystem> {\n return this.createItem<UnitSystem>(UnitSystem, name);\n }\n\n protected createUnitSystemSync(name: string): UnitSystem {\n return this.createItem<UnitSystem>(UnitSystem, name);\n }\n\n /**\n * Creates a Phenomenon with the provided name in this schema.\n * @param name\n */\n protected async createPhenomenon(name: string): Promise<Phenomenon> {\n return this.createItem<Phenomenon>(Phenomenon, name);\n }\n\n protected createPhenomenonSync(name: string): Phenomenon {\n return this.createItem<Phenomenon>(Phenomenon, name);\n }\n\n /**\n * Creates a Unit with the provided name in this schema.\n * @param name\n */\n protected async createUnit(name: string): Promise<Unit> {\n return this.createItem<Unit>(Unit, name);\n }\n\n protected createUnitSync(name: string): Unit {\n return this.createItem<Unit>(Unit, name);\n }\n\n /**\n * Creates an PropertyCategory with the provided name in this schema.\n * @param name\n */\n protected async createPropertyCategory(name: string): Promise<PropertyCategory> {\n return this.createItem<PropertyCategory>(PropertyCategory, name);\n }\n\n protected createPropertyCategorySync(name: string): PropertyCategory {\n return this.createItem<PropertyCategory>(PropertyCategory, name);\n }\n /**\n *\n * @param refSchema\n */\n protected async addReference(refSchema: Schema): Promise<void> {\n // TODO validation of reference schema. For now just adding\n this.addReferenceSync(refSchema);\n }\n\n protected addReferenceSync(refSchema: Schema): void {\n this.references.push(refSchema);\n }\n\n /**\n * @alpha Used for schema editing.\n */\n protected setContext(context: SchemaContext): void {\n this._context = context;\n }\n\n /**\n * Sets the version of the SchemaKey identifying the schema.\n * @param readVersion The read version of the schema. If undefined, the value from the existing SchemaKey will be used.\n * @param writeVersion The write version of the schema. If undefined, the value from the existing SchemaKey will be used.\n * @param minorVersion The minor version of the schema. If undefined, the value from the existing SchemaKey will be used.\n */\n public setVersion(readVersion?: number, writeVersion?: number, minorVersion?: number): void {\n if (!this._schemaKey)\n throw new ECObjectsError(ECObjectsStatus.InvalidSchemaKey, `The schema '${this.name}' has an invalid SchemaKey.`);\n\n const newVersion = new ECVersion(readVersion ?? this._schemaKey.readVersion, writeVersion ?? this._schemaKey.writeVersion, minorVersion ?? this._schemaKey.minorVersion);\n this._schemaKey = new SchemaKey(this._schemaKey.name, newVersion);\n }\n\n /**\n * Shortcut for calling getItem with EntityClass.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested EntityClass or undefined if not found.\n */\n public async getEntityClass(name: string): Promise<EntityClass | undefined> { return this.getItem(name, EntityClass); }\n\n /**\n * Shortcut for calling getItem with Mixin.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested Mixin or undefined if not found.\n */\n public async getMixin(name: string): Promise<Mixin | undefined> { return this.getItem(name, Mixin); }\n\n /**\n * Shortcut for calling getItem with StructClass.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested StructClass or undefined if not found.\n */\n public async getStructClass(name: string): Promise<StructClass | undefined> { return this.getItem(name, StructClass); }\n\n /**\n * Shortcut for calling getItem with CustomAttributeClass.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested CustomAttributeClass or undefined if not found.\n */\n public async getCustomAttributeClass(name: string): Promise<CustomAttributeClass | undefined> { return this.getItem(name, CustomAttributeClass); }\n\n /**\n * Shortcut for calling getItem with RelationshipClass.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested RelationshipClass or undefined if not found.\n */\n public async getRelationshipClass(name: string): Promise<RelationshipClass | undefined> { return this.getItem(name, RelationshipClass); }\n\n /**\n * Shortcut for calling getItem with Enumeration.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested Enumeration or undefined if not found.\n */\n public async getEnumeration(name: string): Promise<Enumeration | undefined> { return this.getItem(name, Enumeration); }\n\n /**\n * Shortcut for calling getItem with KindOfQuantity.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested KindOfQuantity or undefined if not found.\n */\n public async getKindOfQuantity(name: string): Promise<KindOfQuantity | undefined> { return this.getItem(name, KindOfQuantity); }\n\n /**\n * Shortcut for calling getItem with PropertyCategory.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested PropertyCategory or undefined if not found.\n */\n public async getPropertyCategory(name: string): Promise<PropertyCategory | undefined> { return this.getItem(name, PropertyCategory); }\n\n /**\n * Shortcut for calling getItem with Unit.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested Unit or undefined if not found.\n */\n public async getUnit(name: string): Promise<Unit | undefined> { return this.getItem(name, Unit); }\n\n /**\n * Shortcut for calling getItem with InvertedUnit.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested InvertedUnit or undefined if not found.\n */\n public async getInvertedUnit(name: string): Promise<InvertedUnit | undefined> { return this.getItem(name, InvertedUnit); }\n\n /**\n * Shortcut for calling getItem with Constant.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested Constant or undefined if not found.\n */\n public async getConstant(name: string): Promise<Constant | undefined> { return this.getItem(name, Constant); }\n\n /**\n * Shortcut for calling getItem with Phenomenon.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested Phenomenon or undefined if not found.\n */\n public async getPhenomenon(name: string): Promise<Phenomenon | undefined> { return this.getItem(name, Phenomenon); }\n\n /**\n * Shortcut for calling getItem with UnitSystem.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested UnitSystem or undefined if not found.\n */\n public async getUnitSystem(name: string): Promise<UnitSystem | undefined> { return this.getItem(name, UnitSystem); }\n\n /**\n * Shortcut for calling getItem with Format.\n * @param name The local (unqualified) name of the item to return.\n * @returns The requested Format or undefined if not found.\n */\n public async getFormat(name: string): Promise<Format | undefined> { return this.getItem(name, Format); }\n /**\n * Gets an item from within this schema. To get by full name use lookupItem instead.\n * @param key the local (unqualified) name, lookup is case-insensitive\n */\n public async getItem(name: string): Promise<SchemaItem | undefined>\n public async getItem<T extends typeof SchemaItem>(name: string, itemConstructor: T): Promise<InstanceType<T> | undefined>\n public async getItem<T extends typeof SchemaItem>(name: string, itemConstructor?: T): Promise<SchemaItem | InstanceType<T> | undefined> {\n // this method exists so we can rewire it later when we load partial schemas, for now it is identical to the sync version\n if(itemConstructor === undefined)\n return this.getItemSync(name) as InstanceType<T> | undefined;\n\n return this.getItemSync(name, itemConstructor);\n }\n\n /**\n * Gets an item from within this schema. To get by full name use lookupItem instead.\n * If an item of the name exists but does not match the requested type, undefined is returned\n * @param key the local (unqualified) name, lookup is case-insensitive\n * @param itemConstructor The constructor of the item to return.\n */\n public getItemSync(name: string): SchemaItem | undefined\n public getItemSync<T extends typeof SchemaItem>(name: string, itemConstructor: T): InstanceType<T> | undefined\n public getItemSync<T extends typeof SchemaItem>(name: string, itemConstructor?: T): SchemaItem | InstanceType<T> | undefined {\n const value = this._items.get(name.toUpperCase());\n if (value === undefined || itemConstructor === undefined)\n return value;\n\n if(isSupportedSchemaItemType(value.schemaItemType, itemConstructor.schemaItemType))\n return value as InstanceType<T>;\n\n return undefined;\n }\n\n /**\n * Attempts to find a schema item within this schema or a (directly) referenced schema\n * @param key The full name or a SchemaItemKey identifying the desired item.\n */\n public async lookupItem(key: Readonly<SchemaItemKey> | string): Promise<SchemaItem | undefined>;\n public async lookupItem<T extends typeof SchemaItem>(key: Readonly<SchemaItemKey> | string, itemConstructor: T): Promise<InstanceType<T> | undefined>;\n public async lookupItem<T extends typeof SchemaItem>(key: Readonly<SchemaItemKey> | string, itemConstructor?: T): Promise<SchemaItem | InstanceType<T> | undefined> {\n let schemaName, itemName: string;\n if (typeof (key) === \"string\") {\n [schemaName, itemName] = SchemaItem.parseFullName(key);\n } else {\n itemName = key.name;\n schemaName = key.schemaName;\n }\n\n if (!schemaName || schemaName.toUpperCase() === this.name.toUpperCase()) {\n return itemConstructor\n ? this.getItem(itemName, itemConstructor)\n : this.getItem(itemName);\n }\n\n const refSchema = await this.getReference(schemaName);\n if (!refSchema)\n return undefined;\n\n return itemConstructor\n ? refSchema.getItem(itemName, itemConstructor)\n : refSchema.getItem(itemName);\n }\n\n /**\n * Attempts to find a schema item within this schema or a (directly) referenced schema\n * @param key The full name or a SchemaItemKey identifying the desired item.\n */\n public lookupItemSync(key: Readonly<SchemaItemKey> | string): SchemaItem | undefined;\n public lookupItemSync<T extends typeof SchemaItem>(key: Readonly<SchemaItemKey> | string, itemConstructor: T): InstanceType<T> | undefined;\n public lookupItemSync<T extends typeof SchemaItem>(key: Readonly<SchemaItemKey> | string, itemConstructor?: T): SchemaItem | InstanceType<T> | undefined {\n let schemaName, itemName: string;\n if (typeof (key) === \"string\") {\n [schemaName, itemName] = SchemaItem.parseFullName(key);\n } else {\n itemName = key.name;\n schemaName = key.schemaName;\n }\n\n if (!schemaName || schemaName.toUpperCase() === this.name.toUpperCase()) {\n return itemConstructor\n ? this.getItemSync(itemName, itemConstructor)\n : this.getItemSync(itemName);\n }\n\n const refSchema = this.getReferenceSync(schemaName);\n if (!refSchema)\n return undefined;\n\n return itemConstructor\n ? refSchema.getItemSync(itemName, itemConstructor)\n : refSchema.getItemSync(itemName);\n }\n\n /**\n * Returns all of the loaded items in this schema.\n */\n public getItems(): Iterable<SchemaItem>;\n public getItems<T extends typeof SchemaItem>(itemConstructor: T): Iterable<InstanceType<T>>;\n public * getItems<T extends typeof SchemaItem>(itemConstructor?: T): Iterable<InstanceType<T> | SchemaItem> {\n if (!this._items)\n return;\n\n for (const item of this._items.values()) {\n if (itemConstructor === undefined || isSupportedSchemaItemType(item.schemaItemType, itemConstructor.schemaItemType))\n yield item;\n }\n }\n\n /**\n * Gets a referenced schema by name\n * @param refSchemaName schema name to find\n */\n public async getReference(refSchemaName: string): Promise<Schema | undefined> {\n if (this.references.length === 0)\n return undefined;\n\n return this.references.find((ref) => ref.name.toLowerCase() === refSchemaName.toLowerCase());\n }\n\n /**\n * Gets a referenced schema by alias\n * @param alias alias to find\n */\n public getReferenceNameByAlias(alias: string): string | undefined {\n if (this.references.length === 0)\n return undefined;\n\n const schema = this.references.find((ref) => ref.alias ? ref.alias.toLowerCase() === alias.toLowerCase() : false);\n return schema ? schema.name : undefined;\n }\n\n /**\n * Gets a referenced schema by name\n * @param refSchemaName schema name to find\n */\n public getReferenceSync(refSchemaName: string): Schema | undefined {\n if (this.references.length === 0)\n return undefined;\n\n return this.references.find((ref) => ref.name.toLowerCase() === refSchemaName.toLowerCase());\n }\n\n /**\n * Save this Schema's properties to an object for serializing to JSON.\n */\n public toJSON(): SchemaProps {\n if (!this.isECSpecVersionSupported())\n throw new ECObjectsError(ECObjectsStatus.NewerECSpecVersion, `The Schema '${this.name}' has an unsupported ECSpecVersion and cannot be serialized.`);\n\n const schemaJson: { [value: string]: any } = {};\n schemaJson.$schema = SCHEMAURL3_2_JSON; // $schema is required\n schemaJson.name = this.name; // name is required\n schemaJson.version = this.schemaKey.version.toString(true);\n schemaJson.alias = this.alias; // alias is required\n if (undefined !== this.label) // label is optional\n schemaJson.label = this.label;\n if (undefined !== this.description) // description is optional\n schemaJson.description = this.description;\n if (undefined !== this.references && this.references.length > 0) // references is optional\n schemaJson.references = this.references.map(({ name, schemaKey }) => ({ name, version: schemaKey.version.toString() }));\n\n const customAttributes = serializeCustomAttributes(this.customAttributes);\n if (undefined !== customAttributes)\n schemaJson.customAttributes = customAttributes;\n if (this._items.size > 0) {\n schemaJson.items = {};\n this._items.forEach((schemaItem: SchemaItem) => {\n schemaJson.items[schemaItem.name] = schemaItem.toJSON(false, true);\n });\n }\n return schemaJson as SchemaProps;\n }\n\n /**\n * Converts the schema to a DOM XML Document.\n * @param schemaXml An empty DOM document to which the schema will be written\n */\n public async toXml(schemaXml: Document): Promise<Document> {\n if (!this.isECSpecVersionSupported())\n throw new ECObjectsError(ECObjectsStatus.NewerECSpecVersion, `The Schema '${this.name}' has an unsupported ECSpecVersion and cannot be serialized.`);\n\n const schemaMetadata = schemaXml.createElement(\"ECSchema\");\n schemaMetadata.setAttribute(\"xmlns\", SCHEMAURL3_2_XML);\n schemaMetadata.setAttribute(\"version\", this.schemaKey.version.toString());\n schemaMetadata.setAttribute(\"schemaName\", this.name);\n schemaMetadata.setAttribute(\"alias\", this.alias ? this.alias : \"\");\n if (undefined !== this.label)\n schemaMetadata.setAttribute(\"displayLabel\", this.label);\n if (undefined !== this.description)\n schemaMetadata.setAttribute(\"description\", this.description);\n\n // Map used for CA serialization\n const refSchemaMap = new Map<string, string>();\n\n this.references.forEach(({ name, schemaKey, alias }) => {\n const schemaRef = schemaXml.createElement(\"ECSchemaReference\");\n schemaRef.setAttribute(\"name\", name);\n schemaRef.setAttribute(\"version\", schemaKey.version.toString());\n schemaRef.setAttribute(\"alias\", alias ? alias : \"\");\n schemaMetadata.appendChild(schemaRef);\n refSchemaMap.set(name, schemaKey.version.toString());\n });\n\n if (this._customAttributes) {\n const parentElem = schemaXml.createElement(\"ECCustomAttributes\");\n for (const [name, attribute] of this._customAttributes) {\n const caElem = await XmlSerializationUtils.writeCustomAttribute(name, attribute, schemaXml, this);\n parentElem.appendChild(caElem);\n }\n schemaMetadata.appendChild(parentElem);\n }\n\n for (const [, item] of this._items) {\n const itemXml = await item.toXml(schemaXml);\n schemaMetadata.appendChild(itemXml);\n }\n\n schemaXml.appendChild(schemaMetadata);\n return schemaXml;\n }\n\n // Check if the ECSpecVersion read-version is greater than the current ECSpecVersion supported.\n // If a specific ECSpecVersion is given, check against that version.\n // If no argument is given, check against the original ECSpecVersion of the schema.\n private isECSpecMajorVersionSupported(ecSpecMajorVersionToCheck?: number): boolean {\n // If argument is supplied, check the argument against the current ECSpecVersion supported\n if (ecSpecMajorVersionToCheck !== undefined)\n return (Schema.currentECSpecMajorVersion >= ecSpecMajorVersionToCheck);\n\n // If argument is not supplied, check against the original ECSpecVersion of the schema\n if (this.originalECSpecMajorVersion === undefined)\n return false;\n return (Schema.currentECSpecMajorVersion >= this.originalECSpecMajorVersion);\n }\n\n // Check if the full ECSpecVersion is greater than the current ECSpecVersion supported.\n // If a specific ECSpecVersion is given, check against that version.\n // If no argument is given, check against the original ECSpecVersion of the schema.\n private isECSpecVersionSupported(ecSpecMajorVersionToCheck?: number, ecSpecMinorVersionToCheck?: number): boolean {\n // If arguments are supplied, check the arguments against the current ECSpecVersion supported\n if (ecSpecMajorVersionToCheck !== undefined && ecSpecMinorVersionToCheck !== undefined) {\n if (!this.isECSpecMajorVersionSupported(ecSpecMajorVersionToCheck))\n return false;\n return (Schema.currentECSpecMinorVersion >= ecSpecMinorVersionToCheck);\n }\n // If arguments are not supplied, check against the original ECSpecVersion of the schema\n if (!this.isECSpecMajorVersionSupported() || this.originalECSpecMinorVersion === undefined)\n return false;\n return (Schema.currentECSpecMinorVersion >= this.originalECSpecMinorVersion);\n }\n\n /**\n * Loads the schema header (name, version alias, label and description) from the input SchemaProps\n */\n public fromJSONSync(schemaProps: SchemaProps) {\n if (undefined === this._schemaKey) {\n const schemaName = schemaProps.name;\n const version = ECVersion.fromString(schemaProps.version);\n this._schemaKey = new SchemaKey(schemaName, version);\n } else {\n if (schemaProps.name.toLowerCase() !== this.name.toLowerCase())\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Schema ${this.name} does not match the provided name, '${schemaProps.name}'.`);\n if (this.schemaKey.version.compare(ECVersion.fromString(schemaProps.version)))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Schema ${this.name} has the version '${this.schemaKey.version}' that does not match the provided version '${schemaProps.version}'.`);\n }\n\n if (schemaProps.$schema.match(`https://dev\\\\.bentley\\\\.com/json_schemas/ec/([0-9]+)/ecschema`) == null && schemaProps.$schema.match(`http://www\\\\.bentley\\\\.com/schemas/Bentley\\\\.ECXML\\\\.([0-9]+)`) == null)\n throw new ECObjectsError(ECObjectsStatus.MissingSchemaUrl, `The Schema '${this.name}' has an unsupported namespace '${schemaProps.$schema}'.`);\n\n // The schema props have not been parsed. Parse the ECXml version from the $schema attribute\n let ecVersion: ECSpecVersion;\n if (schemaProps.ecSpecMajorVersion === undefined || schemaProps.ecSpecMinorVersion === undefined) {\n ecVersion = ((schemaProps.$schema.search(\"ECXML\") !== -1) ? XmlParser.parseXmlNamespace(schemaProps.$schema) : JsonParser.parseJSUri(schemaProps.$schema)) as ECSpecVersion;\n } else {\n ecVersion = { readVersion: schemaProps.ecSpecMajorVersion, writeVersion: schemaProps.ecSpecMinorVersion } as ECSpecVersion;\n }\n\n this._originalECSpecMajorVersion = ecVersion?.readVersion;\n this._originalECSpecMinorVersion = ecVersion?.writeVersion;\n\n if (!this.isECSpecMajorVersionSupported(ecVersion?.readVersion))\n throw new ECObjectsError(ECObjectsStatus.NewerECSpecVersion, `The Schema '${this.name}' has an unsupported ECVersion and cannot be loaded.`);\n\n if (ECName.validate(schemaProps.alias)) {\n this._alias = schemaProps.alias;\n } else {\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Schema ${schemaProps.name} does not have the required 'alias' attribute.`);\n }\n\n if (undefined !== schemaProps.label)\n this._label = schemaProps.label;\n\n if (undefined !== schemaProps.description)\n this._description = schemaProps.description;\n }\n\n /**\n * Loads the schema header (name, version alias, label and description) from the input SchemaProps\n */\n public async fromJSON(schemaProps: SchemaProps) {\n this.fromJSONSync(schemaProps);\n }\n\n /**\n * Completely loads the SchemaInfo from the input json and starts loading the entire schema. The complete schema can be retrieved from the\n * schema context using the getCachedSchema method\n */\n public static async startLoadingFromJson(jsonObj: object | string, context: SchemaContext): Promise<SchemaInfo> {\n const schema = new Schema(context);\n\n const reader = new SchemaReadHelper(JsonParser, context);\n const rawSchema = typeof jsonObj === \"string\" ? JSON.parse(jsonObj) : jsonObj;\n return reader.readSchemaInfo(schema, rawSchema);\n }\n\n public static async fromJson(jsonObj: object | string, context: SchemaContext): Promise<Schema> {\n let schema: Schema = new Schema(context);\n\n const reader = new SchemaReadHelper(JsonParser, context);\n const rawSchema = typeof jsonObj === \"string\" ? JSON.parse(jsonObj) : jsonObj;\n schema = await reader.readSchema(schema, rawSchema);\n\n return schema;\n }\n\n /**\n * Completely loads the Schema from the input json. The schema is cached in the schema context.\n */\n public static fromJsonSync(jsonObj: object | string, context: SchemaContext): Schema {\n let schema: Schema = new Schema(context);\n\n const reader = new SchemaReadHelper(JsonParser, context);\n const rawSchema = typeof jsonObj === \"string\" ? JSON.parse(jsonObj) : jsonObj;\n schema = reader.readSchemaSync(schema, rawSchema);\n\n return schema;\n }\n\n /**\n * @internal\n */\n public static isSchema(object: any): object is Schema {\n const schema = object as Schema;\n\n return schema !== undefined && schema.schemaKey !== undefined && schema.context !== undefined;\n }\n\n /**\n * @alpha\n * Used for schema editing.\n */\n protected setDisplayLabel(displayLabel: string) {\n this._label = displayLabel;\n }\n\n /**\n * @alpha\n * Used for schema editing.\n */\n protected setDescription(description: string) {\n this._description = description;\n }\n\n /**\n * @alpha\n * Used for schema editing.\n */\n protected setAlias(alias: string) {\n if (!ECName.validate(alias)) {\n throw new ECObjectsError(ECObjectsStatus.InvalidECName, \"The specified schema alias is invalid.\");\n }\n this._alias = alias;\n }\n}\n\n/**\n * Hackish approach that works like a \"friend class\" so we can access protected members without making them public.\n * We cannot put this into Helper.ts and make it non-export, because we are importing Helper.ts from this file, and the circular import\n * would prevent this class from extending Schema.\n * @internal\n */\nexport abstract class MutableSchema extends Schema {\n public abstract override addCustomAttribute(customAttribute: CustomAttribute): void;\n public abstract override createEntityClass(name: string, modifier?: ECClassModifier): Promise<EntityClass>;\n public abstract override createEntityClassSync(name: string, modifier?: ECClassModifier): EntityClass;\n public abstract override createMixinClass(name: string): Promise<Mixin>;\n public abstract override createMixinClassSync(name: string): Mixin;\n public abstract override createStructClass(name: string, modifier?: ECClassModifier): Promise<StructClass>;\n public abstract override createStructClassSync(name: string, modifier?: ECClassModifier): StructClass;\n public abstract override createCustomAttributeClass(name: string, modifier?: ECClassModifier): Promise<CustomAttributeClass>;\n public abstract override createCustomAttributeClassSync(name: string, modifier?: ECClassModifier): CustomAttributeClass;\n public abstract override createRelationshipClass(name: string, modifier?: ECClassModifier): Promise<RelationshipClass>;\n public abstract override createRelationshipClassSync(name: string, modifier?: ECClassModifier): RelationshipClass;\n public abstract override createEnumeration(name: string, primitiveType?: PrimitiveType.Integer | PrimitiveType.String): Promise<Enumeration>;\n public abstract override createEnumerationSync(name: string, primitiveType?: PrimitiveType.Integer | PrimitiveType.String): Enumeration;\n public abstract override createKindOfQuantity(name: string): Promise<KindOfQuantity>;\n public abstract override createKindOfQuantitySync(name: string): KindOfQuantity;\n public abstract override createUnit(name: string): Promise<Unit>;\n public abstract override createUnitSync(name: string): Unit;\n public abstract override createConstant(name: string): Promise<Constant>;\n public abstract override createConstantSync(name: string): Constant;\n public abstract override createInvertedUnit(name: string): Promise<InvertedUnit>;\n public abstract override createInvertedUnitSync(name: string): InvertedUnit;\n public abstract override createPhenomenon(name: string): Promise<Phenomenon>;\n public abstract override createPhenomenonSync(name: string): Phenomenon;\n public abstract override createFormat(name: string): Promise<Format>;\n public abstract override createFormatSync(name: string): Format;\n public abstract override createUnitSystem(name: string): Promise<UnitSystem>;\n public abstract override createUnitSystemSync(name: string): UnitSystem;\n public abstract override createPropertyCategory(name: string): Promise<PropertyCategory>;\n public abstract override createPropertyCategorySync(name: string): PropertyCategory;\n public abstract override addItem<T extends SchemaItem>(item: T): void;\n public abstract override addReference(refSchema: Schema): Promise<void>;\n public abstract override addReferenceSync(refSchema: Schema): void;\n public abstract override setContext(schemaContext: SchemaContext): void;\n public abstract override deleteClass(name: string): Promise<void>;\n public abstract override deleteClassSync(name: string): void;\n public abstract override deleteSchemaItem(name: string): Promise<void>;\n public abstract override deleteSchemaItemSync(name: string): void;\n public abstract override setAlias(alias: string): void;\n}"]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module Metadata
|
|
3
3
|
*/
|
|
4
4
|
import { SchemaItemProps } from "../Deserialization/JsonProps";
|
|
5
|
-
import { SchemaItemType } from "../ECObjects";
|
|
5
|
+
import { SchemaItemType, SupportedSchemaItemType } from "../ECObjects";
|
|
6
6
|
import { SchemaItemKey } from "../SchemaKey";
|
|
7
7
|
import { Schema } from "./Schema";
|
|
8
8
|
/**
|
|
@@ -10,7 +10,16 @@ import { Schema } from "./Schema";
|
|
|
10
10
|
* @beta
|
|
11
11
|
*/
|
|
12
12
|
export declare abstract class SchemaItem {
|
|
13
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Get the type of item represented by this class
|
|
15
|
+
* @beta
|
|
16
|
+
*/
|
|
17
|
+
static get schemaItemType(): SupportedSchemaItemType;
|
|
18
|
+
/**
|
|
19
|
+
* Get the type of item represented by this instance
|
|
20
|
+
* @beta
|
|
21
|
+
*/
|
|
22
|
+
abstract get schemaItemType(): SchemaItemType;
|
|
14
23
|
readonly schema: Schema;
|
|
15
24
|
protected _key: SchemaItemKey;
|
|
16
25
|
protected _description?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaItem.d.ts","sourceRoot":"","sources":["../../../src/Metadata/SchemaItem.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,
|
|
1
|
+
{"version":3,"file":"SchemaItem.d.ts","sourceRoot":"","sources":["../../../src/Metadata/SchemaItem.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAA0B,cAAc,EAA6B,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAE1H,OAAO,EAAa,aAAa,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIlC;;;GAGG;AACH,8BAAsB,UAAU;IAC9B;;;OAGG;IACH,WAAkB,cAAc,IAAI,uBAAuB,CAA6C;IAExG;;;OAGG;IACH,aAAoB,cAAc,IAAI,cAAc,CAAC;IACrD,SAAgB,MAAM,EAAE,MAAM,CAAC;IAC/B,SAAS,CAAC,IAAI,EAAE,aAAa,CAAC;IAC9B,SAAS,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAChC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;gBAEd,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAKxC,IAAW,IAAI,WAA4B;IAC3C,IAAW,QAAQ,WAAqF;IACxG,IAAW,GAAG,kBAAwB;IACtC,IAAW,KAAK,uBAA0B;IAC1C,IAAW,WAAW,uBAAgC;IAGtD;;;;OAIG;IACI,MAAM,CAAC,UAAU,GAAE,OAAe,EAAE,oBAAoB,GAAE,OAAe,GAe3D,eAAe;IAGpC,gBAAgB;IACH,KAAK,CAAC,SAAS,EAAE,QAAQ,GAAG,OAAO,CAA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