@itwin/ecschema-editing 5.0.0-dev.56 → 5.0.0-dev.57

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.
Files changed (53) hide show
  1. package/lib/cjs/Differencing/Errors.js +6 -0
  2. package/lib/cjs/Differencing/Errors.js.map +1 -1
  3. package/lib/cjs/Differencing/SchemaDiagnosticVisitor.js +4 -0
  4. package/lib/cjs/Differencing/SchemaDiagnosticVisitor.js.map +1 -1
  5. package/lib/cjs/Differencing/SchemaDifference.js +2 -0
  6. package/lib/cjs/Differencing/SchemaDifference.js.map +1 -1
  7. package/lib/cjs/Differencing/SchemaDifferenceValidator.js +4 -0
  8. package/lib/cjs/Differencing/SchemaDifferenceValidator.js.map +1 -1
  9. package/lib/cjs/Differencing/SchemaDifferenceVisitor.js +1 -0
  10. package/lib/cjs/Differencing/SchemaDifferenceVisitor.js.map +1 -1
  11. package/lib/cjs/Editing/ECClasses.js +21 -0
  12. package/lib/cjs/Editing/ECClasses.js.map +1 -1
  13. package/lib/cjs/Editing/Editor.js +15 -14
  14. package/lib/cjs/Editing/Editor.js.map +1 -1
  15. package/lib/cjs/Editing/Entities.js +4 -4
  16. package/lib/cjs/Editing/Entities.js.map +1 -1
  17. package/lib/cjs/Editing/Exception.js +35 -6
  18. package/lib/cjs/Editing/Exception.js.map +1 -1
  19. package/lib/cjs/Editing/Mixins.js +4 -4
  20. package/lib/cjs/Editing/Mixins.js.map +1 -1
  21. package/lib/cjs/Editing/Properties.js +2 -0
  22. package/lib/cjs/Editing/Properties.js.map +1 -1
  23. package/lib/cjs/Editing/RelationshipClasses.js +4 -4
  24. package/lib/cjs/Editing/RelationshipClasses.js.map +1 -1
  25. package/lib/cjs/Editing/SchemaItems.js +2 -0
  26. package/lib/cjs/Editing/SchemaItems.js.map +1 -1
  27. package/lib/cjs/Merging/Edits/NameMapping.js +3 -0
  28. package/lib/cjs/Merging/Edits/NameMapping.js.map +1 -1
  29. package/lib/cjs/Merging/Edits/SchemaEdits.js +4 -0
  30. package/lib/cjs/Merging/Edits/SchemaEdits.js.map +1 -1
  31. package/lib/cjs/Merging/SchemaMerger.js +3 -0
  32. package/lib/cjs/Merging/SchemaMerger.js.map +1 -1
  33. package/lib/cjs/Merging/SchemaMergingVisitor.js +1 -0
  34. package/lib/cjs/Merging/SchemaMergingVisitor.js.map +1 -1
  35. package/lib/cjs/Validation/Diagnostic.js +10 -4
  36. package/lib/cjs/Validation/Diagnostic.js.map +1 -1
  37. package/lib/cjs/Validation/DiagnosticReporter.js +3 -0
  38. package/lib/cjs/Validation/DiagnosticReporter.js.map +1 -1
  39. package/lib/cjs/Validation/SchemaChanges.js +38 -68
  40. package/lib/cjs/Validation/SchemaChanges.js.map +1 -1
  41. package/lib/cjs/Validation/SchemaCompareResultDelegate.js +3 -0
  42. package/lib/cjs/Validation/SchemaCompareResultDelegate.js.map +1 -1
  43. package/lib/cjs/Validation/SchemaCompareVisitor.js +2 -0
  44. package/lib/cjs/Validation/SchemaCompareVisitor.js.map +1 -1
  45. package/lib/cjs/Validation/SchemaComparer.js +3 -0
  46. package/lib/cjs/Validation/SchemaComparer.js.map +1 -1
  47. package/lib/cjs/Validation/SchemaValidater.js +1 -4
  48. package/lib/cjs/Validation/SchemaValidater.js.map +1 -1
  49. package/lib/cjs/Validation/SchemaValidationVisitor.js +3 -4
  50. package/lib/cjs/Validation/SchemaValidationVisitor.js.map +1 -1
  51. package/lib/cjs/Validation/SchemaWalker.js +4 -0
  52. package/lib/cjs/Validation/SchemaWalker.js.map +1 -1
  53. package/package.json +9 -9
@@ -25,6 +25,8 @@ var ChangeType;
25
25
  * @alpha
26
26
  */
