@itwin/ecschema-metadata
Version:
ECObjects core concepts in typescript
44 lines • 2.1 kB
TypeScript
import type { SchemaInfo } from "../Interfaces";
import type { Schema } from "../Metadata/Schema";
/**
* Utility class for working with Schema graphs.
* @internal
*/
export declare class SchemaGraphUtil {
/**
* Creates a flattened list of schemas in topological order, typically used before schema import
* so that dependent schemas are processed after their references.
* @param insertSchema The schema to be imported.
* @param schemas The schema collection that will hold the ordered schemas. If null, the collection
* will be created internally and passed along during recursive calls.
*/
static buildDependencyOrderedSchemaList(insertSchema: Schema, schemas?: Schema[]): Schema[];
/**
* Returns a flat list of schemas in topological order, typically used before schema import
* so that dependent schemas are processed after their references. This method does not alter
* the original schemaInfos array.
* @param schemaInfos The schema collection that will hold the ordered schemas.
* @returns A list of schemas in topological order.
*/
static buildDependencyOrderedSchemaInfoList(schemaInfos: ReadonlyArray<SchemaInfo>): ReadonlyArray<SchemaInfo>;
/**
* Indicates if the given Schema references the possibleDependency Schema.
* @param schema The possible dependent schema.
* @param possibleDependency The possible Schema dependency.
*/
private static dependsOn;
/**
* Indicates if the given Schema directly references the possiblyReferencedSchema Schema.
* @param schema The possible parent schema.
* @param possibleDependency The Schema that may be referenced.
*/
private static directlyReferences;
/**
* Helper method that manages the insertion of a Schema into the schemas collection
* based on the topological ordering algorithm.
* @param schemas The ordered collection.
* @param insert The instance to insert.
*/
private static insertSchemaInDependencyOrderedList;
}
//# sourceMappingURL=SchemaGraphUtil.d.ts.map