@itwin/ecschema-metadata
Version:
ECObjects core concepts in typescript
49 lines • 3.75 kB
TypeScript
import { ConstantProps, CustomAttributeClassProps, EntityClassProps, EnumerationProps, InvertedUnitProps, KindOfQuantityProps, MixinProps, NavigationPropertyProps, PhenomenonProps, PrimitiveArrayPropertyProps, PrimitivePropertyProps, PropertyCategoryProps, RelationshipClassProps, SchemaItemFormatProps, SchemaItemUnitProps, SchemaProps, SchemaReferenceProps, StructArrayPropertyProps, StructClassProps, StructPropertyProps, UnitSystemProps } from "../Deserialization/JsonProps";
import { CustomAttribute } from "../Metadata/CustomAttribute";
import { CustomAttributeClass } from "../Metadata/CustomAttributeClass";
import { ECSpecVersion } from "./Helper";
type SchemaItemTuple<T> = Readonly<[string /** Name */, string /** SchemaItemType */, Readonly<T>]>;
type PropertyTuple<T> = Readonly<[string /** Name */, string /** Property */, Readonly<T>]>;
/** @internal */
export type CustomAttributeProvider = (caClass: CustomAttributeClass) => CustomAttribute;
/** @internal */
export type CAProviderTuple = Readonly<[string /** Full Name */, CustomAttributeProvider]>;
/** @internal */
export declare abstract class AbstractParser<TItem = any, TProperty = TItem> {
protected _ecSpecVersion?: ECSpecVersion;
abstract parseSchema(): SchemaProps;
abstract getReferences(): Iterable<SchemaReferenceProps>;
abstract getItems(): Iterable<SchemaItemTuple<TItem>>;
abstract findItem(itemName: string): SchemaItemTuple<TItem> | undefined;
abstract parseEntityClass(data: Readonly<TItem>): EntityClassProps;
abstract parseMixin(data: Readonly<TItem>): MixinProps;
abstract parseStructClass(data: Readonly<TItem>): StructClassProps;
abstract parseCustomAttributeClass(data: Readonly<TItem>): CustomAttributeClassProps;
abstract parseRelationshipClass(data: Readonly<TItem>): RelationshipClassProps;
abstract parseEnumeration(data: Readonly<TItem>): EnumerationProps;
abstract parseKindOfQuantity(data: Readonly<TItem>): KindOfQuantityProps;
abstract parsePropertyCategory(data: Readonly<TItem>): PropertyCategoryProps;
abstract parseUnit(data: Readonly<TItem>): SchemaItemUnitProps;
abstract parseInvertedUnit(data: Readonly<TItem>): InvertedUnitProps;
abstract parseConstant(data: Readonly<TItem>): ConstantProps;
abstract parsePhenomenon(data: Readonly<TItem>): PhenomenonProps;
abstract parseFormat(data: Readonly<TItem>): SchemaItemFormatProps;
abstract parseUnitSystem(data: Readonly<TItem>): UnitSystemProps;
abstract getProperties(data: Readonly<TItem>, itemName: string): Iterable<PropertyTuple<TProperty>>;
abstract parsePrimitiveProperty(data: Readonly<TProperty>): PrimitivePropertyProps;
abstract parseStructProperty(data: Readonly<TProperty>): StructPropertyProps;
abstract parsePrimitiveArrayProperty(data: Readonly<TProperty>): PrimitiveArrayPropertyProps;
abstract parseStructArrayProperty(data: Readonly<TProperty>): StructArrayPropertyProps;
abstract parseNavigationProperty(data: Readonly<TProperty>): NavigationPropertyProps;
abstract getSchemaCustomAttributeProviders(): Iterable<CAProviderTuple>;
abstract getClassCustomAttributeProviders(data: Readonly<TItem>): Iterable<CAProviderTuple>;
abstract getPropertyCustomAttributeProviders(data: Readonly<TProperty>): Iterable<CAProviderTuple>;
abstract getRelationshipConstraintCustomAttributeProviders(data: Readonly<TItem>): [Iterable<CAProviderTuple>, Iterable<CAProviderTuple>];
abstract get getECSpecVersion(): ECSpecVersion | undefined;
}
/** @internal */
export interface AbstractParserConstructor<TSchema, TItem = any, TProperty = TItem> {
new (obj: Readonly<TSchema>): AbstractParser<TItem, TProperty>;
}
export {};
//# sourceMappingURL=AbstractParser.d.ts.map