Class: ProcessDataType

ProcessDataType(schema, parentopt, nullable, defaultValueopt)

Wrapper class for a single data type definition in a schema (e.g. process parameter schema, return value schema).

Constructor

new ProcessDataType(schema, parentopt, nullable, defaultValueopt)

Constructs a new process data type based on JSON Schema.
Parameters:
Name Type Attributes Default Description
schema object
parent ProcessSchema <optional>
<nullable>
null
defaultValue * <optional>
Source:

Members

(static) DEFAULT_GROUP :string

The name of the default group for schemas. Defaults to `Other`.
Type:
  • string
Source:

(static) NON_EDITABLE :array.<string>

A list of data types that can't be edited. Non-editable data types can't be transmitted via JSON through the openEO API (e.g. data cubes or labeled arrays).
Type:
  • array.<string>
Source:

Methods

dataType(nativeopt) → {string}

Returns the data type. The priority is as such: - subtype - native data type - "any"
Parameters:
Name Type Attributes Default Description
native boolean <optional>
false Set to true to only return the native data type.
Source:
Returns:
Type
string

default() → {*}

Returns the default value of the data type. This may return `undefined`.
Source:
Returns:
Type
*

description() → {string}

Returns the description of the data type.
Source:
Returns:
Type
string

getCallbackParameters() → {array.<object>}

Returns the parameters for a "child process" that is defined for the data type.
Source:
Returns:
Type
array.<object>

getEnumChoices() → {array}

Returns the allowed enumeration of values.
Source:
See:
Returns:
Type
array

group() → {string}

Returns the group of the data type. Group is a "extension" of JSON Schema, which allows to group schemas by certain criteria.
Source:
Returns:
Type
string

isAny() → {boolean}

Checks whether the data type is only `null`.
Source:
Returns:
Type
boolean

isEditable() → {boolean}

Returns whether the data type is editable. This means it returns `true`, unless certain data types are detected that can't be transmitted via JSON in the openEO API (e.g. data cubes or labeled arrays).
Source:
Returns:
Type
boolean

isEnum() → {boolean}

Checks whether the data type contains an enumeration of values.
Source:
See:
Returns:
Type
boolean

isNull() → {boolean}

Checks whether the data type is only `null`.
Source:
Returns:
Type
boolean

nativeDataType() → {string}

Returns the native data type of the schema. One of: array, object, null, string, boolean, number or any
Source:
Returns:
Type
string

nullable() → {boolean}

Checks whether the data type allows `null`.
Source:
Returns:
Type
boolean

title() → {string}

Returns the title of the data type. If no title is present, returns a "prettified" version of the data type (e.g. "Temporal Interval" for the data type "temporal-interval").
Source:
Returns:
Type
string

toJSON() → {object}

Converts the schema to a JSON-serializable representation.
Source:
Returns:
Type
object