"use strict";
/*---------------------------------------------------------------------------------------------
* 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
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.BisCoreSchema = void 0;
const path = require("path");
const categoryMod = require("./Category");
const ClassRegistry_1 = require("./ClassRegistry");
const elementMod = require("./Element");
const aspectMod = require("./ElementAspect");
const externalSourceMod = require("./ExternalSource");
const IModelHost_1 = require("./IModelHost");
const materialMod = require("./Material");
const modelMod = require("./Model");
const linkMod = require("./Relationship");
const Schema_1 = require("./Schema");
const textureMod = require("./Texture");
const viewMod = require("./ViewDefinition");
const displayStyleMod = require("./DisplayStyle");
const annotationsMod = require("./annotations/TextAnnotationElement");
const elementDrivesTextAnnotation = require("./annotations/ElementDrivesTextAnnotation");
const sheetIndex = require("./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
 */
class BisCoreSchema extends Schema_1.Schema {
    static get schemaName() { return "BisCore"; }
    static get schemaFilePath() { return path.join(IModelHost_1.KnownLocations.nativeAssetsDir, "ECSchemas", "Dgn", `${BisCoreSchema.schemaName}.ecschema.xml`); }
    /** @internal */
    static registerSchema() {
        if (this === Schema_1.Schemas.getRegisteredSchema(this.schemaName))
            return;
        Schema_1.Schemas.unregisterSchema(this.schemaName);
        Schema_1.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_1.ClassRegistry.registerModule(module, this));
    }
}
exports.BisCoreSchema = BisCoreSchema;
//# sourceMappingURL=BisCoreSchema.js.map