Class PlantUmlContentTransformer
- java.lang.Object
-
- org.eclipse.epsilon.picto.transformers.PlantUmlContentTransformer
-
- All Implemented Interfaces:
ViewContentTransformer
public class PlantUmlContentTransformer extends java.lang.Object implements ViewContentTransformer
-
-
Constructor Summary
Constructors Constructor Description PlantUmlContentTransformer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canTransform(ViewContent content)
java.lang.String
getLabel(ViewContent content)
static java.nio.file.Path
plantumlToImage(java.lang.String plant, java.lang.String imageExt)
Converts PlantUML diagram to a temporary image file.static java.lang.String
plantumlToRawSvg(java.lang.String plant)
Converts PlantUML diagram to SVG as a String.ViewContent
transform(ViewContent content, PictoView pictoView)
-
-
-
Method Detail
-
canTransform
public boolean canTransform(ViewContent content)
- Specified by:
canTransform
in interfaceViewContentTransformer
-
getLabel
public java.lang.String getLabel(ViewContent content)
- Specified by:
getLabel
in interfaceViewContentTransformer
-
transform
public ViewContent transform(ViewContent content, PictoView pictoView) throws java.lang.Exception
- Specified by:
transform
in interfaceViewContentTransformer
- Throws:
java.lang.Exception
-
plantumlToRawSvg
public static java.lang.String plantumlToRawSvg(java.lang.String plant) throws java.io.IOException
Converts PlantUML diagram to SVG as a String.- Parameters:
plant
- The Plant UML description.- Returns:
- The generated SVG as an XML string.
- Throws:
java.io.IOException
- If writing to file fails.
-
plantumlToImage
public static java.nio.file.Path plantumlToImage(java.lang.String plant, java.lang.String imageExt) throws java.io.IOException
Converts PlantUML diagram to a temporary image file.- Parameters:
plant
- The Plant UML description.imageExt
- The file extension (and therefore type) of the image.- Returns:
- The path to the generated image.
- Throws:
java.io.IOException
- If writing to file fails.
-
-