Module: parameterAndOutputParser

Methods

(inner) checkOutput(expandedProcessDesc, expandedCapObject) → {boolean}

A Function that checks if the output object of the capability list of the engine includes the parameters that are needed for the process

Parameters:
Name Type Description
expandedProcessDesc list
expandedCapObject list
Source:
Returns:
Type
boolean

(inner) findMapping(parameterMapping, expectedArg) → {object}

A Function that parses the URI do its domain and actions form

Parameters:
Name Type Description
parameterMapping object
expectedArg object
Source:
Returns:

corresponding function parameter mapping of the expected argument

Type
object

(inner) getOutputParams(outputDescription) → {params}

A recursive helper Function that gets iterates over output description

Parameters:
Name Type Description
outputDescription list
Source:
Returns:

output parameters

Type
params

(inner) getParams(expandedJSONLD, requiredOnly) → {params}

A Function that gets all the parameters of the given expanded list their native function call

Parameters:
Name Type Description
expandedJSONLD list
requiredOnly boolean

if true, returns only the required parameters, otherwise returns all

Source:
Returns:

all parameters

Type
params

(inner) getParamsRecursively(expandedJSONLD, requiredOnly) → {params}

A recursive helper Function that gets iterates over the expanded JSONLD process and capability lists and returns all the parameters

Parameters:
Name Type Description
expandedJSONLD list
requiredOnly boolean

if true, returns only the required parameters, otherwise returns all

Source:
Returns:

required parameters in a non-compacted and non-flattened form

Type
params

(inner) parseArguments(args, expanded) → {object}

A Function that parses the arguments in order them to bring expected arguments into their native function call

Parameters:
Name Type Description
args object
expanded array

jsonld list of semantic description

Source:
Returns:

cleanedMappedArgObject with the native function call arguments and their values

Type
object

(inner) parseOutput(expanded, outputObject) → {object}

A Function that parses the output of the native function in order to bring the output object into its absract format

Parameters:
Name Type Description
expanded array
outputObject object
Source:
Returns:

object with its absract format and values

Type
object

(inner) parseParamRecursively(expectedArg, parameterMapping, parameterDescriptions) → {list}

A function that matches the expected arguments with the given arguments using parameter mapping und parameter description in expanded jsonld the semantic description If there is a unit or encoding Format is given, the check is also made here.

Parameters:
Name Type Description
expectedArg string

given in the semantic description of the capabilities

parameterMapping array

the expanded jsonld node of parameterMapping in the semantic description where the parameter description and native function parameter are mapped

parameterDescriptions array

the expanded jsonld semantic description node of the parameter

Source:
Returns:

the native function parameter and the value

Type
list