Angular service

ToolsService source

Description

List of spatial-hub tools. Includes client side tools with names matching Tool*Service. Includes tools from spatial-service/capabilities.

Methods

checkStatus (interface)

Begin tool status monitoring.

Monitoring will repeat until execution is finished.

When successful #executeResult is called.

Parameters

NameTypeDescription
interface Scope

scope

execute (interface, tool, input) -> Promise(Boolean)

Run a tool

Parameters

NameTypeDescription
interface Scope

scope

tool string

name

input Map

parameters

Returns

TypeDescription
Promise(Boolean)

true the tool is successful

executeResult (interface)

Process tool output. Does download, display and/or add to the map as defined by capabilities and view config.

Parameters

NameTypeDescription
interface Scope

scope

getCap (tool) -> Map

Get tool capabilities (info including inputs/outputs)

Parameters

NameTypeDescription
tool string

name

Returns

TypeDescription
Map

capabilities information

getViewConfig (tool) -> Map

Get spatial-hub view config for a tool. View config overrides capabilities to control display and defaults.

Parameters

NameTypeDescription
tool string

name

Returns

TypeDescription
Map

view config including capabilities override information

init (name) -> Promise

Initialize client side tool

Parameters

NameTypeDescription
name string

of client side tool

Returns

TypeDescription
Promise

isLocalTask (name) -> boolean

Test if a tool name is a client side tool

Parameters

NameTypeDescription
name string

of tool

Returns

TypeDescription
boolean

true when it is a client side tool

isTool (name) -> boolean

Test if a tool name is a client side or remote tool

Parameters

NameTypeDescription
name string

of tool

Returns

TypeDescription
boolean

true when it is a client side or remote tool

refresh (interface, tool, input) -> Promise(Boolean)

Run a tool

Parameters

NameTypeDescription
interface Scope

scope

tool string

name

input Map

parameters

Returns

TypeDescription
Promise(Boolean)

true the tool is successful