import { JsonSchema } from "../JsonSchema"; import { ThingSchema } from "../ThingSchema"; export = AllJoynSchemaReader; /** * Reads thing schema specifications in AllJoyn XML format. * Reference https://wiki.allseenalliance.org/irb/extended_introspection_xml */ declare class AllJoynSchemaReader { /** * Reads thing schemas from an AllJoyn schema XML file. * * @param {string} filePath Path to the source XML file * @returns {Promise} One or more schemas parsed from the file */ static readThingSchemasFromFileAsync(filePath: string): Promise; /** * Reads thing schemas from an AllJoyn schema XML string. * * @param {string} allJoynXml Schema XML contents * @returns {ThingSchema[]} One or more schemas parsed from the XML */ static readThingSchemas(allJoynXml: string): ThingSchema[]; /** * Converts an AllJoyn type code (as found in the type attribute of an element) to a JSON schema. * * @param {string} ajType AllJoyn type code * @param {{[name: string]: Schema}} [namedTypes] Optional mapping from type names to schemas * for named types loaded from or elements within the same XML document * @returns {JsonSchema} JSON schema */ static allJoynTypeToJsonSchema(ajType: string, namedTypes?: { [name: string]: JsonSchema; }): JsonSchema; private static braces; private static parseAllJoynInterface(interfaceElement); private static parseAllJoynProperty(propertyElement, schemaName); private static parseAllJoynSignal(signalElement, schemaName); private static parseAllJoynMethod(methodElement, schemaName); private static mergeProperty(properties, property); private static getRequiredAttribute(xmlElement, attributeName, elementPath); private static getOptionalElement(xmlElement, elementName); private static allJoynStructTypeToJsonSchema(ajType); private static allJoynDictionaryTypeToJsonSchema(ajType); private static getAllJoynTypePart(ajType); }