Class: FileTypes

FileTypes(data)

Manages the files types supported by the back-end.

Constructor

new FileTypes(data)

Creates a new FileTypes object from an API-compatible JSON response.

Parameters:
Name Type Description
data FileTypesAPI

A capabilities response compatible to the API specification for GET /file_formats.

Source:

Members

data :FileTypesAPI

Type:
Source:

Methods

(protected) _findType(type, io) → {FileType|null}

Get a file type object from the list of input or output file formats.

Parameters:
Name Type Description
type string

Identifier of the file type

io string

Either input or output

Source:
Returns:
Type
FileType | null

getInputType(type) → {FileType|null}

Returns a single input file format for a given identifier.

Returns null if no input file format was found for the given identifier.

Parameters:
Name Type Description
type string

Case-insensitive file format identifier

Source:
Returns:
Type
FileType | null

getInputTypes() → {object.<string, FileType>}

Returns the input file formats.

Source:
Returns:
Type
object.<string, FileType>

getOutputType(type) → {FileType|null}

Returns a single output file format for a given identifier.

Returns null if no output file format was found for the given identifier.

Parameters:
Name Type Description
type string

Case-insensitive file format identifier

Source:
Returns:
Type
FileType | null

getOutputTypes() → {object.<string, FileType>}

Returns the output file formats.

Source:
Returns:
Type
object.<string, FileType>

toJSON() → {FileTypesAPI}

Returns the file types response as a JSON serializable representation of the data that is API compliant.

Source:
Returns:
Type
FileTypesAPI