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.
- Returns:
string— the code of the node
getLanguage (): string
Returns the programming language used by the node.
- Returns:
string— the programming language’s name
setSingleData(key: string, value: any): void
Set the value of a data on the node’s data.
- Parameters:
key— the name of the data to setvalue— the value of the data
setMetadata (metadata: Object): void
Set the metadata object of the node.
- Parameters:
metadata— the new metadata
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.
- Returns:
Object}— the output data of the node
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.
- Parameters:
data— the output data of the node
getPreviousNodesData (): object
Retrieve the output data of the nodes connected to this node’s input.
- Returns:
Object— an Object containing all the data from the nodes connected to the input port
getPreviousNodes (): Array
Retrieve the list of Nodes connected to this node’s input
- Returns:
Array<Node>— 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
- Parameters:
nodes— the set of nodes to use while searching for the previous nodes connected to this - Returns:
Array<Node>— the list of nodes connected to this node’s input
getNextNodes (): Array
Retrieve the list of Nodes connected to this node’s output
- Returns:
Array<Node>— 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
- Parameters:
nodes— the set of nodes to use while searching for the next nodes connected to this - Returns:
Array<Node>— the list of nodes connected to this node’s output
getPort (port: string): Port
Returns the port with the given name
- Parameters:
port— the name of the port - Returns:
Port— the port instance with the given name
getName (): string
Returns the name of the node
- Returns:
any|string— the name of the node
setName (name: string): void
Set the name of the node
- Parameters:
name— the new name
setTraceback (traceback: string[]): void
Set the traceback object, received from the Jupyter kernel
- Parameters:
traceback— the traceback as a set of lines
getTraceback (): string[]
Returns the traceback of the node’s last execution
- Returns:
any|Array— the traceback of the node’s last execution as a set of lines, including syntax highlighting
emptyTraceback (): void
Set the traceback to an empty string