Interface GraphFormat
- All Known Implementing Classes:
DrawflowGraphFormat
public interface GraphFormat
Represents a graph format, e.g., a specific JSON structure that can be applied on UI level.
- Author:
- Holger Eichelberger, SSE
-
Method Summary
Modifier and TypeMethodDescriptionfromString(String graph, GraphFactory factory, DecisionVariableProvider varProvider) Parsesgraphfrom this format into an IVML graph structure.Returns the kind of format produced.getName()Returns the name to address/access this format.Turnsgraphinto this format.
-
Method Details
-
getName
String getName()Returns the name to address/access this format.- Returns:
- the unique name
-
getFormatKind
String getFormatKind()Returns the kind of format produced.- Returns:
- the format kind, e.g., XML, JSON, ...
-
toString
Turnsgraphinto this format.- Parameters:
graph- the graph, may be null- Returns:
- the formatted graph, an empty graph if
graphis null - Throws:
ExecutionException- if the translation fails
-
fromString
IvmlGraphMapper.IvmlGraph fromString(String graph, GraphFactory factory, DecisionVariableProvider varProvider) throws ExecutionException Parsesgraphfrom this format into an IVML graph structure.- Parameters:
graph- the graph, may be nullfactory- a factory to be used to create graph instancesvarProvider- the provider allowing to access variables- Returns:
- the IVML graph structure, an empty graph if
graphis null - Throws:
ExecutionException- if the translation fails
-