Skip to main content

Interface: IDataProvider

api.IDataProvider

interface IDataProvider

Interface describing data provider members.

This is a specification for implementers to model: it is not an exported method or class.

fires datacreate

Hierarchy#

Implemented by#

Events#

on#

• on(type, handler): void

Fired when data has been created in the data provider after initial load.

example

// Initialize the data providerclass MyDataProvider extends DataProviderBase {  // implementation}var provider = new MyDataProvider();// Set an event listenerprovider.on("datacreate", function() {  console.log("A datacreate event has occurred.");});

Parameters#

NameType
type"datacreate"
handler(event: ProviderCellEvent) => void

Returns#

void

Overrides#

EventEmitter.on

Defined in#

api/interfaces/IDataProvider.ts:215

Properties#

geometry#

• geometry: IGeometryProvider

Get geometry property.

returns Geometry provider instance.

Defined in#

api/interfaces/IDataProvider.ts:33

Methods#

fire#

â–¸ fire(type, event): void

Fire when data has been created in the data provider after initial load.

example

// Initialize the data providerclass MyDataProvider extends DataProviderBase {  // Class implementation}var provider = new MyDataProvider();// Create the eventvar cellIds = [ // Determine updated cells ];var target = provider;var type = "datacreate";var event = {  cellIds,  target,  type,};// Fire the eventprovider.fire(type, event);

Parameters#

NameTypeDescription
type"datacreate"datacreate
eventProviderCellEventProvider cell event

Returns#

void

Overrides#

EventEmitter.fire

Defined in#

../doc/api/interfaces/IDataProvider.ts:62

â–¸ fire<T>(type, event): void

Type parameters#

Name
T

Parameters#

NameType
type"datacreate"
eventT

Returns#

void

Overrides#

EventEmitter.fire

Defined in#

../doc/api/interfaces/IDataProvider.ts:71


getCluster#

â–¸ getCluster(url, abort?): Promise<ClusterContract>

Get a cluster reconstruction.

throws Rejects the promise on errors.

Parameters#

NameTypeDescription
urlstringURL for the cluster reconstruction to retrieve.
abort?Promise<void>-

Returns#

Promise<ClusterContract>

Promise to the cluster reconstruction.

Defined in#

api/interfaces/IDataProvider.ts:98


getCoreImages#

â–¸ getCoreImages(cellId): Promise<CoreImagesContract>

Get core images in a geometry cell.

throws Rejects the promise on errors.

Parameters#

NameTypeDescription
cellIdstringThe id of the geometry cell.

Returns#

Promise<CoreImagesContract>

Promise to the core images of the requested geometry cell id.

Defined in#

api/interfaces/IDataProvider.ts:84


getImageBuffer#

â–¸ getImageBuffer(url, abort?): Promise<ArrayBuffer>

Get an image as an array buffer.

throws Rejects the promise on errors.

Parameters#

NameTypeDescription
urlstringURL for image to retrieve.
abort?Promise<void>-

Returns#

Promise<ArrayBuffer>

Promise to the array buffer containing the image.

Defined in#

api/interfaces/IDataProvider.ts:136


getImageTiles#

â–¸ getImageTiles(tiles): Promise<ImageTilesContract>

Get image tiles urls for a tile level.

throws Rejects the promise on errors.

example

var tileRequest = { imageId: 'image-id', z: 12 };provider.getImageTiles(tileRequest)  .then((response) => console.log(response));

Parameters#

NameTypeDescription
tilesImageTilesRequestContractTiles to request

Returns#

Promise<ImageTilesContract>

Promise to the image tiles response contract

Defined in#

api/interfaces/IDataProvider.ts:155


getImages#

â–¸ getImages(imageIds): Promise<ImagesContract>

Get complete images.

throws Rejects the promise on errors.

Parameters#

NameTypeDescription
imageIdsstring[]The ids for the images to retrieve.

Returns#

Promise<ImagesContract>

Promise to the images of the requested image ids.

Defined in#

api/interfaces/IDataProvider.ts:123


getMesh#

â–¸ getMesh(url, abort?): Promise<MeshContract>

Get a mesh.

throws Rejects the promise on errors.

Parameters#

NameTypeDescription
urlstringURL for mesh to retrieve.
abort?Promise<void>-

Returns#

Promise<MeshContract>

Promise to the mesh.

Defined in#

api/interfaces/IDataProvider.ts:167


getSequence#

â–¸ getSequence(sequenceId): Promise<SequenceEnt>

Get sequence.

throws Rejects the promise on errors.

Parameters#

NameTypeDescription
sequenceIdstringThe id for the sequence to retrieve.

Returns#

Promise<SequenceEnt>

Promise to the sequences of the requested image ids.

Defined in#

api/interfaces/IDataProvider.ts:180


getSpatialImages#

â–¸ getSpatialImages(imageIds): Promise<SpatialImagesContract>

Get spatial images.

throws Rejects the promise on errors.

Parameters#

NameTypeDescription
imageIdsstring[]The ids for the images to retrieve.

Returns#

Promise<SpatialImagesContract>

Promise to the spatial images of the requested image ids.

Defined in#

api/interfaces/IDataProvider.ts:111


off#

â–¸ off(type, handler): void

Unsubscribe from an event by its name.

Parameters#

NameType
type"datacreate"
handler(event: ProviderCellEvent) => void

Returns#

void

Overrides#

EventEmitter.off

Defined in#

../doc/api/interfaces/IDataProvider.ts:182


setAccessToken#

â–¸ setAccessToken(accessToken?): void

Set an access token for authenticated API requests of protected resources.

Parameters#

NameType
accessToken?string

Returns#

void

Defined in#

api/interfaces/IDataProvider.ts:237