UNPKG

@itwin/ecschema-metadata

Version:

ECObjects core concepts in typescript

50 lines 3.09 kB
import { CustomAttribute } from "../Metadata/CustomAttribute"; import { ArrayProperty, PrimitiveOrEnumPropertyBase, Property, StructProperty } from "../Metadata/Property"; import { Schema } from "../Metadata/Schema"; /** * Namespace holding utility functions for serializing EC types to the EC XML format. * @internal */ export declare namespace XmlSerializationUtils { /** * Serializes a CustomAttribute instance to the EC XML format. * @param fullName The full name of the CustomAttribute (qualified by schema name). * @param customAttribute The CustomAttribute instance to serialize. * @param schemaDoc The Xml Document object holding the serialized EC Schema. * @param schema The Schema object being serialized. */ function writeCustomAttribute(fullName: string, customAttribute: CustomAttribute, schemaDoc: Document, schema: Schema): Promise<Element>; /** * Serializes an EC Property instance to the EC XML format. * @param propertyClass The Property metadata object. * @param instance The Property instance. * @param instanceElement The XML Element that will contain the serialized property instance. * @param schemaDoc The Xml Document object holding the serialized EC Schema. */ function writeInstanceProperty(propertyClass: Property, instance: any, instanceElement: Element, schemaDoc: Document): Promise<void>; /** * Serializes an EC ArrayProperty instance to the EC XML format. * @param propertyClass The Property metadata object. * @param propertyValue An array holding the property values. * @param arrayElement The XML Element that will contain the serialized property instance. * @param schemaDoc The Xml Document object holding the serialized EC Schema. */ function writeArrayProperty(propertyClass: ArrayProperty, propertyValue: any[], arrayElement: Element, schemaDoc: Document): Promise<void>; /** * Serializes an EC StructProperty instance to the EC XML format. * @param propertyClass The Property metadata object. * @param propertyValue The struct object holding the property values. * @param structElement The XML Element that will contain the serialized property instance. * @param schemaDoc The Xml Document object holding the serialized EC Schema. */ function writeStructProperty(propertyClass: StructProperty, propertyValue: any, structElement: Element, schemaDoc: Document): Promise<void>; /** * Serializes an EC PrimitiveProperty instance to the EC XML format. * @param propertyClass The Property metadata object. * @param propertyValue The struct object holding the property values. * @param propertyElement The XML Element that will contain the serialized property instance. */ function writePrimitiveProperty(propertyClass: PrimitiveOrEnumPropertyBase, propertyValue: any, propertyElement: Element): Promise<void>; function createXmlTypedName(currentSchema: Schema, typeSchema: Schema, typeName: string): string; } //# sourceMappingURL=XmlSerializationUtils.d.ts.map