Class: Job

Job(connection, jobId)

A Batch Job.

Constructor

new Job(connection, jobId)

Creates an object representing a batch job stored at the back-end.
Parameters:
Name Type Description
connection Connection A Connection object representing an established connection to an openEO back-end.
jobId string The batch job ID.
Source:

Extends

Methods

(async) deleteJob()

Deletes the batch job from the back-end.
Source:
Throws:
Error

(async) describeJob() → {Job}

Updates the batch job data stored in this object by requesting the metadata from the back-end.
Source:
Throws:
Error
Returns:
The update job object (this).
Type
Job

(async) downloadResults(targetFolder) → {Array.<string>}

Downloads the results to the specified target folder. The specified target folder must already exist! NOTE: This method is only supported in a NodeJS environment. In a browser environment this method throws an exception!
Parameters:
Name Type Description
targetFolder string A target folder to store the file to, which must already exist.
Source:
Throws:
Error
Returns:
A list of file paths of the newly created files.
Type
Array.<string>

(async) estimateJob() → {object}

Calculate an estimate (potentially time/costs/volume) for a batch job.
Source:
Throws:
Error
Returns:
A response compatible to the API specification.
Type
object

get(name) → {*}

Get a value from the additional data that is not part of the core model, i.e. from proprietary extensions.
Parameters:
Name Type Description
name string Name of the property.
Overrides:
Source:
Returns:
The value, which could be of any type.
Type
*

getAll() → {object}

Returns all data in the model.
Overrides:
Source:
Returns:
Type
object

(async) listResults() → {object}

Retrieves download links and additional information about the batch job. NOTE: Requesting metalink XML files is currently not supported by the JS client.
Source:
Throws:
Error
Returns:
The JSON-based response compatible to the API specification, but also including `costs` and `expires` properties as received in the headers (or `null` if not present).
Type
object

setAll(metadata) → {this}

Converts the data from an API response into data suitable for our JS client models.
Parameters:
Name Type Description
metadata object JSON object originating from an API response.
Overrides:
Source:
Returns:
Returns the object itself.
Type
this

(async) startJob() → {Job}

Starts / queues the batch job for processing at the back-end.
Source:
Throws:
Error
Returns:
The updated job object (this).
Type
Job

(async) stopJob() → {Job}

Stops / cancels the batch job processing at the back-end.
Source:
Throws:
Error
Returns:
The updated job object (this).
Type
Job

(async) updateJob(parameters) → {Job}

Modifies the batch job at the back-end and afterwards updates this object, too.
Parameters:
Name Type Description
parameters object An object with properties to update, each of them is optional, but at least one of them must be specified. Additional properties can be set if the server supports them.
Properties
Name Type Description
processGraph object A new process graph.
title string A new title.
description string A new description.
plan string A new plan.
budget number A new budget.
Source:
Throws:
Error
Returns:
The updated job object (this).
Type
Job