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 booleancanTransform(ViewContent content)java.lang.StringgetLabel(ViewContent content)static java.nio.file.PathplantumlToImage(java.lang.String plant, java.lang.String imageExt)Converts PlantUML diagram to a temporary image file.static java.lang.StringplantumlToRawSvg(java.lang.String plant)Converts PlantUML diagram to SVG as a String.ViewContenttransform(ViewContent content, PictoView pictoView)
-
-
-
Method Detail
-
canTransform
public boolean canTransform(ViewContent content)
- Specified by:
canTransformin interfaceViewContentTransformer
-
getLabel
public java.lang.String getLabel(ViewContent content)
- Specified by:
getLabelin interfaceViewContentTransformer
-
transform
public ViewContent transform(ViewContent content, PictoView pictoView) throws java.lang.Exception
- Specified by:
transformin interfaceViewContentTransformer- Throws:
java.lang.Exception
-
plantumlToRawSvg
public static java.lang.String plantumlToRawSvg(java.lang.String plant) throws java.io.IOExceptionConverts 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.IOExceptionConverts 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.
-
-