SFGExporter

The SFGExporter plugin is used to create exports of the StateFlowGraph.

Developer

Stefan Lenselink

Features

Save the state flow graph in one of the formats:

  • DOT
  • DOT Convert to:
    • dia, for use in the DIA application
    • Graphic formats: fig, png, svg, svgz, pic, vml, vmlz
    • Printing formats: hpgl, pcl
    • Document formats: pdf, ps, ps2
    • Many more
  • GraphML
  • GML
  • Matrix, for useage in for example MathLab
  • Visio

Requirements

  • For usage of the DOT Converter; Graphviz tested with version 2.14.1

Download

  • SFGExporter 1.8 (compatible with Crawljax 1.8) Plugin
  • SFGExporter 1.8 all-in-one package The jar can be executed with ‘java -jar’ and when the first parameter is given a correct URL the URL will be crawled and exported to the output directory as png (requires dot installed on path).

Usage

Create a runner class as normal, than add the plugin in the CrawljaxConfiguration. The argument of the constructor of the plugin requires a list of Transformers that need to run.
Example, with Visio, DOT and DOT to PNG export:

ArrayList<Transformer> list = new ArrayList<Transformer>();

//Default VisioTransfromer
list.add(new VisioTransformer());

//DOTTransformer with EdgeLabelProvider
DOTTransformer dotTransformer = new DOTTransformer();
dotTransformer.setEdgeLabelProvider(new EventableNameProvider());
list.add(dotTransformer);

//DOTConvertedTransformer using dot output to convert it by dot to png
DOTConfig dconfig = new DOTConfig();
dconfig.setOutputFormat(DOTConfig.OutputFormat.png);
DOTConvertedTransformer t = new DOTConvertedTransformer(dconfig);
list.add(t);

SFGExporterPlugin exp = new SFGExporterPlugin(list);
exp.setOutputFolder(“output”);
config.addPlugin(exp);

Transformers

Transfromer class Output format
DOTTransformer plain text DOT formated dot file
GmlTransformer plain text graph modeling language
GraphMLTransformer GraphML XML
MatrixTransformer plain text able to load into MathLab
VisioTransformer MS Visio csv format
DOTConvertedTransformer As specified, first a dot file and afterwards converted to for example png

Screenshots

Graph converted with the DOTConvertedTransformer

Graph converted with the DOTConvertedTransformer