Last updated

API / geotoolkit / contour / datasource / AbstractDataLoader / AbstractDataLoader

Class: AbstractDataLoader

datasource.AbstractDataLoader.AbstractDataLoader

An abstract class for data loaders

Hierarchy

Table of contents

Constructors
Methods

Contents

Constructors

new AbstractDataLoader(options)

Protected new AbstractDataLoader(options?)

Parameters

Name Type
Optional optionsObject
Optional options.httpserviceAbstractHttpService
Methods

getClassName

getClassName(): string

Returns

string


getDataSource

Abstract getDataSource(text, name): ContourDataSource

Creates data source

Parameters

Name Type Description
textstringdata in text format
namestringsource name

Returns

ContourDataSource

dataSource


load

load(file): Promise<ContourDataSource>

Returns the AbstractDataLoader that is loaded from the passed in file.

Parameters

Name Type Description
filestring | Filethe local file to read

Returns

Promise<ContourDataSource>

dataSource The loaded data source.


loadFromFile

loadFromFile(file): Promise<ContourDataSource>

Loads data from file

Parameters

Name Type Description
fileFilethe local file to read

Returns

Promise<ContourDataSource>

dataSource The loaded data source.


loadFromURL

loadFromURL(url): Promise<ContourDataSource>

Loads data from url

Parameters

Name Type Description
urlstringurl of the resource

Returns

Promise<ContourDataSource>

dataSource The loaded data source.


getClassName

Static getClassName(): string

Returns

string