ArchitectureDiagram

public class ArchitectureDiagram

Constructors

ArchitectureDiagram

protected ArchitectureDiagram(APIClient client)

Internal constructor

Methods

fromProtobuf

public static ArchitectureDiagram fromProtobuf(APIClient client, Out.CocoArchitectureDiagram inputValue)

Internal constructor

getElements

public final java.util.ArrayList<java.util.ArrayList<io.cocotec.coco.platform.coco.Node>> getElements()

A mapping of SVG graph element IDs to lists of AST nodes they represent. The index, i, corresponds to the SVG ID “e{i}”. E.g. the zeroth array element corresponds to the SVG element with id=”e0”. Most IDs correspond to a single AST node. However, when generating a diagram in simplified mode, edges are consolidated and a single edge may correspond to multiple connect calls in the AST. Empty if isError is true.

getError

public final String getError()

The error message if isError is true, empty otherwise.

getHighlightGroups

public final java.util.ArrayList<java.util.ArrayList<Integer>> getHighlightGroups()

Each subvector contains IDs of elements to highlight when element i is hovered, where i is the index of the subvector within the outer vector. i is typically one of the values in the subvector, because hovering element i should cause i to be highlighted (as well as nearby elements). Empty if isError is true.

getIsError

public final boolean getIsError()

True if this holds an error, false if it contains a SVG.

getSvg

public final String getSvg()

The SVG diagram as a string if isError is false, empty otherwise.