converter

removeSlashesAndSpaces(hedString)

Remove extra slashes and spaces from a HED string.

Arguments:
  • hedString (string) – The HED string to clean.

Returns:

string – The cleaned HED string.

convertTagToLong(schema, hedTag, hedString, offset)

Convert a HED tag to long form.

The seemingly redundant code for duplicate tag entries (which are errored out on for HED 3 schemas) allow for similar HED 2 validation with minimal code duplication.

Arguments:
  • schema (Schema) – The schema object containing a short-to-long mapping.

  • hedTag (string) – The HED tag to convert.

  • hedString (string) – The full HED string (for error messages).

  • offset (number) – The offset of this tag within the HED string.

Returns:

convertTagToShort(schema, hedTag, hedString, offset)

Convert a HED tag to short form.

Arguments:
  • schema (Schema) – The schema object containing a short-to-long mapping.

  • hedTag (string) – The HED tag to convert.

  • hedString (string) – The full HED string (for error messages).

  • offset (number) – The offset of this tag within the HED string.

Returns:

convertPartialHedStringToLong(schema, partialHedString, fullHedString, offset)

Convert a partial HED string to long form.

This is for the internal string parsing for the validation side.

Arguments:
  • schema (Schema) – The schema object containing a short-to-long mapping.

  • partialHedString (string) – The partial HED string to convert to long form.

  • fullHedString (string) – The full HED string.

  • offset (number) – The offset of the partial HED string within the full string.

Returns:

convertHedStringToLong(schemas, hedString)

Note

Deprecated.

Convert a HED string to long form.

Arguments:
  • schemas (Schemas) – The schema container object containing short-to-long mappings.

  • hedString (string) – The HED tag to convert.

Returns:

convertHedStringToShort(schemas, hedString)

Note

Deprecated.

Convert a HED string to short form.

Arguments:
  • schemas (Schemas) – The schema container object containing short-to-long mappings.

  • hedString (string) – The HED tag to convert.

Returns: