Package berlin.yuna.survey.logic
Class DiagramExporter
- java.lang.Object
-
- berlin.yuna.survey.logic.DiagramExporter
-
public class DiagramExporter extends Object
TheDiagramExporter
exports and renders aSurvey
within itsFlowItem
to the givenFormat
. The export can be configured usingconfig()
-
-
Field Summary
Fields Modifier and Type Field Description static String
CONFIG_KEY_CLASS
static String
CONFIG_KEY_COLOR
static String
CONFIG_KEY_CONDITION
static String
CONFIG_KEY_SHAPE
static String
CONFIG_KEY_SOURCE
static String
CONFIG_KEY_TARGET
-
Constructor Summary
Constructors Constructor Description DiagramExporter(Survey survey)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DiagramConfig
config()
Method do configure the diagram exportvoid
Config(DiagramConfig config)
Replaces the current configFile
save(guru.nidi.graphviz.engine.Format format)
Renders a diagram from a survey flowFile
save(File output, guru.nidi.graphviz.engine.Format format)
Renders a diagram from a survey flowSurvey
survey()
GetSurvey
-
-
-
Field Detail
-
CONFIG_KEY_SHAPE
public static final String CONFIG_KEY_SHAPE
-
CONFIG_KEY_COLOR
public static final String CONFIG_KEY_COLOR
-
CONFIG_KEY_CLASS
public static final String CONFIG_KEY_CLASS
- See Also:
- Constant Field Values
-
CONFIG_KEY_SOURCE
public static final String CONFIG_KEY_SOURCE
- See Also:
- Constant Field Values
-
CONFIG_KEY_TARGET
public static final String CONFIG_KEY_TARGET
- See Also:
- Constant Field Values
-
CONFIG_KEY_CONDITION
public static final String CONFIG_KEY_CONDITION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DiagramExporter
public DiagramExporter(Survey survey)
-
-
Method Detail
-
save
public File save(guru.nidi.graphviz.engine.Format format) throws IOException
Renders a diagram from a survey flow- Parameters:
format
- format of generated diagram- Returns:
- file path of generated diagram
- Throws:
IOException
-
save
public File save(File output, guru.nidi.graphviz.engine.Format format) throws IOException
Renders a diagram from a survey flow- Parameters:
output
- nullable target path - on default generates a tmp fileformat
- format of generated diagram- Returns:
- file path of generated diagram
- Throws:
IOException
-
config
public DiagramConfig config()
Method do configure the diagram export- Returns:
- diagram configuration
-
Config
public void Config(DiagramConfig config)
Replaces the current config- Parameters:
config
- config replaces current one
-
-