SchemaXmlFileLocater Class

A SchemaLocater implementation for locating XML Schema files from the file system using configurable search paths. This is a workaround the current lack of a full xml parser.

Extends

Implements

Methods

Name Description
constructor(): SchemaXmlFileLocater    
getSchema<T extends Schema<T>>(key: SchemaKey, matchType: SchemaMatchType, context: SchemaContext): Promise<undefined | T> Attempts to retrieve a Schema with the given SchemaKey by using the configured search paths  
getSchemaInfo(schemaKey: SchemaKey, matchType: SchemaMatchType, context: SchemaContext): Promise<undefined | SchemaInfo> Gets the schema info which matches the provided SchemaKey.  
getSchemaKey(data: string): SchemaKey Constructs a SchemaKey based on the information in the Schema XML.  
getSchemaSync<T extends Schema<T>>(key: SchemaKey, matchType: SchemaMatchType, context: SchemaContext): undefined | T Attempts to retrieve a Schema with the given SchemaKey by using the configured search paths  

Inherited methods

Name Inherited from Description
addSchemaSearchPath(schemaPath: string): void SchemaFileLocater Add one search path used by this locator to find the
addSchemaSearchPaths(schemaPaths: string[]): void SchemaFileLocater Adds more search paths used by this locator to find the
compareSchemaKeyByVersion(lhs: FileSchemaKey, rhs: FileSchemaKey): number SchemaFileLocater Compares two Schema versions.
fileExists(filePath: string): Promise<undefined | boolean> SchemaFileLocater  
fileExistsSync(filePath: string): undefined | boolean SchemaFileLocater  
findEligibleSchemaKeys(desiredKey: Readonly<SchemaKey>, matchType: SchemaMatchType, format: string): FileSchemaKey[] Protected SchemaFileLocater Attempts to find all Schema files in the configurable search paths that match
readUtf8FileToString(filePath: string): Promise<undefined | string> SchemaFileLocater  
readUtf8FileToStringSync(filePath: string): undefined | string SchemaFileLocater  

Inherited properties

Name Type Inherited from Description
searchPaths string[] SchemaFileLocater  

Defined in

Last Updated: 16 April, 2024