UNPKG

@itwin/core-backend

Version:
63 lines 2.57 kB
/*--------------------------------------------------------------------------------------------- * Copyright (c) Bentley Systems, Incorporated. All rights reserved. * See LICENSE.md in the project root for license terms and full copyright notice. *--------------------------------------------------------------------------------------------*/ /** @packageDocumentation * @module Schema */ import * as path from "path"; import * as categoryMod from "./Category"; import { ClassRegistry } from "./ClassRegistry"; import * as elementMod from "./Element"; import * as aspectMod from "./ElementAspect"; import * as externalSourceMod from "./ExternalSource"; import { KnownLocations } from "./IModelHost"; import * as materialMod from "./Material"; import * as modelMod from "./Model"; import * as linkMod from "./Relationship"; import { Schema, Schemas } from "./Schema"; import * as textureMod from "./Texture"; import * as viewMod from "./ViewDefinition"; import * as displayStyleMod from "./DisplayStyle"; import * as annotationsMod from "./annotations/TextAnnotationElement"; import * as elementDrivesTextAnnotation from "./annotations/ElementDrivesTextAnnotation"; import * as sheetIndex from "./SheetIndex"; /** * The [BisCore]($docs/bis/guide/fundamentals/schemas-domains.md) schema is the lowest level Schema in an iModel. * * It is automatically registered when [[IModelHost.startup]] is called. * * Example: * ``` ts * [[include:BisCore.registerSchemaAndGetClass]] * ``` * @public */ export class BisCoreSchema extends Schema { static get schemaName() { return "BisCore"; } static get schemaFilePath() { return path.join(KnownLocations.nativeAssetsDir, "ECSchemas", "Dgn", `${BisCoreSchema.schemaName}.ecschema.xml`); } /** @internal */ static registerSchema() { if (this === Schemas.getRegisteredSchema(this.schemaName)) return; Schemas.unregisterSchema(this.schemaName); Schemas.registerSchema(this); // this list should include all backend .ts files with implementations of Entity-based classes. Order does not matter. [ elementMod, aspectMod, modelMod, categoryMod, viewMod, linkMod, textureMod, materialMod, externalSourceMod, displayStyleMod, annotationsMod, sheetIndex, elementDrivesTextAnnotation, ].forEach((module) => ClassRegistry.registerModule(module, this)); } } //# sourceMappingURL=BisCoreSchema.js.map