loader¶
- loadSchema(schemaDef, useFallback, reportNoFallbackError)¶
Load schema XML data from a schema version or path description.
- Arguments:
schemaDef (SchemaSpec) – The description of which schema to use.
useFallback (boolean) – Whether to use a bundled fallback schema if the requested schema cannot be loaded.
reportNoFallbackError (boolean) – Whether to report an error on a failed schema load when no fallback was used.
- Returns:
- loadSchemaFromSpec(schemaDef)¶
Load schema XML data from a schema version or path description.
- Arguments:
schemaDef (SchemaSpec) – The description of which schema to use.
- Returns:
- loadPromise(schemaDef)¶
Choose the schema Promise from a schema version or path description.
- Arguments:
schemaDef (SchemaSpec) – The description of which schema to use.
- Returns:
Promise.<object> – The schema XML data or an error.
- loadRemoteSchema(schemaDef)¶
Load schema XML data from the HED GitHub repository.
- Arguments:
schemaDef (SchemaSpec) – The standard schema version to load.
- Returns:
Promise.<object> – The schema XML data.
- loadLocalSchema(path)¶
Load schema XML data from a local file.
- Arguments:
path (string) – The path to the schema XML data.
- Returns:
Promise.<object> – The schema XML data.
- loadBundledSchema(schemaDef)¶
Load schema XML data from a bundled file.
- Arguments:
schemaDef (SchemaSpec) – The description of which schema to use.
- Returns:
Promise.<object> – The schema XML data.
- loadSchemaFile(xmlDataPromise, issueCode, issueArgs)¶
Actually load the schema XML file.
- Arguments:
xmlDataPromise (Promise.<string>) – The Promise containing the unparsed XML data.
issueCode (string) – The issue code.
issueArgs (Object.<string, string>) – The issue arguments passed from the calling function.
- Returns:
Promise.<object> – The parsed schema XML data.
- parseSchemaXML(data)¶
Parse the schema XML data.
- Arguments:
data (string) – The XML data.
- Returns:
Promise.<object> – The schema XML data.