Class: File

File(name, properties)

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

Constructor

new File(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:

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

(protected) initDataSource(properties)

Inits the datasource with the constructor properties.
Parameters:
Name Type Description
properties
Overrides:
Source:

onDisconnect()

Trigger when the datasource is disconnected for some reason.
Overrides:
Source:

updateProperties(name, properties)

Update properties
Parameters:
Name Type Description
name String the datasource name
properties Object the datasource properties
Properties
Name Type Description
timeShift Boolean fix some problem with some android devices with some timestamp shift to 16 sec
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
offeringID String the offeringID
observedProperty String the observed property
responseFormat Number the response format (e.g video/mp4)
reconnectTimeout Number the timeout before reconnecting
Overrides:
Source: