@itwin/ecschema-editing 3.5.0-dev.5 → 3.5.0-dev.52
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 +45 -1
- package/lib/cjs/Editing/Constants.d.ts +20 -20
- package/lib/cjs/Editing/Constants.js +60 -60
- package/lib/cjs/Editing/Constants.js.map +1 -1
- package/lib/cjs/Editing/CustomAttributes.d.ts +20 -20
- package/lib/cjs/Editing/CustomAttributes.js +59 -59
- package/lib/cjs/Editing/CustomAttributes.js.map +1 -1
- package/lib/cjs/Editing/ECClasses.d.ts +54 -54
- package/lib/cjs/Editing/ECClasses.js +269 -269
- package/lib/cjs/Editing/ECClasses.js.map +1 -1
- package/lib/cjs/Editing/Editor.d.ts +112 -112
- package/lib/cjs/Editing/Editor.js +166 -166
- package/lib/cjs/Editing/Editor.js.map +1 -1
- package/lib/cjs/Editing/Entities.d.ts +25 -25
- package/lib/cjs/Editing/Entities.js +116 -116
- package/lib/cjs/Editing/Entities.js.map +1 -1
- package/lib/cjs/Editing/Enumerations.d.ts +21 -21
- package/lib/cjs/Editing/Enumerations.js +66 -66
- package/lib/cjs/Editing/Enumerations.js.map +1 -1
- package/lib/cjs/Editing/Formats.d.ts +21 -21
- package/lib/cjs/Editing/Formats.js +61 -61
- package/lib/cjs/Editing/Formats.js.map +1 -1
- package/lib/cjs/Editing/InvertedUnits.d.ts +17 -17
- package/lib/cjs/Editing/InvertedUnits.js +82 -82
- package/lib/cjs/Editing/InvertedUnits.js.map +1 -1
- package/lib/cjs/Editing/KindOfQuantities.d.ts +28 -28
- package/lib/cjs/Editing/KindOfQuantities.js +78 -78
- package/lib/cjs/Editing/KindOfQuantities.js.map +1 -1
- package/lib/cjs/Editing/Mixins.d.ts +22 -22
- package/lib/cjs/Editing/Mixins.js +84 -84
- package/lib/cjs/Editing/Mixins.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableCAClass.d.ts +9 -9
- package/lib/cjs/Editing/Mutable/MutableCAClass.js +15 -15
- package/lib/cjs/Editing/Mutable/MutableCAClass.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableClass.d.ts +34 -34
- package/lib/cjs/Editing/Mutable/MutableClass.js +22 -22
- package/lib/cjs/Editing/Mutable/MutableClass.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableConstant.d.ts +12 -12
- package/lib/cjs/Editing/Mutable/MutableConstant.js +15 -15
- package/lib/cjs/Editing/Mutable/MutableConstant.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableEntityClass.d.ts +15 -15
- package/lib/cjs/Editing/Mutable/MutableEntityClass.js +59 -59
- package/lib/cjs/Editing/Mutable/MutableEntityClass.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableEnumeration.d.ts +9 -9
- package/lib/cjs/Editing/Mutable/MutableEnumeration.js +14 -14
- package/lib/cjs/Editing/Mutable/MutableEnumeration.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableFormat.d.ts +18 -18
- package/lib/cjs/Editing/Mutable/MutableFormat.js +15 -15
- package/lib/cjs/Editing/Mutable/MutableFormat.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableInvertedUnit.d.ts +10 -10
- package/lib/cjs/Editing/Mutable/MutableInvertedUnit.js +15 -15
- package/lib/cjs/Editing/Mutable/MutableInvertedUnit.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableKindOfQuantity.d.ts +10 -10
- package/lib/cjs/Editing/Mutable/MutableKindOfQuantity.js +15 -15
- package/lib/cjs/Editing/Mutable/MutableKindOfQuantity.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableMixin.d.ts +11 -11
- package/lib/cjs/Editing/Mutable/MutableMixin.js +15 -15
- package/lib/cjs/Editing/Mutable/MutableMixin.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutablePhenomenon.d.ts +9 -9
- package/lib/cjs/Editing/Mutable/MutablePhenomenon.js +15 -15
- package/lib/cjs/Editing/Mutable/MutablePhenomenon.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableProperty.d.ts +8 -8
- package/lib/cjs/Editing/Mutable/MutableProperty.js +15 -15
- package/lib/cjs/Editing/Mutable/MutableProperty.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutablePropertyCategory.d.ts +9 -9
- package/lib/cjs/Editing/Mutable/MutablePropertyCategory.js +15 -15
- package/lib/cjs/Editing/Mutable/MutablePropertyCategory.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableRelationshipClass.d.ts +21 -21
- package/lib/cjs/Editing/Mutable/MutableRelationshipClass.js +24 -24
- package/lib/cjs/Editing/Mutable/MutableRelationshipClass.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableSchema.d.ts +45 -45
- package/lib/cjs/Editing/Mutable/MutableSchema.js +17 -17
- package/lib/cjs/Editing/Mutable/MutableSchema.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableUnit.d.ts +11 -11
- package/lib/cjs/Editing/Mutable/MutableUnit.js +15 -15
- package/lib/cjs/Editing/Mutable/MutableUnit.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableUnitSystem.d.ts +8 -8
- package/lib/cjs/Editing/Mutable/MutableUnitSystem.js +15 -15
- package/lib/cjs/Editing/Mutable/MutableUnitSystem.js.map +1 -1
- package/lib/cjs/Editing/Phenomena.d.ts +15 -15
- package/lib/cjs/Editing/Phenomena.js +44 -44
- package/lib/cjs/Editing/Phenomena.js.map +1 -1
- package/lib/cjs/Editing/PropertyCategories.d.ts +16 -16
- package/lib/cjs/Editing/PropertyCategories.js +51 -51
- package/lib/cjs/Editing/PropertyCategories.js.map +1 -1
- package/lib/cjs/Editing/RelationshipClasses.d.ts +21 -21
- package/lib/cjs/Editing/RelationshipClasses.js +68 -68
- package/lib/cjs/Editing/RelationshipClasses.js.map +1 -1
- package/lib/cjs/Editing/Structs.d.ts +19 -19
- package/lib/cjs/Editing/Structs.js +57 -57
- package/lib/cjs/Editing/Structs.js.map +1 -1
- package/lib/cjs/Editing/UnitSystems.d.ts +15 -15
- package/lib/cjs/Editing/UnitSystems.js +41 -41
- package/lib/cjs/Editing/UnitSystems.js.map +1 -1
- package/lib/cjs/Editing/Units.d.ts +15 -15
- package/lib/cjs/Editing/Units.js +58 -58
- package/lib/cjs/Editing/Units.js.map +1 -1
- package/lib/cjs/Validation/Diagnostic.d.ts +321 -321
- package/lib/cjs/Validation/Diagnostic.js +310 -310
- package/lib/cjs/Validation/Diagnostic.js.map +1 -1
- package/lib/cjs/Validation/DiagnosticReporter.d.ts +96 -96
- package/lib/cjs/Validation/DiagnosticReporter.js +106 -106
- package/lib/cjs/Validation/DiagnosticReporter.js.map +1 -1
- package/lib/cjs/Validation/ECRules.d.ts +448 -448
- package/lib/cjs/Validation/ECRules.js +593 -593
- package/lib/cjs/Validation/ECRules.js.map +1 -1
- package/lib/cjs/Validation/LoggingDiagnosticReporter.d.ts +13 -13
- package/lib/cjs/Validation/LoggingDiagnosticReporter.js +40 -40
- package/lib/cjs/Validation/LoggingDiagnosticReporter.js.map +1 -1
- package/lib/cjs/Validation/RuleSuppressionSet.d.ts +59 -59
- package/lib/cjs/Validation/RuleSuppressionSet.js +9 -9
- package/lib/cjs/Validation/RuleSuppressionSet.js.map +1 -1
- package/lib/cjs/Validation/Rules.d.ts +64 -64
- package/lib/cjs/Validation/Rules.js +9 -9
- package/lib/cjs/Validation/Rules.js.map +1 -1
- package/lib/cjs/Validation/SchemaChanges.d.ts +607 -607
- package/lib/cjs/Validation/SchemaChanges.js +1135 -1135
- package/lib/cjs/Validation/SchemaChanges.js.map +1 -1
- package/lib/cjs/Validation/SchemaCompareDiagnostics.d.ts +422 -422
- package/lib/cjs/Validation/SchemaCompareDiagnostics.js +111 -111
- package/lib/cjs/Validation/SchemaCompareDiagnostics.js.map +1 -1
- package/lib/cjs/Validation/SchemaCompareReporter.d.ts +11 -11
- package/lib/cjs/Validation/SchemaCompareReporter.js +9 -9
- package/lib/cjs/Validation/SchemaCompareReporter.js.map +1 -1
- package/lib/cjs/Validation/SchemaCompareResultDelegate.d.ts +236 -236
- package/lib/cjs/Validation/SchemaCompareResultDelegate.js +348 -348
- package/lib/cjs/Validation/SchemaCompareResultDelegate.js.map +1 -1
- package/lib/cjs/Validation/SchemaCompareVisitor.d.ts +119 -119
- package/lib/cjs/Validation/SchemaCompareVisitor.js +206 -206
- package/lib/cjs/Validation/SchemaCompareVisitor.js.map +1 -1
- package/lib/cjs/Validation/SchemaComparer.d.ts +171 -171
- package/lib/cjs/Validation/SchemaComparer.js +666 -666
- package/lib/cjs/Validation/SchemaComparer.js.map +1 -1
- package/lib/cjs/Validation/SchemaValidater.d.ts +19 -19
- package/lib/cjs/Validation/SchemaValidater.js +61 -61
- package/lib/cjs/Validation/SchemaValidater.js.map +1 -1
- package/lib/cjs/Validation/SchemaValidationVisitor.d.ts +170 -170
- package/lib/cjs/Validation/SchemaValidationVisitor.js +492 -492
- package/lib/cjs/Validation/SchemaValidationVisitor.js.map +1 -1
- package/lib/cjs/Validation/SchemaWalker.d.ts +22 -22
- package/lib/cjs/Validation/SchemaWalker.js +51 -51
- package/lib/cjs/Validation/SchemaWalker.js.map +1 -1
- package/lib/cjs/ecschema-editing.d.ts +33 -33
- package/lib/cjs/ecschema-editing.js +54 -54
- package/lib/cjs/ecschema-editing.js.map +1 -1
- package/package.json +12 -12
- package/public/locales/en/ECSchemaEditing.json +26 -26
|
@@ -1,349 +1,349 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*---------------------------------------------------------------------------------------------
|
|
3
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
-
*--------------------------------------------------------------------------------------------*/
|
|
6
|
-
/** @packageDocumentation
|
|
7
|
-
* @module Comparison
|
|
8
|
-
*/
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.SchemaCompareResultDelegate = void 0;
|
|
11
|
-
const SchemaChanges_1 = require("./SchemaChanges");
|
|
12
|
-
const SchemaCompareDiagnostics_1 = require("./SchemaCompareDiagnostics");
|
|
13
|
-
/**
|
|
14
|
-
* Used by the [[SchemaComparer]] to report differences found during schema comparison.
|
|
15
|
-
* @internal
|
|
16
|
-
*/
|
|
17
|
-
class SchemaCompareResultDelegate {
|
|
18
|
-
/**
|
|
19
|
-
* Initializes a new SchemaCompareResultDelegate instance.
|
|
20
|
-
* @param reporters The [[ISchemaCompareReporter]] objects to use to report schema differences.
|
|
21
|
-
*/
|
|
22
|
-
constructor(schemaA, schemaB, ...reporters) {
|
|
23
|
-
this._schemaChangeReporters = reporters;
|
|
24
|
-
const keyMismatch = !schemaA.schemaKey.matches(schemaB.schemaKey);
|
|
25
|
-
this._schemaAChanges = new SchemaChanges_1.SchemaChanges(schemaA);
|
|
26
|
-
if (keyMismatch)
|
|
27
|
-
this._schemaBChanges = new SchemaChanges_1.SchemaChanges(schemaB);
|
|
28
|
-
}
|
|
29
|
-
get schemaChangeReporters() {
|
|
30
|
-
return this._schemaChangeReporters;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Called by the SchemaComparer when the comparison is complete.
|
|
34
|
-
*/
|
|
35
|
-
compareComplete() {
|
|
36
|
-
this.schemaChangeReporters.forEach((r) => r.report(this._schemaAChanges));
|
|
37
|
-
if (this._schemaBChanges)
|
|
38
|
-
this.schemaChangeReporters.forEach((r) => r.report(this._schemaBChanges));
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Reports differences between Schema properties.
|
|
42
|
-
* @param schemaA The first Schema supplied for comparison.
|
|
43
|
-
* @param propertyName The name of the property.
|
|
44
|
-
* @param valueA The value from the first Schema.
|
|
45
|
-
* @param valueB The value from the second Schema.
|
|
46
|
-
*/
|
|
47
|
-
async reportSchemaDelta(schemaA, propertyName, valueA, valueB, _compareDirection) {
|
|
48
|
-
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.SchemaDelta(schemaA, [propertyName, valueA, valueB]);
|
|
49
|
-
await this.reportDiagnostic(diag);
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Reports differences in the schema reference collection of two schemas.
|
|
53
|
-
* @param schemaA The first Schema supplied for comparison.
|
|
54
|
-
* @param referenceSchema The missing schema reference.
|
|
55
|
-
*/
|
|
56
|
-
async reportSchemaReferenceMissing(schemaA, referenceSchema, _compareDirection) {
|
|
57
|
-
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.SchemaReferenceMissing(schemaA, [referenceSchema]);
|
|
58
|
-
await this.reportDiagnostic(diag);
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Reports differences in the schema reference collection of two schemas where the reference version differs.
|
|
62
|
-
* @param schemaA The first Schema supplied for comparison.
|
|
63
|
-
* @param referenceSchema The missing schema reference.
|
|
64
|
-
*/
|
|
65
|
-
async reportSchemaReferenceDelta(schemaA, referenceSchema, versionA, versionB, _compareDirection) {
|
|
66
|
-
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.SchemaReferenceDelta(schemaA, [referenceSchema, versionA, versionB]);
|
|
67
|
-
await this.reportDiagnostic(diag);
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Reports that a given SchemaItem could not be found in the second Schema.
|
|
71
|
-
* @param schemaItemA The SchemaItem from the first Schema.
|
|
72
|
-
*/
|
|
73
|
-
async reportSchemaItemMissing(schemaItemA, _compareDirection) {
|
|
74
|
-
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.SchemaItemMissing(schemaItemA, []);
|
|
75
|
-
await this.reportDiagnostic(diag);
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Reports differences between SchemaItem properties.
|
|
79
|
-
* @param schemaItemA The first SchemaItem supplied for comparison.
|
|
80
|
-
* @param propertyName The name of the property.
|
|
81
|
-
* @param valueA The value from the first SchemaItem.
|
|
82
|
-
* @param valueB The value from the second SchemaItem.
|
|
83
|
-
*/
|
|
84
|
-
async reportSchemaItemDelta(schemaItemA, propertyName, valueA, valueB, _compareDirection) {
|
|
85
|
-
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.SchemaItemDelta(schemaItemA, [propertyName, valueA, valueB]);
|
|
86
|
-
await this.reportDiagnostic(diag);
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Reports differences between ECClass properties.
|
|
90
|
-
* @param classA The first ECClass supplied for comparison.
|
|
91
|
-
* @param propertyName The name of the property.
|
|
92
|
-
* @param valueA The value from the first ECClass.
|
|
93
|
-
* @param valueB The value from the second ECClass.
|
|
94
|
-
*/
|
|
95
|
-
async reportClassDelta(classA, propertyName, valueA, valueB, _compareDirection) {
|
|
96
|
-
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.ClassDelta(classA, [propertyName, valueA, valueB]);
|
|
97
|
-
await this.reportDiagnostic(diag);
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Reports differences of the base class defined between two ECClass objects.
|
|
101
|
-
* @param classA The first ECClass supplied for comparison.
|
|
102
|
-
* @param baseClassA The base class of the first ECClass.
|
|
103
|
-
* @param baseClassB The base class of the second ECClass.
|
|
104
|
-
*/
|
|
105
|
-
async reportBaseClassDelta(classA, baseClassA, baseClassB, _compareDirection) {
|
|
106
|
-
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.BaseClassDelta(classA, [baseClassA, baseClassB]);
|
|
107
|
-
await this.reportDiagnostic(diag);
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Reports differences between ECProperty properties.
|
|
111
|
-
* @param propertyA The first ECProperty supplied for comparison.
|
|
112
|
-
* @param propertyName The name of the property.
|
|
113
|
-
* @param valueA The value from the first ECProperty.
|
|
114
|
-
* @param valueB The value from the second ECProperty.
|
|
115
|
-
*/
|
|
116
|
-
async reportPropertyDelta(propertyA, propertyName, valueA, valueB, _compareDirection) {
|
|
117
|
-
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.PropertyDelta(propertyA, [propertyName, valueA, valueB]);
|
|
118
|
-
await this.reportDiagnostic(diag);
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Reports that an ECProperty found in the first ECClass could not be found in the second.
|
|
122
|
-
* @param propertyA The ECProperty supplied for comparison.
|
|
123
|
-
*/
|
|
124
|
-
async reportPropertyMissing(propertyA, _compareDirection) {
|
|
125
|
-
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.PropertyMissing(propertyA, []);
|
|
126
|
-
await this.reportDiagnostic(diag);
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Reports that a Mixin found in the first EntityClass could not be found in the second.
|
|
130
|
-
* @param entityClassA The first EntityClass that is missing the Mixin.
|
|
131
|
-
* @param mixinA The Mixin from the first EntityClass.
|
|
132
|
-
*/
|
|
133
|
-
async reportEntityMixinMissing(entityClassA, mixinA, _compareDirection) {
|
|
134
|
-
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.EntityMixinMissing(entityClassA, [mixinA]);
|
|
135
|
-
await this.reportDiagnostic(diag);
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* Reports differences between Mixin properties.
|
|
139
|
-
* @param mixinA The first Mixin supplied for comparison.
|
|
140
|
-
* @param propertyName The name of the property.
|
|
141
|
-
* @param valueA The value from the first Mixin.
|
|
142
|
-
* @param valueB The value from the second Mixin.
|
|
143
|
-
*/
|
|
144
|
-
async reportMixinDelta(mixinA, propertyName, valueA, valueB, _compareDirection) {
|
|
145
|
-
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.MixinDelta(mixinA, [propertyName, valueA, valueB]);
|
|
146
|
-
await this.reportDiagnostic(diag);
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Reports differences between RelationshipClass properties.
|
|
150
|
-
* @param relationshipClassA The first RelationshipClass supplied for comparison.
|
|
151
|
-
* @param propertyName The name of the property.
|
|
152
|
-
* @param valueA The value from the first RelationshipClass.
|
|
153
|
-
* @param valueB The value from the second RelationshipClass.
|
|
154
|
-
*/
|
|
155
|
-
async reportRelationshipClassDelta(relationshipClassA, propertyName, valueA, valueB, _compareDirection) {
|
|
156
|
-
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.RelationshipDelta(relationshipClassA, [propertyName, valueA, valueB]);
|
|
157
|
-
await this.reportDiagnostic(diag);
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Reports differences between RelationshipConstraint properties.
|
|
161
|
-
* @param constraintA The first RelationshipConstraint supplied for comparison.
|
|
162
|
-
* @param propertyName The name of the property.
|
|
163
|
-
* @param valueA The value from the first RelationshipConstraint.
|
|
164
|
-
* @param valueB The value from the second RelationshipConstraint.
|
|
165
|
-
*/
|
|
166
|
-
async reportRelationshipConstraintDelta(constraintA, propertyName, valueA, valueB, _compareDirection) {
|
|
167
|
-
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.RelationshipConstraintDelta(constraintA, [propertyName, valueA, valueB]);
|
|
168
|
-
await this.reportDiagnostic(diag);
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* Reports that a constraint class found in the first RelationshipConstraint could not be found in the second.
|
|
172
|
-
* @param constraintA The first RelationshipConstraint that is missing the class constraint.
|
|
173
|
-
* @param constraintClass The constraint ECClass from the first RelationshipConstraint.
|
|
174
|
-
*/
|
|
175
|
-
async reportRelationshipConstraintClassMissing(constraintA, constraintClass, _compareDirection) {
|
|
176
|
-
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.RelationshipConstraintClassMissing(constraintA, [constraintClass]);
|
|
177
|
-
await this.reportDiagnostic(diag);
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* Reports differences between CustomAttributeClass properties.
|
|
181
|
-
* @param customAttributeA The first CustomAttributeClass supplied for comparison.
|
|
182
|
-
* @param propertyName The name of the property.
|
|
183
|
-
* @param valueA The value from the first CustomAttributeClass.
|
|
184
|
-
* @param valueB The value from the second CustomAttributeClass.
|
|
185
|
-
*/
|
|
186
|
-
async reportCustomAttributeClassDelta(customAttributeA, propertyName, valueA, valueB, _compareDirection) {
|
|
187
|
-
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.CustomAttributeClassDelta(customAttributeA, [propertyName, valueA, valueB]);
|
|
188
|
-
await this.reportDiagnostic(diag);
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* Reports that a CustomAttribute instance found in the first CustomAttribute container could not be found in the second.
|
|
192
|
-
* @param customAttributeContainerA The first CustomAttribute container that is missing the CustomAttribute instance.
|
|
193
|
-
* @param customAttribute The CustomAttribute missing.
|
|
194
|
-
*/
|
|
195
|
-
async reportCustomAttributeInstanceClassMissing(customAttributeContainerA, customAttribute, _compareDirection) {
|
|
196
|
-
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.CustomAttributeInstanceClassMissing(customAttributeContainerA, [customAttribute]);
|
|
197
|
-
await this.reportDiagnostic(diag);
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* Reports differences between Enumeration properties.
|
|
201
|
-
* @param enumerationA The first Enumeration supplied for comparison.
|
|
202
|
-
* @param propertyName The name of the property.
|
|
203
|
-
* @param valueA The value from the first Enumeration.
|
|
204
|
-
* @param valueB The value from the second Enumeration.
|
|
205
|
-
*/
|
|
206
|
-
async reportEnumerationDelta(enumerationA, propertyName, valueA, valueB, _compareDirection) {
|
|
207
|
-
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.EnumerationDelta(enumerationA, [propertyName, valueA, valueB]);
|
|
208
|
-
await this.reportDiagnostic(diag);
|
|
209
|
-
}
|
|
210
|
-
/**
|
|
211
|
-
* Reports that a enumerator found in the first Enumeration could not be found in the second.
|
|
212
|
-
* @param enumerationA The first Enumeration that is missing the enumerator.
|
|
213
|
-
* @param enumerator The enumerator missing from the second schema.
|
|
214
|
-
*/
|
|
215
|
-
async reportEnumeratorMissing(enumerationA, enumerator, _compareDirection) {
|
|
216
|
-
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.EnumeratorMissing(enumerationA, [enumerator]);
|
|
217
|
-
await this.reportDiagnostic(diag);
|
|
218
|
-
}
|
|
219
|
-
/**
|
|
220
|
-
* Reports differences between enumerator properties within a given Enumeration.
|
|
221
|
-
* @param enumerationA The first Enumeration supplied for comparison.
|
|
222
|
-
* @param enumerator The enumerator containing differing property values.
|
|
223
|
-
* @param propertyName The name of the property.
|
|
224
|
-
* @param valueA The value from the first enumerator.
|
|
225
|
-
* @param valueB The value from the second enumerator.
|
|
226
|
-
*/
|
|
227
|
-
async reportEnumeratorDelta(enumerationA, enumerator, propertyName, valueA, valueB, _compareDirection) {
|
|
228
|
-
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.EnumeratorDelta(enumerationA, [enumerator, propertyName, valueA, valueB]);
|
|
229
|
-
await this.reportDiagnostic(diag);
|
|
230
|
-
}
|
|
231
|
-
/**
|
|
232
|
-
* Reports differences between KindOfQuantity properties.
|
|
233
|
-
* @param koqA The first KindOfQuantity supplied for comparison.
|
|
234
|
-
* @param propertyName The name of the property.
|
|
235
|
-
* @param valueA The value from the first KindOfQuantity.
|
|
236
|
-
* @param valueB The value from the second KindOfQuantity.
|
|
237
|
-
*/
|
|
238
|
-
async reportKoqDelta(koqA, propertyName, valueA, valueB, _compareDirection) {
|
|
239
|
-
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.KoqDelta(koqA, [propertyName, valueA, valueB]);
|
|
240
|
-
await this.reportDiagnostic(diag);
|
|
241
|
-
}
|
|
242
|
-
/**
|
|
243
|
-
* Reports that a presentation unit found in the first KindOfQuantity could not be found in the second.
|
|
244
|
-
* @param koqA The first KindOfQuantity that is missing the presentation unit.
|
|
245
|
-
* @param unit The Format or OverrideFormat presentation unit missing from the second schema.
|
|
246
|
-
*/
|
|
247
|
-
async reportPresentationUnitMissing(koqA, unit, _compareDirection) {
|
|
248
|
-
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.PresentationUnitMissing(koqA, [unit]);
|
|
249
|
-
await this.reportDiagnostic(diag);
|
|
250
|
-
}
|
|
251
|
-
/**
|
|
252
|
-
* Reports differences between PropertyCategory properties.
|
|
253
|
-
* @param categoryA The first PropertyCategory supplied for comparison.
|
|
254
|
-
* @param propertyName The name of the property.
|
|
255
|
-
* @param valueA The value from the first PropertyCategory.
|
|
256
|
-
* @param valueB The value from the second PropertyCategory.
|
|
257
|
-
*/
|
|
258
|
-
async reportPropertyCategoryDelta(categoryA, propertyName, valueA, valueB, _compareDirection) {
|
|
259
|
-
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.PropertyCategoryDelta(categoryA, [propertyName, valueA, valueB]);
|
|
260
|
-
await this.reportDiagnostic(diag);
|
|
261
|
-
}
|
|
262
|
-
/**
|
|
263
|
-
* Reports differences between Format properties.
|
|
264
|
-
* @param formatA The first Format supplied for comparison.
|
|
265
|
-
* @param propertyName The name of the property.
|
|
266
|
-
* @param valueA The value from the first Format.
|
|
267
|
-
* @param valueB The value from the second Format.
|
|
268
|
-
*/
|
|
269
|
-
async reportFormatDelta(formatA, propertyName, valueA, valueB, _compareDirection) {
|
|
270
|
-
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.FormatDelta(formatA, [propertyName, valueA, valueB]);
|
|
271
|
-
await this.reportDiagnostic(diag);
|
|
272
|
-
}
|
|
273
|
-
/**
|
|
274
|
-
* Reports that a unit found in the first Format could not be found in the second.
|
|
275
|
-
* @param formatA The first Format that is missing the unit.
|
|
276
|
-
* @param unit The Unit or InvertedUnit missing from the second schema.
|
|
277
|
-
*/
|
|
278
|
-
async reportFormatUnitMissing(formatA, unit, _compareDirection) {
|
|
279
|
-
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.FormatUnitMissing(formatA, [unit]);
|
|
280
|
-
await this.reportDiagnostic(diag);
|
|
281
|
-
}
|
|
282
|
-
/**
|
|
283
|
-
* Reports differences between overridden labels within the Units of a given Format.
|
|
284
|
-
* @param formatA The first Format supplied for comparison.
|
|
285
|
-
* @param unit The Unit or InvertedUnit with differing label overrides.
|
|
286
|
-
* @param labelA The value from the first label.
|
|
287
|
-
* @param labelB The value from the second label.
|
|
288
|
-
*/
|
|
289
|
-
async reportUnitLabelOverrideDelta(formatA, unit, labelA, labelB, _compareDirection) {
|
|
290
|
-
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.UnitLabelOverrideDelta(formatA, [unit, labelA, labelB]);
|
|
291
|
-
await this.reportDiagnostic(diag);
|
|
292
|
-
}
|
|
293
|
-
/**
|
|
294
|
-
* Reports differences between Unit properties.
|
|
295
|
-
* @param unitA The first Unit supplied for comparison.
|
|
296
|
-
* @param propertyName The name of the property.
|
|
297
|
-
* @param valueA The value from the first Unit.
|
|
298
|
-
* @param valueB The value from the second Unit.
|
|
299
|
-
*/
|
|
300
|
-
async reportUnitDelta(unitA, propertyName, valueA, valueB, _compareDirection) {
|
|
301
|
-
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.UnitDelta(unitA, [propertyName, valueA, valueB]);
|
|
302
|
-
await this.reportDiagnostic(diag);
|
|
303
|
-
}
|
|
304
|
-
/**
|
|
305
|
-
* Reports differences between InvertedUnit properties.
|
|
306
|
-
* @param invertedUnitA The first InvertedUnit supplied for comparison.
|
|
307
|
-
* @param propertyName The name of the property.
|
|
308
|
-
* @param valueA The value from the first InvertedUnit.
|
|
309
|
-
* @param valueB The value from the second InvertedUnit.
|
|
310
|
-
*/
|
|
311
|
-
async reportInvertedUnitDelta(invertedUnitA, propertyName, valueA, valueB, _compareDirection) {
|
|
312
|
-
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.InvertedUnitDelta(invertedUnitA, [propertyName, valueA, valueB]);
|
|
313
|
-
await this.reportDiagnostic(diag);
|
|
314
|
-
}
|
|
315
|
-
/**
|
|
316
|
-
* Reports differences between Phenomenon properties.
|
|
317
|
-
* @param phenomenonA The first Phenomenon supplied for comparison.
|
|
318
|
-
* @param propertyName The name of the property.
|
|
319
|
-
* @param valueA The value from the first Phenomenon.
|
|
320
|
-
* @param valueB The value from the second Phenomenon.
|
|
321
|
-
*/
|
|
322
|
-
async reportPhenomenonDelta(phenomenonA, propertyName, valueA, valueB, _compareDirection) {
|
|
323
|
-
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.PhenomenonDelta(phenomenonA, [propertyName, valueA, valueB]);
|
|
324
|
-
await this.reportDiagnostic(diag);
|
|
325
|
-
}
|
|
326
|
-
/**
|
|
327
|
-
* Reports differences between Constant properties.
|
|
328
|
-
* @param constantA The first Constant supplied for comparison.
|
|
329
|
-
* @param propertyName The name of the property.
|
|
330
|
-
* @param valueA The value from the first Constant.
|
|
331
|
-
* @param valueB The value from the second Constant.
|
|
332
|
-
*/
|
|
333
|
-
async reportConstantDelta(constantA, propertyName, valueA, valueB, _compareDirection) {
|
|
334
|
-
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.ConstantDelta(constantA, [propertyName, valueA, valueB]);
|
|
335
|
-
await this.reportDiagnostic(diag);
|
|
336
|
-
}
|
|
337
|
-
async reportDiagnostic(diagnostic) {
|
|
338
|
-
if (!this._schemaBChanges || this._schemaAChanges.schema === diagnostic.schema) {
|
|
339
|
-
this._schemaAChanges.addDiagnostic(diagnostic);
|
|
340
|
-
return;
|
|
341
|
-
}
|
|
342
|
-
if (this._schemaBChanges.schema === diagnostic.schema) {
|
|
343
|
-
this._schemaBChanges.addDiagnostic(diagnostic);
|
|
344
|
-
return;
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
exports.SchemaCompareResultDelegate = SchemaCompareResultDelegate;
|
|
1
|
+
"use strict";
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
/** @packageDocumentation
|
|
7
|
+
* @module Comparison
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.SchemaCompareResultDelegate = void 0;
|
|
11
|
+
const SchemaChanges_1 = require("./SchemaChanges");
|
|
12
|
+
const SchemaCompareDiagnostics_1 = require("./SchemaCompareDiagnostics");
|
|
13
|
+
/**
|
|
14
|
+
* Used by the [[SchemaComparer]] to report differences found during schema comparison.
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
class SchemaCompareResultDelegate {
|
|
18
|
+
/**
|
|
19
|
+
* Initializes a new SchemaCompareResultDelegate instance.
|
|
20
|
+
* @param reporters The [[ISchemaCompareReporter]] objects to use to report schema differences.
|
|
21
|
+
*/
|
|
22
|
+
constructor(schemaA, schemaB, ...reporters) {
|
|
23
|
+
this._schemaChangeReporters = reporters;
|
|
24
|
+
const keyMismatch = !schemaA.schemaKey.matches(schemaB.schemaKey);
|
|
25
|
+
this._schemaAChanges = new SchemaChanges_1.SchemaChanges(schemaA);
|
|
26
|
+
if (keyMismatch)
|
|
27
|
+
this._schemaBChanges = new SchemaChanges_1.SchemaChanges(schemaB);
|
|
28
|
+
}
|
|
29
|
+
get schemaChangeReporters() {
|
|
30
|
+
return this._schemaChangeReporters;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Called by the SchemaComparer when the comparison is complete.
|
|
34
|
+
*/
|
|
35
|
+
compareComplete() {
|
|
36
|
+
this.schemaChangeReporters.forEach((r) => r.report(this._schemaAChanges));
|
|
37
|
+
if (this._schemaBChanges)
|
|
38
|
+
this.schemaChangeReporters.forEach((r) => r.report(this._schemaBChanges));
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Reports differences between Schema properties.
|
|
42
|
+
* @param schemaA The first Schema supplied for comparison.
|
|
43
|
+
* @param propertyName The name of the property.
|
|
44
|
+
* @param valueA The value from the first Schema.
|
|
45
|
+
* @param valueB The value from the second Schema.
|
|
46
|
+
*/
|
|
47
|
+
async reportSchemaDelta(schemaA, propertyName, valueA, valueB, _compareDirection) {
|
|
48
|
+
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.SchemaDelta(schemaA, [propertyName, valueA, valueB]);
|
|
49
|
+
await this.reportDiagnostic(diag);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Reports differences in the schema reference collection of two schemas.
|
|
53
|
+
* @param schemaA The first Schema supplied for comparison.
|
|
54
|
+
* @param referenceSchema The missing schema reference.
|
|
55
|
+
*/
|
|
56
|
+
async reportSchemaReferenceMissing(schemaA, referenceSchema, _compareDirection) {
|
|
57
|
+
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.SchemaReferenceMissing(schemaA, [referenceSchema]);
|
|
58
|
+
await this.reportDiagnostic(diag);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Reports differences in the schema reference collection of two schemas where the reference version differs.
|
|
62
|
+
* @param schemaA The first Schema supplied for comparison.
|
|
63
|
+
* @param referenceSchema The missing schema reference.
|
|
64
|
+
*/
|
|
65
|
+
async reportSchemaReferenceDelta(schemaA, referenceSchema, versionA, versionB, _compareDirection) {
|
|
66
|
+
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.SchemaReferenceDelta(schemaA, [referenceSchema, versionA, versionB]);
|
|
67
|
+
await this.reportDiagnostic(diag);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Reports that a given SchemaItem could not be found in the second Schema.
|
|
71
|
+
* @param schemaItemA The SchemaItem from the first Schema.
|
|
72
|
+
*/
|
|
73
|
+
async reportSchemaItemMissing(schemaItemA, _compareDirection) {
|
|
74
|
+
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.SchemaItemMissing(schemaItemA, []);
|
|
75
|
+
await this.reportDiagnostic(diag);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Reports differences between SchemaItem properties.
|
|
79
|
+
* @param schemaItemA The first SchemaItem supplied for comparison.
|
|
80
|
+
* @param propertyName The name of the property.
|
|
81
|
+
* @param valueA The value from the first SchemaItem.
|
|
82
|
+
* @param valueB The value from the second SchemaItem.
|
|
83
|
+
*/
|
|
84
|
+
async reportSchemaItemDelta(schemaItemA, propertyName, valueA, valueB, _compareDirection) {
|
|
85
|
+
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.SchemaItemDelta(schemaItemA, [propertyName, valueA, valueB]);
|
|
86
|
+
await this.reportDiagnostic(diag);
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Reports differences between ECClass properties.
|
|
90
|
+
* @param classA The first ECClass supplied for comparison.
|
|
91
|
+
* @param propertyName The name of the property.
|
|
92
|
+
* @param valueA The value from the first ECClass.
|
|
93
|
+
* @param valueB The value from the second ECClass.
|
|
94
|
+
*/
|
|
95
|
+
async reportClassDelta(classA, propertyName, valueA, valueB, _compareDirection) {
|
|
96
|
+
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.ClassDelta(classA, [propertyName, valueA, valueB]);
|
|
97
|
+
await this.reportDiagnostic(diag);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Reports differences of the base class defined between two ECClass objects.
|
|
101
|
+
* @param classA The first ECClass supplied for comparison.
|
|
102
|
+
* @param baseClassA The base class of the first ECClass.
|
|
103
|
+
* @param baseClassB The base class of the second ECClass.
|
|
104
|
+
*/
|
|
105
|
+
async reportBaseClassDelta(classA, baseClassA, baseClassB, _compareDirection) {
|
|
106
|
+
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.BaseClassDelta(classA, [baseClassA, baseClassB]);
|
|
107
|
+
await this.reportDiagnostic(diag);
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Reports differences between ECProperty properties.
|
|
111
|
+
* @param propertyA The first ECProperty supplied for comparison.
|
|
112
|
+
* @param propertyName The name of the property.
|
|
113
|
+
* @param valueA The value from the first ECProperty.
|
|
114
|
+
* @param valueB The value from the second ECProperty.
|
|
115
|
+
*/
|
|
116
|
+
async reportPropertyDelta(propertyA, propertyName, valueA, valueB, _compareDirection) {
|
|
117
|
+
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.PropertyDelta(propertyA, [propertyName, valueA, valueB]);
|
|
118
|
+
await this.reportDiagnostic(diag);
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Reports that an ECProperty found in the first ECClass could not be found in the second.
|
|
122
|
+
* @param propertyA The ECProperty supplied for comparison.
|
|
123
|
+
*/
|
|
124
|
+
async reportPropertyMissing(propertyA, _compareDirection) {
|
|
125
|
+
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.PropertyMissing(propertyA, []);
|
|
126
|
+
await this.reportDiagnostic(diag);
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Reports that a Mixin found in the first EntityClass could not be found in the second.
|
|
130
|
+
* @param entityClassA The first EntityClass that is missing the Mixin.
|
|
131
|
+
* @param mixinA The Mixin from the first EntityClass.
|
|
132
|
+
*/
|
|
133
|
+
async reportEntityMixinMissing(entityClassA, mixinA, _compareDirection) {
|
|
134
|
+
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.EntityMixinMissing(entityClassA, [mixinA]);
|
|
135
|
+
await this.reportDiagnostic(diag);
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Reports differences between Mixin properties.
|
|
139
|
+
* @param mixinA The first Mixin supplied for comparison.
|
|
140
|
+
* @param propertyName The name of the property.
|
|
141
|
+
* @param valueA The value from the first Mixin.
|
|
142
|
+
* @param valueB The value from the second Mixin.
|
|
143
|
+
*/
|
|
144
|
+
async reportMixinDelta(mixinA, propertyName, valueA, valueB, _compareDirection) {
|
|
145
|
+
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.MixinDelta(mixinA, [propertyName, valueA, valueB]);
|
|
146
|
+
await this.reportDiagnostic(diag);
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Reports differences between RelationshipClass properties.
|
|
150
|
+
* @param relationshipClassA The first RelationshipClass supplied for comparison.
|
|
151
|
+
* @param propertyName The name of the property.
|
|
152
|
+
* @param valueA The value from the first RelationshipClass.
|
|
153
|
+
* @param valueB The value from the second RelationshipClass.
|
|
154
|
+
*/
|
|
155
|
+
async reportRelationshipClassDelta(relationshipClassA, propertyName, valueA, valueB, _compareDirection) {
|
|
156
|
+
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.RelationshipDelta(relationshipClassA, [propertyName, valueA, valueB]);
|
|
157
|
+
await this.reportDiagnostic(diag);
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Reports differences between RelationshipConstraint properties.
|
|
161
|
+
* @param constraintA The first RelationshipConstraint supplied for comparison.
|
|
162
|
+
* @param propertyName The name of the property.
|
|
163
|
+
* @param valueA The value from the first RelationshipConstraint.
|
|
164
|
+
* @param valueB The value from the second RelationshipConstraint.
|
|
165
|
+
*/
|
|
166
|
+
async reportRelationshipConstraintDelta(constraintA, propertyName, valueA, valueB, _compareDirection) {
|
|
167
|
+
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.RelationshipConstraintDelta(constraintA, [propertyName, valueA, valueB]);
|
|
168
|
+
await this.reportDiagnostic(diag);
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Reports that a constraint class found in the first RelationshipConstraint could not be found in the second.
|
|
172
|
+
* @param constraintA The first RelationshipConstraint that is missing the class constraint.
|
|
173
|
+
* @param constraintClass The constraint ECClass from the first RelationshipConstraint.
|
|
174
|
+
*/
|
|
175
|
+
async reportRelationshipConstraintClassMissing(constraintA, constraintClass, _compareDirection) {
|
|
176
|
+
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.RelationshipConstraintClassMissing(constraintA, [constraintClass]);
|
|
177
|
+
await this.reportDiagnostic(diag);
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Reports differences between CustomAttributeClass properties.
|
|
181
|
+
* @param customAttributeA The first CustomAttributeClass supplied for comparison.
|
|
182
|
+
* @param propertyName The name of the property.
|
|
183
|
+
* @param valueA The value from the first CustomAttributeClass.
|
|
184
|
+
* @param valueB The value from the second CustomAttributeClass.
|
|
185
|
+
*/
|
|
186
|
+
async reportCustomAttributeClassDelta(customAttributeA, propertyName, valueA, valueB, _compareDirection) {
|
|
187
|
+
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.CustomAttributeClassDelta(customAttributeA, [propertyName, valueA, valueB]);
|
|
188
|
+
await this.reportDiagnostic(diag);
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Reports that a CustomAttribute instance found in the first CustomAttribute container could not be found in the second.
|
|
192
|
+
* @param customAttributeContainerA The first CustomAttribute container that is missing the CustomAttribute instance.
|
|
193
|
+
* @param customAttribute The CustomAttribute missing.
|
|
194
|
+
*/
|
|
195
|
+
async reportCustomAttributeInstanceClassMissing(customAttributeContainerA, customAttribute, _compareDirection) {
|
|
196
|
+
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.CustomAttributeInstanceClassMissing(customAttributeContainerA, [customAttribute]);
|
|
197
|
+
await this.reportDiagnostic(diag);
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Reports differences between Enumeration properties.
|
|
201
|
+
* @param enumerationA The first Enumeration supplied for comparison.
|
|
202
|
+
* @param propertyName The name of the property.
|
|
203
|
+
* @param valueA The value from the first Enumeration.
|
|
204
|
+
* @param valueB The value from the second Enumeration.
|
|
205
|
+
*/
|
|
206
|
+
async reportEnumerationDelta(enumerationA, propertyName, valueA, valueB, _compareDirection) {
|
|
207
|
+
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.EnumerationDelta(enumerationA, [propertyName, valueA, valueB]);
|
|
208
|
+
await this.reportDiagnostic(diag);
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Reports that a enumerator found in the first Enumeration could not be found in the second.
|
|
212
|
+
* @param enumerationA The first Enumeration that is missing the enumerator.
|
|
213
|
+
* @param enumerator The enumerator missing from the second schema.
|
|
214
|
+
*/
|
|
215
|
+
async reportEnumeratorMissing(enumerationA, enumerator, _compareDirection) {
|
|
216
|
+
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.EnumeratorMissing(enumerationA, [enumerator]);
|
|
217
|
+
await this.reportDiagnostic(diag);
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Reports differences between enumerator properties within a given Enumeration.
|
|
221
|
+
* @param enumerationA The first Enumeration supplied for comparison.
|
|
222
|
+
* @param enumerator The enumerator containing differing property values.
|
|
223
|
+
* @param propertyName The name of the property.
|
|
224
|
+
* @param valueA The value from the first enumerator.
|
|
225
|
+
* @param valueB The value from the second enumerator.
|
|
226
|
+
*/
|
|
227
|
+
async reportEnumeratorDelta(enumerationA, enumerator, propertyName, valueA, valueB, _compareDirection) {
|
|
228
|
+
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.EnumeratorDelta(enumerationA, [enumerator, propertyName, valueA, valueB]);
|
|
229
|
+
await this.reportDiagnostic(diag);
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Reports differences between KindOfQuantity properties.
|
|
233
|
+
* @param koqA The first KindOfQuantity supplied for comparison.
|
|
234
|
+
* @param propertyName The name of the property.
|
|
235
|
+
* @param valueA The value from the first KindOfQuantity.
|
|
236
|
+
* @param valueB The value from the second KindOfQuantity.
|
|
237
|
+
*/
|
|
238
|
+
async reportKoqDelta(koqA, propertyName, valueA, valueB, _compareDirection) {
|
|
239
|
+
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.KoqDelta(koqA, [propertyName, valueA, valueB]);
|
|
240
|
+
await this.reportDiagnostic(diag);
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Reports that a presentation unit found in the first KindOfQuantity could not be found in the second.
|
|
244
|
+
* @param koqA The first KindOfQuantity that is missing the presentation unit.
|
|
245
|
+
* @param unit The Format or OverrideFormat presentation unit missing from the second schema.
|
|
246
|
+
*/
|
|
247
|
+
async reportPresentationUnitMissing(koqA, unit, _compareDirection) {
|
|
248
|
+
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.PresentationUnitMissing(koqA, [unit]);
|
|
249
|
+
await this.reportDiagnostic(diag);
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Reports differences between PropertyCategory properties.
|
|
253
|
+
* @param categoryA The first PropertyCategory supplied for comparison.
|
|
254
|
+
* @param propertyName The name of the property.
|
|
255
|
+
* @param valueA The value from the first PropertyCategory.
|
|
256
|
+
* @param valueB The value from the second PropertyCategory.
|
|
257
|
+
*/
|
|
258
|
+
async reportPropertyCategoryDelta(categoryA, propertyName, valueA, valueB, _compareDirection) {
|
|
259
|
+
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.PropertyCategoryDelta(categoryA, [propertyName, valueA, valueB]);
|
|
260
|
+
await this.reportDiagnostic(diag);
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Reports differences between Format properties.
|
|
264
|
+
* @param formatA The first Format supplied for comparison.
|
|
265
|
+
* @param propertyName The name of the property.
|
|
266
|
+
* @param valueA The value from the first Format.
|
|
267
|
+
* @param valueB The value from the second Format.
|
|
268
|
+
*/
|
|
269
|
+
async reportFormatDelta(formatA, propertyName, valueA, valueB, _compareDirection) {
|
|
270
|
+
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.FormatDelta(formatA, [propertyName, valueA, valueB]);
|
|
271
|
+
await this.reportDiagnostic(diag);
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Reports that a unit found in the first Format could not be found in the second.
|
|
275
|
+
* @param formatA The first Format that is missing the unit.
|
|
276
|
+
* @param unit The Unit or InvertedUnit missing from the second schema.
|
|
277
|
+
*/
|
|
278
|
+
async reportFormatUnitMissing(formatA, unit, _compareDirection) {
|
|
279
|
+
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.FormatUnitMissing(formatA, [unit]);
|
|
280
|
+
await this.reportDiagnostic(diag);
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Reports differences between overridden labels within the Units of a given Format.
|
|
284
|
+
* @param formatA The first Format supplied for comparison.
|
|
285
|
+
* @param unit The Unit or InvertedUnit with differing label overrides.
|
|
286
|
+
* @param labelA The value from the first label.
|
|
287
|
+
* @param labelB The value from the second label.
|
|
288
|
+
*/
|
|
289
|
+
async reportUnitLabelOverrideDelta(formatA, unit, labelA, labelB, _compareDirection) {
|
|
290
|
+
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.UnitLabelOverrideDelta(formatA, [unit, labelA, labelB]);
|
|
291
|
+
await this.reportDiagnostic(diag);
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Reports differences between Unit properties.
|
|
295
|
+
* @param unitA The first Unit supplied for comparison.
|
|
296
|
+
* @param propertyName The name of the property.
|
|
297
|
+
* @param valueA The value from the first Unit.
|
|
298
|
+
* @param valueB The value from the second Unit.
|
|
299
|
+
*/
|
|
300
|
+
async reportUnitDelta(unitA, propertyName, valueA, valueB, _compareDirection) {
|
|
301
|
+
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.UnitDelta(unitA, [propertyName, valueA, valueB]);
|
|
302
|
+
await this.reportDiagnostic(diag);
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* Reports differences between InvertedUnit properties.
|
|
306
|
+
* @param invertedUnitA The first InvertedUnit supplied for comparison.
|
|
307
|
+
* @param propertyName The name of the property.
|
|
308
|
+
* @param valueA The value from the first InvertedUnit.
|
|
309
|
+
* @param valueB The value from the second InvertedUnit.
|
|
310
|
+
*/
|
|
311
|
+
async reportInvertedUnitDelta(invertedUnitA, propertyName, valueA, valueB, _compareDirection) {
|
|
312
|
+
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.InvertedUnitDelta(invertedUnitA, [propertyName, valueA, valueB]);
|
|
313
|
+
await this.reportDiagnostic(diag);
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Reports differences between Phenomenon properties.
|
|
317
|
+
* @param phenomenonA The first Phenomenon supplied for comparison.
|
|
318
|
+
* @param propertyName The name of the property.
|
|
319
|
+
* @param valueA The value from the first Phenomenon.
|
|
320
|
+
* @param valueB The value from the second Phenomenon.
|
|
321
|
+
*/
|
|
322
|
+
async reportPhenomenonDelta(phenomenonA, propertyName, valueA, valueB, _compareDirection) {
|
|
323
|
+
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.PhenomenonDelta(phenomenonA, [propertyName, valueA, valueB]);
|
|
324
|
+
await this.reportDiagnostic(diag);
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Reports differences between Constant properties.
|
|
328
|
+
* @param constantA The first Constant supplied for comparison.
|
|
329
|
+
* @param propertyName The name of the property.
|
|
330
|
+
* @param valueA The value from the first Constant.
|
|
331
|
+
* @param valueB The value from the second Constant.
|
|
332
|
+
*/
|
|
333
|
+
async reportConstantDelta(constantA, propertyName, valueA, valueB, _compareDirection) {
|
|
334
|
+
const diag = new SchemaCompareDiagnostics_1.SchemaCompareDiagnostics.ConstantDelta(constantA, [propertyName, valueA, valueB]);
|
|
335
|
+
await this.reportDiagnostic(diag);
|
|
336
|
+
}
|
|
337
|
+
async reportDiagnostic(diagnostic) {
|
|
338
|
+
if (!this._schemaBChanges || this._schemaAChanges.schema === diagnostic.schema) {
|
|
339
|
+
this._schemaAChanges.addDiagnostic(diagnostic);
|
|
340
|
+
return;
|
|
341
|
+
}
|
|
342
|
+
if (this._schemaBChanges.schema === diagnostic.schema) {
|
|
343
|
+
this._schemaBChanges.addDiagnostic(diagnostic);
|
|
344
|
+
return;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
exports.SchemaCompareResultDelegate = SchemaCompareResultDelegate;
|
|
349
349
|
//# sourceMappingURL=SchemaCompareResultDelegate.js.map
|