Class MermaidContentTransformer
java.lang.Object
org.eclipse.epsilon.picto.transformers.MermaidContentTransformer
- All Implemented Interfaces:
ViewContentTransformer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canTransform
(ViewContent content) getLabel
(ViewContent content) protected static ExternalContentTransformation
static Path
mermaidToImage
(String mmd, String ext) static Path
mermaidToImage
(Path mmd, String ext) static String
mermaidToRawSvg
(String mmd) static String
mermaidToRawSvg
(Path mmd) transform
(ViewContent content, PictoView pictoView)
-
Constructor Details
-
MermaidContentTransformer
public MermaidContentTransformer()
-
-
Method Details
-
canTransform
- Specified by:
canTransform
in interfaceViewContentTransformer
-
getLabel
- Specified by:
getLabel
in interfaceViewContentTransformer
-
transform
- Specified by:
transform
in interfaceViewContentTransformer
- Throws:
Exception
-
mermaidToRawSvg
- Parameters:
mmd
- The Mermaid as plain text.- Returns:
- The SVG as an XML string.
- Throws:
IOException
-
mermaidToRawSvg
- Parameters:
mmd
- The Mermaid file.- Returns:
- The SVG as an XML string.
- Throws:
IOException
-
mermaidToImage
- Parameters:
mmd
- The Mermaid as plain text.ext
- The output file extension.- Returns:
- The image as a file.
- Throws:
IOException
-
mermaidToImage
- Parameters:
mmd
- The Mermaid file.ext
- The output file extension.- Returns:
- The path to the output file.
- Throws:
IOException
- If invoking the CLI tool goes wrong.
-
mermaid
-