@itwin/ecschema-editing 4.7.0-dev.9 → 4.7.1
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 +23 -1
- package/lib/cjs/Editing/Constants.d.ts +6 -6
- package/lib/cjs/Editing/Constants.d.ts.map +1 -1
- package/lib/cjs/Editing/Constants.js +26 -31
- package/lib/cjs/Editing/Constants.js.map +1 -1
- package/lib/cjs/Editing/CustomAttributes.d.ts +3 -3
- package/lib/cjs/Editing/CustomAttributes.d.ts.map +1 -1
- package/lib/cjs/Editing/CustomAttributes.js +18 -28
- package/lib/cjs/Editing/CustomAttributes.js.map +1 -1
- package/lib/cjs/Editing/ECClasses.d.ts +24 -23
- package/lib/cjs/Editing/ECClasses.d.ts.map +1 -1
- package/lib/cjs/Editing/ECClasses.js +126 -156
- package/lib/cjs/Editing/ECClasses.js.map +1 -1
- package/lib/cjs/Editing/Editor.d.ts +10 -31
- package/lib/cjs/Editing/Editor.d.ts.map +1 -1
- package/lib/cjs/Editing/Editor.js +59 -43
- package/lib/cjs/Editing/Editor.js.map +1 -1
- package/lib/cjs/Editing/Entities.d.ts +9 -9
- package/lib/cjs/Editing/Entities.d.ts.map +1 -1
- package/lib/cjs/Editing/Entities.js +65 -85
- package/lib/cjs/Editing/Entities.js.map +1 -1
- package/lib/cjs/Editing/Enumerations.d.ts +6 -6
- package/lib/cjs/Editing/Enumerations.d.ts.map +1 -1
- package/lib/cjs/Editing/Enumerations.js +57 -55
- package/lib/cjs/Editing/Enumerations.js.map +1 -1
- package/lib/cjs/Editing/Exception.d.ts +257 -0
- package/lib/cjs/Editing/Exception.d.ts.map +1 -0
- package/lib/cjs/Editing/Exception.js +426 -0
- package/lib/cjs/Editing/Exception.js.map +1 -0
- package/lib/cjs/Editing/Formats.d.ts +6 -6
- package/lib/cjs/Editing/Formats.d.ts.map +1 -1
- package/lib/cjs/Editing/Formats.js +28 -33
- package/lib/cjs/Editing/Formats.js.map +1 -1
- package/lib/cjs/Editing/InvertedUnits.d.ts +6 -6
- package/lib/cjs/Editing/InvertedUnits.d.ts.map +1 -1
- package/lib/cjs/Editing/InvertedUnits.js +41 -56
- package/lib/cjs/Editing/InvertedUnits.js.map +1 -1
- package/lib/cjs/Editing/KindOfQuantities.d.ts +6 -6
- package/lib/cjs/Editing/KindOfQuantities.d.ts.map +1 -1
- package/lib/cjs/Editing/KindOfQuantities.js +50 -57
- package/lib/cjs/Editing/KindOfQuantities.js.map +1 -1
- package/lib/cjs/Editing/Mixins.d.ts +5 -5
- package/lib/cjs/Editing/Mixins.d.ts.map +1 -1
- package/lib/cjs/Editing/Mixins.js +43 -58
- package/lib/cjs/Editing/Mixins.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableEntityClass.d.ts +1 -5
- package/lib/cjs/Editing/Mutable/MutableEntityClass.d.ts.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableEntityClass.js +1 -45
- package/lib/cjs/Editing/Mutable/MutableEntityClass.js.map +1 -1
- package/lib/cjs/Editing/Phenomena.d.ts +7 -7
- package/lib/cjs/Editing/Phenomena.d.ts.map +1 -1
- package/lib/cjs/Editing/Phenomena.js +23 -23
- package/lib/cjs/Editing/Phenomena.js.map +1 -1
- package/lib/cjs/Editing/Properties.d.ts +7 -6
- package/lib/cjs/Editing/Properties.d.ts.map +1 -1
- package/lib/cjs/Editing/Properties.js +99 -46
- package/lib/cjs/Editing/Properties.js.map +1 -1
- package/lib/cjs/Editing/PropertyCategories.d.ts +6 -6
- package/lib/cjs/Editing/PropertyCategories.d.ts.map +1 -1
- package/lib/cjs/Editing/PropertyCategories.js +29 -27
- package/lib/cjs/Editing/PropertyCategories.js.map +1 -1
- package/lib/cjs/Editing/RelationshipClasses.d.ts +15 -17
- package/lib/cjs/Editing/RelationshipClasses.d.ts.map +1 -1
- package/lib/cjs/Editing/RelationshipClasses.js +97 -101
- package/lib/cjs/Editing/RelationshipClasses.js.map +1 -1
- package/lib/cjs/Editing/SchemaItems.d.ts +13 -5
- package/lib/cjs/Editing/SchemaItems.d.ts.map +1 -1
- package/lib/cjs/Editing/SchemaItems.js +58 -6
- package/lib/cjs/Editing/SchemaItems.js.map +1 -1
- package/lib/cjs/Editing/Structs.d.ts +3 -3
- package/lib/cjs/Editing/Structs.d.ts.map +1 -1
- package/lib/cjs/Editing/Structs.js +17 -27
- package/lib/cjs/Editing/Structs.js.map +1 -1
- package/lib/cjs/Editing/UnitSystems.d.ts +7 -7
- package/lib/cjs/Editing/UnitSystems.d.ts.map +1 -1
- package/lib/cjs/Editing/UnitSystems.js +22 -20
- package/lib/cjs/Editing/UnitSystems.js.map +1 -1
- package/lib/cjs/Editing/Units.d.ts +6 -6
- package/lib/cjs/Editing/Units.d.ts.map +1 -1
- package/lib/cjs/Editing/Units.js +26 -35
- package/lib/cjs/Editing/Units.js.map +1 -1
- package/lib/cjs/Merging/CAClassMerger.js +2 -2
- package/lib/cjs/Merging/CAClassMerger.js.map +1 -1
- package/lib/cjs/Merging/ClassMerger.d.ts +1 -2
- package/lib/cjs/Merging/ClassMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/ClassMerger.js +15 -39
- package/lib/cjs/Merging/ClassMerger.js.map +1 -1
- package/lib/cjs/Merging/ConstantMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/ConstantMerger.js +2 -3
- package/lib/cjs/Merging/ConstantMerger.js.map +1 -1
- package/lib/cjs/Merging/CustomAttributeMerger.d.ts +4 -5
- package/lib/cjs/Merging/CustomAttributeMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/CustomAttributeMerger.js +8 -18
- package/lib/cjs/Merging/CustomAttributeMerger.js.map +1 -1
- package/lib/cjs/Merging/EntityClassMerger.d.ts +1 -2
- package/lib/cjs/Merging/EntityClassMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/EntityClassMerger.js +3 -10
- package/lib/cjs/Merging/EntityClassMerger.js.map +1 -1
- package/lib/cjs/Merging/EnumerationMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/EnumerationMerger.js +8 -10
- package/lib/cjs/Merging/EnumerationMerger.js.map +1 -1
- package/lib/cjs/Merging/KindOfQuantityMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/KindOfQuantityMerger.js +2 -3
- package/lib/cjs/Merging/KindOfQuantityMerger.js.map +1 -1
- package/lib/cjs/Merging/MixinMerger.js +2 -2
- package/lib/cjs/Merging/MixinMerger.js.map +1 -1
- package/lib/cjs/Merging/PhenomenonMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/PhenomenonMerger.js +1 -2
- package/lib/cjs/Merging/PhenomenonMerger.js.map +1 -1
- package/lib/cjs/Merging/PropertyCategoryMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/PropertyCategoryMerger.js +1 -2
- package/lib/cjs/Merging/PropertyCategoryMerger.js.map +1 -1
- package/lib/cjs/Merging/PropertyMerger.d.ts +2 -3
- package/lib/cjs/Merging/PropertyMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/PropertyMerger.js +21 -42
- package/lib/cjs/Merging/PropertyMerger.js.map +1 -1
- package/lib/cjs/Merging/RelationshipClassMerger.d.ts +5 -3
- package/lib/cjs/Merging/RelationshipClassMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/RelationshipClassMerger.js +35 -33
- package/lib/cjs/Merging/RelationshipClassMerger.js.map +1 -1
- package/lib/cjs/Merging/SchemaItemMerger.d.ts +3 -4
- package/lib/cjs/Merging/SchemaItemMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/SchemaItemMerger.js +3 -2
- package/lib/cjs/Merging/SchemaItemMerger.js.map +1 -1
- package/lib/cjs/Merging/SchemaMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/SchemaMerger.js +2 -8
- package/lib/cjs/Merging/SchemaMerger.js.map +1 -1
- package/lib/cjs/Merging/UnitSystemMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/UnitSystemMerger.js +1 -2
- package/lib/cjs/Merging/UnitSystemMerger.js.map +1 -1
- package/package.json +9 -9
|
@@ -11,6 +11,7 @@ exports.Mixins = void 0;
|
|
|
11
11
|
const ecschema_metadata_1 = require("@itwin/ecschema-metadata");
|
|
12
12
|
const ECClasses_1 = require("./ECClasses");
|
|
13
13
|
const Properties_1 = require("./Properties");
|
|
14
|
+
const Exception_1 = require("./Exception");
|
|
14
15
|
/**
|
|
15
16
|
* @alpha
|
|
16
17
|
* A class extending ECClasses allowing you to create schema items of type Mixin.
|
|
@@ -21,30 +22,20 @@ class Mixins extends ECClasses_1.ECClasses {
|
|
|
21
22
|
/**
|
|
22
23
|
* Allows access for editing of NavigationProperty attributes.
|
|
23
24
|
*/
|
|
24
|
-
this.navigationProperties = new Properties_1.NavigationProperties(
|
|
25
|
+
this.navigationProperties = new Properties_1.NavigationProperties(ecschema_metadata_1.SchemaItemType.Mixin, this.schemaEditor);
|
|
25
26
|
}
|
|
26
|
-
async create(schemaKey, name, appliesTo, displayLabel,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
if (baseClassItem.schemaItemType !== ecschema_metadata_1.SchemaItemType.Mixin)
|
|
38
|
-
return { errorMessage: `${baseClassItem.fullName} is not of type Mixin.` };
|
|
39
|
-
newClass.baseClass = new ecschema_metadata_1.DelayedPromiseWithProps(baseClass, async () => baseClassItem);
|
|
27
|
+
async create(schemaKey, name, appliesTo, displayLabel, baseClassKey) {
|
|
28
|
+
try {
|
|
29
|
+
const newClass = await this.createClass(schemaKey, this.schemaItemType, (schema) => schema.createMixinClass.bind(schema), name, baseClassKey);
|
|
30
|
+
const newAppliesTo = await this.getSchemaItem(appliesTo, ecschema_metadata_1.SchemaItemType.EntityClass);
|
|
31
|
+
newClass.setAppliesTo(new ecschema_metadata_1.DelayedPromiseWithProps(newAppliesTo.key, async () => newAppliesTo));
|
|
32
|
+
if (displayLabel)
|
|
33
|
+
newClass.setDisplayLabel(displayLabel);
|
|
34
|
+
return newClass.key;
|
|
35
|
+
}
|
|
36
|
+
catch (e) {
|
|
37
|
+
throw new Exception_1.SchemaEditingError(Exception_1.ECEditingStatus.CreateSchemaItemFailed, new Exception_1.ClassId(this.schemaItemType, name, schemaKey), e);
|
|
40
38
|
}
|
|
41
|
-
const newAppliesTo = (await this._schemaEditor.schemaContext.getSchemaItem(appliesTo));
|
|
42
|
-
if (newAppliesTo === undefined || newAppliesTo.schemaItemType !== ecschema_metadata_1.SchemaItemType.EntityClass)
|
|
43
|
-
return { errorMessage: `Failed to locate the appliedTo entity class ${appliesTo.name}.` };
|
|
44
|
-
newClass.setAppliesTo(new ecschema_metadata_1.DelayedPromiseWithProps(newAppliesTo.key, async () => newAppliesTo));
|
|
45
|
-
if (displayLabel)
|
|
46
|
-
newClass.setDisplayLabel(displayLabel);
|
|
47
|
-
return { itemKey: newClass.key };
|
|
48
39
|
}
|
|
49
40
|
/**
|
|
50
41
|
* Creates a MixinClass through a MixinProps.
|
|
@@ -52,38 +43,32 @@ class Mixins extends ECClasses_1.ECClasses {
|
|
|
52
43
|
* @param mixinProps a json object that will be used to populate the new MixinClass. Needs a name value passed in.
|
|
53
44
|
*/
|
|
54
45
|
async createFromProps(schemaKey, mixinProps) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
return
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
return { errorMessage: `Failed to create class ${mixinProps.name} in schema ${schemaKey.toString(true)}.` };
|
|
63
|
-
await newClass.fromJSON(mixinProps);
|
|
64
|
-
return { itemKey: newClass.key };
|
|
46
|
+
try {
|
|
47
|
+
const newClass = await this.createSchemaItemFromProps(schemaKey, this.schemaItemType, (schema) => schema.createMixinClass.bind(schema), mixinProps);
|
|
48
|
+
return newClass.key;
|
|
49
|
+
}
|
|
50
|
+
catch (e) {
|
|
51
|
+
throw new Exception_1.SchemaEditingError(Exception_1.ECEditingStatus.CreateSchemaItemFromProps, new Exception_1.ClassId(this.schemaItemType, mixinProps.name, schemaKey), e);
|
|
52
|
+
}
|
|
65
53
|
}
|
|
66
54
|
async addMixin(entityKey, mixinKey) {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
if (mixin.schemaItemType !== ecschema_metadata_1.SchemaItemType.Mixin)
|
|
76
|
-
throw new ecschema_metadata_1.ECObjectsError(ecschema_metadata_1.ECObjectsStatus.InvalidSchemaItemType, `Expected ${mixinKey.fullName} to be of type Mixin.`);
|
|
77
|
-
entity.addMixin(mixin);
|
|
55
|
+
try {
|
|
56
|
+
const entity = await this.getSchemaItem(entityKey, ecschema_metadata_1.SchemaItemType.EntityClass);
|
|
57
|
+
const mixin = await this.getSchemaItem(mixinKey);
|
|
58
|
+
entity.addMixin(mixin);
|
|
59
|
+
}
|
|
60
|
+
catch (e) {
|
|
61
|
+
throw new Exception_1.SchemaEditingError(Exception_1.ECEditingStatus.AddMixin, new Exception_1.ClassId(ecschema_metadata_1.SchemaItemType.EntityClass, entityKey), e);
|
|
62
|
+
}
|
|
78
63
|
}
|
|
79
64
|
async createNavigationProperty(mixinKey, name, relationship, direction) {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
65
|
+
try {
|
|
66
|
+
const mixin = await this.getSchemaItem(mixinKey);
|
|
67
|
+
await mixin.createNavigationProperty(name, relationship, direction);
|
|
68
|
+
}
|
|
69
|
+
catch (e) {
|
|
70
|
+
throw new Exception_1.SchemaEditingError(Exception_1.ECEditingStatus.CreateNavigationProperty, new Exception_1.ClassId(ecschema_metadata_1.SchemaItemType.Mixin, mixinKey), e);
|
|
71
|
+
}
|
|
87
72
|
}
|
|
88
73
|
/**
|
|
89
74
|
* Creates a Navigation Property through a NavigationPropertyProps.
|
|
@@ -91,14 +76,14 @@ class Mixins extends ECClasses_1.ECClasses {
|
|
|
91
76
|
* @param navigationProps a json object that will be used to populate the new Navigation Property.
|
|
92
77
|
*/
|
|
93
78
|
async createNavigationPropertyFromProps(classKey, navigationProps) {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
79
|
+
try {
|
|
80
|
+
const mixin = await this.getSchemaItem(classKey);
|
|
81
|
+
const property = await mixin.createNavigationProperty(navigationProps.name, navigationProps.relationshipName, navigationProps.direction);
|
|
82
|
+
await property.fromJSON(navigationProps);
|
|
83
|
+
}
|
|
84
|
+
catch (e) {
|
|
85
|
+
throw new Exception_1.SchemaEditingError(Exception_1.ECEditingStatus.CreateNavigationPropertyFromProps, new Exception_1.ClassId(ecschema_metadata_1.SchemaItemType.RelationshipClass, classKey), e);
|
|
86
|
+
}
|
|
102
87
|
}
|
|
103
88
|
}
|
|
104
89
|
exports.Mixins = Mixins;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Mixins.js","sourceRoot":"","sources":["../../../src/Editing/Mixins.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gEAGkC;AAElC,2CAAwC;AAGxC,6CAAoD;AAEpD;;;GAGG;AACH,MAAa,MAAO,SAAQ,qBAAS;IACnC,YAAmB,YAAiC;QAClD,KAAK,CAAC,kCAAc,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;QAG5C;;WAEG;QACa,yBAAoB,GAAG,IAAI,iCAAoB,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;IALzG,CAAC;IAOM,KAAK,CAAC,MAAM,CAAC,SAAoB,EAAE,IAAY,EAAE,SAAwB,EAAE,YAAqB,EAAE,SAAyB;QAChI,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QAC7D,IAA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AC;IACnD,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,iCAAiC,CAAC,QAAuB,EAAE,eAAwC;QAC9G,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,aAAa,CAAe,QAAQ,CAAC,CAAC;QAC3F,IAAI,KAAK,KAAK,SAAS;YACrB,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,eAAe,CAAC,IAAI,EAAE,YAAY,EAAE,SAAS,QAAQ,CAAC,QAAQ,+BAA+B,EAAC,CAAC;QAE3I,IAAI,KAAK,CAAC,cAAc,KAAK,kCAAc,CAAC,KAAK;YAC/C,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,eAAe,CAAC,IAAI,EAAE,YAAY,EAAE,YAAY,QAAQ,CAAC,QAAQ,uBAAuB,EAAC,CAAC;QAEtI,MAAM,kBAAkB,GAAI,MAAM,KAAK,CAAC,wBAAwB,CAAC,eAAe,CAAC,IAAI,EAAE,eAAe,CAAC,gBAAgB,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;QACpJ,MAAM,kBAAkB,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;QAEnD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,eAAe,CAAC,IAAI,EAAE,CAAC;IACnE,CAAC;CACF;AAjHD,wBAiHC","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 Editing\r\n */\r\n\r\nimport {\r\n DelayedPromiseWithProps, ECObjectsError, ECObjectsStatus, EntityClass, Mixin, MixinProps, NavigationPropertyProps, RelationshipClass,\r\n SchemaItemKey, SchemaItemType, SchemaKey, StrengthDirection,\r\n} from \"@itwin/ecschema-metadata\";\r\nimport { PropertyEditResults, SchemaContextEditor, SchemaItemEditResults } from \"./Editor\";\r\nimport { ECClasses } from \"./ECClasses\";\r\nimport { MutableMixin } from \"./Mutable/MutableMixin\";\r\nimport { MutableEntityClass } from \"./Mutable/MutableEntityClass\";\r\nimport { NavigationProperties } from \"./Properties\";\r\n\r\n/**\r\n * @alpha\r\n * A class extending ECClasses allowing you to create schema items of type Mixin.\r\n */\r\nexport class Mixins extends ECClasses {\r\n public constructor(schemaEditor: SchemaContextEditor) {\r\n super(SchemaItemType.Mixin, schemaEditor);\r\n }\r\n\r\n /**\r\n * Allows access for editing of NavigationProperty attributes.\r\n */\r\n public readonly navigationProperties = new NavigationProperties(this.schemaItemType, this._schemaEditor);\r\n\r\n public async create(schemaKey: SchemaKey, name: string, appliesTo: SchemaItemKey, displayLabel?: string, baseClass?: SchemaItemKey): Promise<SchemaItemEditResults> {\r\n const schema = await this._schemaEditor.getSchema(schemaKey);\r\n if (schema === undefined)\r\n return { errorMessage: `Schema Key ${schemaKey.toString(true)} not found in context` };\r\n\r\n const newClass = ((await schema.createMixinClass(name)) as MutableMixin);\r\n if (newClass === undefined)\r\n return { errorMessage: `Failed to create class ${name} in schema ${schemaKey.toString(true)}.` };\r\n\r\n if (baseClass !== undefined) {\r\n const baseClassItem = await schema.lookupItem<Mixin>(baseClass);\r\n if (baseClassItem === undefined)\r\n return { errorMessage: `Unable to locate base class ${baseClass.fullName} in schema ${schema.fullName}.` };\r\n\r\n if (baseClassItem.schemaItemType !== SchemaItemType.Mixin)\r\n return { errorMessage: `${baseClassItem.fullName} is not of type Mixin.` };\r\n\r\n newClass.baseClass = new DelayedPromiseWithProps<SchemaItemKey, Mixin>(baseClass, async () => baseClassItem);\r\n }\r\n\r\n const newAppliesTo = (await this._schemaEditor.schemaContext.getSchemaItem<EntityClass>(appliesTo));\r\n if (newAppliesTo === undefined || newAppliesTo.schemaItemType !== SchemaItemType.EntityClass)\r\n return { errorMessage: `Failed to locate the appliedTo entity class ${appliesTo.name}.` };\r\n\r\n newClass.setAppliesTo(new DelayedPromiseWithProps<SchemaItemKey, EntityClass>(newAppliesTo.key, async () => newAppliesTo));\r\n\r\n if (displayLabel)\r\n newClass.setDisplayLabel(displayLabel);\r\n\r\n return { itemKey: newClass.key };\r\n }\r\n\r\n /**\r\n * Creates a MixinClass through a MixinProps.\r\n * @param schemaKey a SchemaKey of the Schema that will house the new object.\r\n * @param mixinProps a json object that will be used to populate the new MixinClass. Needs a name value passed in.\r\n */\r\n public async createFromProps(schemaKey: SchemaKey, mixinProps: MixinProps): Promise<SchemaItemEditResults> {\r\n const schema = await this._schemaEditor.getSchema(schemaKey);\r\n if (schema === undefined)\r\n return { errorMessage: `Schema Key ${schemaKey.toString(true)} not found in context` };\r\n\r\n if (mixinProps.name === undefined)\r\n return { errorMessage: `No name was supplied within props.` };\r\n\r\n const newClass = (await schema.createMixinClass(mixinProps.name)) as MutableMixin;\r\n if (newClass === undefined)\r\n return { errorMessage: `Failed to create class ${mixinProps.name} in schema ${schemaKey.toString(true)}.` };\r\n\r\n await newClass.fromJSON(mixinProps);\r\n return { itemKey: newClass.key };\r\n }\r\n\r\n public async addMixin(entityKey: SchemaItemKey, mixinKey: SchemaItemKey): Promise<void> {\r\n const entity = (await this._schemaEditor.schemaContext.getSchemaItem<MutableEntityClass>(entityKey));\r\n const mixin = (await this._schemaEditor.schemaContext.getSchemaItem<Mixin>(mixinKey));\r\n\r\n if (entity === undefined)\r\n throw new ECObjectsError(ECObjectsStatus.ClassNotFound, `Entity Class ${entityKey.fullName} not found in schema context.`);\r\n\r\n if (mixin === undefined)\r\n throw new ECObjectsError(ECObjectsStatus.ClassNotFound, `Mixin Class ${mixinKey.fullName} not found in schema context.`);\r\n\r\n if (entity.schemaItemType !== SchemaItemType.EntityClass)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidSchemaItemType, `Expected ${entityKey.fullName} to be of type Entity Class.`);\r\n\r\n if (mixin.schemaItemType !== SchemaItemType.Mixin)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidSchemaItemType, `Expected ${mixinKey.fullName} to be of type Mixin.`);\r\n\r\n entity.addMixin(mixin);\r\n }\r\n\r\n public async createNavigationProperty(mixinKey: SchemaItemKey, name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): Promise<PropertyEditResults> {\r\n const mixin = (await this._schemaEditor.schemaContext.getSchemaItem<MutableMixin>(mixinKey));\r\n\r\n if (mixin === undefined)\r\n throw new ECObjectsError(ECObjectsStatus.ClassNotFound, `Mixin Class ${mixinKey.fullName} not found in schema context.`);\r\n\r\n if (mixin.schemaItemType !== SchemaItemType.Mixin)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidSchemaItemType, `Expected ${mixinKey.fullName} to be of type Mixin.`);\r\n\r\n await mixin.createNavigationProperty(name, relationship, direction);\r\n return { itemKey: mixinKey, propertyName: name };\r\n }\r\n\r\n /**\r\n * Creates a Navigation Property through a NavigationPropertyProps.\r\n * @param classKey a SchemaItemKey of the Mixin that will house the new property.\r\n * @param navigationProps a json object that will be used to populate the new Navigation Property.\r\n */\r\n public async createNavigationPropertyFromProps(classKey: SchemaItemKey, navigationProps: NavigationPropertyProps): Promise<PropertyEditResults> {\r\n const mixin = await this._schemaEditor.schemaContext.getSchemaItem<MutableMixin>(classKey);\r\n if (mixin === undefined)\r\n return { itemKey: classKey, propertyName: navigationProps.name, errorMessage: `Mixin ${classKey.fullName} not found in schema context.`};\r\n\r\n if (mixin.schemaItemType !== SchemaItemType.Mixin)\r\n return { itemKey: classKey, propertyName: navigationProps.name, errorMessage: `Expected ${classKey.fullName} to be of type Mixin.`};\r\n\r\n const navigationProperty = await mixin.createNavigationProperty(navigationProps.name, navigationProps.relationshipName, navigationProps.direction);\r\n await navigationProperty.fromJSON(navigationProps);\r\n\r\n return { itemKey: classKey, propertyName: navigationProps.name };\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"Mixins.js","sourceRoot":"","sources":["../../../src/Editing/Mixins.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/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S,CAAC,CAAC;QACtE,CAAC;QAAC,OAAM,CAAM,EAAE,CAAC;YACf,MAAM,IAAI,8BAAkB,CAAC,2BAAe,CAAC,wBAAwB,EAAE,IAAI,mBAAO,CAAC,kCAAc,CAAC,KAAK,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;QACzH,CAAC;IACH,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,iCAAiC,CAAC,QAAuB,EAAE,eAAwC;QAC9G,IAAI,CAAC;YACH,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,aAAa,CAAe,QAAQ,CAAC,CAAC;YAC/D,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,wBAAwB,CAAC,eAAe,CAAC,IAAI,EAAE,eAAe,CAAC,gBAAgB,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;YACzI,MAAM,QAAQ,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;QAC3C,CAAC;QAAC,OAAM,CAAM,EAAE,CAAC;YACf,MAAM,IAAI,8BAAkB,CAAC,2BAAe,CAAC,iCAAiC,EAAE,IAAI,mBAAO,CAAC,kCAAc,CAAC,iBAAiB,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;QAC9I,CAAC;IACH,CAAC;CACF;AAxED,wBAwEC","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 Editing\r\n */\r\n\r\nimport {\r\n DelayedPromiseWithProps, EntityClass, Mixin, MixinProps, NavigationPropertyProps, RelationshipClass,\r\n SchemaItemKey, SchemaItemType, SchemaKey, StrengthDirection,\r\n} from \"@itwin/ecschema-metadata\";\r\nimport { SchemaContextEditor } from \"./Editor\";\r\nimport { ECClasses } from \"./ECClasses\";\r\nimport { MutableMixin } from \"./Mutable/MutableMixin\";\r\nimport { MutableEntityClass } from \"./Mutable/MutableEntityClass\";\r\nimport { NavigationProperties } from \"./Properties\";\r\nimport { ClassId, ECEditingStatus, SchemaEditingError } from \"./Exception\";\r\n\r\n/**\r\n * @alpha\r\n * A class extending ECClasses allowing you to create schema items of type Mixin.\r\n */\r\nexport class Mixins extends ECClasses {\r\n public constructor(schemaEditor: SchemaContextEditor) {\r\n super(SchemaItemType.Mixin, schemaEditor);\r\n }\r\n\r\n /**\r\n * Allows access for editing of NavigationProperty attributes.\r\n */\r\n public readonly navigationProperties = new NavigationProperties(SchemaItemType.Mixin, this.schemaEditor);\r\n\r\n public async create(schemaKey: SchemaKey, name: string, appliesTo: SchemaItemKey, displayLabel?: string, baseClassKey?: SchemaItemKey): Promise<SchemaItemKey> {\r\n try {\r\n const newClass = await this.createClass<Mixin>(schemaKey, this.schemaItemType, (schema) => schema.createMixinClass.bind(schema), name, baseClassKey) as MutableMixin;\r\n const newAppliesTo = await this.getSchemaItem<EntityClass>(appliesTo, SchemaItemType.EntityClass);\r\n newClass.setAppliesTo(new DelayedPromiseWithProps<SchemaItemKey, EntityClass>(newAppliesTo.key, async () => newAppliesTo));\r\n\r\n if (displayLabel)\r\n newClass.setDisplayLabel(displayLabel);\r\n\r\n return newClass.key;\r\n } catch (e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreateSchemaItemFailed, new ClassId(this.schemaItemType, name, schemaKey), e);\r\n }\r\n }\r\n\r\n /**\r\n * Creates a MixinClass through a MixinProps.\r\n * @param schemaKey a SchemaKey of the Schema that will house the new object.\r\n * @param mixinProps a json object that will be used to populate the new MixinClass. Needs a name value passed in.\r\n */\r\n public async createFromProps(schemaKey: SchemaKey, mixinProps: MixinProps): Promise<SchemaItemKey> {\r\n try {\r\n const newClass = await this.createSchemaItemFromProps(schemaKey, this.schemaItemType, (schema) => schema.createMixinClass.bind(schema), mixinProps);\r\n return newClass.key;\r\n } catch (e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreateSchemaItemFromProps, new ClassId(this.schemaItemType, mixinProps.name!, schemaKey), e);\r\n }\r\n }\r\n\r\n public async addMixin(entityKey: SchemaItemKey, mixinKey: SchemaItemKey): Promise<void> {\r\n try {\r\n const entity = await this.getSchemaItem<MutableEntityClass>(entityKey, SchemaItemType.EntityClass);\r\n const mixin = await this.getSchemaItem<Mixin>(mixinKey);\r\n entity.addMixin(mixin);\r\n } catch(e: any){\r\n throw new SchemaEditingError(ECEditingStatus.AddMixin, new ClassId(SchemaItemType.EntityClass, entityKey), e);\r\n }\r\n }\r\n\r\n public async createNavigationProperty(mixinKey: SchemaItemKey, name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): Promise<void> {\r\n try {\r\n const mixin = await this.getSchemaItem<MutableMixin>(mixinKey);\r\n await mixin.createNavigationProperty(name, relationship, direction);\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreateNavigationProperty, new ClassId(SchemaItemType.Mixin, mixinKey), e);\r\n }\r\n }\r\n\r\n /**\r\n * Creates a Navigation Property through a NavigationPropertyProps.\r\n * @param classKey a SchemaItemKey of the Mixin that will house the new property.\r\n * @param navigationProps a json object that will be used to populate the new Navigation Property.\r\n */\r\n public async createNavigationPropertyFromProps(classKey: SchemaItemKey, navigationProps: NavigationPropertyProps): Promise<void> {\r\n try {\r\n const mixin = await this.getSchemaItem<MutableMixin>(classKey);\r\n const property = await mixin.createNavigationProperty(navigationProps.name, navigationProps.relationshipName, navigationProps.direction);\r\n await property.fromJSON(navigationProps);\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreateNavigationPropertyFromProps, new ClassId(SchemaItemType.RelationshipClass, classKey), e);\r\n }\r\n }\r\n}\r\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EntityClass, Mixin, NavigationProperty, RelationshipClass, StrengthDirection } from "@itwin/ecschema-metadata";
|
|
2
2
|
/**
|
|
3
3
|
* Hackish approach that works like a "friend class" so we can access protected members without making them public.
|
|
4
4
|
* @internal
|
|
@@ -9,8 +9,4 @@ export declare abstract class MutableEntityClass extends EntityClass {
|
|
|
9
9
|
abstract createNavigationPropertySync(name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): NavigationProperty;
|
|
10
10
|
abstract setDisplayLabel(displayLabel: string): void;
|
|
11
11
|
}
|
|
12
|
-
/** @internal */
|
|
13
|
-
export declare function createNavigationProperty(ecClass: ECClass, name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): Promise<NavigationProperty>;
|
|
14
|
-
/** @internal */
|
|
15
|
-
export declare function createNavigationPropertySync(ecClass: ECClass, name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): NavigationProperty;
|
|
16
12
|
//# sourceMappingURL=MutableEntityClass.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MutableEntityClass.d.ts","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableEntityClass.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"MutableEntityClass.d.ts","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableEntityClass.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,WAAW,EAAE,KAAK,EAAE,kBAAkB,EACtC,iBAAiB,EAAE,iBAAiB,EACrC,MAAM,0BAA0B,CAAC;AAElC;;;GAGG;AACH,8BAAsB,kBAAmB,SAAQ,WAAW;aACjC,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,GAAG;aAC3B,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,iBAAiB,EAAE,SAAS,EAAE,MAAM,GAAG,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;aACpJ,4BAA4B,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,iBAAiB,EAAE,SAAS,EAAE,MAAM,GAAG,iBAAiB,GAAG,kBAAkB;aAC/I,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI;CACrE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.MutableEntityClass = void 0;
|
|
4
4
|
/*---------------------------------------------------------------------------------------------
|
|
5
5
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
6
6
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -13,48 +13,4 @@ const ecschema_metadata_1 = require("@itwin/ecschema-metadata");
|
|
|
13
13
|
class MutableEntityClass extends ecschema_metadata_1.EntityClass {
|
|
14
14
|
}
|
|
15
15
|
exports.MutableEntityClass = MutableEntityClass;
|
|
16
|
-
/** @internal */
|
|
17
|
-
async function createNavigationProperty(ecClass, name, relationship, direction) {
|
|
18
|
-
if (await ecClass.getProperty(name))
|
|
19
|
-
throw new ecschema_metadata_1.ECObjectsError(ecschema_metadata_1.ECObjectsStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${ecClass.name}.`);
|
|
20
|
-
let resolvedRelationship;
|
|
21
|
-
if (typeof (relationship) === "string") {
|
|
22
|
-
resolvedRelationship = await ecClass.schema.lookupItem(relationship);
|
|
23
|
-
}
|
|
24
|
-
else
|
|
25
|
-
resolvedRelationship = relationship;
|
|
26
|
-
if (!resolvedRelationship)
|
|
27
|
-
throw new ecschema_metadata_1.ECObjectsError(ecschema_metadata_1.ECObjectsStatus.InvalidType, `The provided RelationshipClass, ${relationship}, is not a valid RelationshipClassInterface.`); // eslint-disable-line @typescript-eslint/no-base-to-string
|
|
28
|
-
if (typeof (direction) === "string") {
|
|
29
|
-
const tmpDirection = (0, ecschema_metadata_1.parseStrengthDirection)(direction);
|
|
30
|
-
if (undefined === tmpDirection)
|
|
31
|
-
throw new ecschema_metadata_1.ECObjectsError(ecschema_metadata_1.ECObjectsStatus.InvalidStrengthDirection, `The provided StrengthDirection, ${direction}, is not a valid StrengthDirection.`);
|
|
32
|
-
direction = tmpDirection;
|
|
33
|
-
}
|
|
34
|
-
const lazyRelationship = new ecschema_metadata_1.DelayedPromiseWithProps(resolvedRelationship.key, async () => resolvedRelationship);
|
|
35
|
-
return new ecschema_metadata_1.NavigationProperty(ecClass, name, lazyRelationship, direction);
|
|
36
|
-
}
|
|
37
|
-
exports.createNavigationProperty = createNavigationProperty;
|
|
38
|
-
/** @internal */
|
|
39
|
-
function createNavigationPropertySync(ecClass, name, relationship, direction) {
|
|
40
|
-
if (ecClass.getPropertySync(name))
|
|
41
|
-
throw new ecschema_metadata_1.ECObjectsError(ecschema_metadata_1.ECObjectsStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${ecClass.name}.`);
|
|
42
|
-
let resolvedRelationship;
|
|
43
|
-
if (typeof (relationship) === "string") {
|
|
44
|
-
resolvedRelationship = ecClass.schema.lookupItemSync(relationship);
|
|
45
|
-
}
|
|
46
|
-
else
|
|
47
|
-
resolvedRelationship = relationship;
|
|
48
|
-
if (!resolvedRelationship)
|
|
49
|
-
throw new ecschema_metadata_1.ECObjectsError(ecschema_metadata_1.ECObjectsStatus.InvalidType, `The provided RelationshipClass, ${relationship}, is not a valid RelationshipClassInterface.`); // eslint-disable-line @typescript-eslint/no-base-to-string
|
|
50
|
-
if (typeof (direction) === "string") {
|
|
51
|
-
const tmpDirection = (0, ecschema_metadata_1.parseStrengthDirection)(direction);
|
|
52
|
-
if (undefined === tmpDirection)
|
|
53
|
-
throw new ecschema_metadata_1.ECObjectsError(ecschema_metadata_1.ECObjectsStatus.InvalidStrengthDirection, `The provided StrengthDirection, ${direction}, is not a valid StrengthDirection.`);
|
|
54
|
-
direction = tmpDirection;
|
|
55
|
-
}
|
|
56
|
-
const lazyRelationship = new ecschema_metadata_1.DelayedPromiseWithProps(resolvedRelationship.key, async () => resolvedRelationship);
|
|
57
|
-
return new ecschema_metadata_1.NavigationProperty(ecClass, name, lazyRelationship, direction);
|
|
58
|
-
}
|
|
59
|
-
exports.createNavigationPropertySync = createNavigationPropertySync;
|
|
60
16
|
//# sourceMappingURL=MutableEntityClass.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MutableEntityClass.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableEntityClass.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAGkC;AAElC;;;GAGG;AACH,MAAsB,kBAAmB,SAAQ,+BAAW;CAK3D;AALD,gDAKC
|
|
1
|
+
{"version":3,"file":"MutableEntityClass.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableEntityClass.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAGkC;AAElC;;;GAGG;AACH,MAAsB,kBAAmB,SAAQ,+BAAW;CAK3D;AALD,gDAKC","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\nimport {\r\n EntityClass, Mixin, NavigationProperty,\r\n RelationshipClass, StrengthDirection,\r\n} from \"@itwin/ecschema-metadata\";\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 * @internal\r\n */\r\nexport abstract class MutableEntityClass extends EntityClass {\r\n public abstract override addMixin(mixin: Mixin): any;\r\n public abstract override createNavigationProperty(name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): Promise<NavigationProperty>;\r\n public abstract override createNavigationPropertySync(name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): NavigationProperty;\r\n public abstract override setDisplayLabel(displayLabel: string): void;\r\n}\r\n"]}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module Editing
|
|
3
3
|
*/
|
|
4
|
-
import { PhenomenonProps, SchemaKey } from "@itwin/ecschema-metadata";
|
|
5
|
-
import { SchemaContextEditor
|
|
4
|
+
import { PhenomenonProps, SchemaItemKey, SchemaKey } from "@itwin/ecschema-metadata";
|
|
5
|
+
import { SchemaContextEditor } from "./Editor";
|
|
6
|
+
import { SchemaItems } from "./SchemaItems";
|
|
6
7
|
/**
|
|
7
8
|
* @alpha
|
|
8
9
|
* A class allowing you to create schema items of type Phenomenon.
|
|
9
10
|
*/
|
|
10
|
-
export declare class Phenomena {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
createFromProps(schemaKey: SchemaKey, phenomenonProps: PhenomenonProps): Promise<SchemaItemEditResults>;
|
|
11
|
+
export declare class Phenomena extends SchemaItems {
|
|
12
|
+
constructor(schemaEditor: SchemaContextEditor);
|
|
13
|
+
create(schemaKey: SchemaKey, name: string, definition: string, displayLabel?: string): Promise<SchemaItemKey>;
|
|
14
|
+
createFromProps(schemaKey: SchemaKey, phenomenonProps: PhenomenonProps): Promise<SchemaItemKey>;
|
|
15
15
|
}
|
|
16
16
|
//# sourceMappingURL=Phenomena.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Phenomena.d.ts","sourceRoot":"","sources":["../../../src/Editing/Phenomena.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"Phenomena.d.ts","sourceRoot":"","sources":["../../../src/Editing/Phenomena.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAc,eAAe,EAAE,aAAa,EAAkB,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACjH,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAG/C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;;GAGG;AACH,qBAAa,SAAU,SAAQ,WAAW;gBACrB,YAAY,EAAE,mBAAmB;IAIvC,MAAM,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAe7G,eAAe,CAAC,SAAS,EAAE,SAAS,EAAE,eAAe,EAAE,eAAe,GAAG,OAAO,CAAC,aAAa,CAAC;CAQ7G"}
|
|
@@ -8,37 +8,37 @@
|
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.Phenomena = void 0;
|
|
11
|
+
const ecschema_metadata_1 = require("@itwin/ecschema-metadata");
|
|
12
|
+
const Exception_1 = require("./Exception");
|
|
13
|
+
const SchemaItems_1 = require("./SchemaItems");
|
|
11
14
|
/**
|
|
12
15
|
* @alpha
|
|
13
16
|
* A class allowing you to create schema items of type Phenomenon.
|
|
14
17
|
*/
|
|
15
|
-
class Phenomena {
|
|
16
|
-
constructor(
|
|
17
|
-
|
|
18
|
+
class Phenomena extends SchemaItems_1.SchemaItems {
|
|
19
|
+
constructor(schemaEditor) {
|
|
20
|
+
super(ecschema_metadata_1.SchemaItemType.Phenomenon, schemaEditor);
|
|
18
21
|
}
|
|
19
22
|
async create(schemaKey, name, definition, displayLabel) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
try {
|
|
24
|
+
const newPhenomenon = await this.createSchemaItem(schemaKey, this.schemaItemType, (schema) => schema.createPhenomenon.bind(schema), name);
|
|
25
|
+
if (displayLabel)
|
|
26
|
+
newPhenomenon.setDisplayLabel(displayLabel);
|
|
27
|
+
await newPhenomenon.setDefinition(definition);
|
|
28
|
+
return newPhenomenon.key;
|
|
29
|
+
}
|
|
30
|
+
catch (e) {
|
|
31
|
+
throw new Exception_1.SchemaEditingError(Exception_1.ECEditingStatus.CreateSchemaItemFailed, new Exception_1.SchemaItemId(this.schemaItemType, name, schemaKey), e);
|
|
32
|
+
}
|
|
30
33
|
}
|
|
31
34
|
async createFromProps(schemaKey, phenomenonProps) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return { errorMessage: `Failed to create class ${phenomenonProps.name} in schema ${schemaKey.toString(true)}.` };
|
|
40
|
-
await newPhenomenon.fromJSON(phenomenonProps);
|
|
41
|
-
return { itemKey: newPhenomenon.key };
|
|
35
|
+
try {
|
|
36
|
+
const newPhenomenon = await this.createSchemaItemFromProps(schemaKey, this.schemaItemType, (schema) => schema.createPhenomenon.bind(schema), phenomenonProps);
|
|
37
|
+
return newPhenomenon.key;
|
|
38
|
+
}
|
|
39
|
+
catch (e) {
|
|
40
|
+
throw new Exception_1.SchemaEditingError(Exception_1.ECEditingStatus.CreateSchemaItemFromProps, new Exception_1.SchemaItemId(this.schemaItemType, phenomenonProps.name, schemaKey), e);
|
|
41
|
+
}
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
exports.Phenomena = Phenomena;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Phenomena.js","sourceRoot":"","sources":["../../../src/Editing/Phenomena.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;
|
|
1
|
+
{"version":3,"file":"Phenomena.js","sourceRoot":"","sources":["../../../src/Editing/Phenomena.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gEAAiH;AAGjH,2CAAgF;AAChF,+CAA4C;AAE5C;;;GAGG;AACH,MAAa,SAAU,SAAQ,yBAAW;IACxC,YAAmB,YAAiC;QAClD,KAAK,CAAC,kCAAc,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IACjD,CAAC;IAEM,KAAK,CAAC,MAAM,CAAC,SAAoB,EAAE,IAAY,EAAE,UAAkB,EAAE,YAAqB;QAC/F,IAAI,CAAC;YACH,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAa,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,CAAsB,CAAC;YAE3K,IAAI,YAAY;gBACd,aAAa,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;YAE9C,MAAM,aAAa,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;YAE9C,OAAO,aAAa,CAAC,GAAG,CAAC;QAC3B,CAAC;QAAC,OAAO,CAAM,EAAE,CAAC;YAChB,MAAM,IAAI,8BAAkB,CAAC,2BAAe,CAAC,sBAAsB,EAAE,IAAI,wBAAY,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC;QAClI,CAAC;IACH,CAAC;IAEM,KAAK,CAAC,eAAe,CAAC,SAAoB,EAAE,eAAgC;QACjF,IAAI,CAAC;YACH,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,yBAAyB,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,eAAe,CAAC,CAAC;YAC9J,OAAO,aAAa,CAAC,GAAG,CAAC;QAC3B,CAAC;QAAC,OAAO,CAAM,EAAE,CAAC;YAChB,MAAM,IAAI,8BAAkB,CAAC,2BAAe,CAAC,yBAAyB,EAAE,IAAI,wBAAY,CAAC,IAAI,CAAC,cAAc,EAAE,eAAe,CAAC,IAAK,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC;QACtJ,CAAC;IACH,CAAC;CACF;AA5BD,8BA4BC","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 Editing\r\n */\r\n\r\nimport { Phenomenon, PhenomenonProps, SchemaItemKey, SchemaItemType, SchemaKey } from \"@itwin/ecschema-metadata\";\r\nimport { SchemaContextEditor } from \"./Editor\";\r\nimport { MutablePhenomenon } from \"./Mutable/MutablePhenomenon\";\r\nimport { ECEditingStatus, SchemaEditingError, SchemaItemId } from \"./Exception\";\r\nimport { SchemaItems } from \"./SchemaItems\";\r\n\r\n/**\r\n * @alpha\r\n * A class allowing you to create schema items of type Phenomenon.\r\n */\r\nexport class Phenomena extends SchemaItems {\r\n public constructor(schemaEditor: SchemaContextEditor) {\r\n super(SchemaItemType.Phenomenon, schemaEditor);\r\n }\r\n\r\n public async create(schemaKey: SchemaKey, name: string, definition: string, displayLabel?: string): Promise<SchemaItemKey> {\r\n try {\r\n const newPhenomenon = await this.createSchemaItem<Phenomenon>(schemaKey, this.schemaItemType, (schema) => schema.createPhenomenon.bind(schema), name) as MutablePhenomenon;\r\n\r\n if (displayLabel)\r\n newPhenomenon.setDisplayLabel(displayLabel);\r\n\r\n await newPhenomenon.setDefinition(definition);\r\n\r\n return newPhenomenon.key;\r\n } catch (e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreateSchemaItemFailed, new SchemaItemId(this.schemaItemType, name, schemaKey), e);\r\n }\r\n }\r\n\r\n public async createFromProps(schemaKey: SchemaKey, phenomenonProps: PhenomenonProps): Promise<SchemaItemKey> {\r\n try {\r\n const newPhenomenon = await this.createSchemaItemFromProps(schemaKey, this.schemaItemType, (schema) => schema.createPhenomenon.bind(schema), phenomenonProps);\r\n return newPhenomenon.key;\r\n } catch (e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreateSchemaItemFromProps, new SchemaItemId(this.schemaItemType, phenomenonProps.name!, schemaKey), e);\r\n }\r\n }\r\n}\r\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CustomAttribute, SchemaItemKey } from "@itwin/ecschema-metadata";
|
|
1
|
+
import { CustomAttribute, CustomAttributeContainerProps, SchemaItemKey } from "@itwin/ecschema-metadata";
|
|
2
2
|
import { SchemaContextEditor } from "./Editor";
|
|
3
3
|
import { MutableArrayProperty } from "./Mutable/MutableArrayProperty";
|
|
4
4
|
import { MutableProperty } from "./Mutable/MutableProperty";
|
|
@@ -51,13 +51,8 @@ export declare class Properties {
|
|
|
51
51
|
* @param categoryKey The SchemaItemKey of the property category.
|
|
52
52
|
*/
|
|
53
53
|
setCategory(classKey: SchemaItemKey, propertyName: string, categoryKey: SchemaItemKey): Promise<{
|
|
54
|
-
errorMessage: string;
|
|
55
|
-
itemKey?: undefined;
|
|
56
|
-
propertyName?: undefined;
|
|
57
|
-
} | {
|
|
58
54
|
itemKey: SchemaItemKey;
|
|
59
55
|
propertyName: string;
|
|
60
|
-
errorMessage?: undefined;
|
|
61
56
|
}>;
|
|
62
57
|
/**
|
|
63
58
|
* Adds a CustomAttribute instance to the Property identified by the given SchemaItemKey and property name.
|
|
@@ -66,6 +61,12 @@ export declare class Properties {
|
|
|
66
61
|
* @param customAttribute The CustomAttribute instance to add.
|
|
67
62
|
*/
|
|
68
63
|
addCustomAttribute(classKey: SchemaItemKey, propertyName: string, customAttribute: CustomAttribute): Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* Removes a CustomAttribute from a property.
|
|
66
|
+
* @param container
|
|
67
|
+
* @param customAttribute
|
|
68
|
+
*/
|
|
69
|
+
protected removeCustomAttribute(container: CustomAttributeContainerProps, customAttribute: CustomAttribute): void;
|
|
69
70
|
/**
|
|
70
71
|
* Gets the property with the specified name from the class identified by the given key.
|
|
71
72
|
* @param classKey The SchemaItemKey of the class.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Properties.d.ts","sourceRoot":"","sources":["../../../src/Editing/Properties.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"Properties.d.ts","sourceRoot":"","sources":["../../../src/Editing/Properties.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,6BAA6B,EAEnC,aAAa,EAAkC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