UNPKG

@itwin/ecschema-metadata

Version:

ECObjects core concepts in typescript

51 lines 2.55 kB
import { AnySchemaItemProps, KindOfQuantityProps, SchemaItemProps } from "../Deserialization/JsonProps"; import { SchemaInfo } from "../Interfaces"; /** * Parses SchemaItemProps JSON returned from an ECSql query and returns the correct SchemaItemProps JSON. * This is necessary as a small amount information (ie. CustomAttribute data) returned from the iModelDb * is in a different format than is required for a SchemaItemProps JSON object. * @internal */ export declare class SchemaItemParser { protected _schema: string; protected _schemaInfos: Iterable<SchemaInfo>; /** * Initializes a new SchemaItemParser. * @param schemaName The name the Schema containing the SchemaItems. * @param context The SchemaContext containing the Schema. */ constructor(schemaName: string, schemaInfos: Iterable<SchemaInfo>); /** * Parses the given SchemaItemProps JSON returned from an ECSql query. * @param data The SchemaItemProps JSON as returned from an iModelDb. * @returns The corrected SchemaItemProps Json. */ parse(data: AnySchemaItemProps): Promise<SchemaItemProps>; /** * Helper method to resolve the SchemaItem's full name from the given rawTypeName. * If the SchemaItem is defined in the same Schema from which it is referenced, * the rawTypeName will be SchemaItem name ('PhysicalElement'). Otherwise, * the rawTypeName will have the schema alias ('bis:PhysicalElement'). * @param rawTypeName The name or aliased name of the SchemaItem. * @returns The full name of the SchemaItem, ie. 'BisCore.PhysicalElement' */ getQualifiedTypeName(rawTypeName: string): string; private resolveNameFromAlias; } /** * Parses KindOfQuantityProps JSON returned from an ECSql query and returns the correct KindOfQuantityProps JSON. * This is necessary as a small amount information (ie. unqualified type names of presentationUnits) returned from * the iModelDb is in a different format than is required for a KindOfQuantityProps JSON object. * @internal */ export declare class KindOfQuantityParser extends SchemaItemParser { /** * Parses the given KindOfQuantityProps JSON returned from an ECSql query. * @param data The KindOfQuantityProps JSON as returned from an iModelDb. * @returns The corrected KindOfQuantityProps Json. */ parse(data: KindOfQuantityProps): Promise<KindOfQuantityProps>; private parsePresentationUnits; private createOverrideFormatString; } //# sourceMappingURL=SchemaItemParsers.d.ts.map