Class MermaidGraphBuilderBase

java.lang.Object
org.odpi.openmetadata.commonservices.mermaid.MermaidGraphBuilderBase
Direct Known Subclasses:
AssetGraphMermaidGraphBuilder, AssetLineageGraphMermaidGraphBuilder, HierarchyMermaidGraphBuilder, OpenMetadataMermaidGraphBuilder

public class MermaidGraphBuilderBase extends Object
Provides the basic functions for building flowchart based graph visualizations
  • Field Details

  • Constructor Details

    • MermaidGraphBuilderBase

      public MermaidGraphBuilderBase()
  • Method Details

    • getListLabel

      public String getListLabel(List<String> labelValues)
      Convert an array into a comma separated string.
      Parameters:
      labelValues - array of labels
      Returns:
      string value without square brackets (Mermaid does not allow them)
    • appendMermaidNode

      public void appendMermaidNode(String currentNodeName, String currentDisplayName, String currentType)
      Create a node in the mermaid graph.
      Parameters:
      currentNodeName - unique name/identifier
      currentDisplayName - display name
      currentType - type of element
    • appendMermaidLine

      public void appendMermaidLine(String end1Id, String label, String end2Id)
      Append a line to the graph.
      Parameters:
      end1Id - identifier of the starting end
      label - label for the line
      end2Id - identifier of the ending end
    • getMermaidGraph

      public String getMermaidGraph()
      Return the built mermaid graph.
      Returns:
      string markdown