parsedHedGroup

class ParsedHedGroup(parsedHedTags, hedSchemas, hedString, originalBounds)

A parsed HED tag group.

Constructor.

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

  • hedString (string) – The original HED string.

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

ParsedHedGroup.ParsedHedGroup

Constructor.

ParsedHedGroup.defCount

Determine the number of {@code Def} and {@code Def-expand} tag/tag groups included in this group.

ParsedHedGroup.defExpandChildren

type: Array.<ParsedHedGroup>

The top-level child subgroups containing Def-expand tags.

ParsedHedGroup.defExpandName

Determine the name of this group’s definition.

ParsedHedGroup.defExpandNameAndValue

Determine the name and value of this group’s definition.

ParsedHedGroup.defExpandTag

Find what should be the sole {@code Def-expand} tag, or throw an error if more than one is found.

ParsedHedGroup.defExpandTags

The {@code Def-expand} tags associated with this HED tag group.

ParsedHedGroup.defExpandValue

Determine the value of this group’s definition.

ParsedHedGroup.defName

Determine the name(s) of this group’s definition.

ParsedHedGroup.defNameAndValue

Determine the name and value of this group’s {@code Def} or {@code Def-expand}.

ParsedHedGroup.defTags

The {@code Def} tags associated with this HED tag group.

ParsedHedGroup.defValue

Determine the name of this group’s definition.

ParsedHedGroup.definitionGroup

Determine the value of this group’s definition.

ParsedHedGroup.definitionName

Determine the name of this group’s definition.

ParsedHedGroup.definitionNameAndValue

Determine the name and value of this group’s definition.

ParsedHedGroup.definitionTag

Find what should be the sole definition tag, or throw an error if more than one is found.

ParsedHedGroup.definitionTags

The {@code Definition} tags associated with this HED tag group.

ParsedHedGroup.definitionValue

Determine the value of this group’s definition.

ParsedHedGroup.hasDefExpandChildren

type: boolean

Whether this HED tag group has child groups with a Def-expand tag.

ParsedHedGroup.isDefExpandGroup

Whether this HED tag group has a {@code Def-expand} tag.

ParsedHedGroup.isDefGroup

Whether this HED tag group has a {@code Def} tag.

ParsedHedGroup.isDefinitionGroup

Whether this HED tag group is a definition group.

ParsedHedGroup.isInsetGroup

Whether this HED tag group is an inset group.

ParsedHedGroup.isOffsetGroup

Whether this HED tag group is an offset group.

ParsedHedGroup.isOnsetGroup

Whether this HED tag group is an onset group.

ParsedHedGroup.isTemporalGroup

Whether this HED tag group is an onset, offset, or inset group.

ParsedHedGroup.specialTags

type: Map.<string, Array.<ParsedHedTag>>

Any HED tags with special handling.

ParsedHedGroup.tags

The parsed HED tags in the HED tag group.

ParsedHedGroup.temporalGroupName

Whether this HED tag group is an onset, offset, or inset group.

ParsedHedGroup.nestedGroups()

The deeply nested array of parsed tags.

Returns:

Array.<ParsedHedTag>

ParsedHedGroup.subGroupArrayIterator()

Iterator over the full HED groups and subgroups in this HED tag group.

ParsedHedGroup.subParsedGroupIterator()

Iterator over the ParsedHedGroup objects in this HED tag group.

ParsedHedGroup.tagIterator()

Iterator over the parsed HED tags in this HED tag group.

ParsedHedGroup.topLevelGroupIterator()

Iterator over the top-level parsed HED groups in this HED tag group.

static ParsedHedGroup.findDefinitionName(canonicalTag, definitionBase)

Determine the name of this group’s definition.

static ParsedHedGroup.findGroupTags(group, hedSchemas, shortTag)

Determine a parsed HED tag group’s special tags.

Arguments:
  • group (ParsedHedGroup) – The parsed HED tag group.

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

  • shortTag (string) – The short tag to search for.

Returns:

null|Array.<ParsedHedTag> – The tag(s) matching the short tag.

static ParsedHedGroup.getDefinitionTagValue(tag, parentTag)

Extract the value from a definition tag.

Arguments:
  • tag (ParsedHedTag) – A definition-type tag.

  • parentTag (string) – The expected parent of the tag.

Returns:

string – The parameterized value of the definition, or an empty string if no value was found.