-
Notifications
You must be signed in to change notification settings - Fork 261
Commit
Signed-off-by: Mandy Chessell <[email protected]>
- Loading branch information
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* SPDX-License-Identifier: Apache-2.0 */ | ||
/* Copyright Contributors to the ODPi Egeria project. */ | ||
|
||
package org.odpi.openmetadata.commonservices.mermaid; | ||
|
||
|
||
/** | ||
* Creates a mermaid graph rendering of a hierarchy. It relies on the caller to add the nodes and lines | ||
*/ | ||
public class HierarchyMermaidGraphBuilder extends MermaidGraphBuilderBase | ||
{ | ||
/** | ||
* Construct a mermaid markdown graph. | ||
* | ||
* @param title title of graph | ||
* @param displayName displayName of the starting element | ||
* @param startingGUID guid of the starting element | ||
*/ | ||
public HierarchyMermaidGraphBuilder(String title, | ||
String startingGUID, | ||
String displayName) | ||
{ | ||
mermaidGraph.append("---\n"); | ||
mermaidGraph.append("title: "); | ||
mermaidGraph.append(title); | ||
mermaidGraph.append(" - "); | ||
mermaidGraph.append(displayName); | ||
mermaidGraph.append(" ["); | ||
mermaidGraph.append(startingGUID); | ||
mermaidGraph.append("]\n---\nflowchart TD\n%%{init: {\"flowchart\": {\"htmlLabels\": false}} }%%\n\n"); | ||
} | ||
} |