/** @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. Returns only * Schemas from XML files with their keys populated. * @internal */ export declare class StubSchemaXmlFileLocater extends SchemaFileLocater implements ISchemaLocater { /** * Loads a Schema from an XML file on the file system. * @param schemaPath The path to the Schema file. * @param schemaText Optionally pass in the schema text read from the schema file. If undefined, * the schema will be read from the provided schemaPath. */ loadSchema(schemaPath: string, schemaText?: string): Schema; /** * 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. Returns only Schemas from XML files with * their keys populated. * @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(key: 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. Returns only Schemas from XML files with * their keys populated. * @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 schemaXml The Schema XML as a string. */ getSchemaKey(schemaXml: string): SchemaKey; /** * Gets an array of SchemaKeys of the Schemas referenced by the given Schema. * @param xmlSchemaKey The SchemaKey of the parent Schema containing the references. */ private getSchemaReferenceKeys; /** * Adds schemas to the references collection for the given Schema by locating * the referenced schemas. * @param schema The schema for which to add the references. * @param context The SchemaContext that will control the lifetime of the schema. * @param refMatchType The SchemaMatchType to use when locating schema references. */ private addSchemaReferences; /** * Gets an array of SchemaKeys of the Schemas referenced by the given Schema. * @param data The Schema XML string. */ private _getSchemaReferenceKeys; /** * Gets the Schema alias from the Schema XML. * @param data The Schema XML as a string. */ private getSchemaAlias; /** * Parses a valid EC 2.0 version string and returns an ECVersion object. The second digit becomes the minor version, * and a zero is inserted as the 'write' digit. Example: "1.1" -> "1.0.1". * @param versionString A valid EC 2.0 version string of the format, 'RR.mm'. */ private fromECv2String; } //# sourceMappingURL=StubSchemaXmlFileLocater.d.ts.map