@itwin/imodel-transformer 2.0.0-dev.34 → 2.0.0-dev.35

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 (48) hide show
  1. package/lib/cjs/ElementAspectCleanup.d.ts +16 -0
  2. package/lib/cjs/ElementAspectCleanup.d.ts.map +1 -0
  3. package/lib/cjs/ElementAspectCleanup.js +83 -0
  4. package/lib/cjs/ElementAspectCleanup.js.map +1 -0
  5. package/lib/cjs/ElementAspectExportCoordinator.d.ts +44 -0
  6. package/lib/cjs/ElementAspectExportCoordinator.d.ts.map +1 -0
  7. package/lib/cjs/ElementAspectExportCoordinator.js +148 -0
  8. package/lib/cjs/ElementAspectExportCoordinator.js.map +1 -0
  9. package/lib/cjs/ElementAspectExportProcessor.d.ts +55 -0
  10. package/lib/cjs/ElementAspectExportProcessor.d.ts.map +1 -0
  11. package/lib/cjs/ElementAspectExportProcessor.js +186 -0
  12. package/lib/cjs/ElementAspectExportProcessor.js.map +1 -0
  13. package/lib/cjs/IModelCloneContext.d.ts.map +1 -1
  14. package/lib/cjs/IModelCloneContext.js +2 -1
  15. package/lib/cjs/IModelCloneContext.js.map +1 -1
  16. package/lib/cjs/IModelExporter.d.ts +48 -10
  17. package/lib/cjs/IModelExporter.d.ts.map +1 -1
  18. package/lib/cjs/IModelExporter.js +368 -41
  19. package/lib/cjs/IModelExporter.js.map +1 -1
  20. package/lib/cjs/IModelImporter.d.ts +6 -0
  21. package/lib/cjs/IModelImporter.d.ts.map +1 -1
  22. package/lib/cjs/IModelImporter.js +9 -0
  23. package/lib/cjs/IModelImporter.js.map +1 -1
  24. package/lib/cjs/IModelTransformer.d.ts +2 -0
  25. package/lib/cjs/IModelTransformer.d.ts.map +1 -1
  26. package/lib/cjs/IModelTransformer.js +40 -19
  27. package/lib/cjs/IModelTransformer.js.map +1 -1
  28. package/lib/cjs/IModelTransformerError.d.ts +2 -0
  29. package/lib/cjs/IModelTransformerError.d.ts.map +1 -1
  30. package/lib/cjs/IModelTransformerError.js +2 -0
  31. package/lib/cjs/IModelTransformerError.js.map +1 -1
  32. package/lib/cjs/imodel-transformer.d.ts +9 -1
  33. package/lib/cjs/imodel-transformer.d.ts.map +1 -1
  34. package/lib/cjs/imodel-transformer.js +9 -1
  35. package/lib/cjs/imodel-transformer.js.map +1 -1
  36. package/package.json +1 -1
  37. package/lib/cjs/DetachedExportElementAspectsStrategy.d.ts +0 -16
  38. package/lib/cjs/DetachedExportElementAspectsStrategy.d.ts.map +0 -1
  39. package/lib/cjs/DetachedExportElementAspectsStrategy.js +0 -108
  40. package/lib/cjs/DetachedExportElementAspectsStrategy.js.map +0 -1
  41. package/lib/cjs/ExportElementAspectsStrategy.d.ts +0 -35
  42. package/lib/cjs/ExportElementAspectsStrategy.d.ts.map +0 -1
  43. package/lib/cjs/ExportElementAspectsStrategy.js +0 -52
  44. package/lib/cjs/ExportElementAspectsStrategy.js.map +0 -1
  45. package/lib/cjs/ExportElementAspectsWithElementsStrategy.d.ts +0 -12
  46. package/lib/cjs/ExportElementAspectsWithElementsStrategy.d.ts.map +0 -1
  47. package/lib/cjs/ExportElementAspectsWithElementsStrategy.js +0 -48
  48. package/lib/cjs/ExportElementAspectsWithElementsStrategy.js.map +0 -1
@@ -6,6 +6,8 @@ export declare const IModelTransformerErrorScope = "@itwin/imodel-transformer";
6
6
  * @beta
7
7
  */
