parsedHedTag

class ParsedHedTag(originalTag, hedString, originalBounds, hedSchemas, schemaName)

A parsed HED tag.

Constructor.

Arguments:
  • originalTag (string) – The original HED tag.

  • hedString (string) – The original HED string.

  • originalBounds (Array.<number>) – The bounds of the HED tag in the original HED string.

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

  • schemaName (string) – The label of this tag’s schema in the dataset’s schema spec.

ParsedHedTag.ParsedHedTag

Constructor.

ParsedHedTag.allowsExtensions

Check if any level of this HED tag allows extensions.

ParsedHedTag.canonicalTag

type: string

The canonical form of the HED tag.

ParsedHedTag.conversionIssues

type: Array.<Issue>

Any issues encountered during tag conversion.

ParsedHedTag.formattedTag

type: string

The formatted canonical version of the HED tag.

ParsedHedTag.schema

type: Schema

The HED schema this tag belongs to.

ParsedHedTag._convertTag(hedString, hedSchemas, schemaName)

Convert this tag to long form.

Arguments:
  • hedString (string) – The original HED string.

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

  • schemaName (string) – The label of this tag’s schema in the dataset’s schema spec.

ParsedHedTag._formatTag()

Format this HED tag by removing newlines, double quotes, and slashes.

ParsedHedTag.toString()

Override of {@link Object.prototype.toString}.

Returns:

string – The original form of this HED tag.

static ParsedHedTag.ancestorIterator(tagString)

Iterate through a tag’s ancestor tag strings.

Arguments:
  • tagString (string) – A tag string.

static ParsedHedTag.getParentTag(tagString)

Get the HED tag prefix (up to the last slash).

static ParsedHedTag.getTagName(tagString)

Get the last part of a HED tag.

Arguments:
  • tagString (string) – A HED tag.

Returns:

string – The last part of the tag using the given separator.

class ParsedHed3Tag()

A parsed HED3 tag.

ParsedHed3Tag.defaultUnit

Get the default unit for this HED tag.

ParsedHed3Tag.existsInSchema

Determine if this HED tag is in the schema.

ParsedHed3Tag.hasUnitClass

Checks if this HED tag has the ‘unitClass’ attribute.

ParsedHed3Tag.takesValue

Checks if this HED tag has the ‘takesValue’ attribute.

ParsedHed3Tag.takesValueFormattedTag

Determine value-taking form of this tag.

ParsedHed3Tag.takesValueTag

Get the schema tag object for this tag’s value-taking form.

ParsedHed3Tag.unitClasses

Get the unit classes for this HED tag.

ParsedHed3Tag.validUnits

Get the legal units for a particular HED tag.

ParsedHed3Tag._convertTag(hedString, hedSchemas, schemaName)

Convert this tag to long form.

Arguments:
  • hedString (string) – The original HED string.

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

  • schemaName (string) – The label of this tag’s schema in the dataset’s schema spec.