HED JavaScript Library
    Preparing search index...

    A parsed HED tag.

    Hierarchy (View Summary)

    Index

    Constructors

    • Constructor.

      Parameters

      • tagSpec: TagSpec

        The token for this tag.

      • hedSchemas: Schemas

        The collection of HED schemas.

      • hedString: string

        The original HED string.

      Returns default

      If tag conversion or parsing fails.

    Properties

    _normalized: string
    canonicalTag: string

    The canonical form of the HED tag.

    formattedTag: string

    The formatted canonical version of the HED tag.

    originalBounds: int[]

    The bounds of the HED tag in the original HED string.

    originalTag: string

    The original pre-parsed version of the HED tag.

    schema: Schema

    The HED schema this tag belongs to.

    Accessors

    • get normalized(): string

      Return the normalized version of this tag.

      Returns string

      • The normalized version of this tag.
    • get schemaTag(): SchemaTag

      Get the schema tag object for this tag.

      Returns SchemaTag

      The schema tag object for this tag.

    • get unitClasses(): SchemaUnitClass[]

      Get the unit classes for this HED tag.

      Returns SchemaUnitClass[]

      The unit classes for this HED tag.

    Methods

    • Convert this tag to its various forms

      Parameters

      • hedSchemas: Schemas

        The collection of HED schemas.

      • hedString: string

        The original HED string.

      • tagSpec: TagSpec

        The token for this tag.

      Returns void

      If tag conversion or parsing fails.

    • Handle reserved three-level tags.

      Parameters

      • remainder: string

        The remainder of the tag string after schema tag.

      Returns string[]

    • Separate the remainder of the tag into three parts.

      Parameters

      • schemaTag: SchemaTag

        The part of the tag that is in the schema.

      • remainder: string

        The leftover part.

      Returns any[]

      • [SchemaUnit, string, string] representing the actual Unit, the unit string and the value string.
      • If parsing the remainder section fails.
    • Check if value is a valid value for this tag.

      Parameters

      • value: string

        The value to be checked.

      Returns string

      An empty string if value is value, otherwise an indication of failure.

    • Determine if this HED tag is equivalent to another HED tag.

      Note: HED tags are deemed equivalent if they have the same schema and normalized tag string.

      Parameters

      • other: default

        A HED tag to compare with this one.

      Returns boolean

      Whether the other tag is equivalent to this HED tag.

    • Determine whether this tag has a given attribute.

      Parameters

      • attribute: string

        An attribute name.

      Returns boolean

      Whether this tag has the named attribute.

    • Checks if this HED tag has the unitClass attribute.

      Returns boolean

      Whether this HED tag has the unitClass attribute.

    • Checks if this HED tag has the takesValue attribute.

      Returns boolean

      Whether this HED tag has the takesValue attribute.