validator

class HedValidator(parsedString, hedSchemas, options)

HedValidator class

Constructor.

Arguments:
  • parsedString (ParsedHedString) – The parsed HED string to be validated.

  • hedSchemas (Schemas) – The collection of HED schemas.

  • options (Object.<String, boolean>) – The validation options.

HedValidator.HedValidator

Constructor.

HedValidator.hedSchemas

type: Schemas

The collection of HED schemas.

HedValidator.issues

type: Array.<Issue>

The running issue list.

HedValidator.options

type: Object.<string, boolean>

The validation options.

HedValidator.parsedString

type: ParsedHedString

The parsed HED string to be validated.

HedValidator._checkForTagAttribute(attribute, fn)

Validation check based on a tag attribute.

Arguments:
  • attribute (string) – The name of the attribute.

  • fn (function) – The actual validation code.

HedValidator.checkForDuplicateTags(tagList)

Check for duplicate tags at the top level or within a single group.

HedValidator.checkForMultipleUniqueTags(tagList)

Check for multiple instances of a unique tag.

HedValidator.checkForRequiredTags()

Check that all required tags are present.

HedValidator.checkIfTagIsValid(tag, previousTag)

Check if an individual HED tag is in the schema or is an allowed extension.

HedValidator.checkIfTagRequiresChild(tag)

Check if a tag is missing a required child.

Arguments:
HedValidator.checkIfTagUnitClassUnitsAreValid(tag)

Check that the unit is valid for the tag’s unit class.

Arguments:
HedValidator.checkValueTagSyntax(tag)

Check the syntax of tag values.

Arguments:
HedValidator.pushIssue(internalCode, parameters)

Generate a new issue object and push it to the end of the issues array.

Arguments:
  • internalCode (string) – The internal error code.

  • parameters (Object.<string, (string|Array.<number>)>) – The error string parameters.

HedValidator.validateHedTagGroup(parsedTagGroup)

Validate a HED tag group.

HedValidator.validateHedTagGroups()

Validate the HED tag groups in a parsed HED string.

HedValidator.validateHedTagLevel(tagList)

Validate a HED tag level.

HedValidator.validateHedTagLevels()

Validate the HED tag levels in a parsed HED string object.

HedValidator.validateIndividualHedTag(tag, previousTag)

Validate an individual HED tag.

HedValidator.validateIndividualHedTags()

Validate the individual HED tags in a parsed HED string object.

HedValidator.validateTopLevelTags()

Validate the top-level HED tags in a parsed HED string.