HED JavaScript Library
    Preparing search index...

    Class BidsSidecar

    Hierarchy (View Summary)

    Index

    Constructors

    • Constructor for a BIDS sidecar. Used for files like events.json, participants.json, etc.

      Parameters

      • name: string

        The name of the sidecar file.

      • file: any

        The file object representing this file.

      • sidecarData: any = {}

        The raw JSON data.

      • defManager: DefinitionManager = undefined

        The external definitions to use.

      Returns BidsSidecar

    Properties

    columnSpliceMapping: Map<any, any>
    columnSpliceReferences: Set<string>
    definitions: DefinitionManager
    file: any

    The Object representing this file data. This is used to generate BidsHedIssue objects.

    hedCategoricalStrings: string[]
    hedData: Map<any, any>
    hedValueStrings: string[]
    jsonData: any

    This file's JSON data.

    name: string

    The name of this file.

    parsedHedData: Map<any, any>
    sidecarKeys: Map<any, any>

    Accessors

    • get hasHedData(): boolean

      Determine whether this file has any HED data.

      Returns boolean

    • get isTimelineFile(): boolean

      Whether this is a TSV file timeline file.

      Returns boolean

    • get validatorClass(): Function

      The validator class used to validate this file.

      Returns Function

      The validator class used to validate this file.

    Methods

    • Parse this sidecar's HED strings within the sidecar structure.

      The parsed strings are placed into parsedHedData.

      Parameters

      • hedSchemas: Schemas

        The HED schema collection.

      • fullValidation: boolean = false

        True if full validation should be performed.

      Returns any[]

      [Issue[], Issue[]] Any errors and warnings found

    • Read a BIDS file from a path.

      Parameters

      • filePath: string

        The actual path of the file.

      Returns Promise<any[]>

      A Promise that resolves to a two-element array containing the file contents and a mocked BIDS-type file object.

    • Read a BIDS file from a relative path within a dataset.

      Parameters

      • datasetRoot: string

        The root path of the dataset.

      • relativePath: string

        The relative path of the file within the dataset.

      Returns Promise<any[]>

      A Promise that resolves to a two-element array containing the file contents and a mocked BIDS-type file object.