/** @packageDocumentation * @module Locaters */ import { ISchemaLocater, Schema, SchemaContext, SchemaInfo, SchemaKey, SchemaMatchType } from "@itwin/ecschema-metadata"; import { SchemaFileLocater } from "./SchemaFileLocater"; /** * A SchemaLocater implementation for locating XML Schema files * from the file system using configurable search paths. * @public @preview This is a workaround the current lack of a full xml parser. */ export declare class SchemaXmlFileLocater extends SchemaFileLocater implements ISchemaLocater { /** * Attempts to retrieve a Schema with the given SchemaKey by using the configured search paths * to locate the XML Schema file from the file system. * @param key The SchemaKey of the Schema to retrieve. * @param matchType The SchemaMatchType. * @param context The SchemaContext that will control the lifetime of the schema. */ getSchema(key: SchemaKey, matchType: SchemaMatchType, context: SchemaContext): Promise; /** * Gets the schema info which matches the provided SchemaKey. The schema info may be returned before the schema is fully loaded. * The fully loaded schema can be gotten later from the context using the getCachedSchema method. * @param schemaKey The SchemaKey describing the schema to get from the cache. * @param matchType The match type to use when locating the schema * @param context The SchemaContext that will control the lifetime of the schema and holds the schema's references, if they exist. */ getSchemaInfo(schemaKey: SchemaKey, matchType: SchemaMatchType, context: SchemaContext): Promise; /** * Attempts to retrieve a Schema with the given SchemaKey by using the configured search paths * to locate the XML Schema file from the file system. * @param key The SchemaKey of the Schema to retrieve. * @param matchType The SchemaMatchType. * @param context The SchemaContext that will control the lifetime of the schema. */ getSchemaSync(key: SchemaKey, matchType: SchemaMatchType, context: SchemaContext): Schema | undefined; /** * Constructs a SchemaKey based on the information in the Schema XML. * @param data The Schema XML as a string. */ getSchemaKey(data: string): SchemaKey; } /** * This locater is responsible for locating standard schema files that are released by the core-backend package. * The locater needs an argument to the known backend assets directory where the core-backend package is installed. * This can be accessed by the KnownLocations.nativeAssetsDir getter provided by core-backend. * * @note This locater is read-only and does not allow adding new schema search paths. * @note This locater should be used as a fallback/last chance locater in the schema context as any user defined schema should have higher precedence over the standard schema. * @see [Loading ECSchemas from XML Files]($docs/learning/schema-xml-file-locaters.md) for usage guidance. * @public @preview This is a workaround due to the current lack of a full xml parser. */ export declare class PublishedSchemaXmlFileLocater extends SchemaXmlFileLocater implements ISchemaLocater { /** * Constructs a new PublishedSchemaXmlFileLocater * @param knownBackendAssetsDir The assets directory where the core-backend package is installed. Can be accessed by the KnownLocations.nativeAssetsDir getter provided by core-backend. */ constructor(knownBackendAssetsDir: string); /** * Overrides the addSchemaSearchPath method to prevent adding new schema search paths. * * @param _schemaPath - The schema path to add (ignored). */ addSchemaSearchPath(_schemaPath: string): void; /** * Overrides the addSchemaSearchPaths method to prevent adding new schema search paths. * * @param _schemaPaths - The schema paths to add (ignored). */ addSchemaSearchPaths(_schemaPaths: string[]): void; } //# sourceMappingURL=SchemaXmlFileLocater.d.ts.map