27
27
  class BaseSchemaChange {
28
+ _diagnostic;
29
+ _changeType;
28
30
  /**
29
31
  * Initializes a new BaseSchemaChange instance.
30
32
  * @param diagnostic The diagnostic holding the change data.
@@ -95,13 +97,15 @@ exports.BaseSchemaChange = BaseSchemaChange;
95
97
  * @alpha
96
98
  */
97
99
  class BaseSchemaChanges {
100
+ _ecTypeName;
101
+ _schema;
102
+ _propertyValueChanges = [];
98
103
  /**
99
104
  * Initializes a new BaseSchemaChanges instance.
100
105
  * @param schema The schema containing the changes.
101
106
  * @param anyECTypeName The name of the EC type.
102
107
  */
103
108
  constructor(schema, anyECTypeName) {
104
- this._propertyValueChanges = [];
105
109
  this._schema = schema;
106
110
  this._ecTypeName = anyECTypeName;
107
111
  }
@@ -183,23 +187,23 @@ exports.BaseSchemaChanges = BaseSchemaChanges;
183
187
  * @alpha
184
188
  */
185
189
  class SchemaChanges extends BaseSchemaChanges {
190
+ _diagnostics = [];
191
+ _missingSchemaReferences = [];
192
+ _schemaReferenceDeltas = [];
193
+ _customAttributeChanges = new Map();
194
+ _classChanges = new Map();
195
+ _entityClassChanges = new Map();
196
+ _relationshipClassChanges = new Map();
197
+ _schemaItemChanges = new Map();
198
+ _enumerationChanges = new Map();
199
+ _kindOfQuantityChanges = new Map();
200
+ _formatChanges = new Map();
186
201
  /**
187
202
  * Initializes a new SchemaChanges instance.
188
203
  * @param schema The schema containing the changes.
189
204
  */
190
205
  constructor(schema) {
191
206
  super(schema, schema.name);
192
- this._diagnostics = [];
193
- this._missingSchemaReferences = [];
194
- this._schemaReferenceDeltas = [];
195
- this._customAttributeChanges = new Map();
196
- this._classChanges = new Map();
197
- this._entityClassChanges = new Map();
198
- this._relationshipClassChanges = new Map();
199
- this._schemaItemChanges = new Map();
200
- this._enumerationChanges = new Map();
201
- this._kindOfQuantityChanges = new Map();
202
- this._formatChanges = new Map();
203
207
  }
204
208
  /** Gets the MissingSchemaReferences collection. */
205
209
  get missingSchemaReferences() { return this._missingSchemaReferences; }
@@ -435,6 +439,8 @@ exports.SchemaChanges = SchemaChanges;
435
439
  * @alpha
436
440
  */
437
441
  class SchemaItemChanges extends BaseSchemaChanges {
442
+ _schemaItemType;
443
+ _schemaItemMissing;
438
444
  /**
439
445
  * Initializes a new SchemaItemChanges instance.
440
446
  * @param schema The Schema containing the change.
@@ -482,11 +488,9 @@ exports.SchemaItemChanges = SchemaItemChanges;
482
488
  * @alpha
483
489
  */
484
490
  class ClassChanges extends SchemaItemChanges {
485
- constructor() {
486
- super(...arguments);
487
- this._propertyChanges = new Map();
488
- this._customAttributeChanges = new Map();
489
- }
491
+ _baseClassDelta;
492
+ _propertyChanges = new Map();
493
+ _customAttributeChanges = new Map();
490
494
  /** Gets the BaseClassDelta change. Maybe undefined. */
491
495
  get baseClassDelta() {
492
496
  return this._baseClassDelta;
@@ -526,10 +530,7 @@ exports.ClassChanges = ClassChanges;
526
530
  * @alpha
527
531
  */
528
532
  class EntityClassChanges extends ClassChanges {
529
- constructor() {
530
- super(...arguments);
531
- this._entityMixinChanges = new Map();
532
- }
533
+ _entityMixinChanges = new Map();
533
534
  /** Gets the EntityMixinChanges Map. */
534
535
  get entityMixinChanges() {
535
536
  return this._entityMixinChanges;
@@ -553,11 +554,8 @@ exports.EntityClassChanges = EntityClassChanges;
553
554
  * @alpha
554
555
  */
555
556
  class RelationshipClassChanges extends ClassChanges {
556
- constructor() {
557
- super(...arguments);
558
- this._sourceConstraintChanges = new Map();
559
- this._targetConstraintChanges = new Map();
560
- }
557
+ _sourceConstraintChanges = new Map();
558
+ _targetConstraintChanges = new Map();
561
559
  /** Gets the source RelationshipConstraintChanges Map. */
562
560
  get sourceConstraintChanges() {
563
561
  return this._sourceConstraintChanges;
@@ -587,10 +585,8 @@ exports.RelationshipClassChanges = RelationshipClassChanges;
587
585
  * @alpha
588
586
  */
589
587
  class PropertyChanges extends BaseSchemaChanges {
590
- constructor() {
591
- super(...arguments);
592
- this._customAttributeChanges = new Map();
593
- }
588
+ _propertyMissing;
589
+ _customAttributeChanges = new Map();
594
590
  /** Gets the PropertyMissing change. Maybe undefined. */
595
591
  get propertyMissing() {
596
592
  return this._propertyMissing;
@@ -630,10 +626,7 @@ exports.PropertyChanges = PropertyChanges;
630
626
  * @alpha
631
627
  */
632
628
  class EnumerationChanges extends SchemaItemChanges {
633
- constructor() {
634
- super(...arguments);
635
- this._enumeratorChanges = new Map();
636
- }
629
+ _enumeratorChanges = new Map();
637
630
  /** Gets the EnumeratorChanges map. */
638
631
  get enumeratorChanges() {
639
632
  return this._enumeratorChanges;
@@ -660,10 +653,7 @@ exports.EnumerationChanges = EnumerationChanges;
660
653
  * @alpha
661
654
  */
662
655
  class CustomAttributeContainerChanges extends BaseSchemaChanges {
663
- constructor() {
664
- super(...arguments);
665
- this._customAttributeChanges = [];
666
- }
656
+ _customAttributeChanges = [];
667
657
  /** Gets the CustomAttributeContainerChange collection. */
668
658
  get customAttributeChanges() {
669
659
  return this._customAttributeChanges;
@@ -683,11 +673,8 @@ exports.CustomAttributeContainerChanges = CustomAttributeContainerChanges;
683
673
  * @alpha
684
674
  */
685
675
  class RelationshipConstraintChanges extends BaseSchemaChanges {
686
- constructor() {
687
- super(...arguments);
688
- this._constraintClassChanges = [];
689
- this._customAttributeChanges = new Map();
690
- }
676
+ _constraintClassChanges = [];
677
+ _customAttributeChanges = new Map();
691
678
  /** Gets the RelationshipConstraintClassChange collection. */
692
679
  get constraintClassChanges() {
693
680
  return this._constraintClassChanges;
@@ -729,10 +716,8 @@ exports.RelationshipConstraintChanges = RelationshipConstraintChanges;
729
716
  * @alpha
730
717
  */
731
718
  class EnumeratorChanges extends BaseSchemaChanges {
732
- constructor() {
733
- super(...arguments);
734
- this._enumeratorDeltas = [];
735
- }
719
+ _enumeratorDeltas = [];
720
+ _enumeratorMissing;
736
721
  /** Gets the EnumeratorDelta collection. */
737
722
  get enumeratorDeltas() {
738
723
  return this._enumeratorDeltas;
@@ -760,10 +745,7 @@ exports.EnumeratorChanges = EnumeratorChanges;
760
745
  * @alpha
761
746
  */
762
747
  class EntityMixinChanges extends BaseSchemaChanges {
763
- constructor() {
764
- super(...arguments);
765
- this._entityMixinChange = [];
766
- }
748
+ _entityMixinChange = [];
767
749
  /** Gets the EntityMixinChange collection. */
768
750
  get entityMixinChange() {
769
751
  return this._entityMixinChange;
@@ -783,10 +765,7 @@ exports.EntityMixinChanges = EntityMixinChanges;
783
765
  * @alpha
784
766
  */
785
767
  class KindOfQuantityChanges extends SchemaItemChanges {
786
- constructor() {
787
- super(...arguments);
788
- this._presentationUnitChanges = new Map();
789
- }
768
+ _presentationUnitChanges = new Map();
790
769
  /** Gets the EntityMixinChange Map. */
791
770
  get presentationUnitChanges() {
792
771
  return this._presentationUnitChanges;
@@ -807,10 +786,7 @@ exports.KindOfQuantityChanges = KindOfQuantityChanges;
807
786
  * @alpha
808
787
  */
809
788
  class PresentationUnitChanges extends BaseSchemaChanges {
810
- constructor() {
811
- super(...arguments);
812
- this._presentationUnitChange = [];
813
- }
789
+ _presentationUnitChange = [];
814
790
  /** Gets the PresentationUnitChange collection. */
815
791
  get presentationUnitChange() {
816
792
  return this._presentationUnitChange;
@@ -830,10 +806,7 @@ exports.PresentationUnitChanges = PresentationUnitChanges;
830
806
  * @alpha
831
807
  */
832
808
  class FormatChanges extends SchemaItemChanges {
833
- constructor() {
834
- super(...arguments);
835
- this._formatUnitChanges = new Map();
836
- }
809
+ _formatUnitChanges = new Map();
837
810
  /** Gets the FormatUnitChanges collection. */
838
811
  get formatUnitChanges() {
839
812
  return this._formatUnitChanges;
@@ -858,11 +831,8 @@ exports.FormatChanges = FormatChanges;
858
831
  * @alpha
859
832
  */
860
833
  class FormatUnitChanges extends BaseSchemaChanges {
861
- constructor() {
862
- super(...arguments);
863
- this._unitLabelOverrideDeltas = [];
864
- this._formatUnitChanges = [];
865
- }
834
+ _unitLabelOverrideDeltas = [];
835
+ _formatUnitChanges = [];
866
836
  /** Gets the UnitLabelOverrideDelta collection. */
867
837
  get unitLabelOverrideDeltas() {
868
838
  return this._unitLabelOverrideDeltas;
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaChanges.js","sourceRoot":"","sources":["../../../src/Validation/SchemaChanges.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gEAGkC;AAElC,yEAAgE;AAEhE;;;GAGG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AQ,gBAAgB;IAC1D,qEAAqE;IACrE,IAAW,iBAAiB,KAAiB,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;IAEvE,kEAAkE;IAClE,IAAW,kBAAkB;QAC3B,OAAO,IAAI,CAAC,UAAU,CAAC,YAAsB,CAAC;IAChD,CAAC;IAED,kEAAkE;IAClE,IAAW,SAAS;QAClB,OAAO,IAAI,CAAC,mBAAmB,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IAClD,CAAC;IAED,kDAAkD;IAC3C,QAAQ;QACb,MAAM,MAAM,GAAG,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;QAC7C,MAAM,MAAM,GAAG,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;QAC7C,OAAO,UAAU,MAAM,OAAO,MAAM,EAAE,CAAC;IACzC,CAAC;IAED,IAAY,eAAe;QACzB,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW;YAC9B,OAAO,KAAK,CAAC;QAEf,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,cAAc,KAAK,kCAAc,CAAC,YAAY,CAAC;IACvF,CAAC;CACF;AA3BD,wDA2BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Comparison\n */\n\nimport { AnyClass, AnyEnumerator, CustomAttribute, ECClass, ECObjectsError, ECObjectsStatus,\n EntityClass, Enumeration, Format, KindOfQuantity, OverrideFormat, Property, RelationshipClass, RelationshipConstraint,\n Schema, SchemaItem, SchemaItemType,\n} from \"@itwin/ecschema-metadata\";\nimport { AnyDiagnostic } from \"./Diagnostic\";\nimport { SchemaCompareCodes } from \"./SchemaCompareDiagnostics\";\n\n/**\n * Possible change types used to categorize ISchemaChange objects.\n * @alpha\n */\nexport enum ChangeType {\n Delta = 0,\n Missing = 1,\n}\n\n/**\n * Interface that represents any change reported\n * between two schemas.\n * @alpha\n */\nexport interface ISchemaChange {\n /** The diagnostic containing the data related to the change. */\n diagnostic: AnyDiagnostic;\n /** The highest level SchemaItem that this change ultimately belong to. */\n topLevelSchemaItem: SchemaItem | Schema;\n /** The ChangeType (Delta or Missing) for this change. */\n changeType: ChangeType;\n /** Returns a string representation of the change. */\n toString(): string;\n}\n\n/**\n * Interface that represents an object that manages\n * a related set of ISchemaChange objects.\n * @alpha\n */\nexport interface ISchemaChanges {\n schema: Schema;\n ecTypeName: string;\n addChange(change: ISchemaChange): void;\n}\n\n/**\n * Allows an ISchemaChanges implementation to be dynamically constructed in addChangeToMap.\n */\ninterface SchemaChangesConstructor { new(schema: Schema, ecTypeName: string): ISchemaChanges } // eslint-disable-line @typescript-eslint/prefer-function-type\n\n/**\n * An ISchemaChange implementation meant to be used as the base class\n * for all other ISchemaChange implementations.\n * @alpha\n */\nexport abstract class BaseSchemaChange implements ISchemaChange {\n private _diagnostic: AnyDiagnostic;\n private _changeType!: ChangeType;\n\n /**\n * Initializes a new BaseSchemaChange instance.\n * @param diagnostic The diagnostic holding the change data.\n */\n constructor(diagnostic: AnyDiagnostic) {\n this._diagnostic = diagnostic;\n }\n\n /** Gets the diagnostic holding the information about the schema change. */\n public get diagnostic(): AnyDiagnostic { return this._diagnostic; }\n\n /**\n * Returns the SchemaItem that this change ultimately belongs to. For example,\n * for a CustomAttributeInstanceClassMissing diagnostic reported on a RelationshipConstraint,\n * the top-level SchemaItem would be the Relationship.\n */\n public abstract get topLevelSchemaItem(): SchemaItem | Schema;\n\n /**\n * Gets the change type (Delta or Missing) for the change. If not previously\n * set, the defaultChangeType value will be returned.\n */\n public get changeType() {\n if (!this._changeType)\n this._changeType = this.defaultChangeType;\n return this._changeType;\n }\n public set changeType(changeType: ChangeType) { this._changeType = changeType; }\n\n /** The default ChangeType (Delta or Missing). */\n public abstract get defaultChangeType(): ChangeType;\n\n /** Gets a string representation of the schema change. */\n public abstract toString(): string;\n\n /**\n * Gets the name or fullName from an EC type that is in the args array at\n * the specified index. Performs validation based on the given parameters.\n * @param index The index in the args array to find the EC type.\n * @param args The collection of arguments received in the diagnostics.\n * @param allowUndefined Specifies that undefined values are allowed.\n * @param fullName Flag indicating that the fullName should be returned rather than the name.\n */\n protected getNameFromArgument(index: number, allowUndefined: boolean = false, fullName: boolean = false): string {\n if (!this.diagnostic.messageArgs || this.diagnostic.messageArgs.length <= index)\n throw new ECObjectsError(ECObjectsStatus.InvalidSchemaComparisonArgument, `Schema comparison diagnostic '${this.diagnostic.code}' for SchemaItem '${this.topLevelSchemaItem.fullName}' has invalid arguments`);\n\n const schemaItem = this.getValueFromArgument(index);\n if (Schema.isSchema(schemaItem) || SchemaItem.isSchemaItem(schemaItem) || OverrideFormat.isOverrideFormat(schemaItem))\n return fullName ? schemaItem.fullName : schemaItem.name;\n\n if (!allowUndefined)\n throw new ECObjectsError(ECObjectsStatus.InvalidSchemaComparisonArgument, `Schema comparison diagnostic '${this.diagnostic.code}' for SchemaItem '${this.topLevelSchemaItem.fullName}' has invalid arguments`);\n\n return \"undefined\";\n }\n\n /**\n * Gets a string from the diagnostics arguments at the given index. If the value is undefined,\n * the string 'undefined' will be returned.\n * @param index The index in the args array to find the property value.\n */\n protected getStringFromArgument(index: number): string {\n const value = this.getValueFromArgument(index);\n if (value === undefined)\n return \"undefined\";\n\n if (typeof value === \"number\")\n return value.toString();\n\n if (typeof value === \"boolean\")\n return value ? \"true\" : \"false\";\n\n if (typeof value !== \"string\")\n throw new Error();\n\n return value;\n }\n\n /**\n * Helper method to retrieve a value from the diagnostic arguments, performing validation.\n * @param index THe index in the diagnostic arguments array.\n */\n protected getValueFromArgument(index: number): any {\n if (!this.diagnostic.messageArgs || this.diagnostic.messageArgs.length <= index)\n throw new Error();\n\n return this.diagnostic.messageArgs[index];\n }\n}\n\n/**\n * Base class for all ISchemaChanges implementations.\n * @alpha\n */\nexport abstract class BaseSchemaChanges implements ISchemaChanges {\n private _ecTypeName: string;\n private _schema: Schema;\n private _propertyValueChanges: PropertyValueChange[] = [];\n\n /**\n * Initializes a new BaseSchemaChanges instance.\n * @param schema The schema containing the changes.\n * @param anyECTypeName The name of the EC type.\n */\n constructor(schema: Schema, anyECTypeName: string) {\n this._schema = schema;\n this._ecTypeName = anyECTypeName;\n }\n\n /** Gets the array of PropertyValueChange instances. */\n public get propertyValueChanges(): PropertyValueChange[] {\n return this._propertyValueChanges;\n }\n\n /** Gets the name of the EC type associated with these schema changes. */\n public get ecTypeName(): string {\n return this._ecTypeName;\n }\n\n /** Gets the schema to which these changes are associated. */\n public get schema(): Schema {\n return this._schema;\n }\n\n /**\n * Adds a new ISchemaChange to a collection determined by the implementation.\n * @param change\n */\n public abstract addChange(change: ISchemaChange): void;\n\n /**\n * Helper method that adds a new ISchemaChange to a Map whose values are ISchemaChanges. The changesType will\n * be used to create a new ISchemaChanges instance if the changes collection does not exist in the Map.\n * @param changes The ISchemaChanges Map to which to add the ISchemaChange.\n * @param changesType The constructor of the ISchemaChanges. Called if the ISchemaChanges instance does not exist in the Map.\n * @param change The ISchemaChange to add.\n * @param changeKey The key used to identify the ISchemaChanges in the Map (typically the name of the EC type, ie. SchemaItem.name).\n */\n protected addChangeToMap<V extends ISchemaChanges>(changes: Map<string, V>, changesType: SchemaChangesConstructor, change: ISchemaChange, changeKey: string) {\n if (changes.has(changeKey)) {\n const existingChanges = changes.get(changeKey);\n existingChanges!.addChange(change);\n } else {\n const newChanges = new changesType(this._schema, changeKey);\n newChanges.addChange(change);\n changes.set(changeKey, newChanges as V);\n }\n }\n\n /**\n * Helper method to determine if the diagnostic is a property value change delta for this ISchemaChanges instance.\n * @param diagnostic The change diagnostic.\n * @param ecTypeName The name of the EC type as determined by the implementation.\n */\n protected isPropertyValueChangeForThis(diagnostic: AnyDiagnostic, ecTypeName: string): boolean {\n if (this.ecTypeName !== ecTypeName)\n return false;\n\n switch (diagnostic.code) {\n case SchemaCompareCodes.SchemaDelta:\n case SchemaCompareCodes.SchemaItemDelta:\n case SchemaCompareCodes.ClassDelta:\n case SchemaCompareCodes.MixinDelta:\n case SchemaCompareCodes.RelationshipDelta:\n case SchemaCompareCodes.CustomAttributeClassDelta:\n case SchemaCompareCodes.EnumerationDelta:\n case SchemaCompareCodes.KoqDelta:\n case SchemaCompareCodes.PropertyCategoryDelta:\n case SchemaCompareCodes.FormatDelta:\n case SchemaCompareCodes.UnitDelta:\n case SchemaCompareCodes.InvertedUnitDelta:\n case SchemaCompareCodes.PhenomenonDelta:\n case SchemaCompareCodes.ConstantDelta:\n case SchemaCompareCodes.PropertyDelta:\n case SchemaCompareCodes.RelationshipConstraintDelta:\n return true;\n default:\n return false;\n }\n }\n\n /**\n * Helper method to determine if the diagnostic is a CustomAttributeInstance class change for this ISchemaChanges instance.\n * @param diagnostic The change diagnostic.\n * @param ecTypeName The name of the EC type as determined by the implementation.\n */\n protected isCAContainerChangeForThis(diagnostic: AnyDiagnostic, ecTypeName: string | undefined): boolean {\n if (this.ecTypeName !== ecTypeName)\n return false;\n\n return diagnostic.code === SchemaCompareCodes.CustomAttributeInstanceClassMissing;\n }\n}\n\n/**\n * An ISchemaChanges implementation for managing schema comparison diagnostics at the Schema level.\n * @alpha\n */\nexport class SchemaChanges extends BaseSchemaChanges {\n private _diagnostics: AnyDiagnostic[] = [];\n private _missingSchemaReferences: SchemaReferenceMissing[] = [];\n private _schemaReferenceDeltas: SchemaReferenceDelta[] = [];\n private _customAttributeChanges: Map<string, CustomAttributeContainerChanges> = new Map();\n private _classChanges: Map<string, ClassChanges> = new Map();\n private _entityClassChanges: Map<string, EntityClassChanges> = new Map();\n private _relationshipClassChanges: Map<string, RelationshipClassChanges> = new Map();\n private _schemaItemChanges: Map<string, SchemaItemChanges> = new Map();\n private _enumerationChanges: Map<string, EnumerationChanges> = new Map();\n private _kindOfQuantityChanges: Map<string, KindOfQuantityChanges> = new Map();\n private _formatChanges: Map<string, FormatChanges> = new Map();\n\n /**\n * Initializes a new SchemaChanges instance.\n * @param schema The schema containing the changes.\n */\n constructor(schema: Schema) {\n super(schema, schema.name);\n }\n\n /** Gets the MissingSchemaReferences collection. */\n public get missingSchemaReferences(): SchemaReferenceMissing[] { return this._missingSchemaReferences; }\n\n /** Gets the SchemaReferenceChange collection. */\n public get schemaReferenceDeltas(): SchemaReferenceDelta[] { return this._schemaReferenceDeltas; }\n\n /** Gets the CustomAttributeContainerChanges Map. */\n public get customAttributeChanges(): Map<string, CustomAttributeContainerChanges> { return this._customAttributeChanges; }\n\n /** Gets the ClassChanges Map. */\n public get classChanges(): Map<string, ClassChanges> { return this._classChanges; }\n\n /** Gets the EntityClassChanges Map. */\n public get entityClassChanges(): Map<string, EntityClassChanges> { return this._entityClassChanges; }\n\n /** Gets the RelationshipClassChanges Map. */\n public get relationshipClassChanges(): Map<string, RelationshipClassChanges> { return this._relationshipClassChanges; }\n\n /** Gets the SchemaItemChanges Map. */\n public get schemaItemChanges(): Map<string, SchemaItemChanges> { return this._schemaItemChanges; }\n\n /** Gets the EnumerationChanges Map. */\n public get enumerationChanges(): Map<string, EnumerationChanges> { return this._enumerationChanges; }\n\n /** Gets the KindOfQuantityChanges Map. */\n public get kindOfQuantityChanges(): Map<string, KindOfQuantityChanges> { return this._kindOfQuantityChanges; }\n\n /** Gets the FormatChanges Map. */\n public get formatChanges(): Map<string, FormatChanges> { return this._formatChanges; }\n\n /** Gets all the change diagnostics that have been added to instance. */\n public get allDiagnostics(): AnyDiagnostic[] {\n return this._diagnostics;\n }\n\n /**\n * Adds a new change diagnostic for the schema.\n * @param diagnostic\n */\n public addDiagnostic(diagnostic: AnyDiagnostic) {\n this._diagnostics.push(diagnostic);\n\n const change = this.createChangeFromDiagnostic(diagnostic);\n this.addChange(change);\n }\n\n /**\n * Adds the change to the appropriate change collection at this level or adds the change\n * to a Map of child changes will which propagate the change to lower levels. Typically\n * any 'addChangeToMap' type method will then call addChange to add the ISchemaChange to\n * the ISchemaChanges instance at that level.\n * @param change The ISchemaChange to add.\n */\n public addChange(change: ISchemaChange) {\n const schemaName = this.getSchemaNameFromChange(change);\n\n // If change is at the schema level, record change and return\n if (schemaName) {\n if (change.diagnostic.code === SchemaCompareCodes.SchemaReferenceMissing) {\n this.missingSchemaReferences.push(change as SchemaReferenceMissing);\n return;\n }\n\n if (change.diagnostic.code === SchemaCompareCodes.SchemaReferenceDelta) {\n this.schemaReferenceDeltas.push(change as SchemaReferenceDelta);\n return;\n }\n\n if (this.isCAContainerChangeForThis(change.diagnostic, schemaName)) {\n this.addChangeToMap(this.customAttributeChanges, CustomAttributeContainerChanges, change, (change as CustomAttributeContainerChange).changeKey);\n return;\n }\n\n if (this.isPropertyValueChangeForThis(change.diagnostic, schemaName)) {\n this.propertyValueChanges.push(change as PropertyValueChange);\n return;\n }\n }\n\n // Start by adding the change for the top-level SchemaItem which will\n // start a recursion to add the change at each appropriate level.\n const schemaItem = change.topLevelSchemaItem;\n const schemaItemType = (schemaItem as SchemaItem).schemaItemType;\n\n switch (schemaItemType) {\n case SchemaItemType.Mixin:\n case SchemaItemType.StructClass:\n case SchemaItemType.CustomAttributeClass:\n this.addChangeToClassMap(change, schemaItem as AnyClass);\n return;\n case SchemaItemType.EntityClass:\n this.addChangeToEntityClassMap(change, schemaItem as EntityClass);\n return;\n case SchemaItemType.RelationshipClass:\n this.addChangeToRelationshipClassMap(change, schemaItem as RelationshipClass);\n return;\n case SchemaItemType.PropertyCategory:\n case SchemaItemType.Unit:\n case SchemaItemType.InvertedUnit:\n case SchemaItemType.UnitSystem:\n case SchemaItemType.Phenomenon:\n case SchemaItemType.Constant:\n this.addChangeToSchemaItemMap(change, schemaItem as SchemaItem);\n return;\n case SchemaItemType.Enumeration:\n this.addChangeToEnumerationMap(change, schemaItem as Enumeration);\n return;\n case SchemaItemType.KindOfQuantity:\n this.addChangeToKOQMap(change, schemaItem as KindOfQuantity);\n return;\n case SchemaItemType.Format:\n this.addChangeToFormatMap(change, schemaItem as Format);\n return;\n }\n }\n\n private getSchemaNameFromChange(change: ISchemaChange): string | undefined {\n const type = change.diagnostic.ecDefinition;\n\n return (Schema.isSchema(type)) ? type.name : undefined;\n }\n\n /** This creates ISchemaChange instances based on the change diagnostic specified. */\n private createChangeFromDiagnostic(diagnostic: AnyDiagnostic): ISchemaChange {\n switch (diagnostic.code) {\n case SchemaCompareCodes.SchemaReferenceMissing:\n return new SchemaReferenceMissing(diagnostic);\n case SchemaCompareCodes.SchemaReferenceDelta:\n return new SchemaReferenceDelta(diagnostic);\n case SchemaCompareCodes.SchemaDelta:\n case SchemaCompareCodes.SchemaItemDelta:\n case SchemaCompareCodes.ClassDelta:\n case SchemaCompareCodes.MixinDelta:\n case SchemaCompareCodes.RelationshipDelta:\n case SchemaCompareCodes.CustomAttributeClassDelta:\n case SchemaCompareCodes.EnumerationDelta:\n case SchemaCompareCodes.KoqDelta:\n case SchemaCompareCodes.PropertyCategoryDelta:\n case SchemaCompareCodes.FormatDelta:\n case SchemaCompareCodes.UnitDelta:\n case SchemaCompareCodes.InvertedUnitDelta:\n case SchemaCompareCodes.PhenomenonDelta:\n case SchemaCompareCodes.ConstantDelta:\n case SchemaCompareCodes.PropertyDelta:\n case SchemaCompareCodes.RelationshipConstraintDelta:\n return new PropertyValueChange(diagnostic);\n case SchemaCompareCodes.SchemaItemMissing:\n return new SchemaItemMissing(diagnostic);\n case SchemaCompareCodes.BaseClassDelta:\n return new BaseClassDelta(diagnostic);\n case SchemaCompareCodes.PropertyMissing:\n return new PropertyMissing(diagnostic);\n case SchemaCompareCodes.EntityMixinMissing:\n return new EntityMixinChange(diagnostic);\n case SchemaCompareCodes.RelationshipConstraintClassMissing:\n return new RelationshipConstraintClassChange(diagnostic);\n case SchemaCompareCodes.CustomAttributeInstanceClassMissing:\n return new CustomAttributeContainerChange(diagnostic);\n case SchemaCompareCodes.EnumeratorMissing:\n return new EnumeratorMissing(diagnostic);\n case SchemaCompareCodes.EnumeratorDelta:\n return new EnumeratorDelta(diagnostic);\n case SchemaCompareCodes.PresentationUnitMissing:\n return new PresentationUnitChange(diagnostic);\n case SchemaCompareCodes.FormatUnitMissing:\n return new FormatUnitChange(diagnostic);\n case SchemaCompareCodes.UnitLabelOverrideDelta:\n return new UnitLabelOverrideDelta(diagnostic);\n default:\n throw new Error();\n }\n }\n\n private addChangeToSchemaItemMap(change: ISchemaChange, schemaItem: SchemaItem) {\n if (this.schemaItemChanges.has(schemaItem.name)) {\n const existingChanges = this.schemaItemChanges.get(schemaItem.name);\n existingChanges!.addChange(change);\n } else {\n const newChanges = new SchemaItemChanges(this.schema, schemaItem.name, schemaItem.schemaItemType);\n newChanges.addChange(change);\n this.schemaItemChanges.set(schemaItem.name, newChanges);\n }\n }\n\n private addChangeToClassMap(change: ISchemaChange, ecClass: AnyClass) {\n if (this.classChanges.has(ecClass.name)) {\n const existingChanges = this.classChanges.get(ecClass.name);\n existingChanges!.addChange(change);\n } else {\n const newChanges = new ClassChanges(this.schema, ecClass.name, ecClass.schemaItemType);\n newChanges.addChange(change);\n this.classChanges.set(ecClass.name, newChanges);\n }\n }\n\n private addChangeToEntityClassMap(change: ISchemaChange, ecClass: EntityClass) {\n if (this.entityClassChanges.has(ecClass.name)) {\n const existingChanges = this.entityClassChanges.get(ecClass.name);\n existingChanges!.addChange(change);\n } else {\n const newChanges = new EntityClassChanges(this.schema, ecClass.name, ecClass.schemaItemType);\n newChanges.addChange(change);\n this.entityClassChanges.set(ecClass.name, newChanges);\n }\n }\n\n private addChangeToRelationshipClassMap(change: ISchemaChange, ecClass: RelationshipClass) {\n if (this.relationshipClassChanges.has(ecClass.name)) {\n const existingChanges = this.relationshipClassChanges.get(ecClass.name);\n existingChanges!.addChange(change);\n } else {\n const newChanges = new RelationshipClassChanges(this.schema, ecClass.name, ecClass.schemaItemType);\n newChanges.addChange(change);\n this.relationshipClassChanges.set(ecClass.name, newChanges);\n }\n }\n\n private addChangeToEnumerationMap(change: ISchemaChange, enumeration: Enumeration) {\n if (this.enumerationChanges.has(enumeration.name)) {\n const existingChanges = this.enumerationChanges.get(enumeration.name);\n existingChanges!.addChange(change);\n } else {\n const newChanges = new EnumerationChanges(this.schema, enumeration.name, enumeration.schemaItemType);\n newChanges.addChange(change);\n this.enumerationChanges.set(enumeration.name, newChanges);\n }\n }\n\n private addChangeToKOQMap(change: ISchemaChange, koq: KindOfQuantity) {\n if (this.kindOfQuantityChanges.has(koq.name)) {\n const existingChanges = this.kindOfQuantityChanges.get(koq.name);\n existingChanges!.addChange(change);\n } else {\n const newChanges = new KindOfQuantityChanges(this.schema, koq.name, koq.schemaItemType);\n newChanges.addChange(change);\n this.kindOfQuantityChanges.set(koq.name, newChanges);\n }\n }\n\n private addChangeToFormatMap(change: ISchemaChange, format: Format) {\n if (this.formatChanges.has(format.name)) {\n const existingChanges = this.formatChanges.get(format.name);\n existingChanges!.addChange(change);\n } else {\n const newChanges = new FormatChanges(this.schema, format.name, format.schemaItemType);\n newChanges.addChange(change);\n this.formatChanges.set(format.name, newChanges);\n }\n }\n}\n\n/**\n * An ISchemaChanges implementation for managing schema comparison diagnostics at the SchemaItem level.\n * @alpha\n */\nexport class SchemaItemChanges extends BaseSchemaChanges {\n private _schemaItemType: SchemaItemType;\n private _schemaItemMissing?: SchemaItemMissing;\n\n /**\n * Initializes a new SchemaItemChanges instance.\n * @param schema The Schema containing the change.\n * @param schemaItemName The name of the EC type associated with the change.\n * @param schemaItemType The SchemaItemType of the EC type.\n */\n constructor(schema: Schema, schemaItemName: string, schemaItemType: SchemaItemType) {\n super(schema, schemaItemName);\n this._schemaItemType = schemaItemType;\n }\n\n /** Gets the SchemaItemType of the SchemaItem associated with the changes. */\n public get schemaItemType(): SchemaItemType {\n return this._schemaItemType;\n }\n\n /** Gets the SchemaItemMissing change. Maybe undefined. */\n public get schemaItemMissing(): SchemaItemMissing | undefined {\n return this._schemaItemMissing;\n }\n\n /**\n * Adds the change to the appropriate change collection at this level or adds the change\n * to a Map of child changes will which propagate the change to lower levels.\n * @param change The ISchemaChange to add.\n */\n public addChange(change: ISchemaChange): void {\n if (change.diagnostic.code === SchemaCompareCodes.SchemaItemMissing) {\n this._schemaItemMissing = change as SchemaItemMissing;\n return;\n }\n\n const name = this.getSchemaItemNameFromChange(change);\n if (!name)\n return;\n\n if (this.isPropertyValueChangeForThis(change.diagnostic, name)) {\n this.propertyValueChanges.push(change as PropertyValueChange);\n return;\n }\n }\n\n protected getSchemaItemNameFromChange(change: ISchemaChange): string | undefined {\n const type = change.diagnostic.ecDefinition;\n return (SchemaItem.isSchemaItem(type)) ? type.name : undefined;\n }\n}\n\n/**\n * An ISchemaChanges implementation for managing schema comparison diagnostics at the Class level.\n * @alpha\n */\nexport class ClassChanges extends SchemaItemChanges {\n private _baseClassDelta?: BaseClassDelta;\n private _propertyChanges: Map<string, PropertyChanges> = new Map();\n private _customAttributeChanges: Map<string, CustomAttributeContainerChanges> = new Map();\n\n /** Gets the BaseClassDelta change. Maybe undefined. */\n public get baseClassDelta(): BaseClassDelta | undefined {\n return this._baseClassDelta;\n }\n\n /** Gets the PropertyChanges Map. */\n public get propertyChanges(): Map<string, PropertyChanges> {\n return this._propertyChanges;\n }\n\n /** Gets the Map of CustomAttributeContainerChanges. */\n public get customAttributeChanges(): Map<string, CustomAttributeContainerChanges> {\n return this._customAttributeChanges;\n }\n\n /**\n * Adds the change to the appropriate change collection at this level or adds the change\n * to a Map of child changes will which propagate the change to lower levels.\n * @param change The ISchemaChange to add.\n */\n public override addChange(change: ISchemaChange): void {\n super.addChange(change);\n\n if (change.diagnostic.code === SchemaCompareCodes.BaseClassDelta) {\n this._baseClassDelta = change as BaseClassDelta;\n return;\n }\n\n if (Property.isProperty(change.diagnostic.ecDefinition)) {\n this.addChangeToMap(this.propertyChanges, PropertyChanges, change, change.diagnostic.ecDefinition.name);\n return;\n }\n\n if (this.isCAContainerChangeForThis(change.diagnostic, this.getSchemaItemNameFromChange(change))) {\n this.addChangeToMap(this.customAttributeChanges, CustomAttributeContainerChanges, change, (change as CustomAttributeContainerChange).changeKey);\n return;\n }\n }\n}\n\n/**\n * An ISchemaChanges implementation for managing schema comparison diagnostics at the Class level.\n * @alpha\n */\nexport class EntityClassChanges extends ClassChanges {\n private _entityMixinChanges: Map<string, EntityMixinChanges> = new Map();\n\n /** Gets the EntityMixinChanges Map. */\n public get entityMixinChanges(): Map<string, EntityMixinChanges> {\n return this._entityMixinChanges;\n }\n\n /**\n * Adds the change to the appropriate change collection at this level or adds the change\n * to a Map of child changes will which propagate the change to lower levels.\n * @param change The ISchemaChange to add.\n */\n public override addChange(change: ISchemaChange): void {\n super.addChange(change);\n\n if (change.diagnostic.code === SchemaCompareCodes.EntityMixinMissing) {\n this.addChangeToMap(this.entityMixinChanges, EntityMixinChanges, change, (change as EntityMixinChange).changeKey);\n return;\n }\n }\n}\n\n/**\n * An ISchemaChanges implementation for managing schema comparison diagnostics for RelationshipClasses.\n * @alpha\n */\nexport class RelationshipClassChanges extends ClassChanges {\n private _sourceConstraintChanges: Map<string, RelationshipConstraintChanges> = new Map();\n private _targetConstraintChanges: Map<string, RelationshipConstraintChanges> = new Map();\n\n /** Gets the source RelationshipConstraintChanges Map. */\n public get sourceConstraintChanges(): Map<string, RelationshipConstraintChanges> {\n return this._sourceConstraintChanges;\n }\n\n /** Gets the target RelationshipConstraintChanges Map. */\n public get targetConstraintChanges(): Map<string, RelationshipConstraintChanges> {\n return this._targetConstraintChanges;\n }\n\n /**\n * Adds the change to the appropriate change collection at this level or adds the change\n * to a Map of child changes will which propagate the change to lower levels.\n * @param change The ISchemaChange to add.\n */\n public override addChange(change: ISchemaChange): void {\n super.addChange(change);\n\n if (RelationshipConstraint.isRelationshipConstraint(change.diagnostic.ecDefinition)) {\n if (change.diagnostic.ecDefinition.isSource)\n this.addChangeToMap(this.sourceConstraintChanges, RelationshipConstraintChanges, change, change.diagnostic.ecDefinition.fullName);\n else\n this.addChangeToMap(this.targetConstraintChanges, RelationshipConstraintChanges, change, change.diagnostic.ecDefinition.fullName);\n }\n }\n}\n\n/**\n * An ISchemaChanges implementation for managing schema comparison diagnostics at the Property level.\n * @alpha\n */\nexport class PropertyChanges extends BaseSchemaChanges {\n private _propertyMissing?: PropertyMissing;\n private _customAttributeChanges: Map<string, CustomAttributeContainerChanges> = new Map();\n\n /** Gets the PropertyMissing change. Maybe undefined. */\n public get propertyMissing(): PropertyMissing | undefined {\n return this._propertyMissing;\n }\n\n /** Gets the CustomAttributeContainerChanges Map. */\n public get customAttributeChanges(): Map<string, CustomAttributeContainerChanges> {\n return this._customAttributeChanges;\n }\n\n /**\n * Adds the change to the appropriate change collection at this level or adds the change\n * to a Map of child changes will which propagate the change to lower levels.\n * @param change The ISchemaChange to add.\n */\n public addChange(change: ISchemaChange): void {\n const propertyName = this.getPropertyNameFromChange(change);\n if (!propertyName)\n return;\n\n if (change.diagnostic.code === SchemaCompareCodes.PropertyMissing) {\n this._propertyMissing = change as PropertyMissing;\n return;\n }\n\n if (this.isPropertyValueChangeForThis(change.diagnostic, propertyName)) {\n this.propertyValueChanges.push(change as PropertyValueChange);\n return;\n }\n\n if (this.isCAContainerChangeForThis(change.diagnostic, propertyName))\n this.addChangeToMap(this.customAttributeChanges, CustomAttributeContainerChanges, change, (change as CustomAttributeContainerChange).changeKey);\n }\n\n private getPropertyNameFromChange(change: ISchemaChange): string | undefined {\n const type = change.diagnostic.ecDefinition;\n return (Property.isProperty(type)) ? type.name : undefined;\n }\n}\n\n/**\n * An ISchemaChanges implementation for managing schema comparison diagnostics for Enumerations.\n * @alpha\n */\nexport class EnumerationChanges extends SchemaItemChanges {\n private _enumeratorChanges: Map<string, EnumeratorChanges> = new Map();\n\n /** Gets the EnumeratorChanges map. */\n public get enumeratorChanges(): Map<string, EnumeratorChanges> {\n return this._enumeratorChanges;\n }\n\n /**\n * Adds the change to the appropriate change collection at this level or adds the change\n * to a Map of child changes will which propagate the change to lower levels.\n * @param change The ISchemaChange to add.\n */\n public override addChange(change: ISchemaChange): void {\n super.addChange(change);\n\n if (change.diagnostic.code === SchemaCompareCodes.EnumeratorDelta) {\n this.addChangeToMap(this.enumeratorChanges, EnumeratorChanges, change, (change as EnumeratorDelta).changeKey);\n return;\n }\n\n if (change.diagnostic.code === SchemaCompareCodes.EnumeratorMissing) {\n this.addChangeToMap(this.enumeratorChanges, EnumeratorChanges, change, (change as EnumeratorMissing).changeKey);\n }\n }\n}\n\n/**\n * An ISchemaChanges implementation for managing schema comparison diagnostics for CustomAttributeContainers.\n * @alpha\n */\nexport class CustomAttributeContainerChanges extends BaseSchemaChanges {\n private _customAttributeChanges: CustomAttributeContainerChange[] = [];\n\n /** Gets the CustomAttributeContainerChange collection. */\n public get customAttributeChanges(): CustomAttributeContainerChange[] {\n return this._customAttributeChanges;\n }\n\n /**\n * Adds the change to the appropriate change collection at this level.\n * @param change The ISchemaChange to add.\n */\n public addChange(change: ISchemaChange): void {\n if (change.diagnostic.code === SchemaCompareCodes.CustomAttributeInstanceClassMissing)\n this.customAttributeChanges.push(change as CustomAttributeContainerChange);\n }\n}\n\n/**\n * An ISchemaChanges implementation for managing schema comparison diagnostics for RelationshipConstraints.\n * @alpha\n */\nexport class RelationshipConstraintChanges extends BaseSchemaChanges {\n private _constraintClassChanges: RelationshipConstraintClassChange[] = [];\n private _customAttributeChanges: Map<string, CustomAttributeContainerChanges> = new Map();\n\n /** Gets the RelationshipConstraintClassChange collection. */\n public get constraintClassChanges(): RelationshipConstraintClassChange[] {\n return this._constraintClassChanges;\n }\n\n /** Gets the CustomAttributeContainerChanges Map. */\n public get customAttributeChanges(): Map<string, CustomAttributeContainerChanges> {\n return this._customAttributeChanges;\n }\n\n /**\n * Adds the change to the appropriate change collection at this level or adds the change\n * to a Map of child changes will which propagate the change to lower levels.\n * @param change The ISchemaChange to add.\n */\n public addChange(change: ISchemaChange): void {\n const constraintName = this.getConstraintNameFromChange(change);\n if (!constraintName)\n return;\n\n if (this.isPropertyValueChangeForThis(change.diagnostic, constraintName)) {\n this.propertyValueChanges.push(change as PropertyValueChange);\n return;\n }\n\n if (change.diagnostic.code === SchemaCompareCodes.RelationshipConstraintClassMissing) {\n this.constraintClassChanges.push(change as RelationshipConstraintClassChange);\n return;\n }\n\n if (this.isCAContainerChangeForThis(change.diagnostic, constraintName))\n this.addChangeToMap(this.customAttributeChanges, CustomAttributeContainerChanges, change, (change as CustomAttributeContainerChange).changeKey);\n }\n\n private getConstraintNameFromChange(change: ISchemaChange): string | undefined {\n const type = change.diagnostic.ecDefinition;\n if (RelationshipConstraint.isRelationshipConstraint(type))\n return type.fullName;\n return undefined;\n }\n}\n\n/**\n * An ISchemaChanges implementation for managing schema comparison diagnostics for Enumerators.\n * @alpha\n */\nexport class EnumeratorChanges extends BaseSchemaChanges {\n private _enumeratorDeltas: EnumeratorDelta[] = [];\n private _enumeratorMissing?: EnumeratorMissing;\n\n /** Gets the EnumeratorDelta collection. */\n public get enumeratorDeltas(): EnumeratorDelta[] {\n return this._enumeratorDeltas;\n }\n\n /** Gets the EnumeratorMissing change. Maybe undefined. */\n public get enumeratorMissing(): EnumeratorMissing | undefined {\n return this._enumeratorMissing;\n }\n\n /**\n * Adds the change to the appropriate change collection.\n * @param change The ISchemaChange to add.\n */\n public addChange(change: ISchemaChange): void {\n if (change.diagnostic.code === SchemaCompareCodes.EnumeratorDelta) {\n this.enumeratorDeltas.push(change as EnumeratorDelta);\n return;\n }\n\n if (change.diagnostic.code === SchemaCompareCodes.EnumeratorMissing)\n this._enumeratorMissing = change as EnumeratorMissing;\n }\n}\n\n/**\n * An ISchemaChanges implementation for managing schema comparison diagnostics for EntityClass mixin changes.\n * @alpha\n */\nexport class EntityMixinChanges extends BaseSchemaChanges {\n private _entityMixinChange: EntityMixinChange[] = [];\n\n /** Gets the EntityMixinChange collection. */\n public get entityMixinChange(): EntityMixinChange[] {\n return this._entityMixinChange;\n }\n\n /**\n * Adds the change to the appropriate change collection.\n * @param change The ISchemaChange to add.\n */\n public addChange(change: ISchemaChange): void {\n if (change.diagnostic.code === SchemaCompareCodes.EntityMixinMissing)\n this.entityMixinChange.push(change as EntityMixinChange);\n }\n}\n\n/**\n * An ISchemaChanges implementation for managing schema comparison diagnostics for KindOfQuantities.\n * @alpha\n */\nexport class KindOfQuantityChanges extends SchemaItemChanges {\n private _presentationUnitChanges: Map<string, PresentationUnitChanges> = new Map();\n\n /** Gets the EntityMixinChange Map. */\n public get presentationUnitChanges(): Map<string, PresentationUnitChanges> {\n return this._presentationUnitChanges;\n }\n\n /**\n * Adds the change to the appropriate change collection.\n * @param change The ISchemaChange to add.\n */\n public override addChange(change: ISchemaChange): void {\n super.addChange(change);\n\n if (change.diagnostic.code === SchemaCompareCodes.PresentationUnitMissing)\n this.addChangeToMap(this.presentationUnitChanges, PresentationUnitChanges, change, (change as PresentationUnitChange).changeKey);\n }\n}\n\n/**\n * An ISchemaChanges implementation for managing schema comparison diagnostics for KindOfQuantity presentation units.\n * @alpha\n */\nexport class PresentationUnitChanges extends BaseSchemaChanges {\n private _presentationUnitChange: PresentationUnitChange[] = [];\n\n /** Gets the PresentationUnitChange collection. */\n public get presentationUnitChange(): PresentationUnitChange[] {\n return this._presentationUnitChange;\n }\n\n /**\n * Adds the change to the appropriate change collection.\n * @param change The ISchemaChange to add.\n */\n public addChange(change: ISchemaChange): void {\n if (change.diagnostic.code === SchemaCompareCodes.PresentationUnitMissing)\n this.presentationUnitChange.push(change as PresentationUnitChange);\n }\n}\n\n/**\n * An ISchemaChanges implementation for managing schema comparison diagnostics for Formats.\n * @alpha\n */\nexport class FormatChanges extends SchemaItemChanges {\n private _formatUnitChanges: Map<string, FormatUnitChanges> = new Map();\n\n /** Gets the FormatUnitChanges collection. */\n public get formatUnitChanges(): Map<string, FormatUnitChanges> {\n return this._formatUnitChanges;\n }\n\n /**\n * Adds the change to the appropriate change collection.\n * @param change The ISchemaChange to add.\n */\n public override addChange(change: ISchemaChange): void {\n super.addChange(change);\n\n if (change.diagnostic.code === SchemaCompareCodes.UnitLabelOverrideDelta) {\n this.addChangeToMap(this.formatUnitChanges, FormatUnitChanges, change, (change as UnitLabelOverrideDelta).changeKey);\n return;\n }\n\n if (change.diagnostic.code === SchemaCompareCodes.FormatUnitMissing)\n this.addChangeToMap(this.formatUnitChanges, FormatUnitChanges, change, (change as FormatUnitChange).changeKey);\n }\n}\n\n/**\n * An ISchemaChanges implementation for managing schema comparison diagnostics for Format units.\n * @alpha\n */\nexport class FormatUnitChanges extends BaseSchemaChanges {\n private _unitLabelOverrideDeltas: UnitLabelOverrideDelta[] = [];\n private _formatUnitChanges: FormatUnitChange[] = [];\n\n /** Gets the UnitLabelOverrideDelta collection. */\n public get unitLabelOverrideDeltas(): UnitLabelOverrideDelta[] {\n return this._unitLabelOverrideDeltas;\n }\n\n /** Gets the FormatUnitChange collection. */\n public get formatUnitChanges(): FormatUnitChange[] {\n return this._formatUnitChanges;\n }\n\n /**\n * Adds the change to the appropriate change collection.\n * @param change The ISchemaChange to add.\n */\n public addChange(change: ISchemaChange): void {\n if (change.diagnostic.code === SchemaCompareCodes.UnitLabelOverrideDelta) {\n this.unitLabelOverrideDeltas.push(change as UnitLabelOverrideDelta);\n return;\n }\n\n if (change.diagnostic.code === SchemaCompareCodes.FormatUnitMissing)\n this.formatUnitChanges.push(change as FormatUnitChange);\n }\n}\n\n/** ISchemaChange Implementations */\n\n/**\n * An ISchemaChange implementation to act as the base class for all changes\n * associated with SchemaItem instances.\n * @alpha\n */\nexport abstract class SchemaItemChange extends BaseSchemaChange {\n public get topLevelSchemaItem(): Schema | SchemaItem { return this.diagnostic.ecDefinition as SchemaItem; }\n}\n\n/**\n * An ISchemaChange implementation for Schema reference changes.\n * @alpha\n */\nexport class SchemaReferenceMissing extends BaseSchemaChange {\n /** Gets the default ChangeType (Delta or Missing) for this change */\n public get defaultChangeType(): ChangeType { return ChangeType.Missing; }\n\n /** Gets the SchemaItem or Schema (if a schema change) that this change ultimately belongs to. */\n public get topLevelSchemaItem(): Schema | SchemaItem { return this.diagnostic.ecDefinition as Schema; }\n\n /** Gets a string representation of the change. */\n public toString(): string {\n const refSchema = this.getNameFromArgument(0, false, true);\n return `Schema(${refSchema})`;\n }\n}\n\n/**\n * An ISchemaChange implementation differences of baseClasses between two ECClasses.\n * @alpha\n */\nexport class SchemaReferenceDelta extends BaseSchemaChange {\n /** Gets the default ChangeType (Delta or Missing) for this change */\n public get defaultChangeType(): ChangeType { return ChangeType.Delta; }\n\n /** Gets the SchemaItem or Schema (if a schema change) that this change ultimately belongs to. */\n public get topLevelSchemaItem(): Schema | SchemaItem { return this.diagnostic.ecDefinition as Schema; }\n\n /** Gets a string representation of the change. */\n public toString(): string {\n const refSchema = this.getNameFromArgument(0, false, true);\n const versionA = this.getStringFromArgument(1);\n const versionB = this.getStringFromArgument(2);\n return `Schema(${refSchema}): ${versionA} -> ${versionB}`;\n }\n}\n\n/**\n * An ISchemaChange implementation for missing SchemaItems.\n * @alpha\n */\nexport class SchemaItemMissing extends SchemaItemChange {\n /** Gets the default ChangeType (Delta or Missing) for this change */\n public get defaultChangeType(): ChangeType { return ChangeType.Missing; }\n\n /** Gets a string representation of the change. */\n public toString(): string {\n const item = this.diagnostic.ecDefinition as SchemaItem;\n const typeName = ECClass.isECClass(item) ? \"Class\" : item.schemaItemType;\n return `${typeName}(${item.name})`;\n }\n}\n\n/**\n * An ISchemaChange implementation for changes in property values of any EC type.\n * @alpha\n */\nexport class PropertyValueChange extends BaseSchemaChange {\n\n /** Gets the SchemaItem that this change ultimately belongs to. */\n public get topLevelSchemaItem(): Schema | SchemaItem {\n if (SchemaItem.isSchemaItem(this.diagnostic.ecDefinition))\n return this.diagnostic.ecDefinition;\n\n if (Schema.isSchema(this.diagnostic.ecDefinition))\n return this.diagnostic.ecDefinition;\n\n if (Property.isProperty(this.diagnostic.ecDefinition))\n return this.diagnostic.ecDefinition.class;\n\n if (RelationshipConstraint.isRelationshipConstraint(this.diagnostic.ecDefinition))\n return this.diagnostic.ecDefinition.relationshipClass;\n\n throw new Error();\n }\n\n /** Gets the default ChangeType (Delta or Missing) for this change */\n public get defaultChangeType(): ChangeType { return ChangeType.Delta; }\n\n /** Gets a string representation of the change. */\n public toString(): string {\n let property = this.getStringFromArgument(0);\n // Capitalize property name\n property = property.charAt(0).toUpperCase() + property.slice(1);\n const valueA = this.getStringFromArgument(1);\n const valueB = this.getStringFromArgument(2);\n return `${property}: ${valueA} -> ${valueB}`;\n }\n}\n\n/**\n * An ISchemaChange implementation for missing CustomAttribute instances\n * for a given container.\n * @alpha\n */\nexport class CustomAttributeContainerChange extends BaseSchemaChange {\n /** Gets the default ChangeType (Delta or Missing) for this change */\n public get defaultChangeType(): ChangeType { return ChangeType.Missing; }\n\n /** Gets the SchemaItem that this change ultimately belongs to. */\n public get topLevelSchemaItem(): Schema | SchemaItem {\n if (SchemaItem.isSchemaItem(this.diagnostic.ecDefinition))\n return this.diagnostic.ecDefinition;\n\n if (Property.isProperty(this.diagnostic.ecDefinition))\n return this.diagnostic.ecDefinition.class;\n\n if (Schema.isSchema(this.diagnostic.ecDefinition))\n return this.diagnostic.ecDefinition;\n\n if (RelationshipConstraint.isRelationshipConstraint(this.diagnostic.ecDefinition))\n return this.diagnostic.ecDefinition.relationshipClass;\n\n throw new Error();\n }\n\n /** Gets the key to use in a Map of this type of ISchemaChange. */\n public get changeKey(): string {\n return (this.getValueFromArgument(0) as CustomAttribute).className;\n }\n\n /** Gets a string representation of the change. */\n public toString(): string {\n return `CustomAttribute: ${this.changeKey}`;\n }\n}\n\n/**\n * An ISchemaChange implementation differences of baseClasses between two ECClasses.\n * @alpha\n */\nexport class BaseClassDelta extends SchemaItemChange {\n /** Gets the default ChangeType (Delta or Missing) for this change */\n public get defaultChangeType(): ChangeType { return ChangeType.Delta; }\n\n /** Gets a string representation of the change. */\n public toString(): string {\n const classA = this.getNameFromArgument(0, true, true);\n const classB = this.getNameFromArgument(1, true, true);\n return `BaseClass: ${classA} -> ${classB}`;\n }\n}\n\n/**\n * An ISchemaChange implementation for missing properties.\n * @alpha\n */\nexport class PropertyMissing extends BaseSchemaChange {\n /** Gets the SchemaItem that this change ultimately belongs to. */\n public get topLevelSchemaItem(): Schema | SchemaItem {\n return (this.diagnostic.ecDefinition as Property).class;\n }\n\n /** Gets the default ChangeType (Delta or Missing) for this change */\n public get defaultChangeType(): ChangeType { return ChangeType.Missing; }\n\n /** Gets a string representation of the change. */\n public toString(): string {\n return `Property(${(this.diagnostic.ecDefinition as Property).name})`;\n }\n}\n\n/**\n * An ISchemaChange implementation for missing RelationshipConstraint classes.\n * @alpha\n */\nexport class RelationshipConstraintClassChange extends BaseSchemaChange {\n /** Gets the default ChangeType (Delta or Missing) for this change */\n public get defaultChangeType(): ChangeType { return ChangeType.Missing; }\n\n /** Gets the SchemaItem that this change ultimately belongs to. */\n public get topLevelSchemaItem(): Schema | SchemaItem {\n return (this.diagnostic.ecDefinition as RelationshipConstraint).relationshipClass;\n }\n\n /** Gets a string representation of the change. */\n public toString(): string {\n const constraintClass = this.getNameFromArgument(0, false, true);\n return `ConstraintClass: ${constraintClass}`;\n }\n}\n\n/**\n * An ISchemaChange implementation for differences of Enumerator properties.\n * @alpha\n */\nexport class EnumeratorDelta extends BaseSchemaChange {\n /** Gets the default ChangeType (Delta or Missing) for this change */\n public get defaultChangeType(): ChangeType { return ChangeType.Delta; }\n\n /** Gets the SchemaItem that this change ultimately belongs to. */\n public get topLevelSchemaItem(): Schema | SchemaItem {\n return this.diagnostic.ecDefinition as Enumeration;\n }\n\n /** Gets the key to use in a Map of this type of ISchemaChange. */\n public get changeKey(): string {\n const enumerator = this.getValueFromArgument(0) as AnyEnumerator;\n return enumerator.name;\n }\n\n /** Gets a string representation of the change. */\n public toString(): string {\n let propertyName = this.getStringFromArgument(1);\n // Capitalize property name\n propertyName = propertyName.charAt(0).toUpperCase() + propertyName.slice(1);\n const valueA = this.getStringFromArgument(2);\n const valueB = this.getStringFromArgument(3);\n return `${propertyName}: ${valueA} -> ${valueB}`;\n }\n}\n\n/**\n * An ISchemaChange implementation for missing Enumerators within an Enumeration.\n * @alpha\n */\nexport class EnumeratorMissing extends BaseSchemaChange {\n /** Gets the default ChangeType (Delta or Missing) for this change */\n public get defaultChangeType(): ChangeType { return ChangeType.Missing; }\n\n /** Gets the SchemaItem that this change ultimately belongs to. */\n public get topLevelSchemaItem(): Schema | SchemaItem {\n return this.diagnostic.ecDefinition as Enumeration;\n }\n\n /** Gets the key to use in a Map of this type of ISchemaChange. */\n public get changeKey(): string {\n return (this.getValueFromArgument(0) as AnyEnumerator).name;\n }\n\n /** Gets a string representation of the change. */\n public toString(): string {\n return `Enumerator(${this.changeKey})`;\n }\n}\n\n/**\n * An ISchemaChange implementation for missing mixins within an EntityClass.\n * @alpha\n */\nexport class EntityMixinChange extends BaseSchemaChange {\n /** Gets the default ChangeType (Delta or Missing) for this change */\n public get defaultChangeType(): ChangeType { return ChangeType.Missing; }\n\n /** Gets the SchemaItem that this change ultimately belongs to. */\n public get topLevelSchemaItem(): Schema | SchemaItem {\n return this.diagnostic.ecDefinition as EntityClass;\n }\n\n /** Gets the key to use in a Map of this type of ISchemaChange. */\n public get changeKey(): string {\n return this.getNameFromArgument(0, false, true);\n }\n\n /** Gets a string representation of the change. */\n public toString(): string {\n return `Mixin: ${this.changeKey}`;\n }\n}\n\n/**\n * An ISchemaChange implementation for missing presentation Units within a KindOfQuantity.\n * @alpha\n */\nexport class PresentationUnitChange extends BaseSchemaChange {\n /** Gets the default ChangeType (Delta or Missing) for this change */\n public get defaultChangeType(): ChangeType { return ChangeType.Missing; }\n\n /** Gets the SchemaItem that this change ultimately belongs to. */\n public get topLevelSchemaItem(): Schema | SchemaItem {\n return this.diagnostic.ecDefinition as KindOfQuantity;\n }\n\n /** Gets the key to use in a Map of this type of ISchemaChange. */\n public get changeKey(): string {\n return this.getNameFromArgument(0, false, true);\n }\n\n /** Gets a string representation of the change. */\n public toString(): string {\n return `Unit: ${this.changeKey}`;\n }\n\n private get _isOverrideFormat(): boolean {\n if (!this.diagnostic.messageArgs)\n return false;\n\n return OverrideFormat.isOverrideFormat(this.diagnostic.messageArgs[0]);\n }\n}\n\n/**\n * An ISchemaChange implementation for missing Units within a Format.\n * @alpha\n */\nexport class FormatUnitChange extends BaseSchemaChange {\n /** Gets the default ChangeType (Delta or Missing) for this change */\n public get defaultChangeType(): ChangeType { return ChangeType.Missing; }\n\n /** Gets the SchemaItem that this change ultimately belongs to. */\n public get topLevelSchemaItem(): Schema | SchemaItem {\n return this.diagnostic.ecDefinition as Format;\n }\n\n /** Gets the key to use in a Map of this type of ISchemaChange. */\n public get changeKey(): string {\n return this.getNameFromArgument(0, false, true);\n }\n\n /** Gets a string representation of the change. */\n public toString(): string {\n return `Unit: ${this.changeKey}, label: ${this.getStringFromArgument(1)}`;\n }\n\n private get _isInvertedUnit(): boolean {\n if (!this.diagnostic.messageArgs)\n return false;\n\n return this.diagnostic.messageArgs[0].schemaItemType === SchemaItemType.InvertedUnit;\n }\n}\n\n/**\n * An ISchemaChange implementation for differences of Unit label overrides within a given Format.\n * @alpha\n */\nexport class UnitLabelOverrideDelta extends BaseSchemaChange {\n /** Gets the default ChangeType (Delta or Missing) for this change */\n public get defaultChangeType(): ChangeType { return ChangeType.Delta; }\n\n /** Gets the SchemaItem that this change ultimately belongs to. */\n public get topLevelSchemaItem(): Schema | SchemaItem {\n return this.diagnostic.ecDefinition as Format;\n }\n\n /** Gets the key to use in a Map of this type of ISchemaChange. */\n public get changeKey(): string {\n return this.getNameFromArgument(0, false, true);\n }\n\n /** Gets a string representation of the change. */\n public toString(): string {\n const valueA = this.getStringFromArgument(1);\n const valueB = this.getStringFromArgument(2);\n return `Label: ${valueA} -> ${valueB}`;\n }\n\n private get _isInvertedUnit(): boolean {\n if (!this.diagnostic.messageArgs)\n return false;\n\n return this.diagnostic.messageArgs[0].schemaItemType === SchemaItemType.InvertedUnit;\n }\n}\n"]}
1
+ {"version":3,"file":"SchemaChanges.js","sourceRoot":"","sources":["../../../src/Validation/SchemaChanges.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gEAGkC;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AAiB,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;IAEvE,kEAAkE;IAClE,IAAW,kBAAkB;QAC3B,OAAO,IAAI,CAAC,UAAU,CAAC,YAAsB,CAAC;IAChD,CAAC;IAED,kEAAkE;IAClE,IAAW,SAAS;QAClB,OAAO,IAAI,CAAC,mBAAmB,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IAClD,CAAC;IAED,kDAAkD;IAC3C,QAAQ;QACb,MAAM,MAAM,GAAG,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;QAC7C,MAAM,MAAM,GAAG,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;QAC7C,OAAO,UAAU,MAAM,OAAO,MAAM,EAAE,CAAC;IACzC,CAAC;IAED,IAAY,eAAe;QACzB,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW;YAC9B,OAAO,KAAK,CAAC;QAEf,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,cAAc,KAAK,kCAAc,CAAC,YAAY,CAAC;IACvF,CAAC;CACF;AA3BD,wDA2BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Comparison\n */\n\nimport { AnyClass, AnyEnumerator, CustomAttribute, ECClass, ECObjectsError, ECObjectsStatus,\n EntityClass, Enumeration, Format, KindOfQuantity, OverrideFormat, Property, RelationshipClass, RelationshipConstraint,\n Schema, SchemaItem, SchemaItemType,\n} from \"@itwin/ecschema-metadata\";\nimport { AnyDiagnostic } from \"./Diagnostic\";\nimport { SchemaCompareCodes } from \"./SchemaCompareDiagnostics\";\n\n/**\n * Possible change types used to categorize ISchemaChange objects.\n * @alpha\n */\nexport enum ChangeType {\n Delta = 0,\n Missing = 1,\n}\n\n/**\n * Interface that represents any change reported\n * between two schemas.\n * @alpha\n */\nexport interface ISchemaChange {\n /** The diagnostic containing the data related to the change. */\n diagnostic: AnyDiagnostic;\n /** The highest level SchemaItem that this change ultimately belong to. */\n topLevelSchemaItem: SchemaItem | Schema;\n /** The ChangeType (Delta or Missing) for this change. */\n changeType: ChangeType;\n /** Returns a string representation of the change. */\n toString(): string;\n}\n\n/**\n * Interface that represents an object that manages\n * a related set of ISchemaChange objects.\n * @alpha\n */\nexport interface ISchemaChanges {\n schema: Schema;\n ecTypeName: string;\n addChange(change: ISchemaChange): void;\n}\n\n/**\n * Allows an ISchemaChanges implementation to be dynamically constructed in addChangeToMap.\n */\ninterface SchemaChangesConstructor { new(schema: Schema, ecTypeName: string): ISchemaChanges } // eslint-disable-line @typescript-eslint/prefer-function-type\n\n/**\n * An ISchemaChange implementation meant to be used as the base class\n * for all other ISchemaChange implementations.\n * @alpha\n */\nexport abstract class BaseSchemaChange implements ISchemaChange {\n private _diagnostic: AnyDiagnostic;\n private _changeType!: ChangeType;\n\n /**\n * Initializes a new BaseSchemaChange instance.\n * @param diagnostic The diagnostic holding the change data.\n */\n constructor(diagnostic: AnyDiagnostic) {\n this._diagnostic = diagnostic;\n }\n\n /** Gets the diagnostic holding the information about the schema change. */\n public get diagnostic(): AnyDiagnostic { return this._diagnostic; }\n\n /**\n * Returns the SchemaItem that this change ultimately belongs to. For example,\n * for a CustomAttributeInstanceClassMissing diagnostic reported on a RelationshipConstraint,\n * the top-level SchemaItem would be the Relationship.\n */\n public abstract get topLevelSchemaItem(): SchemaItem | Schema;\n\n /**\n * Gets the change type (Delta or Missing) for the change. If not previously\n * set, the defaultChangeType value will be returned.\n */\n public get changeType() {\n if (!this._changeType)\n this._changeType = this.defaultChangeType;\n return this._changeType;\n }\n public set changeType(changeType: ChangeType) { this._changeType = changeType; }\n\n /** The default ChangeType (Delta or Missing). */\n public abstract get defaultChangeType(): ChangeType;\n\n /** Gets a string representation of the schema change. */\n public abstract toString(): string;\n\n /**\n * Gets the name or fullName from an EC type that is in the args array at\n * the specified index. Performs validation based on the given parameters.\n * @param index The index in the args array to find the EC type.\n * @param args The collection of arguments received in the diagnostics.\n * @param allowUndefined Specifies that undefined values are allowed.\n * @param fullName Flag indicating that the fullName should be returned rather than the name.\n */\n protected getNameFromArgument(index: number, allowUndefined: boolean = false, fullName: boolean = false): string {\n if (!this.diagnostic.messageArgs || this.diagnostic.messageArgs.length <= index)\n throw new ECObjectsError(ECObjectsStatus.InvalidSchemaComparisonArgument, `Schema comparison diagnostic '${this.diagnostic.code}' for SchemaItem '${this.topLevelSchemaItem.fullName}' has invalid arguments`);\n\n const schemaItem = this.getValueFromArgument(index);\n if (Schema.isSchema(schemaItem) || SchemaItem.isSchemaItem(schemaItem) || OverrideFormat.isOverrideFormat(schemaItem))\n return fullName ? schemaItem.fullName : schemaItem.name;\n\n if (!allowUndefined)\n throw new ECObjectsError(ECObjectsStatus.InvalidSchemaComparisonArgument, `Schema comparison diagnostic '${this.diagnostic.code}' for SchemaItem '${this.topLevelSchemaItem.fullName}' has invalid arguments`);\n\n return \"undefined\";\n }\n\n /**\n * Gets a string from the diagnostics arguments at the given index. If the value is undefined,\n * the string 'undefined' will be returned.\n * @param index The index in the args array to find the property value.\n */\n protected getStringFromArgument(index: number): string {\n const value = this.getValueFromArgument(index);\n if (value === undefined)\n return \"undefined\";\n\n if (typeof value === \"number\")\n return value.toString();\n\n if (typeof value === \"boolean\")\n return value ? \"true\" : \"false\";\n\n if (typeof value !== \"string\")\n throw new Error();\n\n return value;\n }\n\n /**\n * Helper method to retrieve a value from the diagnostic arguments, performing validation.\n * @param index THe index in the diagnostic arguments array.\n */\n protected getValueFromArgument(index: number): any {\n if (!this.diagnostic.messageArgs || this.diagnostic.messageArgs.length <= index)\n throw new Error();\n\n return this.diagnostic.messageArgs[index];\n }\n}\n\n/**\n * Base class for all ISchemaChanges implementations.\n * @alpha\n */\nexport abstract class BaseSchemaChanges implements ISchemaChanges {\n private _ecTypeName: string;\n private _schema: Schema;\n private _propertyValueChanges: PropertyValueChange[] = [];\n\n /**\n * Initializes a new BaseSchemaChanges instance.\n * @param schema The schema containing the changes.\n * @param anyECTypeName The name of the EC type.\n */\n constructor(schema: Schema, anyECTypeName: string) {\n this._schema = schema;\n this._ecTypeName = anyECTypeName;\n }\n\n /** Gets the array of PropertyValueChange instances. */\n public get propertyValueChanges(): PropertyValueChange[] {\n return this._propertyValueChanges;\n }\n\n /** Gets the name of the EC type associated with these schema changes. */\n public get ecTypeName(): string {\n return this._ecTypeName;\n }\n\n /** Gets the schema to which these changes are associated. */\n public get schema(): Schema {\n return this._schema;\n }\n\n /**\n * Adds a new ISchemaChange to a collection determined by the implementation.\n * @param change\n */\n public abstract addChange(change: ISchemaChange): void;\n\n /**\n * Helper method that adds a new ISchemaChange to a Map whose values are ISchemaChanges. The changesType will\n * be used to create a new ISchemaChanges instance if the changes collection does not exist in the Map.\n * @param changes The ISchemaChanges Map to which to add the ISchemaChange.\n * @param changesType The constructor of the ISchemaChanges. Called if the ISchemaChanges instance does not exist in the Map.\n * @param change The ISchemaChange to add.\n * @param changeKey The key used to identify the ISchemaChanges in the Map (typically the name of the EC type, ie. SchemaItem.name).\n */\n protected addChangeToMap<V extends ISchemaChanges>(changes: Map<string, V>, changesType: SchemaChangesConstructor, change: ISchemaChange, changeKey: string) {\n if (changes.has(changeKey)) {\n const existingChanges = changes.get(changeKey);\n existingChanges!.addChange(change);\n } else {\n const newChanges = new changesType(this._schema, changeKey);\n newChanges.addChange(change);\n changes.set(changeKey, newChanges as V);\n }\n }\n\n /**\n * Helper method to determine if the diagnostic is a property value change delta for this ISchemaChanges instance.\n * @param diagnostic The change diagnostic.\n * @param ecTypeName The name of the EC type as determined by the implementation.\n */\n protected isPropertyValueChangeForThis(diagnostic: AnyDiagnostic, ecTypeName: string): boolean {\n if (this.ecTypeName !== ecTypeName)\n return false;\n\n switch (diagnostic.code) {\n case SchemaCompareCodes.SchemaDelta:\n case SchemaCompareCodes.SchemaItemDelta:\n case SchemaCompareCodes.ClassDelta:\n case SchemaCompareCodes.MixinDelta:\n case SchemaCompareCodes.RelationshipDelta:\n case SchemaCompareCodes.CustomAttributeClassDelta:\n case SchemaCompareCodes.EnumerationDelta:\n case SchemaCompareCodes.KoqDelta:\n case SchemaCompareCodes.PropertyCategoryDelta:\n case SchemaCompareCodes.FormatDelta:\n case SchemaCompareCodes.UnitDelta:\n case SchemaCompareCodes.InvertedUnitDelta:\n case SchemaCompareCodes.PhenomenonDelta:\n case SchemaCompareCodes.ConstantDelta:\n case SchemaCompareCodes.PropertyDelta:\n case SchemaCompareCodes.RelationshipConstraintDelta:\n return true;\n default:\n return false;\n }\n }\n\n /**\n * Helper method to determine if the diagnostic is a CustomAttributeInstance class change for this ISchemaChanges instance.\n * @param diagnostic The change diagnostic.\n * @param ecTypeName The name of the EC type as determined by the implementation.\n */\n protected isCAContainerChangeForThis(diagnostic: AnyDiagnostic, ecTypeName: string | undefined): boolean {\n if (this.ecTypeName !== ecTypeName)\n return false;\n\n return diagnostic.code === SchemaCompareCodes.CustomAttributeInstanceClassMissing;\n }\n}\n\n/**\n * An ISchemaChanges implementation for managing schema comparison diagnostics at the Schema level.\n * @alpha\n */\nexport class SchemaChanges extends BaseSchemaChanges {\n private _diagnostics: AnyDiagnostic[] = [];\n private _missingSchemaReferences: SchemaReferenceMissing[] = [];\n private _schemaReferenceDeltas: SchemaReferenceDelta[] = [];\n private _customAttributeChanges: Map<string, CustomAttributeContainerChanges> = new Map();\n private _classChanges: Map<string, ClassChanges> = new Map();\n private _entityClassChanges: Map<string, EntityClassChanges> = new Map();\n private _relationshipClassChanges: Map<string, RelationshipClassChanges> = new Map();\n private _schemaItemChanges: Map<string, SchemaItemChanges> = new Map();\n private _enumerationChanges: Map<string, EnumerationChanges> = new Map();\n private _kindOfQuantityChanges: Map<string, KindOfQuantityChanges> = new Map();\n private _formatChanges: Map<string, FormatChanges> = new Map();\n\n /**\n * Initializes a new SchemaChanges instance.\n * @param schema The schema containing the changes.\n */\n constructor(schema: Schema) {\n super(schema, schema.name);\n }\n\n /** Gets the MissingSchemaReferences collection. */\n public get missingSchemaReferences(): SchemaReferenceMissing[] { return this._missingSchemaReferences; }\n\n /** Gets the SchemaReferenceChange collection. */\n public get schemaReferenceDeltas(): SchemaReferenceDelta[] { return this._schemaReferenceDeltas; }\n\n /** Gets the CustomAttributeContainerChanges Map. */\n public get customAttributeChanges(): Map<string, CustomAttributeContainerChanges> { return this._customAttributeChanges; }\n\n /** Gets the ClassChanges Map. */\n public get classChanges(): Map<string, ClassChanges> { return this._classChanges; }\n\n /** Gets the EntityClassChanges Map. */\n public get entityClassChanges(): Map<string, EntityClassChanges> { return this._entityClassChanges; }\n\n /** Gets the RelationshipClassChanges Map. */\n public get relationshipClassChanges(): Map<string, RelationshipClassChanges> { return this._relationshipClassChanges; }\n\n /** Gets the SchemaItemChanges Map. */\n public get schemaItemChanges(): Map<string, SchemaItemChanges> { return this._schemaItemChanges; }\n\n /** Gets the EnumerationChanges Map. */\n public get enumerationChanges(): Map<string, EnumerationChanges> { return this._enumerationChanges; }\n\n /** Gets the KindOfQuantityChanges Map. */\n public get kindOfQuantityChanges(): Map<string, KindOfQuantityChanges> { return this._kindOfQuantityChanges; }\n\n /** Gets the FormatChanges Map. */\n public get formatChanges(): Map<string, FormatChanges> { return this._formatChanges; }\n\n /** Gets all the change diagnostics that have been added to instance. */\n public get allDiagnostics(): AnyDiagnostic[] {\n return this._diagnostics;\n }\n\n /**\n * Adds a new change diagnostic for the schema.\n * @param diagnostic\n */\n public addDiagnostic(diagnostic: AnyDiagnostic) {\n this._diagnostics.push(diagnostic);\n\n const change = this.createChangeFromDiagnostic(diagnostic);\n this.addChange(change);\n }\n\n /**\n * Adds the change to the appropriate change collection at this level or adds the change\n * to a Map of child changes will which propagate the change to lower levels. Typically\n * any 'addChangeToMap' type method will then call addChange to add the ISchemaChange to\n * the ISchemaChanges instance at that level.\n * @param change The ISchemaChange to add.\n */\n public addChange(change: ISchemaChange) {\n const schemaName = this.getSchemaNameFromChange(change);\n\n // If change is at the schema level, record change and return\n if (schemaName) {\n if (change.diagnostic.code === SchemaCompareCodes.SchemaReferenceMissing) {\n this.missingSchemaReferences.push(change as SchemaReferenceMissing);\n return;\n }\n\n if (change.diagnostic.code === SchemaCompareCodes.SchemaReferenceDelta) {\n this.schemaReferenceDeltas.push(change as SchemaReferenceDelta);\n return;\n }\n\n if (this.isCAContainerChangeForThis(change.diagnostic, schemaName)) {\n this.addChangeToMap(this.customAttributeChanges, CustomAttributeContainerChanges, change, (change as CustomAttributeContainerChange).changeKey);\n return;\n }\n\n if (this.isPropertyValueChangeForThis(change.diagnostic, schemaName)) {\n this.propertyValueChanges.push(change as PropertyValueChange);\n return;\n }\n }\n\n // Start by adding the change for the top-level SchemaItem which will\n // start a recursion to add the change at each appropriate level.\n const schemaItem = change.topLevelSchemaItem;\n const schemaItemType = (schemaItem as SchemaItem).schemaItemType;\n\n switch (schemaItemType) {\n case SchemaItemType.Mixin:\n case SchemaItemType.StructClass:\n case SchemaItemType.CustomAttributeClass:\n this.addChangeToClassMap(change, schemaItem as AnyClass);\n return;\n case SchemaItemType.EntityClass:\n this.addChangeToEntityClassMap(change, schemaItem as EntityClass);\n return;\n case SchemaItemType.RelationshipClass:\n this.addChangeToRelationshipClassMap(change, schemaItem as RelationshipClass);\n return;\n case SchemaItemType.PropertyCategory:\n case SchemaItemType.Unit:\n case SchemaItemType.InvertedUnit:\n case SchemaItemType.UnitSystem:\n case SchemaItemType.Phenomenon:\n case SchemaItemType.Constant:\n this.addChangeToSchemaItemMap(change, schemaItem as SchemaItem);\n return;\n case SchemaItemType.Enumeration:\n this.addChangeToEnumerationMap(change, schemaItem as Enumeration);\n return;\n case SchemaItemType.KindOfQuantity:\n this.addChangeToKOQMap(change, schemaItem as KindOfQuantity);\n return;\n case SchemaItemType.Format:\n this.addChangeToFormatMap(change, schemaItem as Format);\n return;\n }\n }\n\n private getSchemaNameFromChange(change: ISchemaChange): string | undefined {\n const type = change.diagnostic.ecDefinition;\n\n return (Schema.isSchema(type)) ? type.name : undefined;\n }\n\n /** This creates ISchemaChange instances based on the change diagnostic specified. */\n private createChangeFromDiagnostic(diagnostic: AnyDiagnostic): ISchemaChange {\n switch (diagnostic.code) {\n case SchemaCompareCodes.SchemaReferenceMissing:\n return new SchemaReferenceMissing(diagnostic);\n case SchemaCompareCodes.SchemaReferenceDelta:\n return new SchemaReferenceDelta(diagnostic);\n case SchemaCompareCodes.SchemaDelta:\n case SchemaCompareCodes.SchemaItemDelta:\n case SchemaCompareCodes.ClassDelta:\n case SchemaCompareCodes.MixinDelta:\n case SchemaCompareCodes.RelationshipDelta:\n case SchemaCompareCodes.CustomAttributeClassDelta:\n case SchemaCompareCodes.EnumerationDelta:\n case SchemaCompareCodes.KoqDelta:\n case SchemaCompareCodes.PropertyCategoryDelta:\n case SchemaCompareCodes.FormatDelta:\n case SchemaCompareCodes.UnitDelta:\n case SchemaCompareCodes.InvertedUnitDelta:\n case SchemaCompareCodes.PhenomenonDelta:\n case SchemaCompareCodes.ConstantDelta:\n case SchemaCompareCodes.PropertyDelta:\n case SchemaCompareCodes.RelationshipConstraintDelta:\n return new PropertyValueChange(diagnostic);\n case SchemaCompareCodes.SchemaItemMissing:\n return new SchemaItemMissing(diagnostic);\n case SchemaCompareCodes.BaseClassDelta:\n return new BaseClassDelta(diagnostic);\n case SchemaCompareCodes.PropertyMissing:\n return new PropertyMissing(diagnostic);\n case SchemaCompareCodes.EntityMixinMissing:\n return new EntityMixinChange(diagnostic);\n case SchemaCompareCodes.RelationshipConstraintClassMissing:\n return new RelationshipConstraintClassChange(diagnostic);\n case SchemaCompareCodes.CustomAttributeInstanceClassMissing:\n return new CustomAttributeContainerChange(diagnostic);\n case SchemaCompareCodes.EnumeratorMissing:\n return new EnumeratorMissing(diagnostic);\n case SchemaCompareCodes.EnumeratorDelta:\n return new EnumeratorDelta(diagnostic);\n case SchemaCompareCodes.PresentationUnitMissing:\n return new PresentationUnitChange(diagnostic);\n case SchemaCompareCodes.FormatUnitMissing:\n return new FormatUnitChange(diagnostic);\n case SchemaCompareCodes.UnitLabelOverrideDelta:\n return new UnitLabelOverrideDelta(diagnostic);\n default:\n throw new Error();\n }\n }\n\n private addChangeToSchemaItemMap(change: ISchemaChange, schemaItem: SchemaItem) {\n if (this.schemaItemChanges.has(schemaItem.name)) {\n const existingChanges = this.schemaItemChanges.get(schemaItem.name);\n existingChanges!.addChange(change);\n } else {\n const newChanges = new SchemaItemChanges(this.schema, schemaItem.name, schemaItem.schemaItemType);\n newChanges.addChange(change);\n this.schemaItemChanges.set(schemaItem.name, newChanges);\n }\n }\n\n private addChangeToClassMap(change: ISchemaChange, ecClass: AnyClass) {\n if (this.classChanges.has(ecClass.name)) {\n const existingChanges = this.classChanges.get(ecClass.name);\n existingChanges!.addChange(change);\n } else {\n const newChanges = new ClassChanges(this.schema, ecClass.name, ecClass.schemaItemType);\n newChanges.addChange(change);\n this.classChanges.set(ecClass.name, newChanges);\n }\n }\n\n private addChangeToEntityClassMap(change: ISchemaChange, ecClass: EntityClass) {\n if (this.entityClassChanges.has(ecClass.name)) {\n const existingChanges = this.entityClassChanges.get(ecClass.name);\n existingChanges!.addChange(change);\n } else {\n const newChanges = new EntityClassChanges(this.schema, ecClass.name, ecClass.schemaItemType);\n newChanges.addChange(change);\n this.entityClassChanges.set(ecClass.name, newChanges);\n }\n }\n\n private addChangeToRelationshipClassMap(change: ISchemaChange, ecClass: RelationshipClass) {\n if (this.relationshipClassChanges.has(ecClass.name)) {\n const existingChanges = this.relationshipClassChanges.get(ecClass.name);\n existingChanges!.addChange(change);\n } else {\n const newChanges = new RelationshipClassChanges(this.schema, ecClass.name, ecClass.schemaItemType);\n newChanges.addChange(change);\n this.relationshipClassChanges.set(ecClass.name, newChanges);\n }\n }\n\n private addChangeToEnumerationMap(change: ISchemaChange, enumeration: Enumeration) {\n if (this.enumerationChanges.has(enumeration.name)) {\n const existingChanges = this.enumerationChanges.get(enumeration.name);\n existingChanges!.addChange(change);\n } else {\n const newChanges = new EnumerationChanges(this.schema, enumeration.name, enumeration.schemaItemType);\n newChanges.addChange(change);\n this.enumerationChanges.set(enumeration.name, newChanges);\n }\n }\n\n private addChangeToKOQMap(change: ISchemaChange, koq: KindOfQuantity) {\n if (this.kindOfQuantityChanges.has(koq.name)) {\n const existingChanges = this.kindOfQuantityChanges.get(koq.name);\n existingChanges!.addChange(change);\n } else {\n const newChanges = new KindOfQuantityChanges(this.schema, koq.name, koq.schemaItemType);\n newChanges.addChange(change);\n this.kindOfQuantityChanges.set(koq.name, newChanges);\n }\n }\n\n private addChangeToFormatMap(change: ISchemaChange, format: Format) {\n if (this.formatChanges.has(format.name)) {\n const existingChanges = this.formatChanges.get(format.name);\n existingChanges!.addChange(change);\n } else {\n const newChanges = new FormatChanges(this.schema, format.name, format.schemaItemType);\n newChanges.addChange(change);\n this.formatChanges.set(format.name, newChanges);\n }\n }\n}\n\n/**\n * An ISchemaChanges implementation for managing schema comparison diagnostics at the SchemaItem level.\n * @alpha\n */\nexport class SchemaItemChanges extends BaseSchemaChanges {\n private _schemaItemType: SchemaItemType;\n private _schemaItemMissing?: SchemaItemMissing;\n\n /**\n * Initializes a new SchemaItemChanges instance.\n * @param schema The Schema containing the change.\n * @param schemaItemName The name of the EC type associated with the change.\n * @param schemaItemType The SchemaItemType of the EC type.\n */\n constructor(schema: Schema, schemaItemName: string, schemaItemType: SchemaItemType) {\n super(schema, schemaItemName);\n this._schemaItemType = schemaItemType;\n }\n\n /** Gets the SchemaItemType of the SchemaItem associated with the changes. */\n public get schemaItemType(): SchemaItemType {\n return this._schemaItemType;\n }\n\n /** Gets the SchemaItemMissing change. Maybe undefined. */\n public get schemaItemMissing(): SchemaItemMissing | undefined {\n return this._schemaItemMissing;\n }\n\n /**\n * Adds the change to the appropriate change collection at this level or adds the change\n * to a Map of child changes will which propagate the change to lower levels.\n * @param change The ISchemaChange to add.\n */\n public addChange(change: ISchemaChange): void {\n if (change.diagnostic.code === SchemaCompareCodes.SchemaItemMissing) {\n this._schemaItemMissing = change as SchemaItemMissing;\n return;\n }\n\n const name = this.getSchemaItemNameFromChange(change);\n if (!name)\n return;\n\n if (this.isPropertyValueChangeForThis(change.diagnostic, name)) {\n this.propertyValueChanges.push(change as PropertyValueChange);\n return;\n }\n }\n\n protected getSchemaItemNameFromChange(change: ISchemaChange): string | undefined {\n const type = change.diagnostic.ecDefinition;\n return (SchemaItem.isSchemaItem(type)) ? type.name : undefined;\n }\n}\n\n/**\n * An ISchemaChanges implementation for managing schema comparison diagnostics at the Class level.\n * @alpha\n */\nexport class ClassChanges extends SchemaItemChanges {\n private _baseClassDelta?: BaseClassDelta;\n private _propertyChanges: Map<string, PropertyChanges> = new Map();\n private _customAttributeChanges: Map<string, CustomAttributeContainerChanges> = new Map();\n\n /** Gets the BaseClassDelta change. Maybe undefined. */\n public get baseClassDelta(): BaseClassDelta | undefined {\n return this._baseClassDelta;\n }\n\n /** Gets the PropertyChanges Map. */\n public get propertyChanges(): Map<string, PropertyChanges> {\n return this._propertyChanges;\n }\n\n /** Gets the Map of CustomAttributeContainerChanges. */\n public get customAttributeChanges(): Map<string, CustomAttributeContainerChanges> {\n return this._customAttributeChanges;\n }\n\n /**\n * Adds the change to the appropriate change collection at this level or adds the change\n * to a Map of child changes will which propagate the change to lower levels.\n * @param change The ISchemaChange to add.\n */\n public override addChange(change: ISchemaChange): void {\n super.addChange(change);\n\n if (change.diagnostic.code === SchemaCompareCodes.BaseClassDelta) {\n this._baseClassDelta = change as BaseClassDelta;\n return;\n }\n\n if (Property.isProperty(change.diagnostic.ecDefinition)) {\n this.addChangeToMap(this.propertyChanges, PropertyChanges, change, change.diagnostic.ecDefinition.name);\n return;\n }\n\n if (this.isCAContainerChangeForThis(change.diagnostic, this.getSchemaItemNameFromChange(change))) {\n this.addChangeToMap(this.customAttributeChanges, CustomAttributeContainerChanges, change, (change as CustomAttributeContainerChange).changeKey);\n return;\n }\n }\n}\n\n/**\n * An ISchemaChanges implementation for managing schema comparison diagnostics at the Class level.\n * @alpha\n */\nexport class EntityClassChanges extends ClassChanges {\n private _entityMixinChanges: Map<string, EntityMixinChanges> = new Map();\n\n /** Gets the EntityMixinChanges Map. */\n public get entityMixinChanges(): Map<string, EntityMixinChanges> {\n return this._entityMixinChanges;\n }\n\n /**\n * Adds the change to the appropriate change collection at this level or adds the change\n * to a Map of child changes will which propagate the change to lower levels.\n * @param change The ISchemaChange to add.\n */\n public override addChange(change: ISchemaChange): void {\n super.addChange(change);\n\n if (change.diagnostic.code === SchemaCompareCodes.EntityMixinMissing) {\n this.addChangeToMap(this.entityMixinChanges, EntityMixinChanges, change, (change as EntityMixinChange).changeKey);\n return;\n }\n }\n}\n\n/**\n * An ISchemaChanges implementation for managing schema comparison diagnostics for RelationshipClasses.\n * @alpha\n */\nexport class RelationshipClassChanges extends ClassChanges {\n private _sourceConstraintChanges: Map<string, RelationshipConstraintChanges> = new Map();\n private _targetConstraintChanges: Map<string, RelationshipConstraintChanges> = new Map();\n\n /** Gets the source RelationshipConstraintChanges Map. */\n public get sourceConstraintChanges(): Map<string, RelationshipConstraintChanges> {\n return this._sourceConstraintChanges;\n }\n\n /** Gets the target RelationshipConstraintChanges Map. */\n public get targetConstraintChanges(): Map<string, RelationshipConstraintChanges> {\n return this._targetConstraintChanges;\n }\n\n /**\n * Adds the change to the appropriate change collection at this level or adds the change\n * to a Map of child changes will which propagate the change to lower levels.\n * @param change The ISchemaChange to add.\n */\n public override addChange(change: ISchemaChange): void {\n super.addChange(change);\n\n if (RelationshipConstraint.isRelationshipConstraint(change.diagnostic.ecDefinition)) {\n if (change.diagnostic.ecDefinition.isSource)\n this.addChangeToMap(this.sourceConstraintChanges, RelationshipConstraintChanges, change, change.diagnostic.ecDefinition.fullName);\n else\n this.addChangeToMap(this.targetConstraintChanges, RelationshipConstraintChanges, change, change.diagnostic.ecDefinition.fullName);\n }\n }\n}\n\n/**\n * An ISchemaChanges implementation for managing schema comparison diagnostics at the Property level.\n * @alpha\n */\nexport class PropertyChanges extends BaseSchemaChanges {\n private _propertyMissing?: PropertyMissing;\n private _customAttributeChanges: Map<string, CustomAttributeContainerChanges> = new Map();\n\n /** Gets the PropertyMissing change. Maybe undefined. */\n public get propertyMissing(): PropertyMissing | undefined {\n return this._propertyMissing;\n }\n\n /** Gets the CustomAttributeContainerChanges Map. */\n public get customAttributeChanges(): Map<string, CustomAttributeContainerChanges> {\n return this._customAttributeChanges;\n }\n\n /**\n * Adds the change to the appropriate change collection at this level or adds the change\n * to a Map of child changes will which propagate the change to lower levels.\n * @param change The ISchemaChange to add.\n */\n public addChange(change: ISchemaChange): void {\n const propertyName = this.getPropertyNameFromChange(change);\n if (!propertyName)\n return;\n\n if (change.diagnostic.code === SchemaCompareCodes.PropertyMissing) {\n this._propertyMissing = change as PropertyMissing;\n return;\n }\n\n if (this.isPropertyValueChangeForThis(change.diagnostic, propertyName)) {\n this.propertyValueChanges.push(change as PropertyValueChange);\n return;\n }\n\n if (this.isCAContainerChangeForThis(change.diagnostic, propertyName))\n this.addChangeToMap(this.customAttributeChanges, CustomAttributeContainerChanges, change, (change as CustomAttributeContainerChange).changeKey);\n }\n\n private getPropertyNameFromChange(change: ISchemaChange): string | undefined {\n const type = change.diagnostic.ecDefinition;\n return (Property.isProperty(type)) ? type.name : undefined;\n }\n}\n\n/**\n * An ISchemaChanges implementation for managing schema comparison diagnostics for Enumerations.\n * @alpha\n */\nexport class EnumerationChanges extends SchemaItemChanges {\n private _enumeratorChanges: Map<string, EnumeratorChanges> = new Map();\n\n /** Gets the EnumeratorChanges map. */\n public get enumeratorChanges(): Map<string, EnumeratorChanges> {\n return this._enumeratorChanges;\n }\n\n /**\n * Adds the change to the appropriate change collection at this level or adds the change\n * to a Map of child changes will which propagate the change to lower levels.\n * @param change The ISchemaChange to add.\n */\n public override addChange(change: ISchemaChange): void {\n super.addChange(change);\n\n if (change.diagnostic.code === SchemaCompareCodes.EnumeratorDelta) {\n this.addChangeToMap(this.enumeratorChanges, EnumeratorChanges, change, (change as EnumeratorDelta).changeKey);\n return;\n }\n\n if (change.diagnostic.code === SchemaCompareCodes.EnumeratorMissing) {\n this.addChangeToMap(this.enumeratorChanges, EnumeratorChanges, change, (change as EnumeratorMissing).changeKey);\n }\n }\n}\n\n/**\n * An ISchemaChanges implementation for managing schema comparison diagnostics for CustomAttributeContainers.\n * @alpha\n */\nexport class CustomAttributeContainerChanges extends BaseSchemaChanges {\n private _customAttributeChanges: CustomAttributeContainerChange[] = [];\n\n /** Gets the CustomAttributeContainerChange collection. */\n public get customAttributeChanges(): CustomAttributeContainerChange[] {\n return this._customAttributeChanges;\n }\n\n /**\n * Adds the change to the appropriate change collection at this level.\n * @param change The ISchemaChange to add.\n */\n public addChange(change: ISchemaChange): void {\n if (change.diagnostic.code === SchemaCompareCodes.CustomAttributeInstanceClassMissing)\n this.customAttributeChanges.push(change as CustomAttributeContainerChange);\n }\n}\n\n/**\n * An ISchemaChanges implementation for managing schema comparison diagnostics for RelationshipConstraints.\n * @alpha\n */\nexport class RelationshipConstraintChanges extends BaseSchemaChanges {\n private _constraintClassChanges: RelationshipConstraintClassChange[] = [];\n private _customAttributeChanges: Map<string, CustomAttributeContainerChanges> = new Map();\n\n /** Gets the RelationshipConstraintClassChange collection. */\n public get constraintClassChanges(): RelationshipConstraintClassChange[] {\n return this._constraintClassChanges;\n }\n\n /** Gets the CustomAttributeContainerChanges Map. */\n public get customAttributeChanges(): Map<string, CustomAttributeContainerChanges> {\n return this._customAttributeChanges;\n }\n\n /**\n * Adds the change to the appropriate change collection at this level or adds the change\n * to a Map of child changes will which propagate the change to lower levels.\n * @param change The ISchemaChange to add.\n */\n public addChange(change: ISchemaChange): void {\n const constraintName = this.getConstraintNameFromChange(change);\n if (!constraintName)\n return;\n\n if (this.isPropertyValueChangeForThis(change.diagnostic, constraintName)) {\n this.propertyValueChanges.push(change as PropertyValueChange);\n return;\n }\n\n if (change.diagnostic.code === SchemaCompareCodes.RelationshipConstraintClassMissing) {\n this.constraintClassChanges.push(change as RelationshipConstraintClassChange);\n return;\n }\n\n if (this.isCAContainerChangeForThis(change.diagnostic, constraintName))\n this.addChangeToMap(this.customAttributeChanges, CustomAttributeContainerChanges, change, (change as CustomAttributeContainerChange).changeKey);\n }\n\n private getConstraintNameFromChange(change: ISchemaChange): string | undefined {\n const type = change.diagnostic.ecDefinition;\n if (RelationshipConstraint.isRelationshipConstraint(type))\n return type.fullName;\n return undefined;\n }\n}\n\n/**\n * An ISchemaChanges implementation for managing schema comparison diagnostics for Enumerators.\n * @alpha\n */\nexport class EnumeratorChanges extends BaseSchemaChanges {\n private _enumeratorDeltas: EnumeratorDelta[] = [];\n private _enumeratorMissing?: EnumeratorMissing;\n\n /** Gets the EnumeratorDelta collection. */\n public get enumeratorDeltas(): EnumeratorDelta[] {\n return this._enumeratorDeltas;\n }\n\n /** Gets the EnumeratorMissing change. Maybe undefined. */\n public get enumeratorMissing(): EnumeratorMissing | undefined {\n return this._enumeratorMissing;\n }\n\n /**\n * Adds the change to the appropriate change collection.\n * @param change The ISchemaChange to add.\n */\n public addChange(change: ISchemaChange): void {\n if (change.diagnostic.code === SchemaCompareCodes.EnumeratorDelta) {\n this.enumeratorDeltas.push(change as EnumeratorDelta);\n return;\n }\n\n if (change.diagnostic.code === SchemaCompareCodes.EnumeratorMissing)\n this._enumeratorMissing = change as EnumeratorMissing;\n }\n}\n\n/**\n * An ISchemaChanges implementation for managing schema comparison diagnostics for EntityClass mixin changes.\n * @alpha\n */\nexport class EntityMixinChanges extends BaseSchemaChanges {\n private _entityMixinChange: EntityMixinChange[] = [];\n\n /** Gets the EntityMixinChange collection. */\n public get entityMixinChange(): EntityMixinChange[] {\n return this._entityMixinChange;\n }\n\n /**\n * Adds the change to the appropriate change collection.\n * @param change The ISchemaChange to add.\n */\n public addChange(change: ISchemaChange): void {\n if (change.diagnostic.code === SchemaCompareCodes.EntityMixinMissing)\n this.entityMixinChange.push(change as EntityMixinChange);\n }\n}\n\n/**\n * An ISchemaChanges implementation for managing schema comparison diagnostics for KindOfQuantities.\n * @alpha\n */\nexport class KindOfQuantityChanges extends SchemaItemChanges {\n private _presentationUnitChanges: Map<string, PresentationUnitChanges> = new Map();\n\n /** Gets the EntityMixinChange Map. */\n public get presentationUnitChanges(): Map<string, PresentationUnitChanges> {\n return this._presentationUnitChanges;\n }\n\n /**\n * Adds the change to the appropriate change collection.\n * @param change The ISchemaChange to add.\n */\n public override addChange(change: ISchemaChange): void {\n super.addChange(change);\n\n if (change.diagnostic.code === SchemaCompareCodes.PresentationUnitMissing)\n this.addChangeToMap(this.presentationUnitChanges, PresentationUnitChanges, change, (change as PresentationUnitChange).changeKey);\n }\n}\n\n/**\n * An ISchemaChanges implementation for managing schema comparison diagnostics for KindOfQuantity presentation units.\n * @alpha\n */\nexport class PresentationUnitChanges extends BaseSchemaChanges {\n private _presentationUnitChange: PresentationUnitChange[] = [];\n\n /** Gets the PresentationUnitChange collection. */\n public get presentationUnitChange(): PresentationUnitChange[] {\n return this._presentationUnitChange;\n }\n\n /**\n * Adds the change to the appropriate change collection.\n * @param change The ISchemaChange to add.\n */\n public addChange(change: ISchemaChange): void {\n if (change.diagnostic.code === SchemaCompareCodes.PresentationUnitMissing)\n this.presentationUnitChange.push(change as PresentationUnitChange);\n }\n}\n\n/**\n * An ISchemaChanges implementation for managing schema comparison diagnostics for Formats.\n * @alpha\n */\nexport class FormatChanges extends SchemaItemChanges {\n private _formatUnitChanges: Map<string, FormatUnitChanges> = new Map();\n\n /** Gets the FormatUnitChanges collection. */\n public get formatUnitChanges(): Map<string, FormatUnitChanges> {\n return this._formatUnitChanges;\n }\n\n /**\n * Adds the change to the appropriate change collection.\n * @param change The ISchemaChange to add.\n */\n public override addChange(change: ISchemaChange): void {\n super.addChange(change);\n\n if (change.diagnostic.code === SchemaCompareCodes.UnitLabelOverrideDelta) {\n this.addChangeToMap(this.formatUnitChanges, FormatUnitChanges, change, (change as UnitLabelOverrideDelta).changeKey);\n return;\n }\n\n if (change.diagnostic.code === SchemaCompareCodes.FormatUnitMissing)\n this.addChangeToMap(this.formatUnitChanges, FormatUnitChanges, change, (change as FormatUnitChange).changeKey);\n }\n}\n\n/**\n * An ISchemaChanges implementation for managing schema comparison diagnostics for Format units.\n * @alpha\n */\nexport class FormatUnitChanges extends BaseSchemaChanges {\n private _unitLabelOverrideDeltas: UnitLabelOverrideDelta[] = [];\n private _formatUnitChanges: FormatUnitChange[] = [];\n\n /** Gets the UnitLabelOverrideDelta collection. */\n public get unitLabelOverrideDeltas(): UnitLabelOverrideDelta[] {\n return this._unitLabelOverrideDeltas;\n }\n\n /** Gets the FormatUnitChange collection. */\n public get formatUnitChanges(): FormatUnitChange[] {\n return this._formatUnitChanges;\n }\n\n /**\n * Adds the change to the appropriate change collection.\n * @param change The ISchemaChange to add.\n */\n public addChange(change: ISchemaChange): void {\n if (change.diagnostic.code === SchemaCompareCodes.UnitLabelOverrideDelta) {\n this.unitLabelOverrideDeltas.push(change as UnitLabelOverrideDelta);\n return;\n }\n\n if (change.diagnostic.code === SchemaCompareCodes.FormatUnitMissing)\n this.formatUnitChanges.push(change as FormatUnitChange);\n }\n}\n\n/** ISchemaChange Implementations */\n\n/**\n * An ISchemaChange implementation to act as the base class for all changes\n * associated with SchemaItem instances.\n * @alpha\n */\nexport abstract class SchemaItemChange extends BaseSchemaChange {\n public get topLevelSchemaItem(): Schema | SchemaItem { return this.diagnostic.ecDefinition as SchemaItem; }\n}\n\n/**\n * An ISchemaChange implementation for Schema reference changes.\n * @alpha\n */\nexport class SchemaReferenceMissing extends BaseSchemaChange {\n /** Gets the default ChangeType (Delta or Missing) for this change */\n public get defaultChangeType(): ChangeType { return ChangeType.Missing; }\n\n /** Gets the SchemaItem or Schema (if a schema change) that this change ultimately belongs to. */\n public get topLevelSchemaItem(): Schema | SchemaItem { return this.diagnostic.ecDefinition as Schema; }\n\n /** Gets a string representation of the change. */\n public toString(): string {\n const refSchema = this.getNameFromArgument(0, false, true);\n return `Schema(${refSchema})`;\n }\n}\n\n/**\n * An ISchemaChange implementation differences of baseClasses between two ECClasses.\n * @alpha\n */\nexport class SchemaReferenceDelta extends BaseSchemaChange {\n /** Gets the default ChangeType (Delta or Missing) for this change */\n public get defaultChangeType(): ChangeType { return ChangeType.Delta; }\n\n /** Gets the SchemaItem or Schema (if a schema change) that this change ultimately belongs to. */\n public get topLevelSchemaItem(): Schema | SchemaItem { return this.diagnostic.ecDefinition as Schema; }\n\n /** Gets a string representation of the change. */\n public toString(): string {\n const refSchema = this.getNameFromArgument(0, false, true);\n const versionA = this.getStringFromArgument(1);\n const versionB = this.getStringFromArgument(2);\n return `Schema(${refSchema}): ${versionA} -> ${versionB}`;\n }\n}\n\n/**\n * An ISchemaChange implementation for missing SchemaItems.\n * @alpha\n */\nexport class SchemaItemMissing extends SchemaItemChange {\n /** Gets the default ChangeType (Delta or Missing) for this change */\n public get defaultChangeType(): ChangeType { return ChangeType.Missing; }\n\n /** Gets a string representation of the change. */\n public toString(): string {\n const item = this.diagnostic.ecDefinition as SchemaItem;\n const typeName = ECClass.isECClass(item) ? \"Class\" : item.schemaItemType;\n return `${typeName}(${item.name})`;\n }\n}\n\n/**\n * An ISchemaChange implementation for changes in property values of any EC type.\n * @alpha\n */\nexport class PropertyValueChange extends BaseSchemaChange {\n\n /** Gets the SchemaItem that this change ultimately belongs to. */\n public get topLevelSchemaItem(): Schema | SchemaItem {\n if (SchemaItem.isSchemaItem(this.diagnostic.ecDefinition))\n return this.diagnostic.ecDefinition;\n\n if (Schema.isSchema(this.diagnostic.ecDefinition))\n return this.diagnostic.ecDefinition;\n\n if (Property.isProperty(this.diagnostic.ecDefinition))\n return this.diagnostic.ecDefinition.class;\n\n if (RelationshipConstraint.isRelationshipConstraint(this.diagnostic.ecDefinition))\n return this.diagnostic.ecDefinition.relationshipClass;\n\n throw new Error();\n }\n\n /** Gets the default ChangeType (Delta or Missing) for this change */\n public get defaultChangeType(): ChangeType { return ChangeType.Delta; }\n\n /** Gets a string representation of the change. */\n public toString(): string {\n let property = this.getStringFromArgument(0);\n // Capitalize property name\n property = property.charAt(0).toUpperCase() + property.slice(1);\n const valueA = this.getStringFromArgument(1);\n const valueB = this.getStringFromArgument(2);\n return `${property}: ${valueA} -> ${valueB}`;\n }\n}\n\n/**\n * An ISchemaChange implementation for missing CustomAttribute instances\n * for a given container.\n * @alpha\n */\nexport class CustomAttributeContainerChange extends BaseSchemaChange {\n /** Gets the default ChangeType (Delta or Missing) for this change */\n public get defaultChangeType(): ChangeType { return ChangeType.Missing; }\n\n /** Gets the SchemaItem that this change ultimately belongs to. */\n public get topLevelSchemaItem(): Schema | SchemaItem {\n if (SchemaItem.isSchemaItem(this.diagnostic.ecDefinition))\n return this.diagnostic.ecDefinition;\n\n if (Property.isProperty(this.diagnostic.ecDefinition))\n return this.diagnostic.ecDefinition.class;\n\n if (Schema.isSchema(this.diagnostic.ecDefinition))\n return this.diagnostic.ecDefinition;\n\n if (RelationshipConstraint.isRelationshipConstraint(this.diagnostic.ecDefinition))\n return this.diagnostic.ecDefinition.relationshipClass;\n\n throw new Error();\n }\n\n /** Gets the key to use in a Map of this type of ISchemaChange. */\n public get changeKey(): string {\n return (this.getValueFromArgument(0) as CustomAttribute).className;\n }\n\n /** Gets a string representation of the change. */\n public toString(): string {\n return `CustomAttribute: ${this.changeKey}`;\n }\n}\n\n/**\n * An ISchemaChange implementation differences of baseClasses between two ECClasses.\n * @alpha\n */\nexport class BaseClassDelta extends SchemaItemChange {\n /** Gets the default ChangeType (Delta or Missing) for this change */\n public get defaultChangeType(): ChangeType { return ChangeType.Delta; }\n\n /** Gets a string representation of the change. */\n public toString(): string {\n const classA = this.getNameFromArgument(0, true, true);\n const classB = this.getNameFromArgument(1, true, true);\n return `BaseClass: ${classA} -> ${classB}`;\n }\n}\n\n/**\n * An ISchemaChange implementation for missing properties.\n * @alpha\n */\nexport class PropertyMissing extends BaseSchemaChange {\n /** Gets the SchemaItem that this change ultimately belongs to. */\n public get topLevelSchemaItem(): Schema | SchemaItem {\n return (this.diagnostic.ecDefinition as Property).class;\n }\n\n /** Gets the default ChangeType (Delta or Missing) for this change */\n public get defaultChangeType(): ChangeType { return ChangeType.Missing; }\n\n /** Gets a string representation of the change. */\n public toString(): string {\n return `Property(${(this.diagnostic.ecDefinition as Property).name})`;\n }\n}\n\n/**\n * An ISchemaChange implementation for missing RelationshipConstraint classes.\n * @alpha\n */\nexport class RelationshipConstraintClassChange extends BaseSchemaChange {\n /** Gets the default ChangeType (Delta or Missing) for this change */\n public get defaultChangeType(): ChangeType { return ChangeType.Missing; }\n\n /** Gets the SchemaItem that this change ultimately belongs to. */\n public get topLevelSchemaItem(): Schema | SchemaItem {\n return (this.diagnostic.ecDefinition as RelationshipConstraint).relationshipClass;\n }\n\n /** Gets a string representation of the change. */\n public toString(): string {\n const constraintClass = this.getNameFromArgument(0, false, true);\n return `ConstraintClass: ${constraintClass}`;\n }\n}\n\n/**\n * An ISchemaChange implementation for differences of Enumerator properties.\n * @alpha\n */\nexport class EnumeratorDelta extends BaseSchemaChange {\n /** Gets the default ChangeType (Delta or Missing) for this change */\n public get defaultChangeType(): ChangeType { return ChangeType.Delta; }\n\n /** Gets the SchemaItem that this change ultimately belongs to. */\n public get topLevelSchemaItem(): Schema | SchemaItem {\n return this.diagnostic.ecDefinition as Enumeration;\n }\n\n /** Gets the key to use in a Map of this type of ISchemaChange. */\n public get changeKey(): string {\n const enumerator = this.getValueFromArgument(0) as AnyEnumerator;\n return enumerator.name;\n }\n\n /** Gets a string representation of the change. */\n public toString(): string {\n let propertyName = this.getStringFromArgument(1);\n // Capitalize property name\n propertyName = propertyName.charAt(0).toUpperCase() + propertyName.slice(1);\n const valueA = this.getStringFromArgument(2);\n const valueB = this.getStringFromArgument(3);\n return `${propertyName}: ${valueA} -> ${valueB}`;\n }\n}\n\n/**\n * An ISchemaChange implementation for missing Enumerators within an Enumeration.\n * @alpha\n */\nexport class EnumeratorMissing extends BaseSchemaChange {\n /** Gets the default ChangeType (Delta or Missing) for this change */\n public get defaultChangeType(): ChangeType { return ChangeType.Missing; }\n\n /** Gets the SchemaItem that this change ultimately belongs to. */\n public get topLevelSchemaItem(): Schema | SchemaItem {\n return this.diagnostic.ecDefinition as Enumeration;\n }\n\n /** Gets the key to use in a Map of this type of ISchemaChange. */\n public get changeKey(): string {\n return (this.getValueFromArgument(0) as AnyEnumerator).name;\n }\n\n /** Gets a string representation of the change. */\n public toString(): string {\n return `Enumerator(${this.changeKey})`;\n }\n}\n\n/**\n * An ISchemaChange implementation for missing mixins within an EntityClass.\n * @alpha\n */\nexport class EntityMixinChange extends BaseSchemaChange {\n /** Gets the default ChangeType (Delta or Missing) for this change */\n public get defaultChangeType(): ChangeType { return ChangeType.Missing; }\n\n /** Gets the SchemaItem that this change ultimately belongs to. */\n public get topLevelSchemaItem(): Schema | SchemaItem {\n return this.diagnostic.ecDefinition as EntityClass;\n }\n\n /** Gets the key to use in a Map of this type of ISchemaChange. */\n public get changeKey(): string {\n return this.getNameFromArgument(0, false, true);\n }\n\n /** Gets a string representation of the change. */\n public toString(): string {\n return `Mixin: ${this.changeKey}`;\n }\n}\n\n/**\n * An ISchemaChange implementation for missing presentation Units within a KindOfQuantity.\n * @alpha\n */\nexport class PresentationUnitChange extends BaseSchemaChange {\n /** Gets the default ChangeType (Delta or Missing) for this change */\n public get defaultChangeType(): ChangeType { return ChangeType.Missing; }\n\n /** Gets the SchemaItem that this change ultimately belongs to. */\n public get topLevelSchemaItem(): Schema | SchemaItem {\n return this.diagnostic.ecDefinition as KindOfQuantity;\n }\n\n /** Gets the key to use in a Map of this type of ISchemaChange. */\n public get changeKey(): string {\n return this.getNameFromArgument(0, false, true);\n }\n\n /** Gets a string representation of the change. */\n public toString(): string {\n return `Unit: ${this.changeKey}`;\n }\n\n private get _isOverrideFormat(): boolean {\n if (!this.diagnostic.messageArgs)\n return false;\n\n return OverrideFormat.isOverrideFormat(this.diagnostic.messageArgs[0]);\n }\n}\n\n/**\n * An ISchemaChange implementation for missing Units within a Format.\n * @alpha\n */\nexport class FormatUnitChange extends BaseSchemaChange {\n /** Gets the default ChangeType (Delta or Missing) for this change */\n public get defaultChangeType(): ChangeType { return ChangeType.Missing; }\n\n /** Gets the SchemaItem that this change ultimately belongs to. */\n public get topLevelSchemaItem(): Schema | SchemaItem {\n return this.diagnostic.ecDefinition as Format;\n }\n\n /** Gets the key to use in a Map of this type of ISchemaChange. */\n public get changeKey(): string {\n return this.getNameFromArgument(0, false, true);\n }\n\n /** Gets a string representation of the change. */\n public toString(): string {\n return `Unit: ${this.changeKey}, label: ${this.getStringFromArgument(1)}`;\n }\n\n private get _isInvertedUnit(): boolean {\n if (!this.diagnostic.messageArgs)\n return false;\n\n return this.diagnostic.messageArgs[0].schemaItemType === SchemaItemType.InvertedUnit;\n }\n}\n\n/**\n * An ISchemaChange implementation for differences of Unit label overrides within a given Format.\n * @alpha\n */\nexport class UnitLabelOverrideDelta extends BaseSchemaChange {\n /** Gets the default ChangeType (Delta or Missing) for this change */\n public get defaultChangeType(): ChangeType { return ChangeType.Delta; }\n\n /** Gets the SchemaItem that this change ultimately belongs to. */\n public get topLevelSchemaItem(): Schema | SchemaItem {\n return this.diagnostic.ecDefinition as Format;\n }\n\n /** Gets the key to use in a Map of this type of ISchemaChange. */\n public get changeKey(): string {\n return this.getNameFromArgument(0, false, true);\n }\n\n /** Gets a string representation of the change. */\n public toString(): string {\n const valueA = this.getStringFromArgument(1);\n const valueB = this.getStringFromArgument(2);\n return `Label: ${valueA} -> ${valueB}`;\n }\n\n private get _isInvertedUnit(): boolean {\n if (!this.diagnostic.messageArgs)\n return false;\n\n return this.diagnostic.messageArgs[0].schemaItemType === SchemaItemType.InvertedUnit;\n }\n}\n"]}