Skip to main content

Class: CSVTableDataProvider

Defined in: @tissuumaps-storage/src/csv/CSVTableDataProvider.ts:24

Data provider for tabular data

Implements

Constructors

Constructor

new CSVTableDataProvider(): CSVTableDataProvider

Returns

CSVTableDataProvider

Properties

name

readonly name: "CSV" = "CSV"

Defined in: @tissuumaps-storage/src/csv/CSVTableDataProvider.ts:29

The name of the data provider

Implementation of

TableDataProvider.name


schema

readonly schema: object

Defined in: @tissuumaps-storage/src/csv/CSVTableDataProvider.ts:31

The JSON schema for the data source

properties

properties: object

properties.idColumn

idColumn: object

properties.idColumn.type

type: string = "string"

properties.nameColumn

nameColumn: object

properties.nameColumn.type

type: string = "string"

properties.url

url: object

properties.url.type

type: string = "string"

required

required: string[]

type

type: string = "object"

Implementation of

TableDataProvider.schema


uischema

readonly uischema: object

Defined in: @tissuumaps-storage/src/csv/CSVTableDataProvider.ts:51

The JSON Forms UI schema for the data source

elements

elements: object[]

type

type: string = "VerticalLayout"

Implementation of

TableDataProvider.uischema

Methods

load()

load(normalizedDataSource, options?): Promise<CSVTableData>

Defined in: @tissuumaps-storage/src/csv/CSVTableDataProvider.ts:87

Opens a data source and returns the loaded data accessor

The data source has to have been normalized by DataProvider.normalize beforehand.

Parameters

normalizedDataSource

NormalizedCSVTableDataSource

The normalized data source to open

options?

DataProviderLoadOptions

See DataProviderLoadOptions

Returns

Promise<CSVTableData>

A promise that resolves to the loaded data accessor

Implementation of

TableDataProvider.load


normalize()

normalize(dataSource, projectUrl): NormalizedCSVTableDataSource

Defined in: @tissuumaps-storage/src/csv/CSVTableDataProvider.ts:76

Returns the data source with all of this data provider's defaults applied and all of its relative URLs resolved

Data sources that normalize to the same value are considered equal, and their data is loaded only once and shared between all referencing objects. Normalization has to be idempotent: normalizing an already normalized data source must return the same value again.

Relative URLs are resolved against the URL the project was loaded from, and against the document base URL for projects without one.

Parameters

dataSource

CSVTableDataSource

The data source to normalize

projectUrl

string | null

The absolute URL of the project, or null for projects that were not loaded from a URL

Returns

NormalizedCSVTableDataSource

The normalized data source

Implementation of

TableDataProvider.normalize