Class: FileDataSource

FileDataSource(name, properties)

This datasource provides generic parsing for File input. It is agnostic of the content of the file.

Constructor

new FileDataSource(name, properties)

Parameters:
Name Type Description
name String the datasource name
properties Object the datasource properties
Properties
Name Type Description
protocol String defines the protocol of the datasource. @see DataConnector
paths Array.<String> the file paths
Source:
Example
import File from 'core/datasource/File.js';

let earthquakeDatasource = new File("EQ", {
    protocol: "file",
    paths: ["./data/earthquake.1.csv"]
  });

Extends

Methods

(async) connect()

Connect the dataSource then the protocol will be opened as well.
Overrides:
Source:

(async) disconnect()

Disconnect the dataSource then the protocol will be closed as well.
Overrides:
Source:

getId() → {String}

Gets the datasource id.
Overrides:
Source:
Returns:
the datasource id
Type
String

getName() → {String}

Gets the datasource name.
Overrides:
Source:
Returns:
the datasource name
Type
String

(async) updateProperties(name, properties)

Update properties
Parameters:
Name Type Description
name String the datasource name
properties Object the datasource properties
Properties
Name Type Description
bufferingTime Number defines the time during the data has to be buffered
timeOut Number defines the limit time before data has to be skipped
protocol String defines the protocol of the datasource. @see DataConnector
endpointUrl String the endpoint url
service String the service
responseFormat Number the response format (e.g video/mp4)
reconnectTimeout Number the timeout before reconnecting
Overrides:
Source: