-
Notifications
You must be signed in to change notification settings - Fork 208
/
AnalyticalSchema.ts
31 lines (28 loc) · 1.36 KB
/
AnalyticalSchema.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
* @module Analytical
*/
import * as path from "path";
import { ClassRegistry, KnownLocations, Schema, Schemas } from "@itwin/core-backend";
import * as elementsModule from "./AnalyticalElements";
import * as modelsModule from "./AnalyticalModels";
import * as relationshipsModule from "./AnalyticalRelationships";
/** Schema class for the Analytical domain.
* @beta
*/
export class AnalyticalSchema extends Schema {
public static override get schemaName(): string { return "Analytical"; }
public static get schemaFilePath(): string { return path.join(KnownLocations.nativeAssetsDir, "ECSchemas", "Domain", "Analytical.ecschema.xml"); }
public static registerSchema() {
if (this !== Schemas.getRegisteredSchema(this.schemaName)) {
Schemas.unregisterSchema(this.schemaName);
Schemas.registerSchema(this);
ClassRegistry.registerModule(elementsModule, this);
ClassRegistry.registerModule(modelsModule, this);
ClassRegistry.registerModule(relationshipsModule, this);
}
}
}