Frontend API

export class Node

A node correspond to a block on a flow-based program. A node is a part of a flow. Nodes are linked together with edges.

To know more about Flow-Based programming : http://www.jpaulmorrison.com/fbp/concepts.html To see the FBP Network Protocol : https://flowbased.github.io/fbp-protocol/#graph-addnode

Created by antoine on 09/06/17.

getCode (): string

Returns the code of the node.

getLanguage (): string

Returns the programming language used by the node.

setSingleData(key: string, value: any): void

Set the value of a data on the node’s data.

setMetadata (metadata: Object): void

Set the metadata object of the node.

getData (): Object

Get the data object of the node. The data object is stored in the metadata. The data or either the imported data for data-importer nodes, or the data the user choose in sendTheseDataToNextNodes(**kwargs) in her code.

setData (data: Object): void

Set the data object of the node. The data object is stored in the metadata. The data or either the imported data for data-importer nodes, or the data the user choose in sendTheseDataToNextNodes(**kwargs) in her code.

getPreviousNodesData (): object

Retrieve the output data of the nodes connected to this node’s input.

getPreviousNodes (): Array

Retrieve the list of Nodes connected to this node’s input

getPreviousNodesInList (nodes: Array): Array

Create the list of nodes connected to this node’s input, from the given set of nodes

getNextNodes (): Array

Retrieve the list of Nodes connected to this node’s output

getNextNodesInList (nodes: Array): Array

Create the list of nodes connected to this node’s output, from the given set of nodes

getPort (port: string): Port

Returns the port with the given name

getName (): string

Returns the name of the node

setName (name: string): void

Set the name of the node

setTraceback (traceback: string[]): void

Set the traceback object, received from the Jupyter kernel

getTraceback (): string[]

Returns the traceback of the node’s last execution

emptyTraceback (): void

Set the traceback to an empty string