@itwin/core-backend 5.5.0-dev.1 → 5.5.0-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/BackendHubAccess.js.map +1 -1
- package/lib/cjs/BackendLoggerCategory.js.map +1 -1
- package/lib/cjs/BisCoreSchema.js.map +1 -1
- package/lib/cjs/BlobContainerService.js.map +1 -1
- package/lib/cjs/BriefcaseManager.js.map +1 -1
- package/lib/cjs/CatalogDb.js.map +1 -1
- package/lib/cjs/Category.js.map +1 -1
- package/lib/cjs/ChangeSummaryManager.js +2 -2
- package/lib/cjs/ChangeSummaryManager.js.map +1 -1
- package/lib/cjs/ChangedElementsDb.js.map +1 -1
- package/lib/cjs/ChangesetECAdaptor.js +248 -248
- package/lib/cjs/ChangesetECAdaptor.js.map +1 -1
- package/lib/cjs/ChannelControl.js.map +1 -1
- package/lib/cjs/CheckpointManager.js.map +1 -1
- package/lib/cjs/ClassRegistry.js +5 -5
- package/lib/cjs/ClassRegistry.js.map +1 -1
- package/lib/cjs/CloudSqlite.js.map +1 -1
- package/lib/cjs/CodeService.js.map +1 -1
- package/lib/cjs/CodeSpecs.js.map +1 -1
- package/lib/cjs/ConcurrentQuery.js.map +1 -1
- package/lib/cjs/CustomViewState3dCreator.js.map +1 -1
- package/lib/cjs/DevTools.js.map +1 -1
- package/lib/cjs/DisplayStyle.js.map +1 -1
- package/lib/cjs/ECDb.js.map +1 -1
- package/lib/cjs/ECSchemaXmlContext.js.map +1 -1
- package/lib/cjs/ECSqlStatement.js.map +1 -1
- package/lib/cjs/Element.js.map +1 -1
- package/lib/cjs/ElementAspect.js.map +1 -1
- package/lib/cjs/ElementGraphics.js.map +1 -1
- package/lib/cjs/ElementTreeWalker.js.map +1 -1
- package/lib/cjs/Entity.js.map +1 -1
- package/lib/cjs/EntityReferences.js.map +1 -1
- package/lib/cjs/ExportGraphics.js.map +1 -1
- package/lib/cjs/ExternalSource.js.map +1 -1
- package/lib/cjs/FontFile.js.map +1 -1
- package/lib/cjs/GeoCoordConfig.js.map +1 -1
- package/lib/cjs/GeographicCRSServices.js.map +1 -1
- package/lib/cjs/GeometrySummary.js +47 -47
- package/lib/cjs/GeometrySummary.js.map +1 -1
- package/lib/cjs/IModelDb.js +8 -8
- package/lib/cjs/IModelDb.js.map +1 -1
- package/lib/cjs/IModelDbFonts.js.map +1 -1
- package/lib/cjs/IModelElementCloneContext.js.map +1 -1
- package/lib/cjs/IModelHost.js.map +1 -1
- package/lib/cjs/IModelIncrementalSchemaLocater.js.map +1 -1
- package/lib/cjs/IModelJsFs.js.map +1 -1
- package/lib/cjs/ImageSourceConversion.js.map +1 -1
- package/lib/cjs/IpcHost.js.map +1 -1
- package/lib/cjs/LineStyle.js.map +1 -1
- package/lib/cjs/LocalHub.js +1 -1
- package/lib/cjs/LocalHub.js.map +1 -1
- package/lib/cjs/LocalhostIpcHost.js.map +1 -1
- package/lib/cjs/LockControl.js.map +1 -1
- package/lib/cjs/Material.js.map +1 -1
- package/lib/cjs/Model.js.map +1 -1
- package/lib/cjs/NativeAppStorage.js.map +1 -1
- package/lib/cjs/NativeHost.js.map +1 -1
- package/lib/cjs/NavigationRelationship.js.map +1 -1
- package/lib/cjs/PromiseMemoizer.js.map +1 -1
- package/lib/cjs/PropertyStore.js.map +1 -1
- package/lib/cjs/Relationship.js.map +1 -1
- package/lib/cjs/RpcBackend.js.map +1 -1
- package/lib/cjs/SQLiteDb.js.map +1 -1
- package/lib/cjs/Schema.js.map +1 -1
- package/lib/cjs/SchemaSync.js.map +1 -1
- package/lib/cjs/SchemaUtils.js.map +1 -1
- package/lib/cjs/SheetIndex.js.map +1 -1
- package/lib/cjs/SqliteChangesetReader.js.map +1 -1
- package/lib/cjs/SqliteStatement.js.map +1 -1
- package/lib/cjs/StashManager.js.map +1 -1
- package/lib/cjs/Texture.js.map +1 -1
- package/lib/cjs/TileStorage.js.map +1 -1
- package/lib/cjs/TxnManager.js.map +1 -1
- package/lib/cjs/ViewDefinition.js.map +1 -1
- package/lib/cjs/ViewStateHydrator.js.map +1 -1
- package/lib/cjs/ViewStore.js.map +1 -1
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.js.map +1 -1
- package/lib/cjs/annotations/FrameGeometry.js.map +1 -1
- package/lib/cjs/annotations/LeaderGeometry.js.map +1 -1
- package/lib/cjs/annotations/TextAnnotationElement.js.map +1 -1
- package/lib/cjs/annotations/TextAnnotationGeometry.js.map +1 -1
- package/lib/cjs/annotations/TextBlockGeometry.js.map +1 -1
- package/lib/cjs/annotations/TextBlockLayout.js.map +1 -1
- package/lib/cjs/assets/IModelChange.02.00.00.ecschema.xml +90 -90
- package/lib/cjs/assets/Settings/Schemas/Base.Schema.json +32 -32
- package/lib/cjs/assets/Settings/Schemas/Gcs.schema.json +27 -27
- package/lib/cjs/assets/Settings/Schemas/Workspace.Schema.json +94 -94
- package/lib/cjs/assets/Settings/backend.setting.json5 +21 -21
- package/lib/cjs/core-backend.js.map +1 -1
- package/lib/cjs/domains/FunctionalElements.js.map +1 -1
- package/lib/cjs/domains/FunctionalSchema.js.map +1 -1
- package/lib/cjs/domains/GenericElements.js.map +1 -1
- package/lib/cjs/domains/GenericSchema.js.map +1 -1
- package/lib/cjs/internal/ChangesetConflictArgs.js.map +1 -1
- package/lib/cjs/internal/ChannelAdmin.js.map +1 -1
- package/lib/cjs/internal/ElementLRUCache.js.map +1 -1
- package/lib/cjs/internal/FontFileImpl.js.map +1 -1
- package/lib/cjs/internal/HubMock.js.map +1 -1
- package/lib/cjs/internal/IModelDbFontsImpl.js.map +1 -1
- package/lib/cjs/internal/NativePlatform.js.map +1 -1
- package/lib/cjs/internal/NoLocks.js.map +1 -1
- package/lib/cjs/internal/OnlineStatus.js.map +1 -1
- package/lib/cjs/internal/ServerBasedLocks.js.map +1 -1
- package/lib/cjs/internal/Symbols.js.map +1 -1
- package/lib/cjs/internal/annotations/fields.js.map +1 -1
- package/lib/cjs/internal/cross-package.js.map +1 -1
- package/lib/cjs/internal/workspace/SettingsImpl.js.map +1 -1
- package/lib/cjs/internal/workspace/SettingsSchemasImpl.js.map +1 -1
- package/lib/cjs/internal/workspace/WorkspaceImpl.js.map +1 -1
- package/lib/cjs/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
- package/lib/cjs/rpc/multipart.js.map +1 -1
- package/lib/cjs/rpc/tracing.js.map +1 -1
- package/lib/cjs/rpc/web/logging.js.map +1 -1
- package/lib/cjs/rpc/web/request.js.map +1 -1
- package/lib/cjs/rpc/web/response.js.map +1 -1
- package/lib/cjs/rpc-impl/DevToolsRpcImpl.js.map +1 -1
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
- package/lib/cjs/rpc-impl/IModelTileRpcImpl.js.map +1 -1
- package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
- package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
- package/lib/cjs/workspace/Settings.js.map +1 -1
- package/lib/cjs/workspace/SettingsSchemas.js.map +1 -1
- package/lib/cjs/workspace/Workspace.js.map +1 -1
- package/lib/cjs/workspace/WorkspaceEditor.js.map +1 -1
- package/lib/esm/BackendHubAccess.js.map +1 -1
- package/lib/esm/BackendLoggerCategory.js.map +1 -1
- package/lib/esm/BisCoreSchema.js.map +1 -1
- package/lib/esm/BlobContainerService.js.map +1 -1
- package/lib/esm/BriefcaseManager.js.map +1 -1
- package/lib/esm/CatalogDb.js.map +1 -1
- package/lib/esm/Category.js.map +1 -1
- package/lib/esm/ChangeSummaryManager.js +2 -2
- package/lib/esm/ChangeSummaryManager.js.map +1 -1
- package/lib/esm/ChangedElementsDb.js.map +1 -1
- package/lib/esm/ChangesetECAdaptor.js +248 -248
- package/lib/esm/ChangesetECAdaptor.js.map +1 -1
- package/lib/esm/ChannelControl.js.map +1 -1
- package/lib/esm/CheckpointManager.js.map +1 -1
- package/lib/esm/ClassRegistry.js +5 -5
- package/lib/esm/ClassRegistry.js.map +1 -1
- package/lib/esm/CloudSqlite.js.map +1 -1
- package/lib/esm/CodeService.js.map +1 -1
- package/lib/esm/CodeSpecs.js.map +1 -1
- package/lib/esm/ConcurrentQuery.js.map +1 -1
- package/lib/esm/CustomViewState3dCreator.js.map +1 -1
- package/lib/esm/DevTools.js.map +1 -1
- package/lib/esm/DisplayStyle.js.map +1 -1
- package/lib/esm/ECDb.js.map +1 -1
- package/lib/esm/ECSchemaXmlContext.js.map +1 -1
- package/lib/esm/ECSqlStatement.js.map +1 -1
- package/lib/esm/Element.js.map +1 -1
- package/lib/esm/ElementAspect.js.map +1 -1
- package/lib/esm/ElementGraphics.js.map +1 -1
- package/lib/esm/ElementTreeWalker.js.map +1 -1
- package/lib/esm/Entity.js.map +1 -1
- package/lib/esm/EntityReferences.js.map +1 -1
- package/lib/esm/ExportGraphics.js.map +1 -1
- package/lib/esm/ExternalSource.js.map +1 -1
- package/lib/esm/FontFile.js.map +1 -1
- package/lib/esm/GeoCoordConfig.js.map +1 -1
- package/lib/esm/GeographicCRSServices.js.map +1 -1
- package/lib/esm/GeometrySummary.js +47 -47
- package/lib/esm/GeometrySummary.js.map +1 -1
- package/lib/esm/IModelDb.js +8 -8
- package/lib/esm/IModelDb.js.map +1 -1
- package/lib/esm/IModelDbFonts.js.map +1 -1
- package/lib/esm/IModelElementCloneContext.js.map +1 -1
- package/lib/esm/IModelHost.js.map +1 -1
- package/lib/esm/IModelIncrementalSchemaLocater.js.map +1 -1
- package/lib/esm/IModelJsFs.js.map +1 -1
- package/lib/esm/ImageSourceConversion.js.map +1 -1
- package/lib/esm/IpcHost.js.map +1 -1
- package/lib/esm/LineStyle.js.map +1 -1
- package/lib/esm/LocalHub.js +1 -1
- package/lib/esm/LocalHub.js.map +1 -1
- package/lib/esm/LocalhostIpcHost.js.map +1 -1
- package/lib/esm/LockControl.js.map +1 -1
- package/lib/esm/Material.js.map +1 -1
- package/lib/esm/Model.js.map +1 -1
- package/lib/esm/NativeAppStorage.js.map +1 -1
- package/lib/esm/NativeHost.js.map +1 -1
- package/lib/esm/NavigationRelationship.js.map +1 -1
- package/lib/esm/PromiseMemoizer.js.map +1 -1
- package/lib/esm/PropertyStore.js.map +1 -1
- package/lib/esm/Relationship.js.map +1 -1
- package/lib/esm/RpcBackend.js.map +1 -1
- package/lib/esm/SQLiteDb.js.map +1 -1
- package/lib/esm/Schema.js.map +1 -1
- package/lib/esm/SchemaSync.js.map +1 -1
- package/lib/esm/SchemaUtils.js.map +1 -1
- package/lib/esm/SheetIndex.js.map +1 -1
- package/lib/esm/SqliteChangesetReader.js.map +1 -1
- package/lib/esm/SqliteStatement.js.map +1 -1
- package/lib/esm/StashManager.js.map +1 -1
- package/lib/esm/Texture.js.map +1 -1
- package/lib/esm/TileStorage.js.map +1 -1
- package/lib/esm/TxnManager.js.map +1 -1
- package/lib/esm/ViewDefinition.js.map +1 -1
- package/lib/esm/ViewStateHydrator.js.map +1 -1
- package/lib/esm/ViewStore.js.map +1 -1
- package/lib/esm/annotations/ElementDrivesTextAnnotation.js.map +1 -1
- package/lib/esm/annotations/FrameGeometry.js.map +1 -1
- package/lib/esm/annotations/LeaderGeometry.js.map +1 -1
- package/lib/esm/annotations/TextAnnotationElement.js.map +1 -1
- package/lib/esm/annotations/TextAnnotationGeometry.js.map +1 -1
- package/lib/esm/annotations/TextBlockGeometry.js.map +1 -1
- package/lib/esm/annotations/TextBlockLayout.js.map +1 -1
- package/lib/esm/core-backend.js.map +1 -1
- package/lib/esm/domains/FunctionalElements.js.map +1 -1
- package/lib/esm/domains/FunctionalSchema.js.map +1 -1
- package/lib/esm/domains/GenericElements.js.map +1 -1
- package/lib/esm/domains/GenericSchema.js.map +1 -1
- package/lib/esm/internal/ChangesetConflictArgs.js.map +1 -1
- package/lib/esm/internal/ChannelAdmin.js.map +1 -1
- package/lib/esm/internal/ElementLRUCache.js.map +1 -1
- package/lib/esm/internal/FontFileImpl.js.map +1 -1
- package/lib/esm/internal/HubMock.js.map +1 -1
- package/lib/esm/internal/IModelDbFontsImpl.js.map +1 -1
- package/lib/esm/internal/NativePlatform.js.map +1 -1
- package/lib/esm/internal/NoLocks.js.map +1 -1
- package/lib/esm/internal/OnlineStatus.js.map +1 -1
- package/lib/esm/internal/ServerBasedLocks.js.map +1 -1
- package/lib/esm/internal/Symbols.js.map +1 -1
- package/lib/esm/internal/annotations/fields.js.map +1 -1
- package/lib/esm/internal/cross-package.js.map +1 -1
- package/lib/esm/internal/workspace/SettingsImpl.js.map +1 -1
- package/lib/esm/internal/workspace/SettingsSchemasImpl.js.map +1 -1
- package/lib/esm/internal/workspace/WorkspaceImpl.js.map +1 -1
- package/lib/esm/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
- package/lib/esm/rpc/multipart.js.map +1 -1
- package/lib/esm/rpc/tracing.js.map +1 -1
- package/lib/esm/rpc/web/logging.js.map +1 -1
- package/lib/esm/rpc/web/request.js.map +1 -1
- package/lib/esm/rpc/web/response.js.map +1 -1
- package/lib/esm/rpc-impl/DevToolsRpcImpl.js.map +1 -1
- package/lib/esm/rpc-impl/IModelReadRpcImpl.js.map +1 -1
- package/lib/esm/rpc-impl/IModelTileRpcImpl.js.map +1 -1
- package/lib/esm/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
- package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
- package/lib/esm/test/AdvancedEqual.js.map +1 -1
- package/lib/esm/test/AnnotationTestUtils.js.map +1 -1
- package/lib/esm/test/AttachDb.test.js +11 -11
- package/lib/esm/test/AttachDb.test.js.map +1 -1
- package/lib/esm/test/ElementDrivesElement.test.js +23 -23
- package/lib/esm/test/ElementDrivesElement.test.js.map +1 -1
- package/lib/esm/test/ElementLRUCache.test.js.map +1 -1
- package/lib/esm/test/GeometryTestUtil.js.map +1 -1
- package/lib/esm/test/IModelHost.test.js.map +1 -1
- package/lib/esm/test/IModelTestUtils.js.map +1 -1
- package/lib/esm/test/ImageSourceConversion.test.js.map +1 -1
- package/lib/esm/test/IpcHost.test.js.map +1 -1
- package/lib/esm/test/KnownTestLocations.js.map +1 -1
- package/lib/esm/test/PrintElementTree.js.map +1 -1
- package/lib/esm/test/PropertyDb.test.js.map +1 -1
- package/lib/esm/test/RevisionUtility.js.map +1 -1
- package/lib/esm/test/SchemaUtils.test.js +25 -25
- package/lib/esm/test/SchemaUtils.test.js.map +1 -1
- package/lib/esm/test/SequentialLogMatcher.js.map +1 -1
- package/lib/esm/test/TestChangeSetUtility.js.map +1 -1
- package/lib/esm/test/TestUtils.js.map +1 -1
- package/lib/esm/test/annotations/Fields.test.js +53 -53
- package/lib/esm/test/annotations/Fields.test.js.map +1 -1
- package/lib/esm/test/annotations/FrameGeometry.test.js.map +1 -1
- package/lib/esm/test/annotations/LeaderGeometry.test.js.map +1 -1
- package/lib/esm/test/annotations/TextAnnotation.test.js.map +1 -1
- package/lib/esm/test/annotations/TextBlock.test.js.map +1 -1
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.js.map +1 -1
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.js.map +1 -1
- package/lib/esm/test/categories/Category.test.js.map +1 -1
- package/lib/esm/test/codespec/CodeSpec.test.js.map +1 -1
- package/lib/esm/test/ecdb/CTE.test.js +88 -88
- package/lib/esm/test/ecdb/CTE.test.js.map +1 -1
- package/lib/esm/test/ecdb/ConcurrentQuery.test.js +15 -15
- package/lib/esm/test/ecdb/ConcurrentQuery.test.js.map +1 -1
- package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js +15 -15
- package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECDb.test.js +72 -72
- package/lib/esm/test/ecdb/ECDb.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECDbTestHelper.js.map +1 -1
- package/lib/esm/test/ecdb/ECSchemaXmlContext.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECSqlAst.test.js +65 -65
- package/lib/esm/test/ecdb/ECSqlAst.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECSqlQuery.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECSqlReader.test.js +16 -16
- package/lib/esm/test/ecdb/ECSqlReader.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECSqlStatement.test.js +332 -332
- package/lib/esm/test/ecdb/ECSqlStatement.test.js.map +1 -1
- package/lib/esm/test/ecdb/SqliteStatement.test.js.map +1 -1
- package/lib/esm/test/ecsql/dataset/ECSqlDatasets.js.map +1 -1
- package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js +21 -21
- package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js.map +1 -1
- package/lib/esm/test/ecsql/src/ECSqlTestParser.js.map +1 -1
- package/lib/esm/test/ecsql/src/ECSqlTestRunner.test.js.map +1 -1
- package/lib/esm/test/element/DeleteDefinitionElements.test.js.map +1 -1
- package/lib/esm/test/element/ElementAspect.test.js +22 -22
- package/lib/esm/test/element/ElementAspect.test.js.map +1 -1
- package/lib/esm/test/element/ElementDependencyGraph.test.js.map +1 -1
- package/lib/esm/test/element/ElementRoundTrip.test.js +139 -139
- package/lib/esm/test/element/ElementRoundTrip.test.js.map +1 -1
- package/lib/esm/test/element/ExcludedElements.test.js.map +1 -1
- package/lib/esm/test/element/ExternalSource.test.js.map +1 -1
- package/lib/esm/test/element/NullStructArray.test.js +13 -13
- package/lib/esm/test/element/NullStructArray.test.js.map +1 -1
- package/lib/esm/test/element/ProjectInformationRecord.test.js.map +1 -1
- package/lib/esm/test/element/SheetInformationAspect.test.js.map +1 -1
- package/lib/esm/test/element/UrlLink.test.js.map +1 -1
- package/lib/esm/test/font/FontFile.test.js.map +1 -1
- package/lib/esm/test/font/IModelDbFonts.test.js.map +1 -1
- package/lib/esm/test/hubaccess/ApplyChangeset.test.js +32 -32
- package/lib/esm/test/hubaccess/ApplyChangeset.test.js.map +1 -1
- package/lib/esm/test/hubaccess/BriefcaseManager.test.js.map +1 -1
- package/lib/esm/test/hubaccess/CheckpointManager.test.js.map +1 -1
- package/lib/esm/test/hubaccess/Rebase.test.js +40 -40
- package/lib/esm/test/hubaccess/Rebase.test.js.map +1 -1
- package/lib/esm/test/imageData.js.map +1 -1
- package/lib/esm/test/imodel/Code.test.js.map +1 -1
- package/lib/esm/test/imodel/ElementTreeWalker.test.js.map +1 -1
- package/lib/esm/test/imodel/GetTextureImage.test.js.map +1 -1
- package/lib/esm/test/imodel/IModel.test.js +44 -44
- package/lib/esm/test/imodel/IModel.test.js.map +1 -1
- package/lib/esm/test/imodel/ProjectExtents.test.js.map +1 -1
- package/lib/esm/test/imodel/SchemaXmlImport.test.js.map +1 -1
- package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js.map +1 -1
- package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.js.map +1 -1
- package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.js.map +1 -1
- package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.js.map +1 -1
- package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.js.map +1 -1
- package/lib/esm/test/index.js.map +1 -1
- package/lib/esm/test/misc/DevTools.test.js.map +1 -1
- package/lib/esm/test/misc/EntitySubClasses.test.js.map +1 -1
- package/lib/esm/test/misc/GeoServices.test.js.map +1 -1
- package/lib/esm/test/misc/PromiseMemoizer.test.js.map +1 -1
- package/lib/esm/test/native/DgnDbWorker.test.js.map +1 -1
- package/lib/esm/test/rpc/response.test.js.map +1 -1
- package/lib/esm/test/schema/ClassRegistry.test.js +99 -99
- package/lib/esm/test/schema/ClassRegistry.test.js.map +1 -1
- package/lib/esm/test/schema/FunctionalDomain.test.js.map +1 -1
- package/lib/esm/test/schema/GenericDomain.test.js.map +1 -1
- package/lib/esm/test/schema/IModelSchemaContext.test.js.map +1 -1
- package/lib/esm/test/sheetindex/SheetIndex.test.js.map +1 -1
- package/lib/esm/test/standalone/ChangeMerge.test.js.map +1 -1
- package/lib/esm/test/standalone/ChangesetReader.test.js +124 -124
- package/lib/esm/test/standalone/ChangesetReader.test.js.map +1 -1
- package/lib/esm/test/standalone/CustomViewState3dCreator.test.js.map +1 -1
- package/lib/esm/test/standalone/DisplayStyle.test.js.map +1 -1
- package/lib/esm/test/standalone/Drawing.test.js.map +1 -1
- package/lib/esm/test/standalone/ElementGraphics.test.js.map +1 -1
- package/lib/esm/test/standalone/ElementMesh.test.js.map +1 -1
- package/lib/esm/test/standalone/ExportGraphics.test.js +14 -14
- package/lib/esm/test/standalone/ExportGraphics.test.js.map +1 -1
- package/lib/esm/test/standalone/GeometryChangeEvents.test.js.map +1 -1
- package/lib/esm/test/standalone/GeometryStream.test.js.map +1 -1
- package/lib/esm/test/standalone/HubMock.test.js.map +1 -1
- package/lib/esm/test/standalone/IModelLimits.test.js.map +1 -1
- package/lib/esm/test/standalone/IModelWrite.test.js +27 -27
- package/lib/esm/test/standalone/IModelWrite.test.js.map +1 -1
- package/lib/esm/test/standalone/InlineGeometryPartReferences.test.js.map +1 -1
- package/lib/esm/test/standalone/MergeConflict.test.js.map +1 -1
- package/lib/esm/test/standalone/NativeAppStorage.test.js.map +1 -1
- package/lib/esm/test/standalone/RenderMaterialElement.test.js.map +1 -1
- package/lib/esm/test/standalone/RenderTimeline.test.js.map +1 -1
- package/lib/esm/test/standalone/SQLiteDb.test.js.map +1 -1
- package/lib/esm/test/standalone/SchemaUtils.test.js.map +1 -1
- package/lib/esm/test/standalone/SectionDrawing.test.js.map +1 -1
- package/lib/esm/test/standalone/ServerBasedLocks.test.js.map +1 -1
- package/lib/esm/test/standalone/Setting.test.js.map +1 -1
- package/lib/esm/test/standalone/Settings.test.js.map +1 -1
- package/lib/esm/test/standalone/SettingsSchemas.test.js.map +1 -1
- package/lib/esm/test/standalone/SnapshotDb.test.js.map +1 -1
- package/lib/esm/test/standalone/Texture.test.js.map +1 -1
- package/lib/esm/test/standalone/TileCache.test.js.map +1 -1
- package/lib/esm/test/standalone/TileTree.test.js.map +1 -1
- package/lib/esm/test/standalone/TxnManager.test.js.map +1 -1
- package/lib/esm/test/standalone/ViewDefinition.test.js.map +1 -1
- package/lib/esm/test/standalone/ViewStoreDb.test.js.map +1 -1
- package/lib/esm/test/standalone/Workspace.test.js.map +1 -1
- package/lib/esm/workspace/Settings.js.map +1 -1
- package/lib/esm/workspace/SettingsSchemas.js.map +1 -1
- package/lib/esm/workspace/Workspace.js.map +1 -1
- package/lib/esm/workspace/WorkspaceEditor.js.map +1 -1
- package/package.json +14 -14
package/lib/cjs/Element.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Element.js","sourceRoot":"","sources":["../../src/Element.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;AAEH,sDAAmH;AACnH,oDAM4B;AAC5B,wDAA8G;AAC9G,qCAA0F;AAG1F,mCAA4F;AAC5F,qEAAoG;AACpG,gDAA2F;AAC3F,gEAAkE;AAuElE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAa,OAAQ,SAAQ,eAAM;IAC1B,MAAM,KAAc,SAAS,KAAa,OAAO,SAAS,CAAC,CAAC,CAAC;IACpE,gBAAgB;IACT,MAAM,KAAc,mBAAmB,KAAK,OAAO,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IAEjG,6GAA6G;IAC7F,KAAK,CAAa;IAClC,yEAAyE;IAClE,IAAI,CAAO;IAClB,uDAAuD;IAChD,MAAM,CAAkB;IAC/B,wJAAwJ;IACjJ,cAAc,CAAc;IACnC,gHAAgH;IACzG,SAAS,CAAU;IAC1B,uHAAuH;IACvG,cAAc,CAAyB;IAEvD,YAAsB,KAAmB,EAAE,MAAgB;QACzD,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,kBAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAE,0EAA0E;QAClH,IAAI,CAAC,KAAK,GAAG,4BAAc,CAAC,UA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AAI,CAAC,eAAe,EAAE,aAAa,EAAE,UAAU,CAAU,EAAE,CAAC;YACxE,MAAM,KAAK,GAAG,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC;YAC3C,IAAI,SAAS,KAAK,KAAK,EAAE,CAAC;gBACxB,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;YACrB,CAAC;QACH,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAzDD,4DAyDC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Elements\r\n */\r\n\r\nimport { CompressedId64Set, GuidString, Id64, Id64String, JsonUtils, OrderedId64Array } from \"@itwin/core-bentley\";\r\nimport {\r\n AxisAlignedBox3d, BisCodeSpec, Code, CodeScopeProps, CodeSpec, ConcreteEntityTypes, DefinitionElementProps, DrawingProps, ElementAlignedBox3d,\r\n ElementProps, EntityMetaData, EntityReferenceSet, GeometricElement2dProps, GeometricElement3dProps, GeometricElementProps,\r\n GeometricModel2dProps, GeometricModel3dProps, GeometryPartProps, GeometryStreamProps, IModel, InformationPartitionElementProps, LineStyleProps, ModelProps, PhysicalElementProps, PhysicalTypeProps, Placement2d, Placement2dProps, Placement3d, Placement3dProps, ProjectInformation, ProjectInformationRecordProps, RelatedElement, RenderSchedule,\r\n RenderTimelineProps, RepositoryLinkProps, SectionDrawingLocationProps, SectionDrawingProps, SectionType,\r\n SheetBorderTemplateProps, SheetProps, SheetTemplateProps, SubjectProps, TypeDefinition, TypeDefinitionElementProps, UrlLinkProps\r\n} from \"@itwin/core-common\";\r\nimport { ClipVector, LowAndHighXYZProps, Range3d, Transform, YawPitchRollAngles } from \"@itwin/core-geometry\";\r\nimport { CustomHandledProperty, DeserializeEntityArgs, ECSqlRow, Entity } from \"./Entity\";\r\nimport { IModelDb } from \"./IModelDb\";\r\nimport { IModelElementCloneContext } from \"./IModelElementCloneContext\";\r\nimport { DefinitionModel, DrawingModel, PhysicalModel, SectionDrawingModel } from \"./Model\";\r\nimport { SubjectOwnsProjectInformationRecord, SubjectOwnsSubjects } from \"./NavigationRelationship\";\r\nimport { _cache, _elementWasCreated, _nativeDb, _verifyChannel } from \"./internal/Symbols\";\r\nimport { ECVersion, EntityClass } from \"@itwin/ecschema-metadata\";\r\n\r\n/** Argument for the `Element.onXxx` static methods\r\n * @beta\r\n */\r\nexport interface OnElementArg {\r\n /** The iModel for the Element affected by this method. */\r\n iModel: IModelDb;\r\n}\r\n\r\n/** Argument for `Element.onInsert` and `Element.onUpdate` static methods.\r\n * @beta\r\n */\r\nexport interface OnElementPropsArg extends OnElementArg {\r\n /** The properties of the Element affected by this method.\r\n * @note the properties may be modified. If so the modified values will be inserted/updated.\r\n */\r\n props: ElementProps;\r\n}\r\n\r\n/** Argument for the `Element.onXxx` static methods that notify of operations to an existing Element supplying its Id, ModelId and FederationGuid.\r\n * @beta\r\n */\r\nexport interface OnElementIdArg extends OnElementArg {\r\n /** The Id of the Element affected by this method */\r\n id: Id64String;\r\n /** The ModelId of the element affected by this method */\r\n model: Id64String;\r\n /** The federationGuid of the element affected by this method */\r\n federationGuid: GuidString;\r\n}\r\n\r\n/** Argument for the `Element.onChildXxx` static methods\r\n * @beta\r\n */\r\nexport interface OnChildElementArg extends OnElementArg {\r\n parentId: Id64String;\r\n}\r\n\r\n/** Argument for the `Element.onChildXxx` static methods that supply the properties of the child Element to be inserted or updated.\r\n * @beta\r\n */\r\nexport interface OnChildElementPropsArg extends OnChildElementArg {\r\n /** The new properties of the child Element for this method. */\r\n childProps: Readonly<ElementProps>;\r\n}\r\n\r\n/** Argument for the `Element.onChildXxx` static methods that only supply the Id of the child Element.\r\n * @beta\r\n */\r\nexport interface OnChildElementIdArg extends OnChildElementArg {\r\n /** The Id of the child element for this method */\r\n childId: Id64String;\r\n}\r\n\r\n/** Argument for the `Element.onSubModelInsert` static method\r\n * @beta\r\n */\r\nexport interface OnSubModelPropsArg extends OnElementArg {\r\n /** The properties of the prospective sub-model */\r\n subModelProps: ModelProps;\r\n}\r\n\r\n/** Argument for several `Element.onSubModelXxx` static methods\r\n * @beta\r\n */\r\nexport interface OnSubModelIdArg extends OnElementArg {\r\n /** The modelId of the sub Model */\r\n subModelId: Id64String;\r\n}\r\n\r\n/** The smallest individually identifiable building block for modeling the real world in an iModel.\r\n * Each element represents an [[Entity]] in the real world. Sets of Elements (contained in [[Model]]s) are used to model\r\n * other Elements that represent larger scale real world entities. Using this recursive modeling strategy,\r\n * Elements can represent entities at any scale. Elements can represent physical things or abstract concepts\r\n * or simply be information records.\r\n *\r\n * Every Element has a 64-bit id (inherited from Entity) that uniquely identifies it within an iModel. Every Element also\r\n * has a [[code]] that identifies its meaning in the real world. Additionally, Elements may have a [[federationGuid]]\r\n * to hold a GUID, if the element was assigned that GUID by some other federated database. The iModel database enforces\r\n * uniqueness of id, code, and federationGuid.\r\n *\r\n * The Element class provides `static` methods like [[onInsert]], [[onUpdated]], [[onCloned]], and [[onChildAdded]] that enable\r\n * it to customize persistence operations. For example, the base implementations of [[onInsert]], [[onUpdate]], and [[onDelete]]\r\n * validate that the appropriate [locks]($docs/learning/backend/ConcurrencyControl.md), [codes]($docs/learning/backend/CodeService.md),\r\n * and [channel permissions]($docs/learning/backend/Channel.md) are obtained before a change to the element is written to the iModel.\r\n * A subclass of Element that overrides any of these methods **must** call the `super` method as well. An application that supplies its\r\n * own Element subclasses should register them at startup via [[ClassRegistry.registerModule]] or [[ClassRegistry.register]].\r\n *\r\n * See:\r\n * * [Element Fundamentals]($docs/bis/guide/fundamentals/element-fundamentals.md)\r\n * * [Working with schemas and elements in TypeScript]($docs/learning/backend/SchemasAndElementsInTypeScript.md)\r\n * * [Creating elements]($docs/learning/backend/CreateElements.md)\r\n * @public @preview\r\n */\r\nexport class Element extends Entity {\r\n public static override get className(): string { return \"Element\"; }\r\n /** @internal */\r\n public static override get protectedOperations() { return [\"onInsert\", \"onUpdate\", \"onDelete\"]; }\r\n\r\n /** The ModelId of the [Model]($docs/bis/guide/fundamentals/model-fundamentals.md) containing this element */\r\n public readonly model: Id64String;\r\n /** The [Code]($docs/bis/guide/fundamentals/codes.md) for this element */\r\n public code: Code;\r\n /** The parent element, if present, of this element. */\r\n public parent?: RelatedElement;\r\n /** A [FederationGuid]($docs/bis/guide/fundamentals/element-fundamentals.md#federationguid) assigned to this element by some other federated database */\r\n public federationGuid?: GuidString;\r\n /** A [user-assigned label]($docs/bis/guide/fundamentals/element-fundamentals.md#userlabel) for this element. */\r\n public userLabel?: string;\r\n /** Optional [json properties]($docs/bis/guide/fundamentals/element-fundamentals.md#jsonproperties) of this element. */\r\n public readonly jsonProperties: { [key: string]: any };\r\n\r\n protected constructor(props: ElementProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.code = Code.fromJSON(props.code); // TODO: Validate props.code - don't silently fail if it is the wrong type\r\n this.model = RelatedElement.idFromJson(props.model);\r\n this.parent = RelatedElement.fromJSON(props.parent);\r\n this.federationGuid = props.federationGuid;\r\n this.userLabel = props.userLabel;\r\n this.jsonProperties = { ...props.jsonProperties }; // make sure we have our own copy\r\n }\r\n\r\n /**\r\n * Element custom HandledProps include 'codeValue', 'codeSpec', 'codeScope', 'model', 'parent', 'federationGuid', and 'lastMod'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\r\n { propertyName: \"codeValue\", source: \"Class\" },\r\n { propertyName: \"codeSpec\", source: \"Class\" },\r\n { propertyName: \"codeScope\", source: \"Class\" },\r\n { propertyName: \"model\", source: \"Class\" },\r\n { propertyName: \"parent\", source: \"Class\" },\r\n { propertyName: \"federationGuid\", source: \"Class\" },\r\n { propertyName: \"lastMod\", source: \"Class\" },\r\n ];\r\n\r\n /**\r\n * Element deserializes 'codeValue', 'codeSpec', 'codeScope', 'model', 'parent', and 'federationGuid'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override deserialize(props: DeserializeEntityArgs): ElementProps {\r\n const elProps = super.deserialize(props) as ElementProps;\r\n const instance = props.row;\r\n elProps.code = { value: instance.codeValue ?? \"\", spec: instance.codeSpec.id, scope: instance.codeScope.id }\r\n elProps.model = instance.model.id;\r\n if (instance.parent)\r\n elProps.parent = instance.parent;\r\n\r\n if (instance.federationGuid)\r\n elProps.federationGuid = instance.federationGuid;\r\n return elProps;\r\n }\r\n\r\n /**\r\n * Element serialize 'codeValue', 'codeSpec', 'codeScope', 'model', 'parent', and 'federationGuid'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override serialize(props: ElementProps, iModel: IModelDb): ECSqlRow {\r\n const inst = super.serialize(props, iModel);\r\n inst.codeValue = props.code.value;\r\n inst.codeSpec = { id: props.code.spec };\r\n inst.codeScope = { id: props.code.scope };\r\n inst.model = { id: props.model };\r\n inst.parent = props.parent;\r\n inst.federationGuid = props.federationGuid ?? iModel[_nativeDb].newBeGuid();\r\n return inst;\r\n }\r\n\r\n /** Called before a new Element is inserted.\r\n * @note throw an exception to disallow the insert\r\n * @note If you override this method, you must call super.\r\n * @note `this` is the class of the Element to be inserted\r\n * @beta\r\n */\r\n protected static onInsert(arg: OnElementPropsArg): void {\r\n const { iModel, props } = arg;\r\n const operation = \"insert\";\r\n iModel.channels[_verifyChannel](arg.props.model);\r\n iModel.locks.checkSharedLock(props.model, \"model\", operation); // inserting requires shared lock on model\r\n if (props.parent) // inserting requires shared lock on parent, if present\r\n iModel.locks.checkSharedLock(props.parent.id, \"parent\", operation);\r\n iModel.codeService?.verifyCode(arg);\r\n }\r\n\r\n /** Called after a new Element was inserted.\r\n * @note If you override this method, you must call super.\r\n * @note `this` is the class of the Element that was inserted\r\n * @beta\r\n */\r\n protected static onInserted(arg: OnElementIdArg): void {\r\n const locks = arg.iModel.locks;\r\n if (locks && !locks.holdsExclusiveLock(arg.model))\r\n locks[_elementWasCreated](arg.id);\r\n arg.iModel.models[_cache].delete(arg.model);\r\n }\r\n\r\n /** Called before an Element is updated.\r\n * @note throw an exception to disallow the update\r\n * @note If you override this method, you must call super.\r\n * @note `this` is the class of the Element to be updated\r\n * @beta\r\n */\r\n protected static onUpdate(arg: OnElementPropsArg): void {\r\n const { iModel, props } = arg;\r\n iModel.channels[_verifyChannel](props.model);\r\n iModel.locks.checkExclusiveLock(props.id!, \"element\", \"update\"); // eslint-disable-line @typescript-eslint/no-non-null-assertion\r\n iModel.codeService?.verifyCode(arg);\r\n }\r\n\r\n /** Called after an Element was updated.\r\n * @note If you override this method, you must call super.\r\n * @note `this` is the class of the Element that was updated\r\n * @beta\r\n */\r\n protected static onUpdated(arg: OnElementIdArg): void {\r\n arg.iModel.elements[_cache].delete({ id: arg.id })\r\n arg.iModel.models[_cache].delete(arg.model);\r\n }\r\n\r\n /** Called before an Element is deleted.\r\n * @note throw an exception to disallow the delete\r\n * @note If you override this method, you must call super.\r\n * @note `this` is the class of the Element to be deleted\r\n * @beta\r\n */\r\n protected static onDelete(arg: OnElementIdArg): void {\r\n arg.iModel.channels[_verifyChannel](arg.model);\r\n arg.iModel.locks.checkExclusiveLock(arg.id, \"element\", \"delete\");\r\n }\r\n\r\n /** Called after an Element was deleted.\r\n * @note If you override this method, you must call super.\r\n * @note `this` is the class of the Element that was deleted\r\n * @beta\r\n */\r\n protected static onDeleted(arg: OnElementIdArg): void {\r\n arg.iModel.elements[_cache].delete(arg);\r\n arg.iModel.models[_cache].delete(arg.model);\r\n }\r\n\r\n /** Called when an element with an instance of this class as its parent is about to be deleted.\r\n * @note throw an exception if the element should not be deleted\r\n * @note implementers should not presume that the element was deleted if this method does not throw,\r\n * since the delete may fail for other reasons. Instead, rely on [[onChildDeleted]] for that purpose.\r\n * @note `this` is the class of the parent Element whose child will be deleted\r\n * @beta\r\n */\r\n protected static onChildDelete(_arg: OnChildElementIdArg): void { }\r\n\r\n /** Called after an element with an instance of this class as its parent was successfully deleted.\r\n * @note `this` is the class of the parent Element whose child was deleted\r\n * @beta\r\n */\r\n protected static onChildDeleted(arg: OnChildElementIdArg): void {\r\n arg.iModel.elements[_cache].delete({ id: arg.parentId });\r\n arg.iModel.elements[_cache].delete({ id: arg.childId });\r\n }\r\n\r\n /** Called when a *new element* with an instance of this class as its parent is about to be inserted.\r\n * @note throw an exception if the element should not be inserted\r\n * @note `this` is the class of the prospective parent Element.\r\n * @beta\r\n */\r\n protected static onChildInsert(_arg: OnChildElementPropsArg): void { }\r\n\r\n /** Called after a *new element* with an instance of this class as its parent was inserted.\r\n * @note `this` is the class of the parent Element.\r\n * @beta\r\n */\r\n protected static onChildInserted(arg: OnChildElementIdArg): void {\r\n arg.iModel.elements[_cache].delete({ id: arg.parentId });\r\n }\r\n\r\n /** Called when an element with an instance of this class as its parent is about to be updated.\r\n * @note throw an exception if the element should not be updated\r\n * @note `this` is the class of the parent Element.\r\n * @beta\r\n */\r\n protected static onChildUpdate(_arg: OnChildElementPropsArg): void { }\r\n\r\n /** Called after an element with an instance of this the class as its parent was updated.\r\n * @note `this` is the class of the parent Element.\r\n * @beta\r\n */\r\n protected static onChildUpdated(arg: OnChildElementIdArg): void {\r\n arg.iModel.elements[_cache].delete({ id: arg.parentId });\r\n }\r\n\r\n /** Called when an *existing element* is about to be updated so that an instance of this class will become its new parent.\r\n * @note throw an exception if the element should not be added\r\n * @note `this` is the class of the prospective parent Element.\r\n * @beta\r\n */\r\n protected static onChildAdd(_arg: OnChildElementPropsArg): void { }\r\n\r\n /** Called after an *existing element* has been updated so that an instance of this class is its new parent.\r\n * @note `this` is the class of the new parent Element.\r\n * @beta\r\n */\r\n protected static onChildAdded(arg: OnChildElementIdArg): void {\r\n arg.iModel.elements[_cache].delete({ id: arg.parentId });\r\n }\r\n\r\n /** Called when an element with an instance of this class as its parent is about to be updated change to a different parent.\r\n * @note throw an exception if the element should not be dropped\r\n * @note `this` is the class of the parent Element.\r\n * @beta\r\n */\r\n protected static onChildDrop(_arg: OnChildElementIdArg): void { }\r\n\r\n /** Called after an element with an instance of this class as its previous parent was updated to have a new parent.\r\n * @note `this` is the class of the previous parent Element.\r\n * @beta\r\n */\r\n protected static onChildDropped(arg: OnChildElementIdArg): void {\r\n arg.iModel.elements[_cache].delete({ id: arg.parentId });\r\n }\r\n\r\n /** Called when an instance of this class is being *sub-modeled* by a new Model.\r\n * @note throw an exception if model should not be inserted\r\n * @note `this` is the class of Element to be sub-modeled.\r\n * @beta\r\n */\r\n protected static onSubModelInsert(_arg: OnSubModelPropsArg): void { }\r\n\r\n /** Called after an instance of this class was *sub-modeled* by a new Model.\r\n * @note `this` is the class of Element that is now sub-modeled.\r\n * @beta\r\n */\r\n protected static onSubModelInserted(arg: OnSubModelIdArg): void {\r\n const id = arg.subModelId;\r\n arg.iModel.elements[_cache].delete({ id });\r\n arg.iModel.models[_cache].delete(id);\r\n\r\n }\r\n\r\n /** Called when a sub-model of an instance of this class is being deleted.\r\n * @note throw an exception if model should not be deleted\r\n * @note `this` is the class of Element that is sub-modeled.\r\n * @beta\r\n */\r\n protected static onSubModelDelete(_arg: OnSubModelIdArg): void { }\r\n\r\n /** Called after a sub-model of an instance of this class was deleted.\r\n * @note `this` is the class of Element that was sub-modeled.\r\n * @beta\r\n */\r\n protected static onSubModelDeleted(arg: OnSubModelIdArg): void {\r\n const id = arg.subModelId;\r\n arg.iModel.elements[_cache].delete({ id });\r\n arg.iModel.models[_cache].delete(id);\r\n }\r\n\r\n /** Called during the iModel transformation process after an Element from the source iModel was *cloned* for the target iModel.\r\n * The transformation process automatically handles remapping BisCore properties and those that are properly described in ECSchema.\r\n * This callback is only meant to be overridden if there are other Ids in non-standard locations that need to be remapped or other data that needs to be fixed up after the clone.\r\n * @param _context The context that persists any remapping between the source iModel and target iModel.\r\n * @param _sourceProps The ElementProps for the source Element that was cloned.\r\n * @param _targetProps The ElementProps that are a result of the clone. These can be further modified.\r\n * @note If you override this method, you must call super.\r\n * @beta\r\n */\r\n protected static onCloned(_context: IModelElementCloneContext, _sourceProps: ElementProps, _targetProps: ElementProps): Promise<void> | void { }\r\n\r\n /** Called when a *root* element in a subgraph is changed and before its outputs are processed.\r\n * This special callback is made when:\r\n * * the element is part of an [[ElementDrivesElement]] graph, and\r\n * * the element has no inputs, and\r\n * * none of the element's outputs have been processed.\r\n * @see [[ElementDrivesElement]] for more on element dependency graphs.\r\n * @beta\r\n */\r\n protected static onBeforeOutputsHandled(_id: Id64String, _iModel: IModelDb): void { }\r\n\r\n /** Called on an element in a graph after all of its inputs have been processed and before its outputs are processed.\r\n * This callback is made when:\r\n * * the specified element is part of an [[ElementDrivesElement]] graph, and\r\n * * there was a direct change to some element upstream in the dependency graph.\r\n * * all upstream elements in the graph have been processed.\r\n * * none of the downstream elements have been processed.\r\n * This method is not called if none of the element's inputs were changed.\r\n * @see [[ElementDrivesElement]] for more on element dependency graphs.\r\n * @beta\r\n */\r\n protected static onAllInputsHandled(_id: Id64String, _iModel: IModelDb): void { }\r\n\r\n public override toJSON(): ElementProps {\r\n const val = super.toJSON() as ElementProps;\r\n\r\n if (Code.isValid(this.code))\r\n val.code = this.code;\r\n\r\n val.model = this.model;\r\n if (undefined !== this.userLabel) // NOTE: blank string should be included in JSON\r\n val.userLabel = this.userLabel;\r\n if (this.federationGuid)\r\n val.federationGuid = this.federationGuid;\r\n if (this.parent)\r\n val.parent = this.parent;\r\n\r\n if (Object.keys(this.jsonProperties).length > 0)\r\n val.jsonProperties = this.jsonProperties;\r\n\r\n return val;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n referenceIds.addModel(this.model); // The modeledElement is a reference\r\n if (this.code.scope && Id64.isValidId64(this.code.scope))\r\n referenceIds.addElement(this.code.scope); // The element that scopes the code is a reference\r\n if (this.parent)\r\n referenceIds.addElement(this.parent.id); // A parent element is a reference\r\n }\r\n\r\n /** A *required reference* is an element that had to be inserted before this element could have been inserted.\r\n * This is the list of property keys on this element that store references to those elements\r\n * @note This should be overridden (with `super` called) at each level of the class hierarchy that introduces required references.\r\n * @note any property listed here must be added to the reference ids in [[collectReferenceIds]]\r\n * @beta\r\n */\r\n public static readonly requiredReferenceKeys: ReadonlyArray<string> = [\"parent\", \"model\"];\r\n\r\n /** A map of every [[requiredReferenceKeys]] on this class to their entity type.\r\n * @note This should be overridden (with `super` called) at each level of the class hierarchy that introduces required references.\r\n * @alpha\r\n */\r\n public static readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\r\n parent: ConcreteEntityTypes.Element,\r\n model: ConcreteEntityTypes.Model,\r\n };\r\n\r\n /** Get the class metadata for this element.\r\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Please use `getMetaData` provided by the parent class `Entity` instead.\r\n *\r\n * @example\r\n * ```typescript\r\n * // Current usage:\r\n * const metaData: EntityMetaData | undefined = element.getClassMetaData();\r\n *\r\n * // Replacement:\r\n * const metaData: EntityClass = await element.getMetaData();\r\n * ```\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n public getClassMetaData(): EntityMetaData | undefined { return this.iModel.classMetaDataRegistry.find(this.classFullName); }\r\n\r\n /** Query metadata for this entity class from the iModel's schema. Returns cached metadata if available.*/\r\n public override async getMetaData(): Promise<EntityClass> {\r\n if (this._metadata && EntityClass.isEntityClass(this._metadata)) {\r\n return this._metadata;\r\n }\r\n\r\n const entity = await this.iModel.schemaContext.getSchemaItem(this.schemaItemKey, EntityClass);\r\n if (entity !== undefined) {\r\n this._metadata = entity;\r\n return this._metadata;\r\n } else {\r\n throw new Error(`Cannot get metadata for ${this.classFullName}`);\r\n }\r\n }\r\n\r\n private getAllUserProperties(): any {\r\n if (!this.jsonProperties.UserProps)\r\n this.jsonProperties.UserProps = new Object();\r\n\r\n return this.jsonProperties.UserProps;\r\n }\r\n\r\n /** Get a set of JSON user properties by namespace */\r\n public getUserProperties(namespace: string) { return this.getAllUserProperties()[namespace]; }\r\n\r\n /** Change a set of user JSON properties of this Element by namespace. */\r\n public setUserProperties(nameSpace: string, value: any) { this.getAllUserProperties()[nameSpace] = value; }\r\n\r\n /** Remove a set of JSON user properties, specified by namespace, from this Element */\r\n public removeUserProperties(nameSpace: string) { delete this.getAllUserProperties()[nameSpace]; }\r\n\r\n /** Get a JSON property of this element, by namespace */\r\n public getJsonProperty(nameSpace: string): any { return this.jsonProperties[nameSpace]; }\r\n public setJsonProperty(nameSpace: string, value: any) { this.jsonProperties[nameSpace] = value; }\r\n\r\n /** Get a display label for this Element. By default returns userLabel if present, otherwise code value. */\r\n public getDisplayLabel(): string { return this.userLabel ?? this.code.value; }\r\n\r\n /** Get a list of HTML strings that describe this Element for the tooltip. Strings will be listed on separate lines in the tooltip.\r\n * Any instances of the pattern `%{tag}` will be replaced by the localized value of tag.\r\n */\r\n public getToolTipMessage(): string[] {\r\n const addKey = (key: string) => `<b>%{iModelJs:Element.${key}}:</b> `; // %{iModelJs:Element.xxx} is replaced with localized value of xxx in frontend.\r\n const msg: string[] = [];\r\n const display = this.getDisplayLabel();\r\n msg.push(display ? display : `${addKey(\"Id\") + this.id}, ${addKey(\"Type\")}${this.className}`);\r\n\r\n if (this instanceof GeometricElement)\r\n msg.push(addKey(\"Category\") + this.iModel.elements.getElement(this.category).getDisplayLabel());\r\n\r\n msg.push(addKey(\"Model\") + this.iModel.elements.getElement(this.model).getDisplayLabel());\r\n return msg;\r\n }\r\n\r\n /**\r\n * Insert this Element into the iModel.\r\n * @see [[IModelDb.Elements.insertElement]]\r\n * @note For convenience, the value of `this.id` is updated to reflect the resultant element's id.\r\n * However when `this.federationGuid` is not present or undefined, a new Guid will be generated and stored on the resultant element. But\r\n * the value of `this.federationGuid` is *not* updated. Generally, it is best to re-read the element after inserting (e.g. via [[IModelDb.Elements.getElement]])\r\n * if you intend to continue working with it. That will ensure its values reflect the persistent state.\r\n */\r\n public insert() {\r\n return this.id = this.iModel.elements.insertElement(this.toJSON());\r\n }\r\n /** Update this Element in the iModel. */\r\n public update() { this.iModel.elements.updateElement(this.toJSON()); }\r\n /** Delete this Element from the iModel. */\r\n public delete() { this.iModel.elements.deleteElement(this.id); }\r\n}\r\n\r\n/** An abstract base class to model real world entities that intrinsically have geometry.\r\n * @public @preview\r\n */\r\nexport abstract class GeometricElement extends Element {\r\n public static override get className(): string { return \"GeometricElement\"; }\r\n /** The Id of the [[Category]] for this GeometricElement. */\r\n public category: Id64String;\r\n /** The GeometryStream for this GeometricElement. */\r\n public geom?: GeometryStreamProps;\r\n /** The origin, orientation, and bounding box of this GeometricElement. */\r\n public abstract get placement(): Placement2d | Placement3d;\r\n\r\n protected constructor(props: GeometricElementProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.category = Id64.fromJSON(props.category);\r\n this.geom = props.geom;\r\n }\r\n\r\n /** Type guard for instanceof [[GeometricElement3d]] */\r\n public is3d(): this is GeometricElement3d { return this instanceof GeometricElement3d; }\r\n /** Type guard for instanceof [[GeometricElement2d]] */\r\n public is2d(): this is GeometricElement2d { return this instanceof GeometricElement2d; }\r\n /** Get the [Transform]($geometry) from the Placement of this GeometricElement */\r\n public getPlacementTransform(): Transform { return this.placement.transform; }\r\n public calculateRange3d(): AxisAlignedBox3d { return this.placement.calculateRange(); }\r\n\r\n public override toJSON(): GeometricElementProps {\r\n const val = super.toJSON() as GeometricElementProps;\r\n val.category = this.category;\r\n if (this.geom)\r\n val.geom = this.geom;\r\n return val;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n referenceIds.addElement(this.category);\r\n // TODO: GeometryPartIds?\r\n }\r\n\r\n /** @beta */\r\n public static override readonly requiredReferenceKeys: ReadonlyArray<string> = [...super.requiredReferenceKeys, \"category\"];\r\n /** @alpha */\r\n public static override readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\r\n ...super.requiredReferenceKeyTypeMap,\r\n category: ConcreteEntityTypes.Element,\r\n };\r\n\r\n /**\r\n * GeometricElement custom HandledProps includes 'inSpatialIndex'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\r\n { propertyName: \"inSpatialIndex\", source: \"Class\" },\r\n ];\r\n\r\n /**\r\n * GeometricElement deserializes 'inSpatialIndex'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override deserialize(props: DeserializeEntityArgs): GeometricElementProps {\r\n return super.deserialize(props) as GeometricElementProps;\r\n }\r\n\r\n /**\r\n * GeometricElement serialize 'inSpatialIndex'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override serialize(props: GeometricElementProps, iModel: IModelDb): ECSqlRow {\r\n return super.serialize(props, iModel);\r\n }\r\n}\r\n\r\n/** An abstract base class to model real world entities that intrinsically have 3d geometry.\r\n * See [how to create a GeometricElement3d]($docs/learning/backend/CreateElements.md#GeometricElement3d).\r\n * @public @preview\r\n */\r\nexport abstract class GeometricElement3d extends GeometricElement {\r\n public static override get className(): string { return \"GeometricElement3d\"; }\r\n public placement: Placement3d;\r\n public typeDefinition?: TypeDefinition;\r\n\r\n protected constructor(props: GeometricElement3dProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.placement = Placement3d.fromJSON(props.placement);\r\n if (props.typeDefinition)\r\n this.typeDefinition = TypeDefinition.fromJSON(props.typeDefinition);\r\n }\r\n\r\n public override toJSON(): GeometricElement3dProps {\r\n const val = super.toJSON() as GeometricElement3dProps;\r\n val.placement = this.placement;\r\n if (undefined !== this.typeDefinition)\r\n val.typeDefinition = this.typeDefinition;\r\n\r\n return val;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n if (undefined !== this.typeDefinition)\r\n referenceIds.addElement(this.typeDefinition.id);\r\n }\r\n\r\n /**\r\n * GeometricElement3d custom HandledProps includes 'category', 'geometryStream', 'origin', 'yaw', 'pitch', 'roll',\r\n * 'bBoxLow', 'bBoxHigh', and 'typeDefinition'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\r\n { propertyName: \"category\", source: \"Class\" },\r\n { propertyName: \"geometryStream\", source: \"Class\" },\r\n { propertyName: \"origin\", source: \"Class\" },\r\n { propertyName: \"yaw\", source: \"Class\" },\r\n { propertyName: \"pitch\", source: \"Class\" },\r\n { propertyName: \"roll\", source: \"Class\" },\r\n { propertyName: \"bBoxLow\", source: \"Class\" },\r\n { propertyName: \"bBoxHigh\", source: \"Class\" },\r\n { propertyName: \"typeDefinition\", source: \"Class\" }\r\n ];\r\n\r\n /**\r\n * GeometricElement3d deserializes 'category', 'geometryStream', 'origin', 'yaw', 'pitch', 'roll',\r\n * 'bBoxLow', 'bBoxHigh', and 'typeDefinition'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override deserialize(props: DeserializeEntityArgs): GeometricElement3dProps {\r\n const elProps = super.deserialize(props) as GeometricElement3dProps;\r\n const instance = props.row;\r\n elProps.category = instance.category.id;\r\n\r\n const origin = instance.origin ? [instance.origin.x, instance.origin.y, instance.origin.z] : [0, 0, 0];\r\n let bbox: LowAndHighXYZProps | undefined;\r\n if (\"bBoxHigh\" in instance && instance.bBoxHigh !== undefined && \"bBoxLow\" in instance && instance.bBoxLow !== undefined) {\r\n bbox = {\r\n low: [instance.bBoxLow.x, instance.bBoxLow.y, instance.bBoxLow.z],\r\n high: [instance.bBoxHigh.x, instance.bBoxHigh.y, instance.bBoxHigh.z],\r\n }\r\n }\r\n\r\n elProps.placement = {\r\n origin,\r\n angles: YawPitchRollAngles.createDegrees(instance.yaw ?? 0, instance.pitch ?? 0, instance.roll ?? 0).toJSON(),\r\n bbox\r\n };\r\n\r\n if (instance.geometryStream) {\r\n elProps.geom = props.iModel[_nativeDb].convertOrUpdateGeometrySource({\r\n is2d: false,\r\n geom: instance.geometryStream as Uint8Array,\r\n placement: elProps.placement,\r\n categoryId: elProps.category\r\n }, \"GeometryStreamProps\", props.options?.element ?? {}).geom as GeometryStreamProps;\r\n }\r\n\r\n if (instance.typeDefinition) {\r\n elProps.typeDefinition = instance.typeDefinition;\r\n }\r\n\r\n return elProps;\r\n }\r\n\r\n /**\r\n * GeometricElement3d serializes 'category', 'geometryStream', 'origin', 'yaw', 'pitch', 'roll',\r\n * 'bBoxLow', 'bBoxHigh', and 'typeDefinition'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override serialize(props: GeometricElement3dProps, iModel: IModelDb): ECSqlRow {\r\n const inst = super.serialize(props, iModel);\r\n inst.category = { id: props.category };\r\n\r\n const assignPlacement = (placement: Placement3dProps) => {\r\n if (Array.isArray(placement.origin)) {\r\n inst.origin = { x: placement.origin[0], y: placement.origin[1], z: placement.origin[2] };\r\n } else {\r\n inst.origin = placement.origin;\r\n }\r\n inst.yaw = placement.angles.yaw;\r\n inst.pitch = placement.angles.pitch;\r\n inst.roll = placement.angles.roll;\r\n if (placement.bbox) {\r\n if (Array.isArray(placement.bbox.low)) {\r\n inst.bBoxLow = { x: placement.bbox.low[0], y: placement.bbox.low[1], z: placement.bbox.low[2] };\r\n } else {\r\n inst.bBoxLow = placement.bbox.low;\r\n }\r\n\r\n if (Array.isArray(placement.bbox.high)) {\r\n inst.bBoxHigh = { x: placement.bbox.high[0], y: placement.bbox.high[1], z: placement.bbox.high[2] };\r\n } else {\r\n inst.bBoxHigh = placement.bbox.high;\r\n }\r\n }\r\n }\r\n\r\n\r\n if (props.placement) {\r\n assignPlacement(props.placement);\r\n }\r\n\r\n if (props.elementGeometryBuilderParams) {\r\n const source = iModel[_nativeDb].convertOrUpdateGeometrySource({\r\n builder: props.elementGeometryBuilderParams,\r\n is2d: true,\r\n placement: props.placement,\r\n categoryId: props.category,\r\n }, \"BinaryStream\", {});\r\n\r\n inst.geometryStream = source.geom;\r\n if (source.placement) {\r\n assignPlacement(source.placement as Placement3dProps);\r\n }\r\n }\r\n\r\n if (props.geom) {\r\n const source = iModel[_nativeDb].convertOrUpdateGeometrySource({\r\n geom: props.geom as any,\r\n is2d: false,\r\n placement: props.placement,\r\n categoryId: props.category,\r\n }, \"BinaryStream\", {});\r\n inst.geometryStream = source.geom;\r\n if (source.placement) {\r\n assignPlacement(source.placement as Placement3dProps);\r\n }\r\n }\r\n\r\n inst.typeDefinition = props.typeDefinition;\r\n return inst;\r\n }\r\n}\r\n\r\n/** A 3d Graphical Element\r\n * @public @preview\r\n */\r\nexport abstract class GraphicalElement3d extends GeometricElement3d {\r\n public static override get className(): string { return \"GraphicalElement3d\"; }\r\n protected constructor(props: GeometricElement3dProps, iModel: IModelDb) { super(props, iModel); }\r\n}\r\n\r\n/** An abstract base class to model information entities that intrinsically have 2d geometry.\r\n * @public @preview\r\n */\r\nexport abstract class GeometricElement2d extends GeometricElement {\r\n public static override get className(): string { return \"GeometricElement2d\"; }\r\n public placement: Placement2d;\r\n public typeDefinition?: TypeDefinition;\r\n\r\n protected constructor(props: GeometricElement2dProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.placement = Placement2d.fromJSON(props.placement);\r\n if (props.typeDefinition)\r\n this.typeDefinition = TypeDefinition.fromJSON(props.typeDefinition);\r\n }\r\n\r\n public override toJSON(): GeometricElement2dProps {\r\n const val = super.toJSON() as GeometricElement2dProps;\r\n val.placement = this.placement;\r\n if (undefined !== this.typeDefinition)\r\n val.typeDefinition = this.typeDefinition;\r\n\r\n return val;\r\n }\r\n\r\n /**\r\n * GeometricElement2d custom HandledProps includes 'category', 'geometryStream', 'origin', 'rotation',\r\n * 'bBoxLow', 'bBoxHigh', and 'typeDefinition'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\r\n { propertyName: \"category\", source: \"Class\" },\r\n { propertyName: \"geometryStream\", source: \"Class\" },\r\n { propertyName: \"origin\", source: \"Class\" },\r\n { propertyName: \"rotation\", source: \"Class\" },\r\n { propertyName: \"bBoxLow\", source: \"Class\" },\r\n { propertyName: \"bBoxHigh\", source: \"Class\" },\r\n { propertyName: \"typeDefinition\", source: \"Class\" }\r\n ];\r\n\r\n /**\r\n * GeometricElement2d deserialize 'category', 'geometryStream', 'origin', 'rotation',\r\n * 'bBoxLow', 'bBoxHigh', and 'typeDefinition'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override deserialize(props: DeserializeEntityArgs): GeometricElement2dProps {\r\n const elProps = super.deserialize(props) as GeometricElement2dProps;\r\n const instance = props.row;\r\n elProps.category = instance.category.id;\r\n const origin = instance.origin ? [instance.origin.x, instance.origin.y] : [0, 0];\r\n let bbox: LowAndHighXYZProps | undefined;\r\n if (\"bBoxHigh\" in instance && instance.bBoxHigh !== undefined && \"bBoxLow\" in instance && instance.bBoxLow !== undefined) {\r\n bbox = {\r\n low: [instance.bBoxLow.x, instance.bBoxLow.y],\r\n high: [instance.bBoxHigh.x, instance.bBoxHigh.y],\r\n }\r\n }\r\n elProps.placement = {\r\n origin,\r\n angle: instance.rotation,\r\n bbox,\r\n };\r\n\r\n if (instance.geometryStream) {\r\n const source = props.iModel[_nativeDb].convertOrUpdateGeometrySource({\r\n is2d: true,\r\n geom: instance.geometryStream,\r\n placement: elProps.placement,\r\n categoryId: elProps.category\r\n }, \"GeometryStreamProps\", props.options?.element ?? {});\r\n elProps.geom = source.geom as GeometryStreamProps;\r\n if (source.placement) {\r\n elProps.placement = source.placement as Placement2dProps;\r\n }\r\n }\r\n\r\n if (instance.typeDefinition) {\r\n elProps.typeDefinition = instance.typeDefinition;\r\n }\r\n\r\n return elProps;\r\n }\r\n\r\n /**\r\n * GeometricElement2d serializes 'category', 'geometryStream', 'origin', 'rotation',\r\n * 'bBoxLow', 'bBoxHigh', and 'typeDefinition'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override serialize(props: GeometricElement2dProps, iModel: IModelDb): ECSqlRow {\r\n const inst = super.serialize(props, iModel);\r\n inst.category = { id: props.category };\r\n\r\n const assignPlacement = (placement: Placement2dProps) => {\r\n if (Array.isArray(placement.origin)) {\r\n inst.origin = { x: placement.origin[0], y: placement.origin[1] };\r\n } else {\r\n inst.origin = placement.origin;\r\n }\r\n inst.rotation = placement.angle;\r\n if (placement.bbox) {\r\n if (Array.isArray(placement.bbox.low)) {\r\n inst.bBoxLow = { x: placement.bbox.low[0], y: placement.bbox.low[1] };\r\n } else {\r\n inst.bBoxLow = placement.bbox.low;\r\n }\r\n\r\n if (Array.isArray(placement.bbox.high)) {\r\n inst.bBoxHigh = { x: placement.bbox.high[0], y: placement.bbox.high[1] };\r\n } else {\r\n inst.bBoxHigh = placement.bbox.high;\r\n }\r\n }\r\n }\r\n\r\n\r\n if (props.placement) {\r\n assignPlacement(props.placement);\r\n }\r\n\r\n if (props.elementGeometryBuilderParams) {\r\n const source = iModel[_nativeDb].convertOrUpdateGeometrySource({\r\n builder: props.elementGeometryBuilderParams,\r\n is2d: true,\r\n placement: props.placement,\r\n categoryId: props.category,\r\n }, \"BinaryStream\", {});\r\n\r\n inst.geometryStream = source.geom;\r\n if (source.placement) {\r\n assignPlacement(source.placement as Placement2dProps);\r\n }\r\n }\r\n\r\n if (props.geom) {\r\n const source = iModel[_nativeDb].convertOrUpdateGeometrySource({\r\n geom: props.geom as any,\r\n is2d: true,\r\n placement: props.placement,\r\n categoryId: props.category,\r\n }, \"BinaryStream\", {});\r\n\r\n inst.geometryStream = source.geom;\r\n if (source.placement) {\r\n assignPlacement(source.placement as Placement2dProps);\r\n }\r\n }\r\n inst.typeDefinition = props.typeDefinition;\r\n return inst;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n if (undefined !== this.typeDefinition)\r\n referenceIds.addElement(this.typeDefinition.id);\r\n }\r\n}\r\n\r\n/** An abstract base class for 2d Geometric Elements that are used to convey information within graphical presentations (like drawings).\r\n * @public @preview\r\n */\r\nexport abstract class GraphicalElement2d extends GeometricElement2d {\r\n public static override get className(): string { return \"GraphicalElement2d\"; }\r\n protected constructor(props: GeometricElement2dProps, iModel: IModelDb) { super(props, iModel); }\r\n}\r\n\r\n/** 2d element used to annotate drawings and sheets.\r\n * @public @preview\r\n */\r\nexport class AnnotationElement2d extends GraphicalElement2d {\r\n public static override get className(): string { return \"AnnotationElement2d\"; }\r\n protected constructor(props: GeometricElement2dProps, iModel: IModelDb) { super(props, iModel); }\r\n}\r\n\r\n/** 2d element used to persist graphics for use in drawings.\r\n * @public @preview\r\n */\r\nexport class DrawingGraphic extends GraphicalElement2d {\r\n public static override get className(): string { return \"DrawingGraphic\"; }\r\n protected constructor(props: GeometricElement2dProps, iModel: IModelDb) { super(props, iModel); }\r\n}\r\n\r\n/** An Element that occupies real world space. Its coordinates are in the project space of its iModel.\r\n * @public @preview\r\n */\r\nexport abstract class SpatialElement extends GeometricElement3d {\r\n public static override get className(): string { return \"SpatialElement\"; }\r\n protected constructor(props: GeometricElement3dProps, iModel: IModelDb) { super(props, iModel); }\r\n}\r\n\r\n/** An Element that is spatially located, has mass, and can be *touched*.\r\n * @public @preview\r\n */\r\nexport abstract class PhysicalElement extends SpatialElement {\r\n public static override get className(): string { return \"PhysicalElement\"; }\r\n /** If defined, the [[PhysicalMaterial]] that makes up this PhysicalElement. */\r\n public physicalMaterial?: RelatedElement;\r\n protected constructor(props: PhysicalElementProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.physicalMaterial = RelatedElement.fromJSON(props.physicalMaterial);\r\n }\r\n\r\n public override toJSON(): PhysicalElementProps {\r\n const val = super.toJSON() as PhysicalElementProps;\r\n val.physicalMaterial = this.physicalMaterial?.toJSON();\r\n return val;\r\n }\r\n}\r\n\r\n/** Identifies a *tracked* real world location but has no mass and cannot be *touched*.\r\n * @public @preview\r\n */\r\nexport abstract class SpatialLocationElement extends SpatialElement {\r\n public static override get className(): string { return \"SpatialLocationElement\"; }\r\n protected constructor(props: GeometricElement3dProps, iModel: IModelDb) { super(props, iModel); }\r\n}\r\n\r\n/** A Volume Element is a Spatial Location Element that is restricted to defining a volume.\r\n * @public @preview\r\n */\r\nexport class VolumeElement extends SpatialLocationElement {\r\n public static override get className(): string { return \"VolumeElement\"; }\r\n protected constructor(props: GeometricElement3dProps, iModel: IModelDb) { super(props, iModel); }\r\n}\r\n\r\n/** A SectionDrawingLocation element identifies the location of a [[SectionDrawing]] in the context of a [[SpatialModel]],\r\n * enabling [HyperModeling]($hypermodeling).\r\n * @note The associated ECClass was added to the BisCore schema in version 1.0.11.\r\n * @public @preview\r\n */\r\nexport class SectionDrawingLocation extends SpatialLocationElement {\r\n /** The Id of the [[ViewDefinition]] to which this location refers. */\r\n public sectionView: RelatedElement;\r\n\r\n public static override get className(): string { return \"SectionDrawingLocation\"; }\r\n\r\n public constructor(props: SectionDrawingLocationProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.sectionView = RelatedElement.fromJSON(props.sectionView) ?? RelatedElement.none;\r\n }\r\n\r\n public override toJSON(): SectionDrawingLocationProps {\r\n return {\r\n ...super.toJSON(),\r\n sectionView: this.sectionView.toJSON(),\r\n };\r\n }\r\n}\r\n\r\n/** Information Content Element is an abstract base class for modeling pure information entities. Only the\r\n * core framework should directly subclass from Information Content Element. Domain and application developers\r\n * should start with the most appropriate subclass of Information Content Element.\r\n * @public @preview\r\n */\r\nexport abstract class InformationContentElement extends Element {\r\n public static override get className(): string { return \"InformationContentElement\"; }\r\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\r\n}\r\n\r\n/** Element used in conjunction with bis:ElementDrivesElement relationships to bundle multiple inputs before\r\n * driving the output element.\r\n * @beta\r\n */\r\nexport abstract class DriverBundleElement extends InformationContentElement {\r\n public static override get className(): string { return \"DriverBundleElement\"; }\r\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\r\n}\r\n\r\n/** Information Reference is an abstract base class for modeling entities whose main purpose is to reference something else.\r\n * @public @preview\r\n */\r\nexport abstract class InformationReferenceElement extends InformationContentElement {\r\n public static override get className(): string { return \"InformationReferenceElement\"; }\r\n\r\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\r\n}\r\n\r\n/** A Subject is an information element that describes what this repository (or part thereof) is about.\r\n * @public @preview\r\n */\r\nexport class Subject extends InformationReferenceElement {\r\n public static override get className(): string { return \"Subject\"; }\r\n public description?: string;\r\n protected constructor(props: SubjectProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.description = props.description;\r\n }\r\n\r\n public override toJSON(): SubjectProps { // This override only specializes the return type\r\n return super.toJSON() as SubjectProps; // Entity.toJSON takes care of auto-handled properties\r\n }\r\n /** Create a Code for a Subject given a name that is meant to be unique within the scope of its parent Subject.\r\n * @param iModelDb The IModelDb\r\n * @param parentSubjectId The Id of the parent Subject that provides the scope for names of its child Subjects.\r\n * @param codeValue The child Subject name\r\n */\r\n public static createCode(iModelDb: IModelDb, parentSubjectId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.subject);\r\n return new Code({ spec: codeSpec.id, scope: parentSubjectId, value: codeValue });\r\n }\r\n /** Create a Subject\r\n * @param iModelDb The IModelDb\r\n * @param parentSubjectId The new Subject will be a child of this Subject\r\n * @param name The name (codeValue) of the Subject\r\n * @param description The optional description of the Subject\r\n * @returns The newly constructed Subject\r\n * @throws [[IModelError]] if there is a problem creating the Subject\r\n */\r\n public static create(iModelDb: IModelDb, parentSubjectId: Id64String, name: string, description?: string): Subject {\r\n const subjectProps: SubjectProps = {\r\n classFullName: this.classFullName,\r\n model: IModel.repositoryModelId,\r\n parent: new SubjectOwnsSubjects(parentSubjectId),\r\n code: this.createCode(iModelDb, parentSubjectId, name),\r\n description,\r\n };\r\n return new Subject(subjectProps, iModelDb);\r\n }\r\n\r\n /** Insert a Subject\r\n * @param iModelDb Insert into this IModelDb\r\n * @param parentSubjectId The new Subject will be inserted as a child of this Subject\r\n * @param name The name (codeValue) of the Subject\r\n * @param description The optional description of the Subject\r\n * @returns The Id of the newly inserted Subject\r\n * @throws [[IModelError]] if there is a problem inserting the Subject\r\n */\r\n public static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string, description?: string): Id64String {\r\n const subject = this.create(iModelDb, parentSubjectId, name, description);\r\n return iModelDb.elements.insertElement(subject.toJSON());\r\n }\r\n}\r\n\r\n/** An InformationContentElement that identifies the content of a document.\r\n * The realized form of a document is called a DocumentCarrier (different class than Document).\r\n * For example, a will is a legal document. The will published into a PDF file is an ElectronicDocumentCopy.\r\n * The will printed onto paper is a PrintedDocumentCopy.\r\n * In this example, the Document only identifies, names, and tracks the content of the will.\r\n * @public @preview\r\n */\r\nexport abstract class Document extends InformationContentElement {\r\n public static override get className(): string { return \"Document\"; }\r\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\r\n}\r\n\r\n/** A document that represents a drawing, that is, a two-dimensional graphical representation of engineering data. A Drawing element is usually modelled by a [[DrawingModel]].\r\n * @public @preview\r\n */\r\nexport class Drawing extends Document {\r\n private _scaleFactor: number;\r\n\r\n /** A factor used by tools to adjust the size of text in [GeometricElement2d]($backend)s in the associated [DrawingModel]($backend) and to compute the\r\n * size of the [ViewAttachment]($backend) created when attaching the [Drawing]($backend) to a [Sheet]($backend).\r\n * Default: 1.\r\n * @note Attempting to set this property to a value less than or equal to zero will produce an exception.\r\n * @public @preview\r\n */\r\n public get scaleFactor(): number { return this._scaleFactor; }\r\n public set scaleFactor(factor: number) {\r\n if (factor <= 0) {\r\n if (this._scaleFactor === undefined) {\r\n // Entity constructor calls our setter before our constructor runs...don't throw an exception at that time,\r\n // because somebody may have persisted the value as zero.\r\n return;\r\n }\r\n\r\n throw new Error(\"Drawing.scaleFactor must be greater than zero\");\r\n }\r\n\r\n this._scaleFactor = factor;\r\n }\r\n\r\n public static override get className(): string { return \"Drawing\"; }\r\n\r\n protected constructor(props: DrawingProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n\r\n this._scaleFactor = typeof props.scaleFactor === \"number\" && props.scaleFactor > 0 ? props.scaleFactor : 1;\r\n }\r\n\r\n public override toJSON(): DrawingProps {\r\n const drawingProps: DrawingProps = super.toJSON();\r\n // Entity.toJSON auto-magically sets drawingProps.scaleFactor from this.scaleFactor - unset if default value of 1.\r\n if (drawingProps.scaleFactor === 1) {\r\n delete drawingProps.scaleFactor;\r\n }\r\n\r\n return drawingProps;\r\n }\r\n\r\n /** The name of the DrawingModel class modeled by this element type. */\r\n protected static get drawingModelFullClassName(): string { return DrawingModel.classFullName; }\r\n\r\n /** Create a Code for a Drawing given a name that is meant to be unique within the scope of the specified DocumentListModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DocumentListModel that contains the Drawing and provides the scope for its name.\r\n * @param codeValue The Drawing name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.drawing);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n\r\n /** Insert a Drawing element and a DrawingModel that breaks it down.\r\n * @param iModelDb Insert into this iModel\r\n * @param documentListModelId Insert the new Drawing into this DocumentListModel\r\n * @param name The name of the Drawing.\r\n * @param scaleFactor See [[scaleFactor]]. Must be greater than zero.\r\n * @returns The Id of the newly inserted Drawing element and the DrawingModel that breaks it down (same value).\r\n * @throws [[IModelError]] if unable to insert the element.\r\n * @throws Error if `scaleFactor` is less than or equal to zero.\r\n */\r\n public static insert(iModelDb: IModelDb, documentListModelId: Id64String, name: string, scaleFactor?: number): Id64String {\r\n const drawingProps: DrawingProps = {\r\n classFullName: this.classFullName,\r\n model: documentListModelId,\r\n code: this.createCode(iModelDb, documentListModelId, name),\r\n };\r\n\r\n if (scaleFactor !== undefined) {\r\n if (scaleFactor <= 0) {\r\n throw new Error(\"Drawing.scaleFactor must be greater than zero\");\r\n }\r\n\r\n drawingProps.scaleFactor = scaleFactor;\r\n }\r\n\r\n const drawingId: Id64String = iModelDb.elements.insertElement(drawingProps);\r\n const model: DrawingModel = iModelDb.models.createModel({\r\n classFullName: this.drawingModelFullClassName,\r\n modeledElement: { id: drawingId },\r\n });\r\n return iModelDb.models.insertModel(model.toJSON());\r\n }\r\n}\r\n\r\n/** A document that represents a section drawing, that is, a graphical documentation derived from a planar\r\n * section of a spatial view. A SectionDrawing element is modelled by a [[SectionDrawingModel]] or a [[GraphicalModel3d]].\r\n * A [[SectionDrawingLocation]] can associate the drawing with a spatial location, enabling [HyperModeling]($hypermodeling).\r\n * @public @preview\r\n */\r\nexport class SectionDrawing extends Drawing {\r\n /** The type of section used to generate the drawing. */\r\n public sectionType: SectionType;\r\n /** The spatial view from which the section was generated. */\r\n public spatialView: RelatedElement;\r\n /** A transform from the section drawing model's coordinates to spatial coordinates. */\r\n public drawingToSpatialTransform?: Transform;\r\n /** If the section drawing is placed onto a [[Sheet]] via a [[ViewAttachment]], a transform from the sheet's coordinates to spatial coordinates. */\r\n public sheetToSpatialTransform?: Transform;\r\n /** If the section drawing is placed onto a [[Sheet]] via a [[ViewAttachment]], the clip to apply to the sheet graphics when drawn in the context\r\n * of the spatial view.\r\n * @note The ClipVector is defined in spatial coordinates.\r\n */\r\n public drawingBoundaryClip?: ClipVector;\r\n /** If true, when displaying the section drawing as a [DrawingViewState]($frontend), the [[spatialView]] will also be displayed. */\r\n public displaySpatialView: boolean;\r\n\r\n public static override get className(): string { return \"SectionDrawing\"; }\r\n\r\n protected static override get drawingModelFullClassName(): string { return SectionDrawingModel.classFullName; }\r\n\r\n protected constructor(props: SectionDrawingProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.sectionType = JsonUtils.asInt(props.sectionType, SectionType.Section);\r\n this.spatialView = RelatedElement.fromJSON(props.spatialView) ?? RelatedElement.none;\r\n this.displaySpatialView = JsonUtils.asBool(props.jsonProperties?.displaySpatialView);\r\n\r\n const json = props.jsonProperties;\r\n if (!json)\r\n return;\r\n\r\n if (json.drawingToSpatialTransform)\r\n this.drawingToSpatialTransform = Transform.fromJSON(json.drawingToSpatialTransform);\r\n\r\n if (json.sheetToSpatialTransform)\r\n this.sheetToSpatialTransform = Transform.fromJSON(json.sheetToSpatialTransform);\r\n\r\n if (json.drawingBoundaryClip)\r\n this.drawingBoundaryClip = ClipVector.fromJSON(json.drawingBoundaryClip);\r\n }\r\n\r\n public override toJSON(): SectionDrawingProps {\r\n const props: SectionDrawingProps = {\r\n ...super.toJSON(),\r\n sectionType: this.sectionType,\r\n spatialView: this.spatialView.toJSON(),\r\n };\r\n\r\n if (!props.jsonProperties)\r\n props.jsonProperties = {};\r\n\r\n props.jsonProperties.displaySpatialView = this.displaySpatialView ? true : undefined;\r\n props.jsonProperties.drawingToSpatialTransform = this.drawingToSpatialTransform?.toJSON();\r\n props.jsonProperties.sheetToSpatialTransform = this.sheetToSpatialTransform?.toJSON();\r\n props.jsonProperties.drawingBoundaryClip = this.drawingBoundaryClip?.toJSON();\r\n\r\n return props;\r\n }\r\n}\r\n\r\n/** The template for a SheetBorder\r\n * @public @preview\r\n */\r\nexport class SheetBorderTemplate extends Document {\r\n public static override get className(): string { return \"SheetBorderTemplate\"; }\r\n public height?: number;\r\n public width?: number;\r\n protected constructor(props: SheetBorderTemplateProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.height = props.height;\r\n this.width = props.width;\r\n }\r\n}\r\n\r\n/** The template for a [[Sheet]]\r\n * @public @preview\r\n */\r\nexport class SheetTemplate extends Document {\r\n public static override get className(): string { return \"SheetTemplate\"; }\r\n public height?: number;\r\n public width?: number;\r\n public border?: Id64String;\r\n\r\n protected constructor(props: SheetTemplateProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.height = props.height;\r\n this.width = props.width;\r\n this.border = props.border;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n if (undefined !== this.border)\r\n referenceIds.addElement(this.border);\r\n }\r\n}\r\n\r\n/** A digital representation of a *sheet of paper*. Modeled by a [[SheetModel]].\r\n * @public @preview\r\n */\r\nexport class Sheet extends Document {\r\n public static override get className(): string { return \"Sheet\"; }\r\n public height: number;\r\n public width: number;\r\n public scale?: number;\r\n public sheetTemplate?: Id64String;\r\n\r\n protected constructor(props: SheetProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.height = JsonUtils.asDouble(props.height);\r\n this.width = JsonUtils.asDouble(props.width);\r\n this.scale = props.scale;\r\n this.sheetTemplate = props.sheetTemplate ? Id64.fromJSON(props.sheetTemplate) : undefined;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n if (undefined !== this.sheetTemplate)\r\n referenceIds.addElement(this.sheetTemplate);\r\n }\r\n\r\n /** Create a Code for a Sheet given a name that is meant to be unique within the scope of the specified DocumentListModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DocumentListModel that contains the Sheet and provides the scope for its name.\r\n * @param codeValue The Sheet name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.sheet);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** Information Record Element is an abstract base class for modeling information records. Information Record\r\n * Element is the default choice if no other subclass of Information Content Element makes sense.\r\n * @public @preview\r\n */\r\nexport abstract class InformationRecordElement extends InformationContentElement {\r\n public static override get className(): string { return \"InformationRecordElement\"; }\r\n\r\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\r\n}\r\n\r\n/** A Definition Element holds configuration-related information that is meant to be referenced / shared.\r\n * @public @preview\r\n */\r\nexport abstract class DefinitionElement extends InformationContentElement {\r\n public static override get className(): string { return \"DefinitionElement\"; }\r\n /** If true, don't show this DefinitionElement in user interface lists. */\r\n public isPrivate: boolean;\r\n\r\n protected constructor(props: DefinitionElementProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.isPrivate = true === props.isPrivate;\r\n }\r\n\r\n /**\r\n * DefinitionElement custom HandledProps includes 'isPrivate'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\r\n { propertyName: \"isPrivate\", source: \"Class\" },\r\n ];\r\n\r\n /**\r\n * DefinitionElement deserializes 'isPrivate'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override deserialize(props: DeserializeEntityArgs): DefinitionElementProps {\r\n const elProps = super.deserialize(props) as DefinitionElementProps;\r\n if (props.row.isPrivate !== undefined)\r\n elProps.isPrivate = props.row.isPrivate;\r\n return elProps;\r\n }\r\n\r\n /**\r\n * DefinitionElement serialize 'isPrivate'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override serialize(props: DefinitionElementProps, iModel: IModelDb): ECSqlRow {\r\n const inst = super.serialize(props, iModel);\r\n if (undefined !== props.isPrivate) {\r\n inst.isPrivate = props.isPrivate;\r\n }\r\n return inst;\r\n }\r\n\r\n public override toJSON(): DefinitionElementProps {\r\n const val = super.toJSON() as DefinitionElementProps;\r\n val.isPrivate = this.isPrivate;\r\n return val;\r\n }\r\n}\r\n\r\n/** This abstract class unifies DefinitionGroup and DefinitionContainer for relationship endpoint purposes.\r\n * @note The associated ECClass was added to the BisCore schema in version 1.0.10\r\n * @public @preview\r\n */\r\nexport abstract class DefinitionSet extends DefinitionElement {\r\n public static override get className(): string { return \"DefinitionSet\"; }\r\n}\r\n\r\n/** A DefinitionContainer exclusively owns a set of DefinitionElements contained within its sub-model (of type DefinitionModel).\r\n * @note The associated ECClass was added to the BisCore schema in version 1.0.10\r\n * @public @preview\r\n */\r\nexport class DefinitionContainer extends DefinitionSet {\r\n public static override get className(): string { return \"DefinitionContainer\"; }\r\n /** Create a DefinitionContainer\r\n * @param iModelDb The IModelDb\r\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that will contain this DefinitionContainer element.\r\n * @param code The Code for this DefinitionContainer.\r\n * @param isPrivate The optional hint, that if `true` means it should not be displayed in the UI.\r\n * @returns The newly constructed DefinitionContainer\r\n * @note There is not a predefined CodeSpec for DefinitionContainer elements, so it is the responsibility of the domain or application to create one.\r\n * @throws [[IModelError]] if there is a problem creating the DefinitionContainer\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, code: Code, isPrivate?: boolean): DefinitionContainer {\r\n const elementProps: DefinitionElementProps = {\r\n classFullName: this.classFullName,\r\n model: definitionModelId,\r\n code,\r\n isPrivate,\r\n };\r\n return new DefinitionContainer(elementProps, iModelDb);\r\n }\r\n /** Insert a DefinitionContainer and its sub-model.\r\n * @param iModelDb Insert into this IModelDb\r\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that will contain this DefinitionContainer element.\r\n * @param code The Code for this DefinitionContainer.\r\n * @param isPrivate The optional hint, that if `true` means it should not be displayed in the UI.\r\n * @returns The Id of the newly inserted DefinitionContainer and its newly inserted sub-model (of type DefinitionModel).\r\n * @note There is not a predefined CodeSpec for DefinitionContainer elements, so it is the responsibility of the domain or application to create one.\r\n * @throws [[IModelError]] if there is a problem inserting the DefinitionContainer\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, code: Code, isPrivate?: boolean): Id64String {\r\n const containerElement = this.create(iModelDb, definitionModelId, code, isPrivate);\r\n const containerElementId = iModelDb.elements.insertElement(containerElement.toJSON());\r\n const containerSubModelProps: ModelProps = {\r\n classFullName: DefinitionModel.classFullName,\r\n modeledElement: { id: containerElementId },\r\n isPrivate,\r\n };\r\n iModelDb.models.insertModel(containerSubModelProps);\r\n return containerElementId;\r\n }\r\n}\r\n\r\n/** A non-exclusive set of DefinitionElements grouped using the DefinitionGroupGroupsDefinitions relationship.\r\n * @note The associated ECClass was added to the BisCore schema in version 1.0.10\r\n * @public @preview\r\n */\r\nexport class DefinitionGroup extends DefinitionSet {\r\n public static override get className(): string { return \"DefinitionGroup\"; }\r\n /** Create a DefinitionGroup\r\n * @param iModelDb The IModelDb\r\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that will contain this DefinitionGroup element.\r\n * @param code The Code for this DefinitionGroup\r\n * @param isPrivate The optional hint, that if `true` means it should not be displayed in the UI.\r\n * @returns The newly constructed DefinitionGroup\r\n * @note There is not a predefined CodeSpec for DefinitionGroup elements, so it is the responsibility of the domain or application to create one.\r\n * @throws [[IModelError]] if there is a problem creating the DefinitionGroup\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, code: Code, isPrivate?: boolean): DefinitionGroup {\r\n const elementProps: DefinitionElementProps = {\r\n classFullName: this.classFullName,\r\n model: definitionModelId,\r\n code,\r\n isPrivate,\r\n };\r\n return new DefinitionGroup(elementProps, iModelDb);\r\n }\r\n}\r\n\r\n/** Defines a set of properties (the *type*) that may be associated with an element.\r\n * @public @preview\r\n */\r\nexport abstract class TypeDefinitionElement extends DefinitionElement {\r\n public static override get className(): string { return \"TypeDefinitionElement\"; }\r\n public recipe?: RelatedElement;\r\n\r\n protected constructor(props: TypeDefinitionElementProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.recipe = RelatedElement.fromJSON(props.recipe);\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n if (undefined !== this.recipe)\r\n referenceIds.addElement(this.recipe.id);\r\n }\r\n}\r\n\r\n/** Defines a recipe for generating instances from a definition.\r\n * @beta\r\n */\r\nexport abstract class RecipeDefinitionElement extends DefinitionElement {\r\n public static override get className(): string { return \"RecipeDefinitionElement\"; }\r\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\r\n}\r\n\r\n/** Defines a set of properties (the *type*) that can be associated with a Physical Element. A Physical\r\n * Type has a strong correlation with something that can be ordered from a catalog since all instances\r\n * share a common set of properties.\r\n * @public @preview\r\n */\r\nexport abstract class PhysicalType extends TypeDefinitionElement {\r\n public static override get className(): string { return \"PhysicalType\"; }\r\n /** If defined, the [[PhysicalMaterial]] that makes up this PhysicalType. */\r\n public physicalMaterial?: RelatedElement;\r\n protected constructor(props: PhysicalTypeProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.physicalMaterial = RelatedElement.fromJSON(props.physicalMaterial);\r\n }\r\n\r\n public override toJSON(): PhysicalTypeProps {\r\n const val = super.toJSON() as PhysicalTypeProps;\r\n val.physicalMaterial = this.physicalMaterial?.toJSON();\r\n return val;\r\n }\r\n /** Create a Code for a PhysicalType element given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the PhysicalType element and provides the scope for its name.\r\n * @param codeValue The PhysicalType name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.physicalType);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** Defines a set of properties (the *type*) that can be associated with a spatial location.\r\n * @public @preview\r\n */\r\nexport abstract class SpatialLocationType extends TypeDefinitionElement {\r\n public static override get className(): string { return \"SpatialLocationType\"; }\r\n protected constructor(props: TypeDefinitionElementProps, iModel: IModelDb) { super(props, iModel); }\r\n\r\n /** Create a Code for a SpatialLocationType element given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the SpatialLocationType element and provides the scope for its name.\r\n * @param codeValue The SpatialLocationType name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.spatialLocationType);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** A TemplateRecipe3d is a DefinitionElement that has a sub-model that contains the 3d template elements.\r\n * @beta\r\n */\r\nexport class TemplateRecipe3d extends RecipeDefinitionElement {\r\n public static override get className(): string { return \"TemplateRecipe3d\"; }\r\n\r\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\r\n\r\n /** Create a Code for a TemplateRecipe3d given a name that is meant to be unique within the scope of its Model.\r\n * @param iModelDb The IModelDb\r\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe3d element.\r\n * @param codeValue The name of the TemplateRecipe3d element.\r\n */\r\n public static createCode(iModelDb: IModelDb, definitionModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.templateRecipe3d);\r\n return new Code({ spec: codeSpec.id, scope: definitionModelId, value: codeValue });\r\n }\r\n\r\n /** Create a TemplateRecipe3d\r\n * @param iModelDb The IModelDb\r\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe3d element.\r\n * @param name The name (Code.value) of the TemplateRecipe3d\r\n * @returns The newly constructed TemplateRecipe3d\r\n * @throws [[IModelError]] if there is a problem creating the TemplateRecipe3d\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, isPrivate?: boolean): TemplateRecipe3d {\r\n const elementProps: DefinitionElementProps = {\r\n classFullName: this.classFullName,\r\n model: definitionModelId,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n isPrivate,\r\n };\r\n return new TemplateRecipe3d(elementProps, iModelDb);\r\n }\r\n /** Insert a TemplateRecipe3d and a PhysicalModel (sub-model) that will contain the 3d template elements.\r\n * @param iModelDb The IModelDb\r\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe3d element.\r\n * @param name The name (Code.value) of the TemplateRecipe3d\r\n * @returns The Id of the newly inserted TemplateRecipe3d and the PhysicalModel that sub-models it.\r\n * @throws [[IModelError]] if there is a problem inserting the TemplateRecipe3d or its sub-model.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, isPrivate?: boolean): Id64String {\r\n const element = this.create(iModelDb, definitionModelId, name, isPrivate);\r\n const modeledElementId: Id64String = iModelDb.elements.insertElement(element.toJSON());\r\n const modelProps: GeometricModel3dProps = {\r\n classFullName: PhysicalModel.classFullName,\r\n modeledElement: { id: modeledElementId },\r\n isTemplate: true,\r\n };\r\n return iModelDb.models.insertModel(modelProps); // will be the same value as modeledElementId\r\n }\r\n}\r\n\r\n/** Defines a set of properties (the *type*) that can be associated with a 2D Graphical Element.\r\n * @public @preview\r\n */\r\nexport abstract class GraphicalType2d extends TypeDefinitionElement {\r\n public static override get className(): string { return \"GraphicalType2d\"; }\r\n\r\n protected constructor(props: TypeDefinitionElementProps, iModel: IModelDb) { super(props, iModel); }\r\n\r\n /** Create a Code for a GraphicalType2d element given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the GraphicalType2d element and provides the scope for its name.\r\n * @param codeValue The GraphicalType2d name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.graphicalType2d);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** A recipe that uses a 2D template for creating new instances.\r\n * @beta\r\n */\r\nexport class TemplateRecipe2d extends RecipeDefinitionElement {\r\n public static override get className(): string { return \"TemplateRecipe2d\"; }\r\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\r\n\r\n /** Create a Code for a TemplateRecipe2d given a name that is meant to be unique within the scope of its Model.\r\n * @param iModelDb The IModelDb\r\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe2d element.\r\n * @param codeValue The name of the TemplateRecipe2d element.\r\n */\r\n public static createCode(iModelDb: IModelDb, definitionModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.templateRecipe2d);\r\n return new Code({ spec: codeSpec.id, scope: definitionModelId, value: codeValue });\r\n }\r\n\r\n /** Create a TemplateRecipe2d\r\n * @param iModelDb The IModelDb\r\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe2d element.\r\n * @param name The name (Code.value) of the TemplateRecipe2d\r\n * @returns The newly constructed TemplateRecipe2d\r\n * @throws [[IModelError]] if there is a problem creating the TemplateRecipe2d\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, isPrivate?: boolean): TemplateRecipe2d {\r\n const elementProps: DefinitionElementProps = {\r\n classFullName: this.classFullName,\r\n model: definitionModelId,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n isPrivate,\r\n };\r\n return new TemplateRecipe2d(elementProps, iModelDb);\r\n }\r\n /** Insert a TemplateRecipe2d and a DrawingModel (sub-model) that will contain the 2d template elements.\r\n * @param iModelDb The IModelDb\r\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe2d element.\r\n * @param name The name (Code.value) of the TemplateRecipe2d\r\n * @returns The Id of the newly inserted TemplateRecipe2d and the PhysicalModel that sub-models it.\r\n * @throws [[IModelError]] if there is a problem inserting the TemplateRecipe2d or its sub-model.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, isPrivate?: boolean): Id64String {\r\n const element = this.create(iModelDb, definitionModelId, name, isPrivate);\r\n const modeledElementId: Id64String = iModelDb.elements.insertElement(element.toJSON());\r\n const modelProps: GeometricModel2dProps = {\r\n classFullName: DrawingModel.classFullName,\r\n modeledElement: { id: modeledElementId },\r\n isTemplate: true,\r\n };\r\n return iModelDb.models.insertModel(modelProps); // will be the same value as modeledElementId\r\n }\r\n}\r\n\r\n/** An abstract base class for elements that establishes a particular modeling perspective for its parent Subject.\r\n * Instances are always sub-modeled by a specialization of Model of the appropriate modeling perspective.\r\n * @see [iModel Information Hierarchy]($docs/bis/guide/data-organization/top-of-the-world), [[Subject]], [[Model]]\r\n * @public @preview\r\n */\r\nexport abstract class InformationPartitionElement extends InformationContentElement {\r\n public static override get className(): string { return \"InformationPartitionElement\"; }\r\n /** A human-readable string describing the intent of the partition. */\r\n public description?: string;\r\n\r\n protected constructor(props: InformationPartitionElementProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.description = props.description;\r\n }\r\n\r\n public override toJSON(): InformationPartitionElementProps { // This override only specializes the return type\r\n return super.toJSON() as InformationPartitionElementProps; // Entity.toJSON takes care of auto-handled properties\r\n }\r\n\r\n /** Create a code that can be used for any subclass of InformationPartitionElement.\r\n * @param iModelDb The IModelDb\r\n * @param parentSubjectId The Id of the parent Subject that provides the scope for names of its child InformationPartitionElements.\r\n * @param codeValue The InformationPartitionElement name\r\n */\r\n public static createCode(iModel: IModelDb, parentSubjectId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.informationPartitionElement);\r\n return new Code({ spec: codeSpec.id, scope: parentSubjectId, value: codeValue });\r\n }\r\n}\r\n\r\n/** A DefinitionPartition element establishes a *Definition* modeling perspective for its parent Subject.\r\n * A DefinitionPartition is always sub-modeled by a DefinitionModel.\r\n * @see [[DefinitionModel]]\r\n * @public @preview\r\n */\r\nexport class DefinitionPartition extends InformationPartitionElement {\r\n public static override get className(): string { return \"DefinitionPartition\"; }\r\n}\r\n\r\n/** A DocumentPartition element establishes a *Document* modeling perspective for its parent Subject.\r\n * A DocumentPartition is always sub-modeled by a DocumentListModel.\r\n * @see [[DocumentListModel]]\r\n * @public @preview\r\n */\r\nexport class DocumentPartition extends InformationPartitionElement {\r\n public static override get className(): string { return \"DocumentPartition\"; }\r\n}\r\n\r\n/** A GroupInformationPartition element establishes a *Group Information* modeling perspective for its parent Subject.\r\n * A GroupInformationPartition is always sub-modeled by a GroupInformationModel.\r\n * @see [[GroupInformationModel]]\r\n * @public @preview\r\n */\r\nexport class GroupInformationPartition extends InformationPartitionElement {\r\n public static override get className(): string { return \"GroupInformationPartition\"; }\r\n}\r\n\r\n/** A GraphicalPartition3d element establishes a *3D Graphical* modeling perspective for its parent Subject.\r\n * A GraphicalPartition3d is always sub-modeled by a GraphicalModel3d.\r\n * @note The associated ECClass was added to the BisCore schema in version 1.0.8\r\n * @see [[GraphicalModel3d]]\r\n * @public @preview\r\n */\r\nexport class GraphicalPartition3d extends InformationPartitionElement {\r\n public static override get className(): string { return \"GraphicalPartition3d\"; }\r\n}\r\n\r\n/** An InformationRecordPartition element establishes a *Information Record* modeling perspective for its parent Subject.\r\n * A InformationRecordPartition is always sub-modeled by an InformationRecordModel.\r\n * @see [[InformationRecordModel]]\r\n * @public @preview\r\n */\r\nexport class InformationRecordPartition extends InformationPartitionElement {\r\n public static override get className(): string { return \"InformationRecordPartition\"; }\r\n}\r\n\r\n/** A LinkPartition element establishes a *Link* modeling perspective for its parent Subject. A LinkPartition is always sub-modeled by a LinkModel.\r\n * @see [[LinkModel]]\r\n * @public @preview\r\n */\r\nexport class LinkPartition extends InformationPartitionElement {\r\n public static override get className(): string { return \"LinkPartition\"; }\r\n}\r\n\r\n/** A PhysicalPartition element establishes a *Physical* modeling perspective for its parent Subject. A PhysicalPartition is always sub-modeled by a PhysicalModel.\r\n * @see [[PhysicalModel]]\r\n * @public @preview\r\n */\r\nexport class PhysicalPartition extends InformationPartitionElement {\r\n public static override get className(): string { return \"PhysicalPartition\"; }\r\n}\r\n\r\n/** A SpatialLocationPartition element establishes a *SpatialLocation* modeling perspective for its parent Subject.\r\n * A SpatialLocationPartition is always sub-modeled by a SpatialLocationModel.\r\n * @see [[SpatialLocationModel]]\r\n * @public @preview\r\n */\r\nexport class SpatialLocationPartition extends InformationPartitionElement {\r\n public static override get className(): string { return \"SpatialLocationPartition\"; }\r\n}\r\n\r\n/** A SheetIndexPartition element establishes a [[SheetIndex]] modeling perspective for its parent [[Subject]].\r\n * A SheetIndexPartition is always sub-modeled by a [[SheetIndexModel]].\r\n * @beta\r\n */\r\nexport class SheetIndexPartition extends InformationPartitionElement {\r\n public static override get className(): string { return \"SheetIndexPartition\"; }\r\n}\r\n\r\n/** Group Information is an abstract base class for modeling entities whose main purpose is to reference a group of related elements.\r\n * @public @preview\r\n */\r\nexport abstract class GroupInformationElement extends InformationReferenceElement {\r\n public static override get className(): string { return \"GroupInformationElement\"; }\r\n}\r\n\r\n/** An information element that specifies a link.\r\n * @public @preview\r\n */\r\nexport abstract class LinkElement extends InformationReferenceElement {\r\n public static override get className(): string { return \"LinkElement\"; }\r\n /** Create a Code for a LinkElement given a name that is meant to be unique within the scope of the specified Model.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the Model that contains the LinkElement and provides the scope for its name.\r\n * @param codeValue The LinkElement name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.linkElement);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** An information element that specifies a URL link.\r\n * @public @preview\r\n */\r\nexport class UrlLink extends LinkElement {\r\n public static override get className(): string { return \"UrlLink\"; }\r\n public description?: string;\r\n public url?: string;\r\n\r\n protected constructor(props: UrlLinkProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.description = props.description;\r\n this.url = props.url;\r\n }\r\n\r\n /**\r\n * UrlLink custom HandledProps includes 'description', and 'url'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\r\n { propertyName: \"description\", source: \"Class\" },\r\n { propertyName: \"url\", source: \"Class\" },\r\n ];\r\n\r\n /**\r\n * UrlLink deserializes 'description', and 'url'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override deserialize(props: DeserializeEntityArgs): UrlLinkProps {\r\n const elProps = super.deserialize(props) as UrlLinkProps;\r\n elProps.description = props.row.description ?? \"\";\r\n elProps.url = props.row.url;\r\n return elProps;\r\n }\r\n\r\n /**\r\n * UrlLink serializes 'description', and 'url'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override serialize(props: UrlLinkProps, iModel: IModelDb): ECSqlRow {\r\n const inst = super.serialize(props, iModel);\r\n inst.description = props.description;\r\n return inst;\r\n }\r\n\r\n public override toJSON(): UrlLinkProps {\r\n const val = super.toJSON() as UrlLinkProps;\r\n val.description = this.description;\r\n val.url = this.url;\r\n return val;\r\n }\r\n}\r\n\r\n/** Represents a folder-like structure that organizes repositories (typically files) in an external system.\r\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\r\n * @alpha\r\n */\r\nexport class FolderLink extends UrlLink {\r\n public static override get className(): string { return \"FolderLink\"; }\r\n}\r\n\r\n/** An information element that links to a repository.\r\n * @public @preview\r\n */\r\nexport class RepositoryLink extends UrlLink {\r\n public static override get className(): string { return \"RepositoryLink\"; }\r\n public repositoryGuid?: GuidString;\r\n /** @note This property was added to the BisCore schema in version 1.0.13 */\r\n public format?: string;\r\n\r\n protected constructor(props: RepositoryLinkProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.repositoryGuid = props.repositoryGuid;\r\n this.format = props.format;\r\n }\r\n\r\n public override toJSON(): RepositoryLinkProps {\r\n const val = super.toJSON() as RepositoryLinkProps;\r\n val.repositoryGuid = this.repositoryGuid;\r\n val.format = this.format;\r\n return val;\r\n }\r\n}\r\n\r\n/** An information element that links to an embedded file.\r\n * @public @preview\r\n */\r\nexport class EmbeddedFileLink extends LinkElement {\r\n public static override get className(): string { return \"EmbeddedFileLink\"; }\r\n}\r\n\r\n/** A real world entity is modeled as a Role Element when a set of external circumstances define an important\r\n * role (one that is worth tracking) that is not intrinsic to the entity playing the role. For example,\r\n * a person can play the role of a teacher or a rock can play the role of a boundary marker.\r\n * @public @preview\r\n */\r\nexport abstract class RoleElement extends Element {\r\n public static override get className(): string { return \"RoleElement\"; }\r\n}\r\n\r\n/** A Definition Element that specifies a collection of geometry that is meant to be reused across Geometric\r\n * Element instances. Leveraging Geometry Parts can help reduce file size and improve display performance.\r\n * @public @preview\r\n */\r\nexport class GeometryPart extends DefinitionElement {\r\n public static override get className(): string { return \"GeometryPart\"; }\r\n public geom?: GeometryStreamProps;\r\n public bbox: ElementAlignedBox3d;\r\n\r\n protected constructor(props: GeometryPartProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.geom = props.geom;\r\n this.bbox = Range3d.fromJSON(props.bbox);\r\n }\r\n\r\n /**\r\n * GeometryPart custom HandledProps includes 'geometryStream', 'bBoxHigh', and 'bBoxLow'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\r\n { propertyName: \"geometryStream\", source: \"Class\" },\r\n { propertyName: \"bBoxLow\", source: \"Class\" },\r\n { propertyName: \"bBoxHigh\", source: \"Class\" },\r\n ];\r\n\r\n /**\r\n * GeometryPart deserializes 'geometryStream', 'bBoxHigh', and 'bBoxLow'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override deserialize(props: DeserializeEntityArgs): GeometryPartProps {\r\n const elProps = super.deserialize(props) as GeometryPartProps;\r\n const instance = props.row;\r\n\r\n if (\"bBoxHigh\" in instance && instance.bBoxHigh !== undefined && \"bBoxLow\" in instance && instance.bBoxLow !== undefined) {\r\n elProps.bbox = {\r\n low: [instance.bBoxLow.x, instance.bBoxLow.y, instance.bBoxLow.z],\r\n high: [instance.bBoxHigh.x, instance.bBoxHigh.y, instance.bBoxHigh.z],\r\n };\r\n }\r\n\r\n if (instance.geometryStream) {\r\n elProps.geom = props.iModel[_nativeDb].convertOrUpdateGeometryPart({\r\n geom: instance.geometryStream as Uint8Array,\r\n is2d: false,\r\n bbox: elProps.bbox,\r\n }, \"GeometryStreamProps\", props.options?.element ?? {}).geom as GeometryStreamProps;\r\n }\r\n\r\n return elProps;\r\n }\r\n\r\n /**\r\n * GeometryPart serialize 'geometryStream', 'bBoxHigh', and 'bBoxLow'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override serialize(props: GeometryPartProps, iModel: IModelDb): ECSqlRow {\r\n const inst = super.serialize(props, iModel);\r\n\r\n if (undefined !== props.geom) {\r\n const source = inst.geometryStream = iModel[_nativeDb].convertOrUpdateGeometryPart({\r\n geom: props.geom as any,\r\n is2d: false,\r\n bbox: props.bbox,\r\n }, \"BinaryStream\", {});\r\n inst.geometryStream = source.geom as Uint8Array;\r\n if (source.bbox) {\r\n props.bbox = source.bbox;\r\n }\r\n }\r\n\r\n if (undefined !== props.bbox) {\r\n if (Array.isArray(props.bbox.low)) {\r\n inst.bBoxLow = { x: props.bbox.low[0], y: props.bbox.low[1], z: props.bbox.low[2] };\r\n } else {\r\n inst.bBoxLow = props.bbox.low;\r\n }\r\n if (Array.isArray(props.bbox.high)) {\r\n inst.bBoxHigh = { x: props.bbox.high[0], y: props.bbox.high[1], z: props.bbox.high[2] };\r\n } else {\r\n inst.bBoxHigh = props.bbox.high;\r\n }\r\n }\r\n return inst;\r\n }\r\n\r\n public override toJSON(): GeometryPartProps {\r\n const val = super.toJSON() as GeometryPartProps;\r\n val.geom = this.geom;\r\n val.bbox = this.bbox;\r\n return val;\r\n }\r\n\r\n /** Create a Code for a GeometryPart element given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the GeometryPart element and provides the scope for its name.\r\n * @param codeValue The GeometryPart name\r\n * @note GeometryPart elements are not required to be named (have a non-empty Code).\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.geometryPart);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** The definition element for a line style\r\n * @public @preview\r\n */\r\nexport class LineStyle extends DefinitionElement {\r\n public static override get className(): string { return \"LineStyle\"; }\r\n public description?: string;\r\n public data: string;\r\n\r\n protected constructor(props: LineStyleProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.description = props.description;\r\n this.data = props.data;\r\n }\r\n\r\n /**\r\n * LineStyle custom HandledProps includes 'data'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\r\n { propertyName: \"data\", source: \"Class\" },\r\n ];\r\n\r\n /**\r\n * LineStyle deserializes 'data'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override deserialize(props: DeserializeEntityArgs): LineStyleProps {\r\n const elProps = super.deserialize(props) as LineStyleProps;\r\n const instance = props.row;\r\n elProps.data = instance.data ?? \"\";\r\n return elProps;\r\n }\r\n\r\n /**\r\n * LineStyle serializes 'data'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override serialize(props: LineStyleProps, iModel: IModelDb): ECSqlRow {\r\n const inst = super.serialize(props, iModel);\r\n inst.data = props.data;\r\n return inst;\r\n }\r\n\r\n /** Create a Code for a LineStyle definition given a name that is meant to be unique within the scope of the specified model.\r\n * @param iModel The IModel\r\n * @param scopeModelId The Id of the DefinitionModel that contains the LineStyle and provides the scope for its name.\r\n * @param codeValue The name of the LineStyle\r\n * @returns A LineStyle Code\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n return new Code({ spec: iModel.codeSpecs.getByName(BisCodeSpec.lineStyle).id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** Describes how to animate a view of a [[GeometricModel]] to show change over time using a [RenderSchedule.Script]($common).\r\n * @note This class was introduced in version 01.00.13 of the BisCore ECSchema. It should only be used with [[IModelDb]]s containing that version or newer.\r\n * @public @preview\r\n */\r\nexport class RenderTimeline extends InformationRecordElement {\r\n public static override get className(): string { return \"RenderTimeline\"; }\r\n /** A human-readable description of the timeline, which may be an empty string. */\r\n public description: string;\r\n /** The JSON representation of the instructions for visualizing change over time.\r\n * @see [RenderSchedule.Script]($common) for the API for working with the script.\r\n */\r\n public scriptProps: RenderSchedule.ScriptProps;\r\n\r\n protected constructor(props: RenderTimelineProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.description = props.description ?? \"\";\r\n this.scriptProps = RenderTimeline.parseScriptProps(props.script);\r\n }\r\n\r\n public static fromJSON(props: RenderTimelineProps, iModel: IModelDb): RenderTimeline {\r\n return new RenderTimeline(props, iModel);\r\n }\r\n\r\n public override toJSON(): RenderTimelineProps {\r\n const props = super.toJSON() as RenderTimelineProps;\r\n if (this.description.length > 0)\r\n props.description = this.description;\r\n\r\n props.script = JSON.stringify(this.scriptProps);\r\n return props;\r\n }\r\n\r\n /**\r\n * RenderTimeline deserialize checks if Schedule Script Element Ids need to be omitted, and if so, removes them.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override deserialize(props: DeserializeEntityArgs): RenderTimelineProps {\r\n const elProps = super.deserialize(props) as RenderTimelineProps;\r\n const options = props.options?.element?.renderTimeline;\r\n // Omit Schedule Script Element Ids if the option is set\r\n if (options?.omitScriptElementIds && elProps.script) {\r\n const scriptProps: RenderSchedule.ScriptProps = RenderTimeline.parseScriptProps(elProps.script);\r\n elProps.script = JSON.stringify(RenderSchedule.Script.removeScheduleScriptElementIds(scriptProps));\r\n }\r\n return elProps;\r\n }\r\n\r\n private static parseScriptProps(json: string): RenderSchedule.ScriptProps {\r\n try {\r\n return JSON.parse(json);\r\n } catch {\r\n return [];\r\n }\r\n }\r\n\r\n protected override collectReferenceIds(ids: EntityReferenceSet): void {\r\n super.collectReferenceIds(ids);\r\n const script = RenderSchedule.Script.fromJSON(this.scriptProps);\r\n script?.discloseIds(ids);\r\n }\r\n\r\n /** @alpha */\r\n protected static override async onCloned(context: IModelElementCloneContext, sourceProps: RenderTimelineProps, targetProps: RenderTimelineProps): Promise<void> {\r\n await super.onCloned(context, sourceProps, targetProps);\r\n if (context.isBetweenIModels)\r\n targetProps.script = JSON.stringify(this.remapScript(context, this.parseScriptProps(targetProps.script)));\r\n }\r\n\r\n /** Remap Ids when cloning a RenderSchedule.Script between iModels on a DisplayStyle or RenderTimeline.\r\n * @beta\r\n */\r\n public static remapScript(context: IModelElementCloneContext, input: RenderSchedule.ScriptProps): RenderSchedule.ScriptProps {\r\n const scriptProps: RenderSchedule.ScriptProps = [];\r\n if (!Array.isArray(input))\r\n return scriptProps;\r\n\r\n const elementIds = new OrderedId64Array();\r\n for (const model of input) {\r\n const modelId = context.findTargetElementId(model.modelId);\r\n if (!Id64.isValid(modelId))\r\n continue;\r\n\r\n model.modelId = modelId;\r\n scriptProps.push(model);\r\n for (const element of model.elementTimelines) {\r\n elementIds.clear();\r\n for (const sourceId of RenderSchedule.ElementTimeline.getElementIds(element.elementIds)) {\r\n const targetId = context.findTargetElementId(sourceId);\r\n if (Id64.isValid(targetId))\r\n elementIds.insert(targetId);\r\n }\r\n\r\n element.elementIds = CompressedId64Set.compressIds(elementIds);\r\n }\r\n }\r\n\r\n return scriptProps;\r\n }\r\n}\r\n\r\n/** Arguments supplied to [[ProjectInformationRecord.create]].\r\n * @beta\r\n */\r\nexport interface ProjectInformationRecordCreateArgs extends ProjectInformation {\r\n /** The iModel in which to create the new element. */\r\n iModel: IModelDb;\r\n /** The new element's code. Defaults to an empty code. */\r\n code?: Code;\r\n /** The Id of the parent [[Subject]] whose project-level properties the ProjectInformationRecord element describes.\r\n * The ProjectInformationRecord element will reside in the same [[Model]] as the parent Subject.\r\n */\r\n parentSubjectId: Id64String;\r\n}\r\n\r\n/** Captures project-level properties of the real-world entity represented by its parent [[Subject]].\r\n * @beta\r\n */\r\nexport class ProjectInformationRecord extends InformationRecordElement {\r\n public static override get className() { return \"ProjectInformationRecord\"; }\r\n\r\n /** The properties of the project. */\r\n public projectInformation: ProjectInformation;\r\n\r\n private constructor(props: ProjectInformationRecordProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.projectInformation = {\r\n projectNumber: props.projectNumber,\r\n projectName: props.projectName,\r\n location: props.location,\r\n };\r\n }\r\n\r\n protected static override onInsert(arg: OnElementPropsArg) {\r\n super.onInsert(arg);\r\n\r\n const parentId = arg.props.parent?.id;\r\n const subject = undefined !== parentId ? arg.iModel.elements.tryGetElement<Subject>(parentId) : undefined;\r\n if (!(subject instanceof Subject)) {\r\n throw new Error(\"ProjectInformationRecord must be a child of a Subject\");\r\n }\r\n }\r\n\r\n /** Create a new ProjectInformationRecord element ready to be inserted into the iModel.\r\n * @throws Error if the iModel contains a version of the BisCore schema older than 01.00.25.\r\n */\r\n public static create(args: ProjectInformationRecordCreateArgs): ProjectInformationRecord {\r\n args.iModel.requireMinimumSchemaVersion(\"BisCore\", new ECVersion(1, 0, 25), \"ProjectInformationRecord\");\r\n\r\n const parent = args.iModel.elements.getElement(args.parentSubjectId);\r\n\r\n const props: ProjectInformationRecordProps = {\r\n classFullName: this.classFullName,\r\n model: parent.model,\r\n code: args.code ?? Code.createEmpty(),\r\n parent: new SubjectOwnsProjectInformationRecord(args.parentSubjectId),\r\n projectName: args.projectName,\r\n projectNumber: args.projectNumber,\r\n location: args.location,\r\n };\r\n\r\n return new this(props, args.iModel);\r\n }\r\n\r\n public override toJSON(): ProjectInformationRecordProps {\r\n const props = super.toJSON() as ProjectInformationRecordProps;\r\n for (const key of [\"projectNumber\", \"projectName\", \"location\"] as const) {\r\n const value = this.projectInformation[key];\r\n if (undefined !== value) {\r\n props[key] = value;\r\n }\r\n }\r\n\r\n return props;\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"Element.js","sourceRoot":"","sources":["../../src/Element.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;AAEH,sDAAmH;AACnH,oDAM4B;AAC5B,wDAA8G;AAC9G,qCAA0F;AAG1F,mCAA4F;AAC5F,qEAAoG;AACpG,gDAA2F;AAC3F,gEAAkE;AAuElE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAa,OAAQ,SAAQ,eAAM;IAC1B,MAAM,KAAc,SAAS,KAAa,OAAO,SAAS,CAAC,CAAC,CAAC;IACpE,gBAAgB;IACT,MAAM,KAAc,mBAAmB,KAAK,OAAO,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,CAA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AAM,CAAC,KAAK;YACnB,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,kBAAI,CAAC,WAAW,EAAE;YACrC,MAAM,EAAE,IAAI,4DAAmC,CAAC,IAAI,CAAC,eAAe,CAAC;YACrE,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAC;QAEF,OAAO,IAAI,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;IAEe,MAAM;QACpB,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,EAAmC,CAAC;QAC9D,KAAK,MAAM,GAAG,IAAI,CAAC,eAAe,EAAE,aAAa,EAAE,UAAU,CAAU,EAAE,CAAC;YACxE,MAAM,KAAK,GAAG,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC;YAC3C,IAAI,SAAS,KAAK,KAAK,EAAE,CAAC;gBACxB,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;YACrB,CAAC;QACH,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAzDD,4DAyDC","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 Elements\n */\n\nimport { CompressedId64Set, GuidString, Id64, Id64String, JsonUtils, OrderedId64Array } from \"@itwin/core-bentley\";\nimport {\n AxisAlignedBox3d, BisCodeSpec, Code, CodeScopeProps, CodeSpec, ConcreteEntityTypes, DefinitionElementProps, DrawingProps, ElementAlignedBox3d,\n ElementProps, EntityMetaData, EntityReferenceSet, GeometricElement2dProps, GeometricElement3dProps, GeometricElementProps,\n GeometricModel2dProps, GeometricModel3dProps, GeometryPartProps, GeometryStreamProps, IModel, InformationPartitionElementProps, LineStyleProps, ModelProps, PhysicalElementProps, PhysicalTypeProps, Placement2d, Placement2dProps, Placement3d, Placement3dProps, ProjectInformation, ProjectInformationRecordProps, RelatedElement, RenderSchedule,\n RenderTimelineProps, RepositoryLinkProps, SectionDrawingLocationProps, SectionDrawingProps, SectionType,\n SheetBorderTemplateProps, SheetProps, SheetTemplateProps, SubjectProps, TypeDefinition, TypeDefinitionElementProps, UrlLinkProps\n} from \"@itwin/core-common\";\nimport { ClipVector, LowAndHighXYZProps, Range3d, Transform, YawPitchRollAngles } from \"@itwin/core-geometry\";\nimport { CustomHandledProperty, DeserializeEntityArgs, ECSqlRow, Entity } from \"./Entity\";\nimport { IModelDb } from \"./IModelDb\";\nimport { IModelElementCloneContext } from \"./IModelElementCloneContext\";\nimport { DefinitionModel, DrawingModel, PhysicalModel, SectionDrawingModel } from \"./Model\";\nimport { SubjectOwnsProjectInformationRecord, SubjectOwnsSubjects } from \"./NavigationRelationship\";\nimport { _cache, _elementWasCreated, _nativeDb, _verifyChannel } from \"./internal/Symbols\";\nimport { ECVersion, EntityClass } from \"@itwin/ecschema-metadata\";\n\n/** Argument for the `Element.onXxx` static methods\n * @beta\n */\nexport interface OnElementArg {\n /** The iModel for the Element affected by this method. */\n iModel: IModelDb;\n}\n\n/** Argument for `Element.onInsert` and `Element.onUpdate` static methods.\n * @beta\n */\nexport interface OnElementPropsArg extends OnElementArg {\n /** The properties of the Element affected by this method.\n * @note the properties may be modified. If so the modified values will be inserted/updated.\n */\n props: ElementProps;\n}\n\n/** Argument for the `Element.onXxx` static methods that notify of operations to an existing Element supplying its Id, ModelId and FederationGuid.\n * @beta\n */\nexport interface OnElementIdArg extends OnElementArg {\n /** The Id of the Element affected by this method */\n id: Id64String;\n /** The ModelId of the element affected by this method */\n model: Id64String;\n /** The federationGuid of the element affected by this method */\n federationGuid: GuidString;\n}\n\n/** Argument for the `Element.onChildXxx` static methods\n * @beta\n */\nexport interface OnChildElementArg extends OnElementArg {\n parentId: Id64String;\n}\n\n/** Argument for the `Element.onChildXxx` static methods that supply the properties of the child Element to be inserted or updated.\n * @beta\n */\nexport interface OnChildElementPropsArg extends OnChildElementArg {\n /** The new properties of the child Element for this method. */\n childProps: Readonly<ElementProps>;\n}\n\n/** Argument for the `Element.onChildXxx` static methods that only supply the Id of the child Element.\n * @beta\n */\nexport interface OnChildElementIdArg extends OnChildElementArg {\n /** The Id of the child element for this method */\n childId: Id64String;\n}\n\n/** Argument for the `Element.onSubModelInsert` static method\n * @beta\n */\nexport interface OnSubModelPropsArg extends OnElementArg {\n /** The properties of the prospective sub-model */\n subModelProps: ModelProps;\n}\n\n/** Argument for several `Element.onSubModelXxx` static methods\n * @beta\n */\nexport interface OnSubModelIdArg extends OnElementArg {\n /** The modelId of the sub Model */\n subModelId: Id64String;\n}\n\n/** The smallest individually identifiable building block for modeling the real world in an iModel.\n * Each element represents an [[Entity]] in the real world. Sets of Elements (contained in [[Model]]s) are used to model\n * other Elements that represent larger scale real world entities. Using this recursive modeling strategy,\n * Elements can represent entities at any scale. Elements can represent physical things or abstract concepts\n * or simply be information records.\n *\n * Every Element has a 64-bit id (inherited from Entity) that uniquely identifies it within an iModel. Every Element also\n * has a [[code]] that identifies its meaning in the real world. Additionally, Elements may have a [[federationGuid]]\n * to hold a GUID, if the element was assigned that GUID by some other federated database. The iModel database enforces\n * uniqueness of id, code, and federationGuid.\n *\n * The Element class provides `static` methods like [[onInsert]], [[onUpdated]], [[onCloned]], and [[onChildAdded]] that enable\n * it to customize persistence operations. For example, the base implementations of [[onInsert]], [[onUpdate]], and [[onDelete]]\n * validate that the appropriate [locks]($docs/learning/backend/ConcurrencyControl.md), [codes]($docs/learning/backend/CodeService.md),\n * and [channel permissions]($docs/learning/backend/Channel.md) are obtained before a change to the element is written to the iModel.\n * A subclass of Element that overrides any of these methods **must** call the `super` method as well. An application that supplies its\n * own Element subclasses should register them at startup via [[ClassRegistry.registerModule]] or [[ClassRegistry.register]].\n *\n * See:\n * * [Element Fundamentals]($docs/bis/guide/fundamentals/element-fundamentals.md)\n * * [Working with schemas and elements in TypeScript]($docs/learning/backend/SchemasAndElementsInTypeScript.md)\n * * [Creating elements]($docs/learning/backend/CreateElements.md)\n * @public @preview\n */\nexport class Element extends Entity {\n public static override get className(): string { return \"Element\"; }\n /** @internal */\n public static override get protectedOperations() { return [\"onInsert\", \"onUpdate\", \"onDelete\"]; }\n\n /** The ModelId of the [Model]($docs/bis/guide/fundamentals/model-fundamentals.md) containing this element */\n public readonly model: Id64String;\n /** The [Code]($docs/bis/guide/fundamentals/codes.md) for this element */\n public code: Code;\n /** The parent element, if present, of this element. */\n public parent?: RelatedElement;\n /** A [FederationGuid]($docs/bis/guide/fundamentals/element-fundamentals.md#federationguid) assigned to this element by some other federated database */\n public federationGuid?: GuidString;\n /** A [user-assigned label]($docs/bis/guide/fundamentals/element-fundamentals.md#userlabel) for this element. */\n public userLabel?: string;\n /** Optional [json properties]($docs/bis/guide/fundamentals/element-fundamentals.md#jsonproperties) of this element. */\n public readonly jsonProperties: { [key: string]: any };\n\n protected constructor(props: ElementProps, iModel: IModelDb) {\n super(props, iModel);\n this.code = Code.fromJSON(props.code); // TODO: Validate props.code - don't silently fail if it is the wrong type\n this.model = RelatedElement.idFromJson(props.model);\n this.parent = RelatedElement.fromJSON(props.parent);\n this.federationGuid = props.federationGuid;\n this.userLabel = props.userLabel;\n this.jsonProperties = { ...props.jsonProperties }; // make sure we have our own copy\n }\n\n /**\n * Element custom HandledProps include 'codeValue', 'codeSpec', 'codeScope', 'model', 'parent', 'federationGuid', and 'lastMod'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"codeValue\", source: \"Class\" },\n { propertyName: \"codeSpec\", source: \"Class\" },\n { propertyName: \"codeScope\", source: \"Class\" },\n { propertyName: \"model\", source: \"Class\" },\n { propertyName: \"parent\", source: \"Class\" },\n { propertyName: \"federationGuid\", source: \"Class\" },\n { propertyName: \"lastMod\", source: \"Class\" },\n ];\n\n /**\n * Element deserializes 'codeValue', 'codeSpec', 'codeScope', 'model', 'parent', and 'federationGuid'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): ElementProps {\n const elProps = super.deserialize(props) as ElementProps;\n const instance = props.row;\n elProps.code = { value: instance.codeValue ?? \"\", spec: instance.codeSpec.id, scope: instance.codeScope.id }\n elProps.model = instance.model.id;\n if (instance.parent)\n elProps.parent = instance.parent;\n\n if (instance.federationGuid)\n elProps.federationGuid = instance.federationGuid;\n return elProps;\n }\n\n /**\n * Element serialize 'codeValue', 'codeSpec', 'codeScope', 'model', 'parent', and 'federationGuid'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: ElementProps, iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, iModel);\n inst.codeValue = props.code.value;\n inst.codeSpec = { id: props.code.spec };\n inst.codeScope = { id: props.code.scope };\n inst.model = { id: props.model };\n inst.parent = props.parent;\n inst.federationGuid = props.federationGuid ?? iModel[_nativeDb].newBeGuid();\n return inst;\n }\n\n /** Called before a new Element is inserted.\n * @note throw an exception to disallow the insert\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Element to be inserted\n * @beta\n */\n protected static onInsert(arg: OnElementPropsArg): void {\n const { iModel, props } = arg;\n const operation = \"insert\";\n iModel.channels[_verifyChannel](arg.props.model);\n iModel.locks.checkSharedLock(props.model, \"model\", operation); // inserting requires shared lock on model\n if (props.parent) // inserting requires shared lock on parent, if present\n iModel.locks.checkSharedLock(props.parent.id, \"parent\", operation);\n iModel.codeService?.verifyCode(arg);\n }\n\n /** Called after a new Element was inserted.\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Element that was inserted\n * @beta\n */\n protected static onInserted(arg: OnElementIdArg): void {\n const locks = arg.iModel.locks;\n if (locks && !locks.holdsExclusiveLock(arg.model))\n locks[_elementWasCreated](arg.id);\n arg.iModel.models[_cache].delete(arg.model);\n }\n\n /** Called before an Element is updated.\n * @note throw an exception to disallow the update\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Element to be updated\n * @beta\n */\n protected static onUpdate(arg: OnElementPropsArg): void {\n const { iModel, props } = arg;\n iModel.channels[_verifyChannel](props.model);\n iModel.locks.checkExclusiveLock(props.id!, \"element\", \"update\"); // eslint-disable-line @typescript-eslint/no-non-null-assertion\n iModel.codeService?.verifyCode(arg);\n }\n\n /** Called after an Element was updated.\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Element that was updated\n * @beta\n */\n protected static onUpdated(arg: OnElementIdArg): void {\n arg.iModel.elements[_cache].delete({ id: arg.id })\n arg.iModel.models[_cache].delete(arg.model);\n }\n\n /** Called before an Element is deleted.\n * @note throw an exception to disallow the delete\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Element to be deleted\n * @beta\n */\n protected static onDelete(arg: OnElementIdArg): void {\n arg.iModel.channels[_verifyChannel](arg.model);\n arg.iModel.locks.checkExclusiveLock(arg.id, \"element\", \"delete\");\n }\n\n /** Called after an Element was deleted.\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Element that was deleted\n * @beta\n */\n protected static onDeleted(arg: OnElementIdArg): void {\n arg.iModel.elements[_cache].delete(arg);\n arg.iModel.models[_cache].delete(arg.model);\n }\n\n /** Called when an element with an instance of this class as its parent is about to be deleted.\n * @note throw an exception if the element should not be deleted\n * @note implementers should not presume that the element was deleted if this method does not throw,\n * since the delete may fail for other reasons. Instead, rely on [[onChildDeleted]] for that purpose.\n * @note `this` is the class of the parent Element whose child will be deleted\n * @beta\n */\n protected static onChildDelete(_arg: OnChildElementIdArg): void { }\n\n /** Called after an element with an instance of this class as its parent was successfully deleted.\n * @note `this` is the class of the parent Element whose child was deleted\n * @beta\n */\n protected static onChildDeleted(arg: OnChildElementIdArg): void {\n arg.iModel.elements[_cache].delete({ id: arg.parentId });\n arg.iModel.elements[_cache].delete({ id: arg.childId });\n }\n\n /** Called when a *new element* with an instance of this class as its parent is about to be inserted.\n * @note throw an exception if the element should not be inserted\n * @note `this` is the class of the prospective parent Element.\n * @beta\n */\n protected static onChildInsert(_arg: OnChildElementPropsArg): void { }\n\n /** Called after a *new element* with an instance of this class as its parent was inserted.\n * @note `this` is the class of the parent Element.\n * @beta\n */\n protected static onChildInserted(arg: OnChildElementIdArg): void {\n arg.iModel.elements[_cache].delete({ id: arg.parentId });\n }\n\n /** Called when an element with an instance of this class as its parent is about to be updated.\n * @note throw an exception if the element should not be updated\n * @note `this` is the class of the parent Element.\n * @beta\n */\n protected static onChildUpdate(_arg: OnChildElementPropsArg): void { }\n\n /** Called after an element with an instance of this the class as its parent was updated.\n * @note `this` is the class of the parent Element.\n * @beta\n */\n protected static onChildUpdated(arg: OnChildElementIdArg): void {\n arg.iModel.elements[_cache].delete({ id: arg.parentId });\n }\n\n /** Called when an *existing element* is about to be updated so that an instance of this class will become its new parent.\n * @note throw an exception if the element should not be added\n * @note `this` is the class of the prospective parent Element.\n * @beta\n */\n protected static onChildAdd(_arg: OnChildElementPropsArg): void { }\n\n /** Called after an *existing element* has been updated so that an instance of this class is its new parent.\n * @note `this` is the class of the new parent Element.\n * @beta\n */\n protected static onChildAdded(arg: OnChildElementIdArg): void {\n arg.iModel.elements[_cache].delete({ id: arg.parentId });\n }\n\n /** Called when an element with an instance of this class as its parent is about to be updated change to a different parent.\n * @note throw an exception if the element should not be dropped\n * @note `this` is the class of the parent Element.\n * @beta\n */\n protected static onChildDrop(_arg: OnChildElementIdArg): void { }\n\n /** Called after an element with an instance of this class as its previous parent was updated to have a new parent.\n * @note `this` is the class of the previous parent Element.\n * @beta\n */\n protected static onChildDropped(arg: OnChildElementIdArg): void {\n arg.iModel.elements[_cache].delete({ id: arg.parentId });\n }\n\n /** Called when an instance of this class is being *sub-modeled* by a new Model.\n * @note throw an exception if model should not be inserted\n * @note `this` is the class of Element to be sub-modeled.\n * @beta\n */\n protected static onSubModelInsert(_arg: OnSubModelPropsArg): void { }\n\n /** Called after an instance of this class was *sub-modeled* by a new Model.\n * @note `this` is the class of Element that is now sub-modeled.\n * @beta\n */\n protected static onSubModelInserted(arg: OnSubModelIdArg): void {\n const id = arg.subModelId;\n arg.iModel.elements[_cache].delete({ id });\n arg.iModel.models[_cache].delete(id);\n\n }\n\n /** Called when a sub-model of an instance of this class is being deleted.\n * @note throw an exception if model should not be deleted\n * @note `this` is the class of Element that is sub-modeled.\n * @beta\n */\n protected static onSubModelDelete(_arg: OnSubModelIdArg): void { }\n\n /** Called after a sub-model of an instance of this class was deleted.\n * @note `this` is the class of Element that was sub-modeled.\n * @beta\n */\n protected static onSubModelDeleted(arg: OnSubModelIdArg): void {\n const id = arg.subModelId;\n arg.iModel.elements[_cache].delete({ id });\n arg.iModel.models[_cache].delete(id);\n }\n\n /** Called during the iModel transformation process after an Element from the source iModel was *cloned* for the target iModel.\n * The transformation process automatically handles remapping BisCore properties and those that are properly described in ECSchema.\n * This callback is only meant to be overridden if there are other Ids in non-standard locations that need to be remapped or other data that needs to be fixed up after the clone.\n * @param _context The context that persists any remapping between the source iModel and target iModel.\n * @param _sourceProps The ElementProps for the source Element that was cloned.\n * @param _targetProps The ElementProps that are a result of the clone. These can be further modified.\n * @note If you override this method, you must call super.\n * @beta\n */\n protected static onCloned(_context: IModelElementCloneContext, _sourceProps: ElementProps, _targetProps: ElementProps): Promise<void> | void { }\n\n /** Called when a *root* element in a subgraph is changed and before its outputs are processed.\n * This special callback is made when:\n * * the element is part of an [[ElementDrivesElement]] graph, and\n * * the element has no inputs, and\n * * none of the element's outputs have been processed.\n * @see [[ElementDrivesElement]] for more on element dependency graphs.\n * @beta\n */\n protected static onBeforeOutputsHandled(_id: Id64String, _iModel: IModelDb): void { }\n\n /** Called on an element in a graph after all of its inputs have been processed and before its outputs are processed.\n * This callback is made when:\n * * the specified element is part of an [[ElementDrivesElement]] graph, and\n * * there was a direct change to some element upstream in the dependency graph.\n * * all upstream elements in the graph have been processed.\n * * none of the downstream elements have been processed.\n * This method is not called if none of the element's inputs were changed.\n * @see [[ElementDrivesElement]] for more on element dependency graphs.\n * @beta\n */\n protected static onAllInputsHandled(_id: Id64String, _iModel: IModelDb): void { }\n\n public override toJSON(): ElementProps {\n const val = super.toJSON() as ElementProps;\n\n if (Code.isValid(this.code))\n val.code = this.code;\n\n val.model = this.model;\n if (undefined !== this.userLabel) // NOTE: blank string should be included in JSON\n val.userLabel = this.userLabel;\n if (this.federationGuid)\n val.federationGuid = this.federationGuid;\n if (this.parent)\n val.parent = this.parent;\n\n if (Object.keys(this.jsonProperties).length > 0)\n val.jsonProperties = this.jsonProperties;\n\n return val;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addModel(this.model); // The modeledElement is a reference\n if (this.code.scope && Id64.isValidId64(this.code.scope))\n referenceIds.addElement(this.code.scope); // The element that scopes the code is a reference\n if (this.parent)\n referenceIds.addElement(this.parent.id); // A parent element is a reference\n }\n\n /** A *required reference* is an element that had to be inserted before this element could have been inserted.\n * This is the list of property keys on this element that store references to those elements\n * @note This should be overridden (with `super` called) at each level of the class hierarchy that introduces required references.\n * @note any property listed here must be added to the reference ids in [[collectReferenceIds]]\n * @beta\n */\n public static readonly requiredReferenceKeys: ReadonlyArray<string> = [\"parent\", \"model\"];\n\n /** A map of every [[requiredReferenceKeys]] on this class to their entity type.\n * @note This should be overridden (with `super` called) at each level of the class hierarchy that introduces required references.\n * @alpha\n */\n public static readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\n parent: ConcreteEntityTypes.Element,\n model: ConcreteEntityTypes.Model,\n };\n\n /** Get the class metadata for this element.\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Please use `getMetaData` provided by the parent class `Entity` instead.\n *\n * @example\n * ```typescript\n * // Current usage:\n * const metaData: EntityMetaData | undefined = element.getClassMetaData();\n *\n * // Replacement:\n * const metaData: EntityClass = await element.getMetaData();\n * ```\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public getClassMetaData(): EntityMetaData | undefined { return this.iModel.classMetaDataRegistry.find(this.classFullName); }\n\n /** Query metadata for this entity class from the iModel's schema. Returns cached metadata if available.*/\n public override async getMetaData(): Promise<EntityClass> {\n if (this._metadata && EntityClass.isEntityClass(this._metadata)) {\n return this._metadata;\n }\n\n const entity = await this.iModel.schemaContext.getSchemaItem(this.schemaItemKey, EntityClass);\n if (entity !== undefined) {\n this._metadata = entity;\n return this._metadata;\n } else {\n throw new Error(`Cannot get metadata for ${this.classFullName}`);\n }\n }\n\n private getAllUserProperties(): any {\n if (!this.jsonProperties.UserProps)\n this.jsonProperties.UserProps = new Object();\n\n return this.jsonProperties.UserProps;\n }\n\n /** Get a set of JSON user properties by namespace */\n public getUserProperties(namespace: string) { return this.getAllUserProperties()[namespace]; }\n\n /** Change a set of user JSON properties of this Element by namespace. */\n public setUserProperties(nameSpace: string, value: any) { this.getAllUserProperties()[nameSpace] = value; }\n\n /** Remove a set of JSON user properties, specified by namespace, from this Element */\n public removeUserProperties(nameSpace: string) { delete this.getAllUserProperties()[nameSpace]; }\n\n /** Get a JSON property of this element, by namespace */\n public getJsonProperty(nameSpace: string): any { return this.jsonProperties[nameSpace]; }\n public setJsonProperty(nameSpace: string, value: any) { this.jsonProperties[nameSpace] = value; }\n\n /** Get a display label for this Element. By default returns userLabel if present, otherwise code value. */\n public getDisplayLabel(): string { return this.userLabel ?? this.code.value; }\n\n /** Get a list of HTML strings that describe this Element for the tooltip. Strings will be listed on separate lines in the tooltip.\n * Any instances of the pattern `%{tag}` will be replaced by the localized value of tag.\n */\n public getToolTipMessage(): string[] {\n const addKey = (key: string) => `<b>%{iModelJs:Element.${key}}:</b> `; // %{iModelJs:Element.xxx} is replaced with localized value of xxx in frontend.\n const msg: string[] = [];\n const display = this.getDisplayLabel();\n msg.push(display ? display : `${addKey(\"Id\") + this.id}, ${addKey(\"Type\")}${this.className}`);\n\n if (this instanceof GeometricElement)\n msg.push(addKey(\"Category\") + this.iModel.elements.getElement(this.category).getDisplayLabel());\n\n msg.push(addKey(\"Model\") + this.iModel.elements.getElement(this.model).getDisplayLabel());\n return msg;\n }\n\n /**\n * Insert this Element into the iModel.\n * @see [[IModelDb.Elements.insertElement]]\n * @note For convenience, the value of `this.id` is updated to reflect the resultant element's id.\n * However when `this.federationGuid` is not present or undefined, a new Guid will be generated and stored on the resultant element. But\n * the value of `this.federationGuid` is *not* updated. Generally, it is best to re-read the element after inserting (e.g. via [[IModelDb.Elements.getElement]])\n * if you intend to continue working with it. That will ensure its values reflect the persistent state.\n */\n public insert() {\n return this.id = this.iModel.elements.insertElement(this.toJSON());\n }\n /** Update this Element in the iModel. */\n public update() { this.iModel.elements.updateElement(this.toJSON()); }\n /** Delete this Element from the iModel. */\n public delete() { this.iModel.elements.deleteElement(this.id); }\n}\n\n/** An abstract base class to model real world entities that intrinsically have geometry.\n * @public @preview\n */\nexport abstract class GeometricElement extends Element {\n public static override get className(): string { return \"GeometricElement\"; }\n /** The Id of the [[Category]] for this GeometricElement. */\n public category: Id64String;\n /** The GeometryStream for this GeometricElement. */\n public geom?: GeometryStreamProps;\n /** The origin, orientation, and bounding box of this GeometricElement. */\n public abstract get placement(): Placement2d | Placement3d;\n\n protected constructor(props: GeometricElementProps, iModel: IModelDb) {\n super(props, iModel);\n this.category = Id64.fromJSON(props.category);\n this.geom = props.geom;\n }\n\n /** Type guard for instanceof [[GeometricElement3d]] */\n public is3d(): this is GeometricElement3d { return this instanceof GeometricElement3d; }\n /** Type guard for instanceof [[GeometricElement2d]] */\n public is2d(): this is GeometricElement2d { return this instanceof GeometricElement2d; }\n /** Get the [Transform]($geometry) from the Placement of this GeometricElement */\n public getPlacementTransform(): Transform { return this.placement.transform; }\n public calculateRange3d(): AxisAlignedBox3d { return this.placement.calculateRange(); }\n\n public override toJSON(): GeometricElementProps {\n const val = super.toJSON() as GeometricElementProps;\n val.category = this.category;\n if (this.geom)\n val.geom = this.geom;\n return val;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addElement(this.category);\n // TODO: GeometryPartIds?\n }\n\n /** @beta */\n public static override readonly requiredReferenceKeys: ReadonlyArray<string> = [...super.requiredReferenceKeys, \"category\"];\n /** @alpha */\n public static override readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\n ...super.requiredReferenceKeyTypeMap,\n category: ConcreteEntityTypes.Element,\n };\n\n /**\n * GeometricElement custom HandledProps includes 'inSpatialIndex'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"inSpatialIndex\", source: \"Class\" },\n ];\n\n /**\n * GeometricElement deserializes 'inSpatialIndex'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): GeometricElementProps {\n return super.deserialize(props) as GeometricElementProps;\n }\n\n /**\n * GeometricElement serialize 'inSpatialIndex'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: GeometricElementProps, iModel: IModelDb): ECSqlRow {\n return super.serialize(props, iModel);\n }\n}\n\n/** An abstract base class to model real world entities that intrinsically have 3d geometry.\n * See [how to create a GeometricElement3d]($docs/learning/backend/CreateElements.md#GeometricElement3d).\n * @public @preview\n */\nexport abstract class GeometricElement3d extends GeometricElement {\n public static override get className(): string { return \"GeometricElement3d\"; }\n public placement: Placement3d;\n public typeDefinition?: TypeDefinition;\n\n protected constructor(props: GeometricElement3dProps, iModel: IModelDb) {\n super(props, iModel);\n this.placement = Placement3d.fromJSON(props.placement);\n if (props.typeDefinition)\n this.typeDefinition = TypeDefinition.fromJSON(props.typeDefinition);\n }\n\n public override toJSON(): GeometricElement3dProps {\n const val = super.toJSON() as GeometricElement3dProps;\n val.placement = this.placement;\n if (undefined !== this.typeDefinition)\n val.typeDefinition = this.typeDefinition;\n\n return val;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n if (undefined !== this.typeDefinition)\n referenceIds.addElement(this.typeDefinition.id);\n }\n\n /**\n * GeometricElement3d custom HandledProps includes 'category', 'geometryStream', 'origin', 'yaw', 'pitch', 'roll',\n * 'bBoxLow', 'bBoxHigh', and 'typeDefinition'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"category\", source: \"Class\" },\n { propertyName: \"geometryStream\", source: \"Class\" },\n { propertyName: \"origin\", source: \"Class\" },\n { propertyName: \"yaw\", source: \"Class\" },\n { propertyName: \"pitch\", source: \"Class\" },\n { propertyName: \"roll\", source: \"Class\" },\n { propertyName: \"bBoxLow\", source: \"Class\" },\n { propertyName: \"bBoxHigh\", source: \"Class\" },\n { propertyName: \"typeDefinition\", source: \"Class\" }\n ];\n\n /**\n * GeometricElement3d deserializes 'category', 'geometryStream', 'origin', 'yaw', 'pitch', 'roll',\n * 'bBoxLow', 'bBoxHigh', and 'typeDefinition'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): GeometricElement3dProps {\n const elProps = super.deserialize(props) as GeometricElement3dProps;\n const instance = props.row;\n elProps.category = instance.category.id;\n\n const origin = instance.origin ? [instance.origin.x, instance.origin.y, instance.origin.z] : [0, 0, 0];\n let bbox: LowAndHighXYZProps | undefined;\n if (\"bBoxHigh\" in instance && instance.bBoxHigh !== undefined && \"bBoxLow\" in instance && instance.bBoxLow !== undefined) {\n bbox = {\n low: [instance.bBoxLow.x, instance.bBoxLow.y, instance.bBoxLow.z],\n high: [instance.bBoxHigh.x, instance.bBoxHigh.y, instance.bBoxHigh.z],\n }\n }\n\n elProps.placement = {\n origin,\n angles: YawPitchRollAngles.createDegrees(instance.yaw ?? 0, instance.pitch ?? 0, instance.roll ?? 0).toJSON(),\n bbox\n };\n\n if (instance.geometryStream) {\n elProps.geom = props.iModel[_nativeDb].convertOrUpdateGeometrySource({\n is2d: false,\n geom: instance.geometryStream as Uint8Array,\n placement: elProps.placement,\n categoryId: elProps.category\n }, \"GeometryStreamProps\", props.options?.element ?? {}).geom as GeometryStreamProps;\n }\n\n if (instance.typeDefinition) {\n elProps.typeDefinition = instance.typeDefinition;\n }\n\n return elProps;\n }\n\n /**\n * GeometricElement3d serializes 'category', 'geometryStream', 'origin', 'yaw', 'pitch', 'roll',\n * 'bBoxLow', 'bBoxHigh', and 'typeDefinition'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: GeometricElement3dProps, iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, iModel);\n inst.category = { id: props.category };\n\n const assignPlacement = (placement: Placement3dProps) => {\n if (Array.isArray(placement.origin)) {\n inst.origin = { x: placement.origin[0], y: placement.origin[1], z: placement.origin[2] };\n } else {\n inst.origin = placement.origin;\n }\n inst.yaw = placement.angles.yaw;\n inst.pitch = placement.angles.pitch;\n inst.roll = placement.angles.roll;\n if (placement.bbox) {\n if (Array.isArray(placement.bbox.low)) {\n inst.bBoxLow = { x: placement.bbox.low[0], y: placement.bbox.low[1], z: placement.bbox.low[2] };\n } else {\n inst.bBoxLow = placement.bbox.low;\n }\n\n if (Array.isArray(placement.bbox.high)) {\n inst.bBoxHigh = { x: placement.bbox.high[0], y: placement.bbox.high[1], z: placement.bbox.high[2] };\n } else {\n inst.bBoxHigh = placement.bbox.high;\n }\n }\n }\n\n\n if (props.placement) {\n assignPlacement(props.placement);\n }\n\n if (props.elementGeometryBuilderParams) {\n const source = iModel[_nativeDb].convertOrUpdateGeometrySource({\n builder: props.elementGeometryBuilderParams,\n is2d: true,\n placement: props.placement,\n categoryId: props.category,\n }, \"BinaryStream\", {});\n\n inst.geometryStream = source.geom;\n if (source.placement) {\n assignPlacement(source.placement as Placement3dProps);\n }\n }\n\n if (props.geom) {\n const source = iModel[_nativeDb].convertOrUpdateGeometrySource({\n geom: props.geom as any,\n is2d: false,\n placement: props.placement,\n categoryId: props.category,\n }, \"BinaryStream\", {});\n inst.geometryStream = source.geom;\n if (source.placement) {\n assignPlacement(source.placement as Placement3dProps);\n }\n }\n\n inst.typeDefinition = props.typeDefinition;\n return inst;\n }\n}\n\n/** A 3d Graphical Element\n * @public @preview\n */\nexport abstract class GraphicalElement3d extends GeometricElement3d {\n public static override get className(): string { return \"GraphicalElement3d\"; }\n protected constructor(props: GeometricElement3dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** An abstract base class to model information entities that intrinsically have 2d geometry.\n * @public @preview\n */\nexport abstract class GeometricElement2d extends GeometricElement {\n public static override get className(): string { return \"GeometricElement2d\"; }\n public placement: Placement2d;\n public typeDefinition?: TypeDefinition;\n\n protected constructor(props: GeometricElement2dProps, iModel: IModelDb) {\n super(props, iModel);\n this.placement = Placement2d.fromJSON(props.placement);\n if (props.typeDefinition)\n this.typeDefinition = TypeDefinition.fromJSON(props.typeDefinition);\n }\n\n public override toJSON(): GeometricElement2dProps {\n const val = super.toJSON() as GeometricElement2dProps;\n val.placement = this.placement;\n if (undefined !== this.typeDefinition)\n val.typeDefinition = this.typeDefinition;\n\n return val;\n }\n\n /**\n * GeometricElement2d custom HandledProps includes 'category', 'geometryStream', 'origin', 'rotation',\n * 'bBoxLow', 'bBoxHigh', and 'typeDefinition'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"category\", source: \"Class\" },\n { propertyName: \"geometryStream\", source: \"Class\" },\n { propertyName: \"origin\", source: \"Class\" },\n { propertyName: \"rotation\", source: \"Class\" },\n { propertyName: \"bBoxLow\", source: \"Class\" },\n { propertyName: \"bBoxHigh\", source: \"Class\" },\n { propertyName: \"typeDefinition\", source: \"Class\" }\n ];\n\n /**\n * GeometricElement2d deserialize 'category', 'geometryStream', 'origin', 'rotation',\n * 'bBoxLow', 'bBoxHigh', and 'typeDefinition'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): GeometricElement2dProps {\n const elProps = super.deserialize(props) as GeometricElement2dProps;\n const instance = props.row;\n elProps.category = instance.category.id;\n const origin = instance.origin ? [instance.origin.x, instance.origin.y] : [0, 0];\n let bbox: LowAndHighXYZProps | undefined;\n if (\"bBoxHigh\" in instance && instance.bBoxHigh !== undefined && \"bBoxLow\" in instance && instance.bBoxLow !== undefined) {\n bbox = {\n low: [instance.bBoxLow.x, instance.bBoxLow.y],\n high: [instance.bBoxHigh.x, instance.bBoxHigh.y],\n }\n }\n elProps.placement = {\n origin,\n angle: instance.rotation,\n bbox,\n };\n\n if (instance.geometryStream) {\n const source = props.iModel[_nativeDb].convertOrUpdateGeometrySource({\n is2d: true,\n geom: instance.geometryStream,\n placement: elProps.placement,\n categoryId: elProps.category\n }, \"GeometryStreamProps\", props.options?.element ?? {});\n elProps.geom = source.geom as GeometryStreamProps;\n if (source.placement) {\n elProps.placement = source.placement as Placement2dProps;\n }\n }\n\n if (instance.typeDefinition) {\n elProps.typeDefinition = instance.typeDefinition;\n }\n\n return elProps;\n }\n\n /**\n * GeometricElement2d serializes 'category', 'geometryStream', 'origin', 'rotation',\n * 'bBoxLow', 'bBoxHigh', and 'typeDefinition'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: GeometricElement2dProps, iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, iModel);\n inst.category = { id: props.category };\n\n const assignPlacement = (placement: Placement2dProps) => {\n if (Array.isArray(placement.origin)) {\n inst.origin = { x: placement.origin[0], y: placement.origin[1] };\n } else {\n inst.origin = placement.origin;\n }\n inst.rotation = placement.angle;\n if (placement.bbox) {\n if (Array.isArray(placement.bbox.low)) {\n inst.bBoxLow = { x: placement.bbox.low[0], y: placement.bbox.low[1] };\n } else {\n inst.bBoxLow = placement.bbox.low;\n }\n\n if (Array.isArray(placement.bbox.high)) {\n inst.bBoxHigh = { x: placement.bbox.high[0], y: placement.bbox.high[1] };\n } else {\n inst.bBoxHigh = placement.bbox.high;\n }\n }\n }\n\n\n if (props.placement) {\n assignPlacement(props.placement);\n }\n\n if (props.elementGeometryBuilderParams) {\n const source = iModel[_nativeDb].convertOrUpdateGeometrySource({\n builder: props.elementGeometryBuilderParams,\n is2d: true,\n placement: props.placement,\n categoryId: props.category,\n }, \"BinaryStream\", {});\n\n inst.geometryStream = source.geom;\n if (source.placement) {\n assignPlacement(source.placement as Placement2dProps);\n }\n }\n\n if (props.geom) {\n const source = iModel[_nativeDb].convertOrUpdateGeometrySource({\n geom: props.geom as any,\n is2d: true,\n placement: props.placement,\n categoryId: props.category,\n }, \"BinaryStream\", {});\n\n inst.geometryStream = source.geom;\n if (source.placement) {\n assignPlacement(source.placement as Placement2dProps);\n }\n }\n inst.typeDefinition = props.typeDefinition;\n return inst;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n if (undefined !== this.typeDefinition)\n referenceIds.addElement(this.typeDefinition.id);\n }\n}\n\n/** An abstract base class for 2d Geometric Elements that are used to convey information within graphical presentations (like drawings).\n * @public @preview\n */\nexport abstract class GraphicalElement2d extends GeometricElement2d {\n public static override get className(): string { return \"GraphicalElement2d\"; }\n protected constructor(props: GeometricElement2dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** 2d element used to annotate drawings and sheets.\n * @public @preview\n */\nexport class AnnotationElement2d extends GraphicalElement2d {\n public static override get className(): string { return \"AnnotationElement2d\"; }\n protected constructor(props: GeometricElement2dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** 2d element used to persist graphics for use in drawings.\n * @public @preview\n */\nexport class DrawingGraphic extends GraphicalElement2d {\n public static override get className(): string { return \"DrawingGraphic\"; }\n protected constructor(props: GeometricElement2dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** An Element that occupies real world space. Its coordinates are in the project space of its iModel.\n * @public @preview\n */\nexport abstract class SpatialElement extends GeometricElement3d {\n public static override get className(): string { return \"SpatialElement\"; }\n protected constructor(props: GeometricElement3dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** An Element that is spatially located, has mass, and can be *touched*.\n * @public @preview\n */\nexport abstract class PhysicalElement extends SpatialElement {\n public static override get className(): string { return \"PhysicalElement\"; }\n /** If defined, the [[PhysicalMaterial]] that makes up this PhysicalElement. */\n public physicalMaterial?: RelatedElement;\n protected constructor(props: PhysicalElementProps, iModel: IModelDb) {\n super(props, iModel);\n this.physicalMaterial = RelatedElement.fromJSON(props.physicalMaterial);\n }\n\n public override toJSON(): PhysicalElementProps {\n const val = super.toJSON() as PhysicalElementProps;\n val.physicalMaterial = this.physicalMaterial?.toJSON();\n return val;\n }\n}\n\n/** Identifies a *tracked* real world location but has no mass and cannot be *touched*.\n * @public @preview\n */\nexport abstract class SpatialLocationElement extends SpatialElement {\n public static override get className(): string { return \"SpatialLocationElement\"; }\n protected constructor(props: GeometricElement3dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** A Volume Element is a Spatial Location Element that is restricted to defining a volume.\n * @public @preview\n */\nexport class VolumeElement extends SpatialLocationElement {\n public static override get className(): string { return \"VolumeElement\"; }\n protected constructor(props: GeometricElement3dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** A SectionDrawingLocation element identifies the location of a [[SectionDrawing]] in the context of a [[SpatialModel]],\n * enabling [HyperModeling]($hypermodeling).\n * @note The associated ECClass was added to the BisCore schema in version 1.0.11.\n * @public @preview\n */\nexport class SectionDrawingLocation extends SpatialLocationElement {\n /** The Id of the [[ViewDefinition]] to which this location refers. */\n public sectionView: RelatedElement;\n\n public static override get className(): string { return \"SectionDrawingLocation\"; }\n\n public constructor(props: SectionDrawingLocationProps, iModel: IModelDb) {\n super(props, iModel);\n this.sectionView = RelatedElement.fromJSON(props.sectionView) ?? RelatedElement.none;\n }\n\n public override toJSON(): SectionDrawingLocationProps {\n return {\n ...super.toJSON(),\n sectionView: this.sectionView.toJSON(),\n };\n }\n}\n\n/** Information Content Element is an abstract base class for modeling pure information entities. Only the\n * core framework should directly subclass from Information Content Element. Domain and application developers\n * should start with the most appropriate subclass of Information Content Element.\n * @public @preview\n */\nexport abstract class InformationContentElement extends Element {\n public static override get className(): string { return \"InformationContentElement\"; }\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** Element used in conjunction with bis:ElementDrivesElement relationships to bundle multiple inputs before\n * driving the output element.\n * @beta\n */\nexport abstract class DriverBundleElement extends InformationContentElement {\n public static override get className(): string { return \"DriverBundleElement\"; }\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** Information Reference is an abstract base class for modeling entities whose main purpose is to reference something else.\n * @public @preview\n */\nexport abstract class InformationReferenceElement extends InformationContentElement {\n public static override get className(): string { return \"InformationReferenceElement\"; }\n\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** A Subject is an information element that describes what this repository (or part thereof) is about.\n * @public @preview\n */\nexport class Subject extends InformationReferenceElement {\n public static override get className(): string { return \"Subject\"; }\n public description?: string;\n protected constructor(props: SubjectProps, iModel: IModelDb) {\n super(props, iModel);\n this.description = props.description;\n }\n\n public override toJSON(): SubjectProps { // This override only specializes the return type\n return super.toJSON() as SubjectProps; // Entity.toJSON takes care of auto-handled properties\n }\n /** Create a Code for a Subject given a name that is meant to be unique within the scope of its parent Subject.\n * @param iModelDb The IModelDb\n * @param parentSubjectId The Id of the parent Subject that provides the scope for names of its child Subjects.\n * @param codeValue The child Subject name\n */\n public static createCode(iModelDb: IModelDb, parentSubjectId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.subject);\n return new Code({ spec: codeSpec.id, scope: parentSubjectId, value: codeValue });\n }\n /** Create a Subject\n * @param iModelDb The IModelDb\n * @param parentSubjectId The new Subject will be a child of this Subject\n * @param name The name (codeValue) of the Subject\n * @param description The optional description of the Subject\n * @returns The newly constructed Subject\n * @throws [[IModelError]] if there is a problem creating the Subject\n */\n public static create(iModelDb: IModelDb, parentSubjectId: Id64String, name: string, description?: string): Subject {\n const subjectProps: SubjectProps = {\n classFullName: this.classFullName,\n model: IModel.repositoryModelId,\n parent: new SubjectOwnsSubjects(parentSubjectId),\n code: this.createCode(iModelDb, parentSubjectId, name),\n description,\n };\n return new Subject(subjectProps, iModelDb);\n }\n\n /** Insert a Subject\n * @param iModelDb Insert into this IModelDb\n * @param parentSubjectId The new Subject will be inserted as a child of this Subject\n * @param name The name (codeValue) of the Subject\n * @param description The optional description of the Subject\n * @returns The Id of the newly inserted Subject\n * @throws [[IModelError]] if there is a problem inserting the Subject\n */\n public static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string, description?: string): Id64String {\n const subject = this.create(iModelDb, parentSubjectId, name, description);\n return iModelDb.elements.insertElement(subject.toJSON());\n }\n}\n\n/** An InformationContentElement that identifies the content of a document.\n * The realized form of a document is called a DocumentCarrier (different class than Document).\n * For example, a will is a legal document. The will published into a PDF file is an ElectronicDocumentCopy.\n * The will printed onto paper is a PrintedDocumentCopy.\n * In this example, the Document only identifies, names, and tracks the content of the will.\n * @public @preview\n */\nexport abstract class Document extends InformationContentElement {\n public static override get className(): string { return \"Document\"; }\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** A document that represents a drawing, that is, a two-dimensional graphical representation of engineering data. A Drawing element is usually modelled by a [[DrawingModel]].\n * @public @preview\n */\nexport class Drawing extends Document {\n private _scaleFactor: number;\n\n /** A factor used by tools to adjust the size of text in [GeometricElement2d]($backend)s in the associated [DrawingModel]($backend) and to compute the\n * size of the [ViewAttachment]($backend) created when attaching the [Drawing]($backend) to a [Sheet]($backend).\n * Default: 1.\n * @note Attempting to set this property to a value less than or equal to zero will produce an exception.\n * @public @preview\n */\n public get scaleFactor(): number { return this._scaleFactor; }\n public set scaleFactor(factor: number) {\n if (factor <= 0) {\n if (this._scaleFactor === undefined) {\n // Entity constructor calls our setter before our constructor runs...don't throw an exception at that time,\n // because somebody may have persisted the value as zero.\n return;\n }\n\n throw new Error(\"Drawing.scaleFactor must be greater than zero\");\n }\n\n this._scaleFactor = factor;\n }\n\n public static override get className(): string { return \"Drawing\"; }\n\n protected constructor(props: DrawingProps, iModel: IModelDb) {\n super(props, iModel);\n\n this._scaleFactor = typeof props.scaleFactor === \"number\" && props.scaleFactor > 0 ? props.scaleFactor : 1;\n }\n\n public override toJSON(): DrawingProps {\n const drawingProps: DrawingProps = super.toJSON();\n // Entity.toJSON auto-magically sets drawingProps.scaleFactor from this.scaleFactor - unset if default value of 1.\n if (drawingProps.scaleFactor === 1) {\n delete drawingProps.scaleFactor;\n }\n\n return drawingProps;\n }\n\n /** The name of the DrawingModel class modeled by this element type. */\n protected static get drawingModelFullClassName(): string { return DrawingModel.classFullName; }\n\n /** Create a Code for a Drawing given a name that is meant to be unique within the scope of the specified DocumentListModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DocumentListModel that contains the Drawing and provides the scope for its name.\n * @param codeValue The Drawing name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.drawing);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n\n /** Insert a Drawing element and a DrawingModel that breaks it down.\n * @param iModelDb Insert into this iModel\n * @param documentListModelId Insert the new Drawing into this DocumentListModel\n * @param name The name of the Drawing.\n * @param scaleFactor See [[scaleFactor]]. Must be greater than zero.\n * @returns The Id of the newly inserted Drawing element and the DrawingModel that breaks it down (same value).\n * @throws [[IModelError]] if unable to insert the element.\n * @throws Error if `scaleFactor` is less than or equal to zero.\n */\n public static insert(iModelDb: IModelDb, documentListModelId: Id64String, name: string, scaleFactor?: number): Id64String {\n const drawingProps: DrawingProps = {\n classFullName: this.classFullName,\n model: documentListModelId,\n code: this.createCode(iModelDb, documentListModelId, name),\n };\n\n if (scaleFactor !== undefined) {\n if (scaleFactor <= 0) {\n throw new Error(\"Drawing.scaleFactor must be greater than zero\");\n }\n\n drawingProps.scaleFactor = scaleFactor;\n }\n\n const drawingId: Id64String = iModelDb.elements.insertElement(drawingProps);\n const model: DrawingModel = iModelDb.models.createModel({\n classFullName: this.drawingModelFullClassName,\n modeledElement: { id: drawingId },\n });\n return iModelDb.models.insertModel(model.toJSON());\n }\n}\n\n/** A document that represents a section drawing, that is, a graphical documentation derived from a planar\n * section of a spatial view. A SectionDrawing element is modelled by a [[SectionDrawingModel]] or a [[GraphicalModel3d]].\n * A [[SectionDrawingLocation]] can associate the drawing with a spatial location, enabling [HyperModeling]($hypermodeling).\n * @public @preview\n */\nexport class SectionDrawing extends Drawing {\n /** The type of section used to generate the drawing. */\n public sectionType: SectionType;\n /** The spatial view from which the section was generated. */\n public spatialView: RelatedElement;\n /** A transform from the section drawing model's coordinates to spatial coordinates. */\n public drawingToSpatialTransform?: Transform;\n /** If the section drawing is placed onto a [[Sheet]] via a [[ViewAttachment]], a transform from the sheet's coordinates to spatial coordinates. */\n public sheetToSpatialTransform?: Transform;\n /** If the section drawing is placed onto a [[Sheet]] via a [[ViewAttachment]], the clip to apply to the sheet graphics when drawn in the context\n * of the spatial view.\n * @note The ClipVector is defined in spatial coordinates.\n */\n public drawingBoundaryClip?: ClipVector;\n /** If true, when displaying the section drawing as a [DrawingViewState]($frontend), the [[spatialView]] will also be displayed. */\n public displaySpatialView: boolean;\n\n public static override get className(): string { return \"SectionDrawing\"; }\n\n protected static override get drawingModelFullClassName(): string { return SectionDrawingModel.classFullName; }\n\n protected constructor(props: SectionDrawingProps, iModel: IModelDb) {\n super(props, iModel);\n this.sectionType = JsonUtils.asInt(props.sectionType, SectionType.Section);\n this.spatialView = RelatedElement.fromJSON(props.spatialView) ?? RelatedElement.none;\n this.displaySpatialView = JsonUtils.asBool(props.jsonProperties?.displaySpatialView);\n\n const json = props.jsonProperties;\n if (!json)\n return;\n\n if (json.drawingToSpatialTransform)\n this.drawingToSpatialTransform = Transform.fromJSON(json.drawingToSpatialTransform);\n\n if (json.sheetToSpatialTransform)\n this.sheetToSpatialTransform = Transform.fromJSON(json.sheetToSpatialTransform);\n\n if (json.drawingBoundaryClip)\n this.drawingBoundaryClip = ClipVector.fromJSON(json.drawingBoundaryClip);\n }\n\n public override toJSON(): SectionDrawingProps {\n const props: SectionDrawingProps = {\n ...super.toJSON(),\n sectionType: this.sectionType,\n spatialView: this.spatialView.toJSON(),\n };\n\n if (!props.jsonProperties)\n props.jsonProperties = {};\n\n props.jsonProperties.displaySpatialView = this.displaySpatialView ? true : undefined;\n props.jsonProperties.drawingToSpatialTransform = this.drawingToSpatialTransform?.toJSON();\n props.jsonProperties.sheetToSpatialTransform = this.sheetToSpatialTransform?.toJSON();\n props.jsonProperties.drawingBoundaryClip = this.drawingBoundaryClip?.toJSON();\n\n return props;\n }\n}\n\n/** The template for a SheetBorder\n * @public @preview\n */\nexport class SheetBorderTemplate extends Document {\n public static override get className(): string { return \"SheetBorderTemplate\"; }\n public height?: number;\n public width?: number;\n protected constructor(props: SheetBorderTemplateProps, iModel: IModelDb) {\n super(props, iModel);\n this.height = props.height;\n this.width = props.width;\n }\n}\n\n/** The template for a [[Sheet]]\n * @public @preview\n */\nexport class SheetTemplate extends Document {\n public static override get className(): string { return \"SheetTemplate\"; }\n public height?: number;\n public width?: number;\n public border?: Id64String;\n\n protected constructor(props: SheetTemplateProps, iModel: IModelDb) {\n super(props, iModel);\n this.height = props.height;\n this.width = props.width;\n this.border = props.border;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n if (undefined !== this.border)\n referenceIds.addElement(this.border);\n }\n}\n\n/** A digital representation of a *sheet of paper*. Modeled by a [[SheetModel]].\n * @public @preview\n */\nexport class Sheet extends Document {\n public static override get className(): string { return \"Sheet\"; }\n public height: number;\n public width: number;\n public scale?: number;\n public sheetTemplate?: Id64String;\n\n protected constructor(props: SheetProps, iModel: IModelDb) {\n super(props, iModel);\n this.height = JsonUtils.asDouble(props.height);\n this.width = JsonUtils.asDouble(props.width);\n this.scale = props.scale;\n this.sheetTemplate = props.sheetTemplate ? Id64.fromJSON(props.sheetTemplate) : undefined;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n if (undefined !== this.sheetTemplate)\n referenceIds.addElement(this.sheetTemplate);\n }\n\n /** Create a Code for a Sheet given a name that is meant to be unique within the scope of the specified DocumentListModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DocumentListModel that contains the Sheet and provides the scope for its name.\n * @param codeValue The Sheet name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.sheet);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** Information Record Element is an abstract base class for modeling information records. Information Record\n * Element is the default choice if no other subclass of Information Content Element makes sense.\n * @public @preview\n */\nexport abstract class InformationRecordElement extends InformationContentElement {\n public static override get className(): string { return \"InformationRecordElement\"; }\n\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** A Definition Element holds configuration-related information that is meant to be referenced / shared.\n * @public @preview\n */\nexport abstract class DefinitionElement extends InformationContentElement {\n public static override get className(): string { return \"DefinitionElement\"; }\n /** If true, don't show this DefinitionElement in user interface lists. */\n public isPrivate: boolean;\n\n protected constructor(props: DefinitionElementProps, iModel: IModelDb) {\n super(props, iModel);\n this.isPrivate = true === props.isPrivate;\n }\n\n /**\n * DefinitionElement custom HandledProps includes 'isPrivate'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"isPrivate\", source: \"Class\" },\n ];\n\n /**\n * DefinitionElement deserializes 'isPrivate'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): DefinitionElementProps {\n const elProps = super.deserialize(props) as DefinitionElementProps;\n if (props.row.isPrivate !== undefined)\n elProps.isPrivate = props.row.isPrivate;\n return elProps;\n }\n\n /**\n * DefinitionElement serialize 'isPrivate'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: DefinitionElementProps, iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, iModel);\n if (undefined !== props.isPrivate) {\n inst.isPrivate = props.isPrivate;\n }\n return inst;\n }\n\n public override toJSON(): DefinitionElementProps {\n const val = super.toJSON() as DefinitionElementProps;\n val.isPrivate = this.isPrivate;\n return val;\n }\n}\n\n/** This abstract class unifies DefinitionGroup and DefinitionContainer for relationship endpoint purposes.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.10\n * @public @preview\n */\nexport abstract class DefinitionSet extends DefinitionElement {\n public static override get className(): string { return \"DefinitionSet\"; }\n}\n\n/** A DefinitionContainer exclusively owns a set of DefinitionElements contained within its sub-model (of type DefinitionModel).\n * @note The associated ECClass was added to the BisCore schema in version 1.0.10\n * @public @preview\n */\nexport class DefinitionContainer extends DefinitionSet {\n public static override get className(): string { return \"DefinitionContainer\"; }\n /** Create a DefinitionContainer\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that will contain this DefinitionContainer element.\n * @param code The Code for this DefinitionContainer.\n * @param isPrivate The optional hint, that if `true` means it should not be displayed in the UI.\n * @returns The newly constructed DefinitionContainer\n * @note There is not a predefined CodeSpec for DefinitionContainer elements, so it is the responsibility of the domain or application to create one.\n * @throws [[IModelError]] if there is a problem creating the DefinitionContainer\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, code: Code, isPrivate?: boolean): DefinitionContainer {\n const elementProps: DefinitionElementProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code,\n isPrivate,\n };\n return new DefinitionContainer(elementProps, iModelDb);\n }\n /** Insert a DefinitionContainer and its sub-model.\n * @param iModelDb Insert into this IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that will contain this DefinitionContainer element.\n * @param code The Code for this DefinitionContainer.\n * @param isPrivate The optional hint, that if `true` means it should not be displayed in the UI.\n * @returns The Id of the newly inserted DefinitionContainer and its newly inserted sub-model (of type DefinitionModel).\n * @note There is not a predefined CodeSpec for DefinitionContainer elements, so it is the responsibility of the domain or application to create one.\n * @throws [[IModelError]] if there is a problem inserting the DefinitionContainer\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, code: Code, isPrivate?: boolean): Id64String {\n const containerElement = this.create(iModelDb, definitionModelId, code, isPrivate);\n const containerElementId = iModelDb.elements.insertElement(containerElement.toJSON());\n const containerSubModelProps: ModelProps = {\n classFullName: DefinitionModel.classFullName,\n modeledElement: { id: containerElementId },\n isPrivate,\n };\n iModelDb.models.insertModel(containerSubModelProps);\n return containerElementId;\n }\n}\n\n/** A non-exclusive set of DefinitionElements grouped using the DefinitionGroupGroupsDefinitions relationship.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.10\n * @public @preview\n */\nexport class DefinitionGroup extends DefinitionSet {\n public static override get className(): string { return \"DefinitionGroup\"; }\n /** Create a DefinitionGroup\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that will contain this DefinitionGroup element.\n * @param code The Code for this DefinitionGroup\n * @param isPrivate The optional hint, that if `true` means it should not be displayed in the UI.\n * @returns The newly constructed DefinitionGroup\n * @note There is not a predefined CodeSpec for DefinitionGroup elements, so it is the responsibility of the domain or application to create one.\n * @throws [[IModelError]] if there is a problem creating the DefinitionGroup\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, code: Code, isPrivate?: boolean): DefinitionGroup {\n const elementProps: DefinitionElementProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code,\n isPrivate,\n };\n return new DefinitionGroup(elementProps, iModelDb);\n }\n}\n\n/** Defines a set of properties (the *type*) that may be associated with an element.\n * @public @preview\n */\nexport abstract class TypeDefinitionElement extends DefinitionElement {\n public static override get className(): string { return \"TypeDefinitionElement\"; }\n public recipe?: RelatedElement;\n\n protected constructor(props: TypeDefinitionElementProps, iModel: IModelDb) {\n super(props, iModel);\n this.recipe = RelatedElement.fromJSON(props.recipe);\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n if (undefined !== this.recipe)\n referenceIds.addElement(this.recipe.id);\n }\n}\n\n/** Defines a recipe for generating instances from a definition.\n * @beta\n */\nexport abstract class RecipeDefinitionElement extends DefinitionElement {\n public static override get className(): string { return \"RecipeDefinitionElement\"; }\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** Defines a set of properties (the *type*) that can be associated with a Physical Element. A Physical\n * Type has a strong correlation with something that can be ordered from a catalog since all instances\n * share a common set of properties.\n * @public @preview\n */\nexport abstract class PhysicalType extends TypeDefinitionElement {\n public static override get className(): string { return \"PhysicalType\"; }\n /** If defined, the [[PhysicalMaterial]] that makes up this PhysicalType. */\n public physicalMaterial?: RelatedElement;\n protected constructor(props: PhysicalTypeProps, iModel: IModelDb) {\n super(props, iModel);\n this.physicalMaterial = RelatedElement.fromJSON(props.physicalMaterial);\n }\n\n public override toJSON(): PhysicalTypeProps {\n const val = super.toJSON() as PhysicalTypeProps;\n val.physicalMaterial = this.physicalMaterial?.toJSON();\n return val;\n }\n /** Create a Code for a PhysicalType element given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the PhysicalType element and provides the scope for its name.\n * @param codeValue The PhysicalType name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.physicalType);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** Defines a set of properties (the *type*) that can be associated with a spatial location.\n * @public @preview\n */\nexport abstract class SpatialLocationType extends TypeDefinitionElement {\n public static override get className(): string { return \"SpatialLocationType\"; }\n protected constructor(props: TypeDefinitionElementProps, iModel: IModelDb) { super(props, iModel); }\n\n /** Create a Code for a SpatialLocationType element given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the SpatialLocationType element and provides the scope for its name.\n * @param codeValue The SpatialLocationType name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.spatialLocationType);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** A TemplateRecipe3d is a DefinitionElement that has a sub-model that contains the 3d template elements.\n * @beta\n */\nexport class TemplateRecipe3d extends RecipeDefinitionElement {\n public static override get className(): string { return \"TemplateRecipe3d\"; }\n\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n\n /** Create a Code for a TemplateRecipe3d given a name that is meant to be unique within the scope of its Model.\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe3d element.\n * @param codeValue The name of the TemplateRecipe3d element.\n */\n public static createCode(iModelDb: IModelDb, definitionModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.templateRecipe3d);\n return new Code({ spec: codeSpec.id, scope: definitionModelId, value: codeValue });\n }\n\n /** Create a TemplateRecipe3d\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe3d element.\n * @param name The name (Code.value) of the TemplateRecipe3d\n * @returns The newly constructed TemplateRecipe3d\n * @throws [[IModelError]] if there is a problem creating the TemplateRecipe3d\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, isPrivate?: boolean): TemplateRecipe3d {\n const elementProps: DefinitionElementProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n isPrivate,\n };\n return new TemplateRecipe3d(elementProps, iModelDb);\n }\n /** Insert a TemplateRecipe3d and a PhysicalModel (sub-model) that will contain the 3d template elements.\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe3d element.\n * @param name The name (Code.value) of the TemplateRecipe3d\n * @returns The Id of the newly inserted TemplateRecipe3d and the PhysicalModel that sub-models it.\n * @throws [[IModelError]] if there is a problem inserting the TemplateRecipe3d or its sub-model.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, isPrivate?: boolean): Id64String {\n const element = this.create(iModelDb, definitionModelId, name, isPrivate);\n const modeledElementId: Id64String = iModelDb.elements.insertElement(element.toJSON());\n const modelProps: GeometricModel3dProps = {\n classFullName: PhysicalModel.classFullName,\n modeledElement: { id: modeledElementId },\n isTemplate: true,\n };\n return iModelDb.models.insertModel(modelProps); // will be the same value as modeledElementId\n }\n}\n\n/** Defines a set of properties (the *type*) that can be associated with a 2D Graphical Element.\n * @public @preview\n */\nexport abstract class GraphicalType2d extends TypeDefinitionElement {\n public static override get className(): string { return \"GraphicalType2d\"; }\n\n protected constructor(props: TypeDefinitionElementProps, iModel: IModelDb) { super(props, iModel); }\n\n /** Create a Code for a GraphicalType2d element given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the GraphicalType2d element and provides the scope for its name.\n * @param codeValue The GraphicalType2d name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.graphicalType2d);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** A recipe that uses a 2D template for creating new instances.\n * @beta\n */\nexport class TemplateRecipe2d extends RecipeDefinitionElement {\n public static override get className(): string { return \"TemplateRecipe2d\"; }\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n\n /** Create a Code for a TemplateRecipe2d given a name that is meant to be unique within the scope of its Model.\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe2d element.\n * @param codeValue The name of the TemplateRecipe2d element.\n */\n public static createCode(iModelDb: IModelDb, definitionModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.templateRecipe2d);\n return new Code({ spec: codeSpec.id, scope: definitionModelId, value: codeValue });\n }\n\n /** Create a TemplateRecipe2d\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe2d element.\n * @param name The name (Code.value) of the TemplateRecipe2d\n * @returns The newly constructed TemplateRecipe2d\n * @throws [[IModelError]] if there is a problem creating the TemplateRecipe2d\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, isPrivate?: boolean): TemplateRecipe2d {\n const elementProps: DefinitionElementProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n isPrivate,\n };\n return new TemplateRecipe2d(elementProps, iModelDb);\n }\n /** Insert a TemplateRecipe2d and a DrawingModel (sub-model) that will contain the 2d template elements.\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe2d element.\n * @param name The name (Code.value) of the TemplateRecipe2d\n * @returns The Id of the newly inserted TemplateRecipe2d and the PhysicalModel that sub-models it.\n * @throws [[IModelError]] if there is a problem inserting the TemplateRecipe2d or its sub-model.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, isPrivate?: boolean): Id64String {\n const element = this.create(iModelDb, definitionModelId, name, isPrivate);\n const modeledElementId: Id64String = iModelDb.elements.insertElement(element.toJSON());\n const modelProps: GeometricModel2dProps = {\n classFullName: DrawingModel.classFullName,\n modeledElement: { id: modeledElementId },\n isTemplate: true,\n };\n return iModelDb.models.insertModel(modelProps); // will be the same value as modeledElementId\n }\n}\n\n/** An abstract base class for elements that establishes a particular modeling perspective for its parent Subject.\n * Instances are always sub-modeled by a specialization of Model of the appropriate modeling perspective.\n * @see [iModel Information Hierarchy]($docs/bis/guide/data-organization/top-of-the-world), [[Subject]], [[Model]]\n * @public @preview\n */\nexport abstract class InformationPartitionElement extends InformationContentElement {\n public static override get className(): string { return \"InformationPartitionElement\"; }\n /** A human-readable string describing the intent of the partition. */\n public description?: string;\n\n protected constructor(props: InformationPartitionElementProps, iModel: IModelDb) {\n super(props, iModel);\n this.description = props.description;\n }\n\n public override toJSON(): InformationPartitionElementProps { // This override only specializes the return type\n return super.toJSON() as InformationPartitionElementProps; // Entity.toJSON takes care of auto-handled properties\n }\n\n /** Create a code that can be used for any subclass of InformationPartitionElement.\n * @param iModelDb The IModelDb\n * @param parentSubjectId The Id of the parent Subject that provides the scope for names of its child InformationPartitionElements.\n * @param codeValue The InformationPartitionElement name\n */\n public static createCode(iModel: IModelDb, parentSubjectId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.informationPartitionElement);\n return new Code({ spec: codeSpec.id, scope: parentSubjectId, value: codeValue });\n }\n}\n\n/** A DefinitionPartition element establishes a *Definition* modeling perspective for its parent Subject.\n * A DefinitionPartition is always sub-modeled by a DefinitionModel.\n * @see [[DefinitionModel]]\n * @public @preview\n */\nexport class DefinitionPartition extends InformationPartitionElement {\n public static override get className(): string { return \"DefinitionPartition\"; }\n}\n\n/** A DocumentPartition element establishes a *Document* modeling perspective for its parent Subject.\n * A DocumentPartition is always sub-modeled by a DocumentListModel.\n * @see [[DocumentListModel]]\n * @public @preview\n */\nexport class DocumentPartition extends InformationPartitionElement {\n public static override get className(): string { return \"DocumentPartition\"; }\n}\n\n/** A GroupInformationPartition element establishes a *Group Information* modeling perspective for its parent Subject.\n * A GroupInformationPartition is always sub-modeled by a GroupInformationModel.\n * @see [[GroupInformationModel]]\n * @public @preview\n */\nexport class GroupInformationPartition extends InformationPartitionElement {\n public static override get className(): string { return \"GroupInformationPartition\"; }\n}\n\n/** A GraphicalPartition3d element establishes a *3D Graphical* modeling perspective for its parent Subject.\n * A GraphicalPartition3d is always sub-modeled by a GraphicalModel3d.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.8\n * @see [[GraphicalModel3d]]\n * @public @preview\n */\nexport class GraphicalPartition3d extends InformationPartitionElement {\n public static override get className(): string { return \"GraphicalPartition3d\"; }\n}\n\n/** An InformationRecordPartition element establishes a *Information Record* modeling perspective for its parent Subject.\n * A InformationRecordPartition is always sub-modeled by an InformationRecordModel.\n * @see [[InformationRecordModel]]\n * @public @preview\n */\nexport class InformationRecordPartition extends InformationPartitionElement {\n public static override get className(): string { return \"InformationRecordPartition\"; }\n}\n\n/** A LinkPartition element establishes a *Link* modeling perspective for its parent Subject. A LinkPartition is always sub-modeled by a LinkModel.\n * @see [[LinkModel]]\n * @public @preview\n */\nexport class LinkPartition extends InformationPartitionElement {\n public static override get className(): string { return \"LinkPartition\"; }\n}\n\n/** A PhysicalPartition element establishes a *Physical* modeling perspective for its parent Subject. A PhysicalPartition is always sub-modeled by a PhysicalModel.\n * @see [[PhysicalModel]]\n * @public @preview\n */\nexport class PhysicalPartition extends InformationPartitionElement {\n public static override get className(): string { return \"PhysicalPartition\"; }\n}\n\n/** A SpatialLocationPartition element establishes a *SpatialLocation* modeling perspective for its parent Subject.\n * A SpatialLocationPartition is always sub-modeled by a SpatialLocationModel.\n * @see [[SpatialLocationModel]]\n * @public @preview\n */\nexport class SpatialLocationPartition extends InformationPartitionElement {\n public static override get className(): string { return \"SpatialLocationPartition\"; }\n}\n\n/** A SheetIndexPartition element establishes a [[SheetIndex]] modeling perspective for its parent [[Subject]].\n * A SheetIndexPartition is always sub-modeled by a [[SheetIndexModel]].\n * @beta\n */\nexport class SheetIndexPartition extends InformationPartitionElement {\n public static override get className(): string { return \"SheetIndexPartition\"; }\n}\n\n/** Group Information is an abstract base class for modeling entities whose main purpose is to reference a group of related elements.\n * @public @preview\n */\nexport abstract class GroupInformationElement extends InformationReferenceElement {\n public static override get className(): string { return \"GroupInformationElement\"; }\n}\n\n/** An information element that specifies a link.\n * @public @preview\n */\nexport abstract class LinkElement extends InformationReferenceElement {\n public static override get className(): string { return \"LinkElement\"; }\n /** Create a Code for a LinkElement given a name that is meant to be unique within the scope of the specified Model.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the Model that contains the LinkElement and provides the scope for its name.\n * @param codeValue The LinkElement name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.linkElement);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** An information element that specifies a URL link.\n * @public @preview\n */\nexport class UrlLink extends LinkElement {\n public static override get className(): string { return \"UrlLink\"; }\n public description?: string;\n public url?: string;\n\n protected constructor(props: UrlLinkProps, iModel: IModelDb) {\n super(props, iModel);\n this.description = props.description;\n this.url = props.url;\n }\n\n /**\n * UrlLink custom HandledProps includes 'description', and 'url'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"description\", source: \"Class\" },\n { propertyName: \"url\", source: \"Class\" },\n ];\n\n /**\n * UrlLink deserializes 'description', and 'url'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): UrlLinkProps {\n const elProps = super.deserialize(props) as UrlLinkProps;\n elProps.description = props.row.description ?? \"\";\n elProps.url = props.row.url;\n return elProps;\n }\n\n /**\n * UrlLink serializes 'description', and 'url'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: UrlLinkProps, iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, iModel);\n inst.description = props.description;\n return inst;\n }\n\n public override toJSON(): UrlLinkProps {\n const val = super.toJSON() as UrlLinkProps;\n val.description = this.description;\n val.url = this.url;\n return val;\n }\n}\n\n/** Represents a folder-like structure that organizes repositories (typically files) in an external system.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\n * @alpha\n */\nexport class FolderLink extends UrlLink {\n public static override get className(): string { return \"FolderLink\"; }\n}\n\n/** An information element that links to a repository.\n * @public @preview\n */\nexport class RepositoryLink extends UrlLink {\n public static override get className(): string { return \"RepositoryLink\"; }\n public repositoryGuid?: GuidString;\n /** @note This property was added to the BisCore schema in version 1.0.13 */\n public format?: string;\n\n protected constructor(props: RepositoryLinkProps, iModel: IModelDb) {\n super(props, iModel);\n this.repositoryGuid = props.repositoryGuid;\n this.format = props.format;\n }\n\n public override toJSON(): RepositoryLinkProps {\n const val = super.toJSON() as RepositoryLinkProps;\n val.repositoryGuid = this.repositoryGuid;\n val.format = this.format;\n return val;\n }\n}\n\n/** An information element that links to an embedded file.\n * @public @preview\n */\nexport class EmbeddedFileLink extends LinkElement {\n public static override get className(): string { return \"EmbeddedFileLink\"; }\n}\n\n/** A real world entity is modeled as a Role Element when a set of external circumstances define an important\n * role (one that is worth tracking) that is not intrinsic to the entity playing the role. For example,\n * a person can play the role of a teacher or a rock can play the role of a boundary marker.\n * @public @preview\n */\nexport abstract class RoleElement extends Element {\n public static override get className(): string { return \"RoleElement\"; }\n}\n\n/** A Definition Element that specifies a collection of geometry that is meant to be reused across Geometric\n * Element instances. Leveraging Geometry Parts can help reduce file size and improve display performance.\n * @public @preview\n */\nexport class GeometryPart extends DefinitionElement {\n public static override get className(): string { return \"GeometryPart\"; }\n public geom?: GeometryStreamProps;\n public bbox: ElementAlignedBox3d;\n\n protected constructor(props: GeometryPartProps, iModel: IModelDb) {\n super(props, iModel);\n this.geom = props.geom;\n this.bbox = Range3d.fromJSON(props.bbox);\n }\n\n /**\n * GeometryPart custom HandledProps includes 'geometryStream', 'bBoxHigh', and 'bBoxLow'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"geometryStream\", source: \"Class\" },\n { propertyName: \"bBoxLow\", source: \"Class\" },\n { propertyName: \"bBoxHigh\", source: \"Class\" },\n ];\n\n /**\n * GeometryPart deserializes 'geometryStream', 'bBoxHigh', and 'bBoxLow'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): GeometryPartProps {\n const elProps = super.deserialize(props) as GeometryPartProps;\n const instance = props.row;\n\n if (\"bBoxHigh\" in instance && instance.bBoxHigh !== undefined && \"bBoxLow\" in instance && instance.bBoxLow !== undefined) {\n elProps.bbox = {\n low: [instance.bBoxLow.x, instance.bBoxLow.y, instance.bBoxLow.z],\n high: [instance.bBoxHigh.x, instance.bBoxHigh.y, instance.bBoxHigh.z],\n };\n }\n\n if (instance.geometryStream) {\n elProps.geom = props.iModel[_nativeDb].convertOrUpdateGeometryPart({\n geom: instance.geometryStream as Uint8Array,\n is2d: false,\n bbox: elProps.bbox,\n }, \"GeometryStreamProps\", props.options?.element ?? {}).geom as GeometryStreamProps;\n }\n\n return elProps;\n }\n\n /**\n * GeometryPart serialize 'geometryStream', 'bBoxHigh', and 'bBoxLow'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: GeometryPartProps, iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, iModel);\n\n if (undefined !== props.geom) {\n const source = inst.geometryStream = iModel[_nativeDb].convertOrUpdateGeometryPart({\n geom: props.geom as any,\n is2d: false,\n bbox: props.bbox,\n }, \"BinaryStream\", {});\n inst.geometryStream = source.geom as Uint8Array;\n if (source.bbox) {\n props.bbox = source.bbox;\n }\n }\n\n if (undefined !== props.bbox) {\n if (Array.isArray(props.bbox.low)) {\n inst.bBoxLow = { x: props.bbox.low[0], y: props.bbox.low[1], z: props.bbox.low[2] };\n } else {\n inst.bBoxLow = props.bbox.low;\n }\n if (Array.isArray(props.bbox.high)) {\n inst.bBoxHigh = { x: props.bbox.high[0], y: props.bbox.high[1], z: props.bbox.high[2] };\n } else {\n inst.bBoxHigh = props.bbox.high;\n }\n }\n return inst;\n }\n\n public override toJSON(): GeometryPartProps {\n const val = super.toJSON() as GeometryPartProps;\n val.geom = this.geom;\n val.bbox = this.bbox;\n return val;\n }\n\n /** Create a Code for a GeometryPart element given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the GeometryPart element and provides the scope for its name.\n * @param codeValue The GeometryPart name\n * @note GeometryPart elements are not required to be named (have a non-empty Code).\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.geometryPart);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** The definition element for a line style\n * @public @preview\n */\nexport class LineStyle extends DefinitionElement {\n public static override get className(): string { return \"LineStyle\"; }\n public description?: string;\n public data: string;\n\n protected constructor(props: LineStyleProps, iModel: IModelDb) {\n super(props, iModel);\n this.description = props.description;\n this.data = props.data;\n }\n\n /**\n * LineStyle custom HandledProps includes 'data'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"data\", source: \"Class\" },\n ];\n\n /**\n * LineStyle deserializes 'data'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): LineStyleProps {\n const elProps = super.deserialize(props) as LineStyleProps;\n const instance = props.row;\n elProps.data = instance.data ?? \"\";\n return elProps;\n }\n\n /**\n * LineStyle serializes 'data'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: LineStyleProps, iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, iModel);\n inst.data = props.data;\n return inst;\n }\n\n /** Create a Code for a LineStyle definition given a name that is meant to be unique within the scope of the specified model.\n * @param iModel The IModel\n * @param scopeModelId The Id of the DefinitionModel that contains the LineStyle and provides the scope for its name.\n * @param codeValue The name of the LineStyle\n * @returns A LineStyle Code\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n return new Code({ spec: iModel.codeSpecs.getByName(BisCodeSpec.lineStyle).id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** Describes how to animate a view of a [[GeometricModel]] to show change over time using a [RenderSchedule.Script]($common).\n * @note This class was introduced in version 01.00.13 of the BisCore ECSchema. It should only be used with [[IModelDb]]s containing that version or newer.\n * @public @preview\n */\nexport class RenderTimeline extends InformationRecordElement {\n public static override get className(): string { return \"RenderTimeline\"; }\n /** A human-readable description of the timeline, which may be an empty string. */\n public description: string;\n /** The JSON representation of the instructions for visualizing change over time.\n * @see [RenderSchedule.Script]($common) for the API for working with the script.\n */\n public scriptProps: RenderSchedule.ScriptProps;\n\n protected constructor(props: RenderTimelineProps, iModel: IModelDb) {\n super(props, iModel);\n this.description = props.description ?? \"\";\n this.scriptProps = RenderTimeline.parseScriptProps(props.script);\n }\n\n public static fromJSON(props: RenderTimelineProps, iModel: IModelDb): RenderTimeline {\n return new RenderTimeline(props, iModel);\n }\n\n public override toJSON(): RenderTimelineProps {\n const props = super.toJSON() as RenderTimelineProps;\n if (this.description.length > 0)\n props.description = this.description;\n\n props.script = JSON.stringify(this.scriptProps);\n return props;\n }\n\n /**\n * RenderTimeline deserialize checks if Schedule Script Element Ids need to be omitted, and if so, removes them.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): RenderTimelineProps {\n const elProps = super.deserialize(props) as RenderTimelineProps;\n const options = props.options?.element?.renderTimeline;\n // Omit Schedule Script Element Ids if the option is set\n if (options?.omitScriptElementIds && elProps.script) {\n const scriptProps: RenderSchedule.ScriptProps = RenderTimeline.parseScriptProps(elProps.script);\n elProps.script = JSON.stringify(RenderSchedule.Script.removeScheduleScriptElementIds(scriptProps));\n }\n return elProps;\n }\n\n private static parseScriptProps(json: string): RenderSchedule.ScriptProps {\n try {\n return JSON.parse(json);\n } catch {\n return [];\n }\n }\n\n protected override collectReferenceIds(ids: EntityReferenceSet): void {\n super.collectReferenceIds(ids);\n const script = RenderSchedule.Script.fromJSON(this.scriptProps);\n script?.discloseIds(ids);\n }\n\n /** @alpha */\n protected static override async onCloned(context: IModelElementCloneContext, sourceProps: RenderTimelineProps, targetProps: RenderTimelineProps): Promise<void> {\n await super.onCloned(context, sourceProps, targetProps);\n if (context.isBetweenIModels)\n targetProps.script = JSON.stringify(this.remapScript(context, this.parseScriptProps(targetProps.script)));\n }\n\n /** Remap Ids when cloning a RenderSchedule.Script between iModels on a DisplayStyle or RenderTimeline.\n * @beta\n */\n public static remapScript(context: IModelElementCloneContext, input: RenderSchedule.ScriptProps): RenderSchedule.ScriptProps {\n const scriptProps: RenderSchedule.ScriptProps = [];\n if (!Array.isArray(input))\n return scriptProps;\n\n const elementIds = new OrderedId64Array();\n for (const model of input) {\n const modelId = context.findTargetElementId(model.modelId);\n if (!Id64.isValid(modelId))\n continue;\n\n model.modelId = modelId;\n scriptProps.push(model);\n for (const element of model.elementTimelines) {\n elementIds.clear();\n for (const sourceId of RenderSchedule.ElementTimeline.getElementIds(element.elementIds)) {\n const targetId = context.findTargetElementId(sourceId);\n if (Id64.isValid(targetId))\n elementIds.insert(targetId);\n }\n\n element.elementIds = CompressedId64Set.compressIds(elementIds);\n }\n }\n\n return scriptProps;\n }\n}\n\n/** Arguments supplied to [[ProjectInformationRecord.create]].\n * @beta\n */\nexport interface ProjectInformationRecordCreateArgs extends ProjectInformation {\n /** The iModel in which to create the new element. */\n iModel: IModelDb;\n /** The new element's code. Defaults to an empty code. */\n code?: Code;\n /** The Id of the parent [[Subject]] whose project-level properties the ProjectInformationRecord element describes.\n * The ProjectInformationRecord element will reside in the same [[Model]] as the parent Subject.\n */\n parentSubjectId: Id64String;\n}\n\n/** Captures project-level properties of the real-world entity represented by its parent [[Subject]].\n * @beta\n */\nexport class ProjectInformationRecord extends InformationRecordElement {\n public static override get className() { return \"ProjectInformationRecord\"; }\n\n /** The properties of the project. */\n public projectInformation: ProjectInformation;\n\n private constructor(props: ProjectInformationRecordProps, iModel: IModelDb) {\n super(props, iModel);\n this.projectInformation = {\n projectNumber: props.projectNumber,\n projectName: props.projectName,\n location: props.location,\n };\n }\n\n protected static override onInsert(arg: OnElementPropsArg) {\n super.onInsert(arg);\n\n const parentId = arg.props.parent?.id;\n const subject = undefined !== parentId ? arg.iModel.elements.tryGetElement<Subject>(parentId) : undefined;\n if (!(subject instanceof Subject)) {\n throw new Error(\"ProjectInformationRecord must be a child of a Subject\");\n }\n }\n\n /** Create a new ProjectInformationRecord element ready to be inserted into the iModel.\n * @throws Error if the iModel contains a version of the BisCore schema older than 01.00.25.\n */\n public static create(args: ProjectInformationRecordCreateArgs): ProjectInformationRecord {\n args.iModel.requireMinimumSchemaVersion(\"BisCore\", new ECVersion(1, 0, 25), \"ProjectInformationRecord\");\n\n const parent = args.iModel.elements.getElement(args.parentSubjectId);\n\n const props: ProjectInformationRecordProps = {\n classFullName: this.classFullName,\n model: parent.model,\n code: args.code ?? Code.createEmpty(),\n parent: new SubjectOwnsProjectInformationRecord(args.parentSubjectId),\n projectName: args.projectName,\n projectNumber: args.projectNumber,\n location: args.location,\n };\n\n return new this(props, args.iModel);\n }\n\n public override toJSON(): ProjectInformationRecordProps {\n const props = super.toJSON() as ProjectInformationRecordProps;\n for (const key of [\"projectNumber\", \"projectName\", \"location\"] as const) {\n const value = this.projectInformation[key];\n if (undefined !== value) {\n props[key] = value;\n }\n }\n\n return props;\n }\n}\n"]}
|