8
8
  export declare enum IModelTransformerError {
9
+ /** An ElementAspect change requires its owning element identifier. */
10
+ AspectOwnerRequired = "aspect-owner-required",
9
11
  /** Required changed-instance metadata is missing. */
10
12
  ChangedInstanceMetadataMissing = "changed-instance-metadata-missing",
11
13
  /** A required changeset index is unavailable. */
@@ -1 +1 @@
1
- {"version":3,"file":"IModelTransformerError.d.ts","sourceRoot":"","sources":["../../src/IModelTransformerError.ts"],"names":[],"mappings":"AAKA;;GAEG;AAEH,eAAO,MAAM,2BAA2B,8BAA8B,CAAC;AAEvE;;GAEG;AACH,oBAAY,sBAAsB;I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"file":"IModelTransformerError.d.ts","sourceRoot":"","sources":["../../src/IModelTransformerError.ts"],"names":[],"mappings":"AAKA;;GAEG;AAEH,eAAO,MAAM,2BAA2B,8BAA8B,CAAC;AAEvE;;GAEG;AACH,oBAAY,sBAAsB;IAChC,sEAAsE;IACtE,mBAAmB,0BAA0B;IAC7C,qDAAqD;IACrD,8BAA8B,sCAAsC;IACpE,iDAAiD;IACjD,yBAAyB,gCAAgC;IACzD,oFAAoF;IACpF,iBAAiB,uBAAuB;IACxC,mDAAmD;IACnD,wBAAwB,+BAA+B;IACvD,iEAAiE;IACjE,yBAAyB,gCAAgC;IACzD,iDAAiD;IACjD,gBAAgB,wBAAwB;IACxC,+DAA+D;IAC/D,uBAAuB,+BAA+B;IACtD,sDAAsD;IACtD,iBAAiB,wBAAwB;IACzC,qDAAqD;IACrD,8BAA8B,sCAAsC;IACpE,6CAA6C;IAC7C,0BAA0B,kCAAkC;IAC5D,8DAA8D;IAC9D,qCAAqC,6CAA6C;IAClF,wEAAwE;IACxE,kCAAkC,0CAA0C;IAC5E,uFAAuF;IACvF,sBAAsB,4BAA4B;IAClD,sEAAsE;IACtE,sBAAsB,6BAA6B;IACnD,uCAAuC;IACvC,WAAW,iBAAiB;IAC5B,6DAA6D;IAC7D,sBAAsB,6BAA6B;IACnD,gDAAgD;IAChD,cAAc,qBAAqB;IACnC,8CAA8C;IAC9C,kBAAkB,wBAAwB;IAC1C,6DAA6D;IAC7D,YAAY,kBAAkB;IAC9B,gDAAgD;IAChD,mBAAmB,0BAA0B;IAC7C,6DAA6D;IAC7D,uBAAuB,8BAA8B;IACrD,oEAAoE;IACpE,2BAA2B,kCAAkC;IAC7D,+CAA+C;IAC/C,yBAAyB,iCAAiC;IAC1D,2DAA2D;IAC3D,sBAAsB,6BAA6B;IACnD,kDAAkD;IAClD,8BAA8B,sCAAsC;IACpE,qDAAqD;IACrD,yBAAyB,iCAAiC;IAC1D,6CAA6C;IAC7C,gBAAgB,uBAAuB;IACvC,kEAAkE;IAClE,qBAAqB,6BAA6B;IAClD,sDAAsD;IACtD,2BAA2B,kCAAkC;IAC7D,0DAA0D;IAC1D,gCAAgC,wCAAwC;IACxE,uDAAuD;IACvD,6BAA6B,oCAAoC;IACjE,yDAAyD;IACzD,mBAAmB,2BAA2B;CAC/C"}
@@ -15,6 +15,8 @@ exports.IModelTransformerErrorScope = "@itwin/imodel-transformer";
15
15
  */
16
16
  var IModelTransformerError;
17
17
  (function (IModelTransformerError) {
18
+ /** An ElementAspect change requires its owning element identifier. */
19
+ IModelTransformerError["AspectOwnerRequired"] = "aspect-owner-required";
18
20
  /** Required changed-instance metadata is missing. */
19
21
  IModelTransformerError["ChangedInstanceMetadataMissing"] = "changed-instance-metadata-missing";
20
22
  /** A required changeset index is unavailable. */
@@ -1 +1 @@
1
- {"version":3,"file":"IModelTransformerError.js","sourceRoot":"","sources":["../../src/IModelTransformerError.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG;;GAEG;AACH,gEAAgE;AACnD,QAAA,2BAA2B,GAAG,2BAA2B,CAAC;AAEvE;;GAEG;AACH,IAAY,sBAiEX;AAjED,WAAY,sBAAsB;IAChC,qDAAqD;IACrD,8FAAoE,CAAA;IACpE,iDAAiD;IACjD,mFAAyD,CAAA;IACzD,oFAAoF;IACpF,kEAAwC,CAAA;IACxC,mDAAmD;IACnD,iFAAuD,CAAA;IACvD,iEAAiE;IACjE,mFAAyD,CAAA;IACzD,iDAAiD;IACjD,kEAAwC,CAAA;IACxC,+DAA+D;IAC/D,gFAAsD,CAAA;IACtD,sDAAsD;IACtD,mEAAyC,CAAA;IACzC,qDAAqD;IACrD,8FAAoE,CAAA;IACpE,6CAA6C;IAC7C,sFAA4D,CAAA;IAC5D,8DAA8D;IAC9D,4GAAkF,CAAA;IAClF,wEAAwE;IACxE,sGAA4E,CAAA;IAC5E,uFAAuF;IACvF,4EAAkD,CAAA;IAClD,sEAAsE;IACtE,6EAAmD,CAAA;IACnD,uCAAuC;IACvC,sDAA4B,CAAA;IAC5B,6DAA6D;IAC7D,6EAAmD,CAAA;IACnD,gDAAgD;IAChD,6DAAmC,CAAA;IACnC,8CAA8C;IAC9C,oEAA0C,CAAA;IAC1C,6DAA6D;IAC7D,wDAA8B,CAAA;IAC9B,gDAAgD;IAChD,uEAA6C,CAAA;IAC7C,6DAA6D;IAC7D,+EAAqD,CAAA;IACrD,oEAAoE;IACpE,uFAA6D,CAAA;IAC7D,+CAA+C;IAC/C,oFAA0D,CAAA;IAC1D,2DAA2D;IAC3D,6EAAmD,CAAA;IACnD,kDAAkD;IAClD,8FAAoE,CAAA;IACpE,qDAAqD;IACrD,oFAA0D,CAAA;IAC1D,6CAA6C;IAC7C,iEAAuC,CAAA;IACvC,kEAAkE;IAClE,4EAAkD,CAAA;IAClD,sDAAsD;IACtD,uFAA6D,CAAA;IAC7D,0DAA0D;IAC1D,kGAAwE,CAAA;IACxE,uDAAuD;IACvD,2FAAiE,CAAA;IACjE,yDAAyD;IACzD,wEAA8C,CAAA;AAChD,CAAC,EAjEW,sBAAsB,sCAAtB,sBAAsB,QAiEjC","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\n/** Scope shared by errors originating from `@itwin/imodel-transformer`.\n * @beta\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const IModelTransformerErrorScope = \"@itwin/imodel-transformer\";\n\n/** Errors originating from `@itwin/imodel-transformer`.\n * @beta\n */\nexport enum IModelTransformerError {\n /** Required changed-instance metadata is missing. */\n ChangedInstanceMetadataMissing = \"changed-instance-metadata-missing\",\n /** A required changeset index is unavailable. */\n ChangesetIndexUnavailable = \"changeset-index-unavailable\",\n /** A source entity contains a dangling reference rejected by transformer policy. */\n DanglingReference = \"dangling-reference\",\n /** A required dependency has no target mapping. */\n DependencyMappingMissing = \"dependency-mapping-missing\",\n /** The installed iTwin.js dependency version is incompatible. */\n DependencyVersionMismatch = \"dependency-version-mismatch\",\n /** A required edit transaction is not active. */\n EditTxnNotActive = \"edit-txn-not-active\",\n /** An element identifier cannot be preserved in the target. */\n ElementIdNotPreservable = \"element-id-not-preservable\",\n /** A required element identifier was not provided. */\n ElementIdRequired = \"element-id-required\",\n /** Exporting changes requires a briefcase iModel. */\n ExportChangesRequiresBriefcase = \"export-changes-requires-briefcase\",\n /** No export handler has been registered. */\n ExportHandlerNotRegistered = \"export-handler-not-registered\",\n /** A required geographic coordinate system is unavailable. */\n GeographicCoordinateSystemUnavailable = \"geographic-coordinate-system-unavailable\",\n /** Source and target geographic coordinate systems are incompatible. */\n GeographicCoordinateSystemMismatch = \"geographic-coordinate-system-mismatch\",\n /** Required geolocation data or an invertible geolocation transform is unavailable. */\n GeolocationUnavailable = \"geolocation-unavailable\",\n /** A custom importer option conflicts with the transformer option. */\n ImporterOptionMismatch = \"importer-option-mismatch\",\n /** A code is invalid or incomplete. */\n InvalidCode = \"invalid-code\",\n /** An entity reference has an unsupported representation. */\n InvalidEntityReference = \"invalid-entity-reference\",\n /** A model identifier is invalid or missing. */\n InvalidModelId = \"invalid-model-id\",\n /** A subcategory is invalid or incomplete. */\n InvalidSubCategory = \"invalid-subcategory\",\n /** The source iModel has no changesets or custom changes. */\n NoChangesets = \"no-changesets\",\n /** A required parent model was not provided. */\n ParentModelRequired = \"parent-model-required\",\n /** A provenance scope conflicts with existing provenance. */\n ProvenanceScopeConflict = \"provenance-scope-conflict\",\n /** The BisCore schema does not support required provenance data. */\n ProvenanceSchemaUnsupported = \"provenance-schema-unsupported\",\n /** A required relationship class is absent. */\n RelationshipClassNotFound = \"relationship-class-not-found\",\n /** A required relationship identifier was not provided. */\n RelationshipIdRequired = \"relationship-id-required\",\n /** Expected relationship provenance is absent. */\n RelationshipProvenanceNotFound = \"relationship-provenance-not-found\",\n /** The root subject cannot be processed directly. */\n RootSubjectNotProcessable = \"root-subject-not-processable\",\n /** A required schema could not be loaded. */\n SchemaLoadFailed = \"schema-load-failed\",\n /** Reverse synchronization requires a source edit transaction. */\n SourceEditTxnRequired = \"source-edit-txn-required\",\n /** The requested synchronization range is invalid. */\n SynchronizationRangeInvalid = \"synchronization-range-invalid\",\n /** The synchronization direction cannot be determined. */\n SynchronizationTypeNotDetermined = \"synchronization-type-not-determined\",\n /** The previous synchronization version is missing. */\n SynchronizationVersionMissing = \"synchronization-version-missing\",\n /** A required class is absent from the target iModel. */\n TargetClassNotFound = \"target-class-not-found\",\n}\n"]}
1
+ {"version":3,"file":"IModelTransformerError.js","sourceRoot":"","sources":["../../src/IModelTransformerError.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG;;GAEG;AACH,gEAAgE;AACnD,QAAA,2BAA2B,GAAG,2BAA2B,CAAC;AAEvE;;GAEG;AACH,IAAY,sBAmEX;AAnED,WAAY,sBAAsB;IAChC,sEAAsE;IACtE,uEAA6C,CAAA;IAC7C,qDAAqD;IACrD,8FAAoE,CAAA;IACpE,iDAAiD;IACjD,mFAAyD,CAAA;IACzD,oFAAoF;IACpF,kEAAwC,CAAA;IACxC,mDAAmD;IACnD,iFAAuD,CAAA;IACvD,iEAAiE;IACjE,mFAAyD,CAAA;IACzD,iDAAiD;IACjD,kEAAwC,CAAA;IACxC,+DAA+D;IAC/D,gFAAsD,CAAA;IACtD,sDAAsD;IACtD,mEAAyC,CAAA;IACzC,qDAAqD;IACrD,8FAAoE,CAAA;IACpE,6CAA6C;IAC7C,sFAA4D,CAAA;IAC5D,8DAA8D;IAC9D,4GAAkF,CAAA;IAClF,wEAAwE;IACxE,sGAA4E,CAAA;IAC5E,uFAAuF;IACvF,4EAAkD,CAAA;IAClD,sEAAsE;IACtE,6EAAmD,CAAA;IACnD,uCAAuC;IACvC,sDAA4B,CAAA;IAC5B,6DAA6D;IAC7D,6EAAmD,CAAA;IACnD,gDAAgD;IAChD,6DAAmC,CAAA;IACnC,8CAA8C;IAC9C,oEAA0C,CAAA;IAC1C,6DAA6D;IAC7D,wDAA8B,CAAA;IAC9B,gDAAgD;IAChD,uEAA6C,CAAA;IAC7C,6DAA6D;IAC7D,+EAAqD,CAAA;IACrD,oEAAoE;IACpE,uFAA6D,CAAA;IAC7D,+CAA+C;IAC/C,oFAA0D,CAAA;IAC1D,2DAA2D;IAC3D,6EAAmD,CAAA;IACnD,kDAAkD;IAClD,8FAAoE,CAAA;IACpE,qDAAqD;IACrD,oFAA0D,CAAA;IAC1D,6CAA6C;IAC7C,iEAAuC,CAAA;IACvC,kEAAkE;IAClE,4EAAkD,CAAA;IAClD,sDAAsD;IACtD,uFAA6D,CAAA;IAC7D,0DAA0D;IAC1D,kGAAwE,CAAA;IACxE,uDAAuD;IACvD,2FAAiE,CAAA;IACjE,yDAAyD;IACzD,wEAA8C,CAAA;AAChD,CAAC,EAnEW,sBAAsB,sCAAtB,sBAAsB,QAmEjC","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\n/** Scope shared by errors originating from `@itwin/imodel-transformer`.\n * @beta\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const IModelTransformerErrorScope = \"@itwin/imodel-transformer\";\n\n/** Errors originating from `@itwin/imodel-transformer`.\n * @beta\n */\nexport enum IModelTransformerError {\n /** An ElementAspect change requires its owning element identifier. */\n AspectOwnerRequired = \"aspect-owner-required\",\n /** Required changed-instance metadata is missing. */\n ChangedInstanceMetadataMissing = \"changed-instance-metadata-missing\",\n /** A required changeset index is unavailable. */\n ChangesetIndexUnavailable = \"changeset-index-unavailable\",\n /** A source entity contains a dangling reference rejected by transformer policy. */\n DanglingReference = \"dangling-reference\",\n /** A required dependency has no target mapping. */\n DependencyMappingMissing = \"dependency-mapping-missing\",\n /** The installed iTwin.js dependency version is incompatible. */\n DependencyVersionMismatch = \"dependency-version-mismatch\",\n /** A required edit transaction is not active. */\n EditTxnNotActive = \"edit-txn-not-active\",\n /** An element identifier cannot be preserved in the target. */\n ElementIdNotPreservable = \"element-id-not-preservable\",\n /** A required element identifier was not provided. */\n ElementIdRequired = \"element-id-required\",\n /** Exporting changes requires a briefcase iModel. */\n ExportChangesRequiresBriefcase = \"export-changes-requires-briefcase\",\n /** No export handler has been registered. */\n ExportHandlerNotRegistered = \"export-handler-not-registered\",\n /** A required geographic coordinate system is unavailable. */\n GeographicCoordinateSystemUnavailable = \"geographic-coordinate-system-unavailable\",\n /** Source and target geographic coordinate systems are incompatible. */\n GeographicCoordinateSystemMismatch = \"geographic-coordinate-system-mismatch\",\n /** Required geolocation data or an invertible geolocation transform is unavailable. */\n GeolocationUnavailable = \"geolocation-unavailable\",\n /** A custom importer option conflicts with the transformer option. */\n ImporterOptionMismatch = \"importer-option-mismatch\",\n /** A code is invalid or incomplete. */\n InvalidCode = \"invalid-code\",\n /** An entity reference has an unsupported representation. */\n InvalidEntityReference = \"invalid-entity-reference\",\n /** A model identifier is invalid or missing. */\n InvalidModelId = \"invalid-model-id\",\n /** A subcategory is invalid or incomplete. */\n InvalidSubCategory = \"invalid-subcategory\",\n /** The source iModel has no changesets or custom changes. */\n NoChangesets = \"no-changesets\",\n /** A required parent model was not provided. */\n ParentModelRequired = \"parent-model-required\",\n /** A provenance scope conflicts with existing provenance. */\n ProvenanceScopeConflict = \"provenance-scope-conflict\",\n /** The BisCore schema does not support required provenance data. */\n ProvenanceSchemaUnsupported = \"provenance-schema-unsupported\",\n /** A required relationship class is absent. */\n RelationshipClassNotFound = \"relationship-class-not-found\",\n /** A required relationship identifier was not provided. */\n RelationshipIdRequired = \"relationship-id-required\",\n /** Expected relationship provenance is absent. */\n RelationshipProvenanceNotFound = \"relationship-provenance-not-found\",\n /** The root subject cannot be processed directly. */\n RootSubjectNotProcessable = \"root-subject-not-processable\",\n /** A required schema could not be loaded. */\n SchemaLoadFailed = \"schema-load-failed\",\n /** Reverse synchronization requires a source edit transaction. */\n SourceEditTxnRequired = \"source-edit-txn-required\",\n /** The requested synchronization range is invalid. */\n SynchronizationRangeInvalid = \"synchronization-range-invalid\",\n /** The synchronization direction cannot be determined. */\n SynchronizationTypeNotDetermined = \"synchronization-type-not-determined\",\n /** The previous synchronization version is missing. */\n SynchronizationVersionMissing = \"synchronization-version-missing\",\n /** A required class is absent from the target iModel. */\n TargetClassNotFound = \"target-class-not-found\",\n}\n"]}
@@ -1,8 +1,8 @@
1
1
  export * from "./TransformerLoggerCategory";
2
- export * from "./IModelTransformerError";
3
2
  export * from "./IModelExporter";
4
3
  export * from "./IModelImporter";
5
4
  export * from "./IModelTransformer";
5
+ export * from "./IModelTransformerError";
6
6
  export * from "./BranchProvenanceInitializer";
7
7
  /** @docs-package-description
8
8
  * The @itwin/imodel-transformer package contains classes that [backend code]($docs/learning/backend/index.md) can use to
@@ -24,6 +24,14 @@ export * from "./BranchProvenanceInitializer";
24
24
  * @docs-group-description Logging
25
25
  * Logger categories used by this package.
26
26
  */
27
+ /**
28
+ * @docs-group-description ElementAspectExportCoordinator
29
+ * Internal coordination for scoped, owner-batched ElementAspect export.
30
+ */
31
+ /**
32
+ * @docs-group-description ElementAspectExportProcessor
33
+ * Internal source queries, filtering, and export callbacks for ElementAspects owned by accepted elements.
34
+ */
27
35
  /**
28
36
  * @docs-group-description IModelTransformerError
29
37
  * Stable identifiers for errors originating from this package.
@@ -1 +1 @@
1
- {"version":3,"file":"imodel-transformer.d.ts","sourceRoot":"","sources":["../../src/imodel-transformer.ts"],"names":[],"mappings":"AAIA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAyG9C;;;;;;GAMG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG"}
1
+ {"version":3,"file":"imodel-transformer.d.ts","sourceRoot":"","sources":["../../src/imodel-transformer.ts"],"names":[],"mappings":"AAIA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAyG9C;;;;;;GAMG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG"}
@@ -19,10 +19,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
19
19
  * See LICENSE.md in the project root for license terms and full copyright notice.
20
20
  *--------------------------------------------------------------------------------------------*/
21
21
  __exportStar(require("./TransformerLoggerCategory"), exports);
22
- __exportStar(require("./IModelTransformerError"), exports);
23
22
  __exportStar(require("./IModelExporter"), exports);
24
23
  __exportStar(require("./IModelImporter"), exports);
25
24
  __exportStar(require("./IModelTransformer"), exports);
25
+ __exportStar(require("./IModelTransformerError"), exports);
26
26
  __exportStar(require("./BranchProvenanceInitializer"), exports);
27
27
  const semver = require("semver");
28
28
  const core_bentley_1 = require("@itwin/core-bentley");
@@ -108,6 +108,14 @@ if (process.env[noStrictDepCheckEnvVar] !== "1" &&
108
108
  * @docs-group-description Logging
109
109
  * Logger categories used by this package.
110
110
  */
111
+ /**
112
+ * @docs-group-description ElementAspectExportCoordinator
113
+ * Internal coordination for scoped, owner-batched ElementAspect export.
114
+ */
115
+ /**
116
+ * @docs-group-description ElementAspectExportProcessor
117
+ * Internal source queries, filtering, and export callbacks for ElementAspects owned by accepted elements.
118
+ */
111
119
  /**
112
120
  * @docs-group-description IModelTransformerError
113
121
  * Stable identifiers for errors originating from this package.
@@ -1 +1 @@
1
- {"version":3,"file":"imodel-transformer.js","sourceRoot":"","sources":["../../src/imodel-transformer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;gGAGgG;AAChG,8DAA4C;AAC5C,2DAAyC;AACzC,mDAAiC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,CAAC,yBAAyB;aACtD;YACD,OAAO,EAAE,GAAG,SAAS,+CAA+C,iBAAiB,yCAAyC;SAC/H,CAAC,CAAC;IACL,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","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 *--------------------------------------------------------------------------------------------*/\nexport * from \"./TransformerLoggerCategory\";\nexport * from \"./IModelTransformerError\";\nexport * from \"./IModelExporter\";\nexport * from \"./IModelImporter\";\nexport * from \"./IModelTransformer\";\nexport * from \"./BranchProvenanceInitializer\";\n\nimport * as semver from \"semver\";\nimport { ITwinError } from \"@itwin/core-bentley\";\nimport { version as iTwinCoreBackendVersion } from \"@itwin/core-backend/package.json\";\nimport {\n IModelTransformerError,\n IModelTransformerErrorScope,\n} from \"./IModelTransformerError\";\nimport { transformerPackageMetadata } from \"./TransformerPackageMetadata\";\n\nconst {\n version: ourVersion,\n name: ourName,\n peerDependencies,\n} = transformerPackageMetadata;\n\nconst ourITwinCoreBackendDepRange = peerDependencies[\"@itwin/core-backend\"];\n\nconst noStrictDepCheckEnvVar = \"TRANSFORMER_NO_STRICT_DEP_CHECK\";\nconst suggestEnvVarName = \"SUGGEST_TRANSFORMER_VERSIONS\";\n\n// warn if using a prerelease or dev version\nif (semver.prerelease(iTwinCoreBackendVersion)) {\n // eslint-disable-next-line no-console\n console.warn(\n `Warning: dev version detected (${iTwinCoreBackendVersion}). ` +\n \"This version is most likely fine, but it may introduce new behavior that could cause \" +\n \"unexpected issues or changes in the transformer's functionality. Please proceed with caution.\"\n );\n}\n\nif (\n process.env[noStrictDepCheckEnvVar] !== \"1\" &&\n !semver.satisfies(iTwinCoreBackendVersion, ourITwinCoreBackendDepRange, {\n includePrerelease: true,\n })\n) {\n const errHeader =\n `${ourName}@${ourVersion} only supports @itwin/core-backend@${ourITwinCoreBackendDepRange}, ` +\n `but @itwin/core-backend${iTwinCoreBackendVersion} was resolved when looking for the peer dependency.\\n` +\n `If you know exactly what you are doing, you can disable this check by setting ${noStrictDepCheckEnvVar}=1 in the environment\\n`;\n\n if (process.env[suggestEnvVarName]) {\n // let's not import https except in this case\n // eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports\n const https = require(\"node:https\") as typeof import(\"node:https\");\n https.get(`https://registry.npmjs.org/${ourName}`, async (resp) => {\n const chunks: string[] = [];\n const packumentSrc = await new Promise<string>((r) =>\n resp\n .setEncoding(\"utf8\")\n .on(\"data\", (d) => chunks.push(d))\n .on(\"end\", () => r(chunks.join(\"\")))\n );\n interface PackumentSubset {\n versions: Record<\n string,\n {\n peerDependencies?: {\n \"@itwin/core-backend\": string; // eslint-disable-line @typescript-eslint/naming-convention\n };\n }\n >;\n }\n\n const packumentJson = JSON.parse(packumentSrc) as PackumentSubset;\n const isTaglessVersion = (version: string) => version.includes(\"-\");\n const latestFirstApplicableVersions = Object.entries(\n packumentJson.versions\n )\n .filter(([, v]) =>\n semver.satisfies(\n iTwinCoreBackendVersion,\n v.peerDependencies?.[\"@itwin/core-backend\"] ?? \"\"\n )\n )\n .map(([k]) => k)\n .filter(isTaglessVersion)\n .reverse();\n\n ITwinError.throwError({\n iTwinErrorId: {\n scope: IModelTransformerErrorScope,\n key: IModelTransformerError.DependencyVersionMismatch,\n },\n message: [\n errHeader,\n `You have ${suggestEnvVarName}=1 set in the environment, so we suggest one of the following versions.`,\n \"Be aware that older versions may be missing bug fixes.\",\n ...latestFirstApplicableVersions,\n ].join(\"\\n\"),\n });\n });\n } else {\n ITwinError.throwError({\n iTwinErrorId: {\n scope: IModelTransformerErrorScope,\n key: IModelTransformerError.DependencyVersionMismatch,\n },\n message: `${errHeader}You can rerun with the environment variable ${suggestEnvVarName}=1 to have this error suggest a version`,\n });\n }\n}\n\n/** @docs-package-description\n * The @itwin/imodel-transformer package contains classes that [backend code]($docs/learning/backend/index.md) can use to\n * traverse iModels, as well as *transform* an iModel into another existing or empty one, by exporting elements from one during\n * traversal and importing them into another.\n *\n * You can read further in [iModelTransformation and Data Exchange]($docs/learning/transformer/index.md) here.\n */\n/**\n * @docs-group-description iModels\n * Classes for working with [iModels]($docs/learning/iModels.md).\n * See [the learning article]($docs/learning/backend/index.md).\n */\n/**\n * @docs-group-description Utils\n * Miscellaneous utility classes.\n */\n/**\n * @docs-group-description Logging\n * Logger categories used by this package.\n */\n/**\n * @docs-group-description IModelTransformerError\n * Stable identifiers for errors originating from this package.\n */\n/**\n * @docs-group-description TransformerPackageMetadata\n * Internal metadata describing this package and its peer dependencies.\n */\n"]}
1
+ {"version":3,"file":"imodel-transformer.js","sourceRoot":"","sources":["../../src/imodel-transformer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;gGAGgG;AAChG,8DAA4C;AAC5C,mDAAiC;AACjC,mDAAiC;AACjC,sDAAoC;AACpC,2DAAyC;AACzC,gEAA8C;AAE9C,iCAAiC;AACjC,sDAAiD;AACjD,mEAAsF;AACtF,qEAGkC;AAClC,6EAA0E;AAE1E,MAAM,EACJ,OAAO,EAAE,UAAU,EACnB,IAAI,EAAE,OAAO,EACb,gBAAgB,GACjB,GAAG,uDAA0B,CAAC;AAE/B,MAAM,2BAA2B,GAAG,gBAAgB,CAAC,qBAAqB,CAAC,CAAC;AAE5E,MAAM,sBAAsB,GAAG,iCAAiC,CAAC;AACjE,MAAM,iBAAiB,GAAG,8BAA8B,CAAC;AAEzD,4CAA4C;AAC5C,IAAI,MAAM,CAAC,UAAU,CAAC,sBAAuB,CAAC,EAAE,CAAC;IAC/C,sCAAsC;IACtC,OAAO,CAAC,IAAI,CACV,kCAAkC,sBAAuB,KAAK;QAC5D,uFAAuF;QACvF,+FAA+F,CAClG,CAAC;AACJ,CAAC;AAED,IACE,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,KAAK,GAAG;IAC3C,C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AAC,qBAAqB,CAAC,IAAI,EAAE,CAClD,CACF;iBACA,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;iBACf,MAAM,CAAC,gBAAgB,CAAC;iBACxB,OAAO,EAAE,CAAC;YAEb,yBAAU,CAAC,UAAU,CAAC;gBACpB,YAAY,EAAE;oBACZ,KAAK,EAAE,oDAA2B;oBAClC,GAAG,EAAE,+CAAsB,CAAC,yBAAyB;iBACtD;gBACD,OAAO,EAAE;oBACP,SAAS;oBACT,YAAY,iBAAiB,yEAAyE;oBACtG,wDAAwD;oBACxD,GAAG,6BAA6B;iBACjC,CAAC,IAAI,CAAC,IAAI,CAAC;aACb,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;SAAM,CAAC;QACN,yBAAU,CAAC,UAAU,CAAC;YACpB,YAAY,EAAE;gBACZ,KAAK,EAAE,oDAA2B;gBAClC,GAAG,EAAE,+CAAsB,CAAC,yBAAyB;aACtD;YACD,OAAO,EAAE,GAAG,SAAS,+CAA+C,iBAAiB,yCAAyC;SAC/H,CAAC,CAAC;IACL,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","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 *--------------------------------------------------------------------------------------------*/\nexport * from \"./TransformerLoggerCategory\";\nexport * from \"./IModelExporter\";\nexport * from \"./IModelImporter\";\nexport * from \"./IModelTransformer\";\nexport * from \"./IModelTransformerError\";\nexport * from \"./BranchProvenanceInitializer\";\n\nimport * as semver from \"semver\";\nimport { ITwinError } from \"@itwin/core-bentley\";\nimport { version as iTwinCoreBackendVersion } from \"@itwin/core-backend/package.json\";\nimport {\n IModelTransformerError,\n IModelTransformerErrorScope,\n} from \"./IModelTransformerError\";\nimport { transformerPackageMetadata } from \"./TransformerPackageMetadata\";\n\nconst {\n version: ourVersion,\n name: ourName,\n peerDependencies,\n} = transformerPackageMetadata;\n\nconst ourITwinCoreBackendDepRange = peerDependencies[\"@itwin/core-backend\"];\n\nconst noStrictDepCheckEnvVar = \"TRANSFORMER_NO_STRICT_DEP_CHECK\";\nconst suggestEnvVarName = \"SUGGEST_TRANSFORMER_VERSIONS\";\n\n// warn if using a prerelease or dev version\nif (semver.prerelease(iTwinCoreBackendVersion)) {\n // eslint-disable-next-line no-console\n console.warn(\n `Warning: dev version detected (${iTwinCoreBackendVersion}). ` +\n \"This version is most likely fine, but it may introduce new behavior that could cause \" +\n \"unexpected issues or changes in the transformer's functionality. Please proceed with caution.\"\n );\n}\n\nif (\n process.env[noStrictDepCheckEnvVar] !== \"1\" &&\n !semver.satisfies(iTwinCoreBackendVersion, ourITwinCoreBackendDepRange, {\n includePrerelease: true,\n })\n) {\n const errHeader =\n `${ourName}@${ourVersion} only supports @itwin/core-backend@${ourITwinCoreBackendDepRange}, ` +\n `but @itwin/core-backend${iTwinCoreBackendVersion} was resolved when looking for the peer dependency.\\n` +\n `If you know exactly what you are doing, you can disable this check by setting ${noStrictDepCheckEnvVar}=1 in the environment\\n`;\n\n if (process.env[suggestEnvVarName]) {\n // let's not import https except in this case\n // eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports\n const https = require(\"node:https\") as typeof import(\"node:https\");\n https.get(`https://registry.npmjs.org/${ourName}`, async (resp) => {\n const chunks: string[] = [];\n const packumentSrc = await new Promise<string>((r) =>\n resp\n .setEncoding(\"utf8\")\n .on(\"data\", (d) => chunks.push(d))\n .on(\"end\", () => r(chunks.join(\"\")))\n );\n interface PackumentSubset {\n versions: Record<\n string,\n {\n peerDependencies?: {\n \"@itwin/core-backend\": string; // eslint-disable-line @typescript-eslint/naming-convention\n };\n }\n >;\n }\n\n const packumentJson = JSON.parse(packumentSrc) as PackumentSubset;\n const isTaglessVersion = (version: string) => version.includes(\"-\");\n const latestFirstApplicableVersions = Object.entries(\n packumentJson.versions\n )\n .filter(([, v]) =>\n semver.satisfies(\n iTwinCoreBackendVersion,\n v.peerDependencies?.[\"@itwin/core-backend\"] ?? \"\"\n )\n )\n .map(([k]) => k)\n .filter(isTaglessVersion)\n .reverse();\n\n ITwinError.throwError({\n iTwinErrorId: {\n scope: IModelTransformerErrorScope,\n key: IModelTransformerError.DependencyVersionMismatch,\n },\n message: [\n errHeader,\n `You have ${suggestEnvVarName}=1 set in the environment, so we suggest one of the following versions.`,\n \"Be aware that older versions may be missing bug fixes.\",\n ...latestFirstApplicableVersions,\n ].join(\"\\n\"),\n });\n });\n } else {\n ITwinError.throwError({\n iTwinErrorId: {\n scope: IModelTransformerErrorScope,\n key: IModelTransformerError.DependencyVersionMismatch,\n },\n message: `${errHeader}You can rerun with the environment variable ${suggestEnvVarName}=1 to have this error suggest a version`,\n });\n }\n}\n\n/** @docs-package-description\n * The @itwin/imodel-transformer package contains classes that [backend code]($docs/learning/backend/index.md) can use to\n * traverse iModels, as well as *transform* an iModel into another existing or empty one, by exporting elements from one during\n * traversal and importing them into another.\n *\n * You can read further in [iModelTransformation and Data Exchange]($docs/learning/transformer/index.md) here.\n */\n/**\n * @docs-group-description iModels\n * Classes for working with [iModels]($docs/learning/iModels.md).\n * See [the learning article]($docs/learning/backend/index.md).\n */\n/**\n * @docs-group-description Utils\n * Miscellaneous utility classes.\n */\n/**\n * @docs-group-description Logging\n * Logger categories used by this package.\n */\n/**\n * @docs-group-description ElementAspectExportCoordinator\n * Internal coordination for scoped, owner-batched ElementAspect export.\n */\n/**\n * @docs-group-description ElementAspectExportProcessor\n * Internal source queries, filtering, and export callbacks for ElementAspects owned by accepted elements.\n */\n/**\n * @docs-group-description IModelTransformerError\n * Stable identifiers for errors originating from this package.\n */\n/**\n * @docs-group-description TransformerPackageMetadata\n * Internal metadata describing this package and its peer dependencies.\n */\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/imodel-transformer",
3
- "version": "2.0.0-dev.34",
3
+ "version": "2.0.0-dev.35",
4
4
  "description": "API for exporting an iModel's parts and also importing them into another iModel",
5
5
  "main": "lib/cjs/imodel-transformer.js",
6
6
  "typings": "lib/cjs/imodel-transformer",
@@ -1,16 +0,0 @@
1
- import { ExportElementAspectsStrategy } from "./ExportElementAspectsStrategy";
2
- /**
3
- * Detached ElementAspect export strategy for [[IModelExporter]].
4
- * This strategy exports all ElementAspects separately from the Elements that own them.
5
- *
6
- * @note Since aspects are exported separately from elements that own them, this strategy will export aspects of filtered out elements by default and
7
- * this needs to be handled by ElementAspectHandler
8
- * @internal
9
- */
10
- export declare class DetachedExportElementAspectsStrategy extends ExportElementAspectsStrategy {
11
- exportAllElementAspects(): Promise<void>;
12
- private exportAspectsLoop;
13
- private queryAspects;
14
- exportElementAspectsForElement(_elementId: string): Promise<void>;
15
- }
16
- //# sourceMappingURL=DetachedExportElementAspectsStrategy.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DetachedExportElementAspectsStrategy.d.ts","sourceRoot":"","sources":["../../src/DetachedExportElementAspectsStrategy.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAQ9E;;;;;;;GAOG;AACH,qBAAa,oCAAqC,SAAQ,4BAA4B;IAC9D,uBAAuB,IAAI,OAAO,CAAC,IAAI,CAAC;YAsDhD,iBAAiB;YAahB,YAAY;IAgEL,8BAA8B,CAClD,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC;CAGjB"}
@@ -1,108 +0,0 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.DetachedExportElementAspectsStrategy = void 0;
8
- const core_backend_1 = require("@itwin/core-backend");
9
- const ExportElementAspectsStrategy_1 = require("./ExportElementAspectsStrategy");
10
- const ECSqlReaderAsyncIterableIteratorAdapter_1 = require("./ECSqlReaderAsyncIterableIteratorAdapter");
11
- const core_common_1 = require("@itwin/core-common");
12
- /**
13
- * Detached ElementAspect export strategy for [[IModelExporter]].
14
- * This strategy exports all ElementAspects separately from the Elements that own them.
15
- *
16
- * @note Since aspects are exported separately from elements that own them, this strategy will export aspects of filtered out elements by default and
17
- * this needs to be handled by ElementAspectHandler
18
- * @internal
19
- */
20
- class DetachedExportElementAspectsStrategy extends ExportElementAspectsStrategy_1.ExportElementAspectsStrategy {
21
- async exportAllElementAspects() {
22
- await this.exportAspectsLoop(core_backend_1.ElementUniqueAspect.classFullName, async (uniqueAspect) => {
23
- const isInsertChange = this.aspectChanges?.insertIds.has(uniqueAspect.id) ?? false;
24
- const isUpdateChange = this.aspectChanges?.updateIds.has(uniqueAspect.id) ?? false;
25
- const doExport = this.aspectChanges === undefined || isInsertChange || isUpdateChange;
26
- if (doExport) {
27
- const isKnownUpdate = this.aspectChanges ? isUpdateChange : undefined;
28
- await this.handler.onExportElementUniqueAspect(uniqueAspect, isKnownUpdate);
29
- await this.handler.trackProgress();
30
- }
31
- });
32
- let batchedElementMultiAspects = [];
33
- await this.exportAspectsLoop(core_backend_1.ElementMultiAspect.classFullName, async (multiAspect) => {
34
- if (batchedElementMultiAspects.length === 0) {
35
- batchedElementMultiAspects.push(multiAspect);
36
- return;
37
- }
38
- // element id changed so all element's aspects are in the array and can be exported
39
- if (batchedElementMultiAspects[0].element.id !== multiAspect.element.id) {
40
- await this.handler.onExportElementMultiAspects(batchedElementMultiAspects);
41
- await this.handler.trackProgress();
42
- batchedElementMultiAspects = [];
43
- }
44
- batchedElementMultiAspects.push(multiAspect);
45
- });
46
- if (batchedElementMultiAspects.length > 0) {
47
- // aspects that are left in the array have not been exported
48
- await this.handler.onExportElementMultiAspects(batchedElementMultiAspects);
49
- await this.handler.trackProgress();
50
- }
51
- }
52
- async exportAspectsLoop(baseAspectClass, exportAspect) {
53
- for await (const aspect of this.queryAspects(baseAspectClass)) {
54
- if (!(await this.shouldExportElementAspect(aspect))) {
55
- continue;
56
- }
57
- await exportAspect(aspect);
58
- }
59
- }
60
- async *queryAspects(baseElementAspectClassFullName) {
61
- const aspectClassNameIdMap = new Map();
62
- const optimizesAspectClassesSql = `
63
- SELECT c.ECInstanceId as classId, (ec_className(c.ECInstanceId, 's')) as schemaName, (ec_className(c.ECInstanceId, 'c')) as className
64
- FROM ECDbMeta.ClassHasAllBaseClasses r
65
- JOIN ECDbMeta.ECClassDef c ON c.ECInstanceId = r.SourceECInstanceId
66
- WHERE r.TargetECInstanceId = ec_classId(:baseClassName)
67
- `;
68
- const aspectClassesQueryReader = this.sourceDb.createQueryReader(optimizesAspectClassesSql, new core_common_1.QueryBinder().bindString("baseClassName", baseElementAspectClassFullName), { usePrimaryConn: true });
69
- const aspectClassesAsyncQueryReader = (0, ECSqlReaderAsyncIterableIteratorAdapter_1.ensureECSqlReaderIsAsyncIterableIterator)(aspectClassesQueryReader);
70
- for await (const rowProxy of aspectClassesAsyncQueryReader) {
71
- const row = rowProxy.toRow();
72
- aspectClassNameIdMap.set(row.classId, {
73
- schemaName: row.schemaName,
74
- className: row.className,
75
- });
76
- }
77
- for (const [classId, { schemaName, className }] of aspectClassNameIdMap) {
78
- const classFullName = `${schemaName}:${className}`;
79
- if (this.excludedElementAspectClassFullNames.has(classFullName))
80
- continue;
81
- const getAspectPropsSql = `SELECT * FROM [${schemaName}]:[${className}] WHERE ECClassId = :classId ORDER BY Element.Id`;
82
- const aspectQueryReader = this.sourceDb.createQueryReader(getAspectPropsSql, new core_common_1.QueryBinder().bindId("classId", classId),
83
- // eslint-disable-next-line @typescript-eslint/no-deprecated
84
- { rowFormat: core_common_1.QueryRowFormat.UseJsPropertyNames, usePrimaryConn: true });
85
- const aspectAsyncQueryReader = (0, ECSqlReaderAsyncIterableIteratorAdapter_1.ensureECSqlReaderIsAsyncIterableIterator)(aspectQueryReader);
86
- let firstDone = false;
87
- for await (const rowProxy of aspectAsyncQueryReader) {
88
- const row = rowProxy.toRow();
89
- const aspectProps = {
90
- ...row,
91
- classFullName,
92
- className: undefined,
93
- }; // add in property required by EntityProps
94
- if (!firstDone) {
95
- firstDone = true;
96
- }
97
- delete aspectProps.className; // clear property from SELECT * that we don't want in the final instance
98
- const aspectEntity = this.sourceDb.constructEntity(aspectProps);
99
- yield aspectEntity;
100
- }
101
- }
102
- }
103
- async exportElementAspectsForElement(_elementId) {
104
- // All aspects are exported separately from their elements and don't need to be exported when element is exported.
105
- }
106
- }
107
- exports.DetachedExportElementAspectsStrategy = DetachedExportElementAspectsStrategy;
108
- //# sourceMappingURL=DetachedExportElementAspectsStrategy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DetachedExportElementAspectsStrategy.js","sourceRoot":"","sources":["../../src/DetachedExportElementAspectsStrategy.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,sDAI6B;AAE7B,iFAA8E;AAC9E,uGAAqG;AACrG,oDAI4B;AAE5B;;;;;;;GAOG;AACH,MAAa,oCAAqC,SAAQ,2DAA4B;IACpE,KAAK,CAAC,uBAAuB;QAC3C,MAAM,IAAI,CAAC,iBAAiB,CAC1B,kCAAmB,CAAC,aAAa,EACjC,KAAK,EAAE,YAAY,EAAE,EAAE;YACrB,MAAM,cAAc,GAClB,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC,IAAI,KAAK,CAAC;YAC9D,MAAM,cAAc,GAClB,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC,IAAI,KAAK,CAAC;YAC9D,MAAM,QAAQ,GACZ,IAAI,CAAC,aAAa,KAAK,SAAS,IAAI,cAAc,IAAI,cAAc,CAAC;YACvE,IAAI,QAAQ,EAAE,CAA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G,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CACvD,iBAAiB,EACjB,IAAI,yBAAW,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC;YAC5C,4DAA4D;YAC5D,EAAE,SAAS,EAAE,4BAAc,CAAC,kBAAkB,EAAE,cAAc,EAAE,IAAI,EAAE,CACvE,CAAC;YACF,MAAM,sBAAsB,GAC1B,IAAA,kFAAwC,EAAC,iBAAiB,CAAC,CAAC;YAC9D,IAAI,SAAS,GAAG,KAAK,CAAC;YACtB,IAAI,KAAK,EAAE,MAAM,QAAQ,IAAI,sBAAsB,EAAE,CAAC;gBACpD,MAAM,GAAG,GAAG,QAAQ,CAAC,KAAK,EAAE,CAAC;gBAC7B,MAAM,WAAW,GAAuB;oBACtC,GAAG,GAAG;oBACN,aAAa;oBACb,SAAS,EAAE,SAAS;iBACrB,CAAC,CAAC,0CAA0C;gBAC7C,IAAI,CAAC,SAAS,EAAE,CAAC;oBACf,SAAS,GAAG,IAAI,CAAC;gBACnB,CAAC;gBACD,OAAQ,WAAmB,CAAC,SAAS,CAAC,CAAC,wEAAwE;gBAC/G,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAI,WAAW,CAAC,CAAC;gBAEnE,MAAM,YAAY,CAAC;YACrB,CAAC;QACH,CAAC;IACH,CAAC;IAEe,KAAK,CAAC,8BAA8B,CAClD,UAAkB;QAElB,kHAAkH;IACpH,CAAC;CACF;AAzID,oFAyIC","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\nimport {\n ElementAspect,\n ElementMultiAspect,\n ElementUniqueAspect,\n} from \"@itwin/core-backend\";\nimport { Id64String } from \"@itwin/core-bentley\";\nimport { ExportElementAspectsStrategy } from \"./ExportElementAspectsStrategy\";\nimport { ensureECSqlReaderIsAsyncIterableIterator } from \"./ECSqlReaderAsyncIterableIteratorAdapter\";\nimport {\n ElementAspectProps,\n QueryBinder,\n QueryRowFormat,\n} from \"@itwin/core-common\";\n\n/**\n * Detached ElementAspect export strategy for [[IModelExporter]].\n * This strategy exports all ElementAspects separately from the Elements that own them.\n *\n * @note Since aspects are exported separately from elements that own them, this strategy will export aspects of filtered out elements by default and\n * this needs to be handled by ElementAspectHandler\n * @internal\n */\nexport class DetachedExportElementAspectsStrategy extends ExportElementAspectsStrategy {\n public override async exportAllElementAspects(): Promise<void> {\n await this.exportAspectsLoop<ElementUniqueAspect>(\n ElementUniqueAspect.classFullName,\n async (uniqueAspect) => {\n const isInsertChange =\n this.aspectChanges?.insertIds.has(uniqueAspect.id) ?? false;\n const isUpdateChange =\n this.aspectChanges?.updateIds.has(uniqueAspect.id) ?? false;\n const doExport =\n this.aspectChanges === undefined || isInsertChange || isUpdateChange;\n if (doExport) {\n const isKnownUpdate = this.aspectChanges ? isUpdateChange : undefined;\n await this.handler.onExportElementUniqueAspect(\n uniqueAspect,\n isKnownUpdate\n );\n await this.handler.trackProgress();\n }\n }\n );\n\n let batchedElementMultiAspects: ElementMultiAspect[] = [];\n await this.exportAspectsLoop<ElementMultiAspect>(\n ElementMultiAspect.classFullName,\n async (multiAspect) => {\n if (batchedElementMultiAspects.length === 0) {\n batchedElementMultiAspects.push(multiAspect);\n return;\n }\n\n // element id changed so all element's aspects are in the array and can be exported\n if (\n batchedElementMultiAspects[0].element.id !== multiAspect.element.id\n ) {\n await this.handler.onExportElementMultiAspects(\n batchedElementMultiAspects\n );\n await this.handler.trackProgress();\n batchedElementMultiAspects = [];\n }\n\n batchedElementMultiAspects.push(multiAspect);\n }\n );\n\n if (batchedElementMultiAspects.length > 0) {\n // aspects that are left in the array have not been exported\n await this.handler.onExportElementMultiAspects(\n batchedElementMultiAspects\n );\n await this.handler.trackProgress();\n }\n }\n\n private async exportAspectsLoop<T extends ElementAspect>(\n baseAspectClass: string,\n exportAspect: (aspect: T) => Promise<void>\n ) {\n for await (const aspect of this.queryAspects<T>(baseAspectClass)) {\n if (!(await this.shouldExportElementAspect(aspect))) {\n continue;\n }\n\n await exportAspect(aspect);\n }\n }\n\n private async *queryAspects<T extends ElementAspect>(\n baseElementAspectClassFullName: string\n ) {\n const aspectClassNameIdMap = new Map<\n Id64String,\n { schemaName: string; className: string }\n >();\n\n const optimizesAspectClassesSql = `\n SELECT c.ECInstanceId as classId, (ec_className(c.ECInstanceId, 's')) as schemaName, (ec_className(c.ECInstanceId, 'c')) as className\n FROM ECDbMeta.ClassHasAllBaseClasses r\n JOIN ECDbMeta.ECClassDef c ON c.ECInstanceId = r.SourceECInstanceId\n WHERE r.TargetECInstanceId = ec_classId(:baseClassName)\n `;\n const aspectClassesQueryReader = this.sourceDb.createQueryReader(\n optimizesAspectClassesSql,\n new QueryBinder().bindString(\n \"baseClassName\",\n baseElementAspectClassFullName\n ),\n { usePrimaryConn: true }\n );\n const aspectClassesAsyncQueryReader =\n ensureECSqlReaderIsAsyncIterableIterator(aspectClassesQueryReader);\n for await (const rowProxy of aspectClassesAsyncQueryReader) {\n const row = rowProxy.toRow();\n aspectClassNameIdMap.set(row.classId, {\n schemaName: row.schemaName,\n className: row.className,\n });\n }\n\n for (const [classId, { schemaName, className }] of aspectClassNameIdMap) {\n const classFullName = `${schemaName}:${className}`;\n if (this.excludedElementAspectClassFullNames.has(classFullName)) continue;\n\n const getAspectPropsSql = `SELECT * FROM [${schemaName}]:[${className}] WHERE ECClassId = :classId ORDER BY Element.Id`;\n const aspectQueryReader = this.sourceDb.createQueryReader(\n getAspectPropsSql,\n new QueryBinder().bindId(\"classId\", classId),\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n { rowFormat: QueryRowFormat.UseJsPropertyNames, usePrimaryConn: true }\n );\n const aspectAsyncQueryReader =\n ensureECSqlReaderIsAsyncIterableIterator(aspectQueryReader);\n let firstDone = false;\n for await (const rowProxy of aspectAsyncQueryReader) {\n const row = rowProxy.toRow();\n const aspectProps: ElementAspectProps = {\n ...row,\n classFullName,\n className: undefined,\n }; // add in property required by EntityProps\n if (!firstDone) {\n firstDone = true;\n }\n delete (aspectProps as any).className; // clear property from SELECT * that we don't want in the final instance\n const aspectEntity = this.sourceDb.constructEntity<T>(aspectProps);\n\n yield aspectEntity;\n }\n }\n }\n\n public override async exportElementAspectsForElement(\n _elementId: string\n ): Promise<void> {\n // All aspects are exported separately from their elements and don't need to be exported when element is exported.\n }\n}\n"]}
@@ -1,35 +0,0 @@
1
- import { ElementAspect, ElementMultiAspect, ElementUniqueAspect, IModelDb } from "@itwin/core-backend";
2
- import { Id64String } from "@itwin/core-bentley";
3
- import { ChangedInstanceOps } from "./IModelExporter";
4
- /**
5
- * Handler for [[ExportElementAspectsStrategy]]
6
- * @internal
7
- */
8
- export interface ElementAspectsHandler {
9
- shouldExportElementAspect(aspect: ElementAspect): Promise<boolean>;
10
- onExportElementUniqueAspect(uniqueAspect: ElementUniqueAspect, isUpdate?: boolean | undefined): Promise<void>;
11
- onExportElementMultiAspects(multiAspects: ElementMultiAspect[]): Promise<void>;
12
- trackProgress: () => Promise<void>;
13
- }
14
- /**
15
- * Base ElementAspect export strategy. Base export strategy includes state saving and loading and
16
- * ElementAspect filtering.
17
- * @internal
18
- */
19
- export declare abstract class ExportElementAspectsStrategy {
20
- /** The set of classes of ElementAspects that will be excluded (polymorphically) from transformation to the target iModel. */
21
- protected _excludedElementAspectClasses: Set<typeof ElementAspect>;
22
- /** The set of classFullNames for ElementAspects that will be excluded from transformation to the target iModel. */
23
- readonly excludedElementAspectClassFullNames: Set<string>;
24
- protected sourceDb: IModelDb;
25
- protected aspectChanges: ChangedInstanceOps | undefined;
26
- protected handler: ElementAspectsHandler;
27
- constructor(sourceDb: IModelDb, handler: ElementAspectsHandler);
28
- abstract exportElementAspectsForElement(_elementId: Id64String): Promise<void>;
29
- abstract exportAllElementAspects(): Promise<void>;
30
- protected shouldExportElementAspect(aspect: ElementAspect): Promise<boolean>;
31
- setAspectChanges(aspectChanges?: ChangedInstanceOps): void;
32
- loadExcludedElementAspectClasses(excludedElementAspectClassFullNames: string[]): void;
33
- excludeElementAspectClass(classFullName: string): void;
34
- }
35
- //# sourceMappingURL=ExportElementAspectsStrategy.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExportElementAspectsStrategy.d.ts","sourceRoot":"","sources":["../../src/ExportElementAspectsStrategy.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EACnB,QAAQ,EACT,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAU,MAAM,qBAAqB,CAAC;AAEzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAItD;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,yBAAyB,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACnE,2BAA2B,CACzB,YAAY,EAAE,mBAAmB,EACjC,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,GAC7B,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,2BAA2B,CACzB,YAAY,EAAE,kBAAkB,EAAE,GACjC,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,aAAa,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACpC;AAED;;;;GAIG;AACH,8BAAsB,4BAA4B;IAChD,6HAA6H;IAC7H,SAAS,CAAC,6BAA6B,4BAAmC;IAC1E,mHAAmH;IACnH,SAAgB,mCAAmC,cAAqB;IAExE,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAE7B,SAAS,CAAC,aAAa,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAExD,SAAS,CAAC,OAAO,EAAE,qBAAqB,CAAC;gBAEtB,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,qBAAqB;aAKrD,8BAA8B,CAC5C,UAAU,EAAE,UAAU,GACrB,OAAO,CAAC,IAAI,CAAC;aACA,uBAAuB,IAAI,OAAO,CAAC,IAAI,CAAC;cAExC,yBAAyB,CACvC,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,OAAO,CAAC;IAeZ,gBAAgB,CAAC,aAAa,CAAC,EAAE,kBAAkB;IAInD,gCAAgC,CACrC,mCAAmC,EAAE,MAAM,EAAE,GAC5C,IAAI;IAWA,yBAAyB,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI;CAM9D"}
@@ -1,52 +0,0 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.ExportElementAspectsStrategy = void 0;
8
- const core_bentley_1 = require("@itwin/core-bentley");
9
- const TransformerLoggerCategory_1 = require("./TransformerLoggerCategory");
10
- const loggerCategory = TransformerLoggerCategory_1.TransformerLoggerCategory.IModelExporter;
11
- /**
12
- * Base ElementAspect export strategy. Base export strategy includes state saving and loading and
13
- * ElementAspect filtering.
14
- * @internal
15
- */
16
- class ExportElementAspectsStrategy {
17
- /** The set of classes of ElementAspects that will be excluded (polymorphically) from transformation to the target iModel. */
18
- _excludedElementAspectClasses = new Set();
19
- /** The set of classFullNames for ElementAspects that will be excluded from transformation to the target iModel. */
20
- excludedElementAspectClassFullNames = new Set();
21
- sourceDb;
22
- aspectChanges;
23
- handler;
24
- constructor(sourceDb, handler) {
25
- this.sourceDb = sourceDb;
26
- this.handler = handler;
27
- }
28
- async shouldExportElementAspect(aspect) {
29
- for (const excludedElementAspectClass of this
30
- ._excludedElementAspectClasses) {
31
- if (aspect instanceof excludedElementAspectClass) {
32
- core_bentley_1.Logger.logInfo(loggerCategory, `Excluded ElementAspect by class: ${aspect.classFullName}`);
33
- return false;
34
- }
35
- }
36
- // ElementAspect has passed standard exclusion rules, now give handler a chance to accept/reject
37
- return this.handler.shouldExportElementAspect(aspect);
38
- }
39
- setAspectChanges(aspectChanges) {
40
- this.aspectChanges = aspectChanges;
41
- }
42
- loadExcludedElementAspectClasses(excludedElementAspectClassFullNames) {
43
- this.excludedElementAspectClassFullNames = new Set(excludedElementAspectClassFullNames);
44
- this._excludedElementAspectClasses = new Set(excludedElementAspectClassFullNames.map((c) => this.sourceDb.getJsClass(c)));
45
- }
46
- excludeElementAspectClass(classFullName) {
47
- this.excludedElementAspectClassFullNames.add(classFullName); // allows non-polymorphic exclusion before query
48
- this._excludedElementAspectClasses.add(this.sourceDb.getJsClass(classFullName)); // allows polymorphic exclusion after query/load
49
- }
50
- }
51
- exports.ExportElementAspectsStrategy = ExportElementAspectsStrategy;
52
- //# sourceMappingURL=ExportElementAspectsStrategy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExportElementAspectsStrategy.js","sourceRoot":"","sources":["../../src/ExportElementAspectsStrategy.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAQhG,sDAAyD;AACzD,2EAAwE;AAGxE,MAAM,cAAc,GAAG,qDAAyB,CAAC,cAAc,CAAC;AAkBhE;;;;GAIG;AACH,MAAsB,4BAA4B;IAChD,6HAA6H;IACnH,6BAA6B,GAAG,IAAI,GAAG,EAAwB,CAAC;IAC1E,mHAAmH;IACnG,mCAAmC,GAAG,IAAI,GAAG,EAAU,CAAC;IAE9D,QAAQ,CAAW;IAEnB,aAAa,CAAiC;IAE9C,OAAO,CAAwB;IAEzC,YAAmB,QAAkB,EAAE,OAA8B;QACnE,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAOS,KAAK,CAAC,yBAAyB,CACvC,MAAqB;QAErB,KAAK,MAAM,0BAA0B,IAAI,IAAI;aAC1C,6BAA6B,EAAE,CAAC;YACjC,IAAI,MAAM,YAAY,0BAA0B,EAAE,CAAC;gBACjD,qBAAM,CAAC,OAAO,CACZ,cAAc,EACd,oCAAoC,MAAM,CAAC,aAAa,EAAE,CAC3D,CAAC;gBACF,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;QACD,gGAAgG;QAChG,OAAO,IAAI,CAAC,OAAO,CAAC,yBAAyB,CAAC,MAAM,CAAC,CAAC;IACxD,CAAC;IAEM,gBAAgB,CAAC,aAAkC;QACxD,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;IAEM,gCAAgC,CACrC,mCAA6C;QAE5C,IAAI,CAAC,mCAA2C,GAAG,IAAI,GAAG,CACzD,mCAAmC,CACpC,CAAC;QACF,IAAI,CAAC,6BAA6B,GAAG,IAAI,GAAG,CAC1C,mCAAmC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAC5C,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAC5B,CACF,CAAC;IACJ,CAAC;IAEM,yBAAyB,CAAC,aAAqB;QACpD,IAAI,CAAC,mCAAmC,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,gDAAgD;QAC7G,IAAI,CAAC,6BAA6B,CAAC,GAAG,CACpC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAuB,aAAa,CAAC,CAC9D,CAAC,CAAC,gDAAgD;IACrD,CAAC;CACF;AA9DD,oEA8DC","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\nimport {\n ElementAspect,\n ElementMultiAspect,\n ElementUniqueAspect,\n IModelDb,\n} from \"@itwin/core-backend\";\nimport { Id64String, Logger } from \"@itwin/core-bentley\";\nimport { TransformerLoggerCategory } from \"./TransformerLoggerCategory\";\nimport { ChangedInstanceOps } from \"./IModelExporter\";\n\nconst loggerCategory = TransformerLoggerCategory.IModelExporter;\n\n/**\n * Handler for [[ExportElementAspectsStrategy]]\n * @internal\n */\nexport interface ElementAspectsHandler {\n shouldExportElementAspect(aspect: ElementAspect): Promise<boolean>;\n onExportElementUniqueAspect(\n uniqueAspect: ElementUniqueAspect,\n isUpdate?: boolean | undefined\n ): Promise<void>;\n onExportElementMultiAspects(\n multiAspects: ElementMultiAspect[]\n ): Promise<void>;\n trackProgress: () => Promise<void>;\n}\n\n/**\n * Base ElementAspect export strategy. Base export strategy includes state saving and loading and\n * ElementAspect filtering.\n * @internal\n */\nexport abstract class ExportElementAspectsStrategy {\n /** The set of classes of ElementAspects that will be excluded (polymorphically) from transformation to the target iModel. */\n protected _excludedElementAspectClasses = new Set<typeof ElementAspect>();\n /** The set of classFullNames for ElementAspects that will be excluded from transformation to the target iModel. */\n public readonly excludedElementAspectClassFullNames = new Set<string>();\n\n protected sourceDb: IModelDb;\n\n protected aspectChanges: ChangedInstanceOps | undefined;\n\n protected handler: ElementAspectsHandler;\n\n public constructor(sourceDb: IModelDb, handler: ElementAspectsHandler) {\n this.sourceDb = sourceDb;\n this.handler = handler;\n }\n\n public abstract exportElementAspectsForElement(\n _elementId: Id64String\n ): Promise<void>;\n public abstract exportAllElementAspects(): Promise<void>;\n\n protected async shouldExportElementAspect(\n aspect: ElementAspect\n ): Promise<boolean> {\n for (const excludedElementAspectClass of this\n ._excludedElementAspectClasses) {\n if (aspect instanceof excludedElementAspectClass) {\n Logger.logInfo(\n loggerCategory,\n `Excluded ElementAspect by class: ${aspect.classFullName}`\n );\n return false;\n }\n }\n // ElementAspect has passed standard exclusion rules, now give handler a chance to accept/reject\n return this.handler.shouldExportElementAspect(aspect);\n }\n\n public setAspectChanges(aspectChanges?: ChangedInstanceOps) {\n this.aspectChanges = aspectChanges;\n }\n\n public loadExcludedElementAspectClasses(\n excludedElementAspectClassFullNames: string[]\n ): void {\n (this.excludedElementAspectClassFullNames as any) = new Set(\n excludedElementAspectClassFullNames\n );\n this._excludedElementAspectClasses = new Set(\n excludedElementAspectClassFullNames.map((c) =>\n this.sourceDb.getJsClass(c)\n )\n );\n }\n\n public excludeElementAspectClass(classFullName: string): void {\n this.excludedElementAspectClassFullNames.add(classFullName); // allows non-polymorphic exclusion before query\n this._excludedElementAspectClasses.add(\n this.sourceDb.getJsClass<typeof ElementAspect>(classFullName)\n ); // allows polymorphic exclusion after query/load\n }\n}\n"]}
@@ -1,12 +0,0 @@
1
- import { Id64String } from "@itwin/core-bentley";
2
- import { ExportElementAspectsStrategy } from "./ExportElementAspectsStrategy";
3
- /**
4
- * ElementAspect export strategy for [[IModelExporter]].
5
- * This strategy exports ElementAspects together with their Elements.
6
- * @internal
7
- */
8
- export declare class ExportElementAspectsWithElementsStrategy extends ExportElementAspectsStrategy {
9
- exportElementAspectsForElement(elementId: Id64String): Promise<void>;
10
- exportAllElementAspects(): Promise<void>;
11
- }
12
- //# sourceMappingURL=ExportElementAspectsWithElementsStrategy.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExportElementAspectsWithElementsStrategy.d.ts","sourceRoot":"","sources":["../../src/ExportElementAspectsWithElementsStrategy.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAE9E;;;;GAIG;AACH,qBAAa,wCAAyC,SAAQ,4BAA4B;IAClE,8BAA8B,CAClD,SAAS,EAAE,UAAU,GACpB,OAAO,CAAC,IAAI,CAAC;IA4CM,uBAAuB,IAAI,OAAO,CAAC,IAAI,CAAC;CAG/D"}
@@ -1,48 +0,0 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.ExportElementAspectsWithElementsStrategy = void 0;
8
- const core_backend_1 = require("@itwin/core-backend");
9
- const ExportElementAspectsStrategy_1 = require("./ExportElementAspectsStrategy");
10
- /**
11
- * ElementAspect export strategy for [[IModelExporter]].
12
- * This strategy exports ElementAspects together with their Elements.
13
- * @internal
14
- */
15
- class ExportElementAspectsWithElementsStrategy extends ExportElementAspectsStrategy_1.ExportElementAspectsStrategy {
16
- async exportElementAspectsForElement(elementId) {
17
- const allUniqueAspects = this.sourceDb.elements._queryAspects(elementId, core_backend_1.ElementUniqueAspect.classFullName, this.excludedElementAspectClassFullNames);
18
- for (const uniqueAspect of allUniqueAspects) {
19
- if (!(await this.shouldExportElementAspect(uniqueAspect))) {
20
- continue;
21
- }
22
- const isInsertChange = this.aspectChanges?.insertIds.has(uniqueAspect.id) ?? false;
23
- const isUpdateChange = this.aspectChanges?.updateIds.has(uniqueAspect.id) ?? false;
24
- const doExport = this.aspectChanges === undefined || isInsertChange || isUpdateChange;
25
- if (doExport) {
26
- const isKnownUpdate = this.aspectChanges ? isUpdateChange : undefined;
27
- await this.handler.onExportElementUniqueAspect(uniqueAspect, isKnownUpdate);
28
- await this.handler.trackProgress();
29
- }
30
- }
31
- const allMultiAspects = this.sourceDb.elements._queryAspects(elementId, core_backend_1.ElementMultiAspect.classFullName, this.excludedElementAspectClassFullNames);
32
- const multiAspects = [];
33
- for (const aspect of allMultiAspects) {
34
- if (await this.shouldExportElementAspect(aspect)) {
35
- multiAspects.push(aspect);
36
- }
37
- }
38
- if (multiAspects.length > 0) {
39
- await this.handler.onExportElementMultiAspects(multiAspects);
40
- return this.handler.trackProgress();
41
- }
42
- }
43
- async exportAllElementAspects() {
44
- // All aspects are exported with their owning elements and don't need to be exported separately.
45
- }
46
- }
47
- exports.ExportElementAspectsWithElementsStrategy = ExportElementAspectsWithElementsStrategy;
48
- //# sourceMappingURL=ExportElementAspectsWithElementsStrategy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExportElementAspectsWithElementsStrategy.js","sourceRoot":"","sources":["../../src/ExportElementAspectsWithElementsStrategy.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,sDAA8E;AA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e,EAAE,CAAC;YACrC,IAAI,MAAM,IAAI,CAAC,yBAAyB,CAAC,MAAM,CAAC,EAAE,CAAC;gBACjD,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAC5B,CAAC;QACH,CAAC;QAED,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC5B,MAAM,IAAI,CAAC,OAAO,CAAC,2BAA2B,CAAC,YAAY,CAAC,CAAC;YAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;QACtC,CAAC;IACH,CAAC;IAEe,KAAK,CAAC,uBAAuB;QAC3C,gGAAgG;IAClG,CAAC;CACF;AAlDD,4FAkDC","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\nimport { ElementMultiAspect, ElementUniqueAspect } from \"@itwin/core-backend\";\nimport { Id64String } from \"@itwin/core-bentley\";\nimport { ExportElementAspectsStrategy } from \"./ExportElementAspectsStrategy\";\n\n/**\n * ElementAspect export strategy for [[IModelExporter]].\n * This strategy exports ElementAspects together with their Elements.\n * @internal\n */\nexport class ExportElementAspectsWithElementsStrategy extends ExportElementAspectsStrategy {\n public override async exportElementAspectsForElement(\n elementId: Id64String\n ): Promise<void> {\n const allUniqueAspects = this.sourceDb.elements._queryAspects(\n elementId,\n ElementUniqueAspect.classFullName,\n this.excludedElementAspectClassFullNames\n );\n for (const uniqueAspect of allUniqueAspects) {\n if (!(await this.shouldExportElementAspect(uniqueAspect))) {\n continue;\n }\n const isInsertChange =\n this.aspectChanges?.insertIds.has(uniqueAspect.id) ?? false;\n const isUpdateChange =\n this.aspectChanges?.updateIds.has(uniqueAspect.id) ?? false;\n const doExport =\n this.aspectChanges === undefined || isInsertChange || isUpdateChange;\n if (doExport) {\n const isKnownUpdate = this.aspectChanges ? isUpdateChange : undefined;\n await this.handler.onExportElementUniqueAspect(\n uniqueAspect,\n isKnownUpdate\n );\n await this.handler.trackProgress();\n }\n }\n\n const allMultiAspects = this.sourceDb.elements._queryAspects(\n elementId,\n ElementMultiAspect.classFullName,\n this.excludedElementAspectClassFullNames\n );\n const multiAspects: ElementMultiAspect[] = [];\n for (const aspect of allMultiAspects) {\n if (await this.shouldExportElementAspect(aspect)) {\n multiAspects.push(aspect);\n }\n }\n\n if (multiAspects.length > 0) {\n await this.handler.onExportElementMultiAspects(multiAspects);\n return this.handler.trackProgress();\n }\n }\n\n public override async exportAllElementAspects(): Promise<void> {\n // All aspects are exported with their owning elements and don't need to be exported separately.\n }\n}\n"]}