Interface GraphFormat
-
- All Known Implementing Classes:
DrawflowGraphFormat
public interface GraphFormatRepresents a graph format, e.g., a specific JSON structure that can be applied on UI level.- Author:
- Holger Eichelberger, SSE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IvmlGraphMapper.IvmlGraphfromString(java.lang.String graph, GraphFactory factory, DecisionVariableProvider varProvider)Parsesgraphfrom this format into an IVML graph structure.java.lang.StringgetFormatKind()Returns the kind of format produced.java.lang.StringgetName()Returns the name to address/access this format.java.lang.StringtoString(IvmlGraphMapper.IvmlGraph graph)Turnsgraphinto this format.
-
-
-
Method Detail
-
getName
java.lang.String getName()
Returns the name to address/access this format.- Returns:
- the unique name
-
getFormatKind
java.lang.String getFormatKind()
Returns the kind of format produced.- Returns:
- the format kind, e.g., XML, JSON, ...
-
toString
java.lang.String toString(IvmlGraphMapper.IvmlGraph graph) throws java.util.concurrent.ExecutionException
Turnsgraphinto this format.- Parameters:
graph- the graph, may be null- Returns:
- the formatted graph, an empty graph if
graphis null - Throws:
java.util.concurrent.ExecutionException- if the translation fails
-
fromString
IvmlGraphMapper.IvmlGraph fromString(java.lang.String graph, GraphFactory factory, DecisionVariableProvider varProvider) throws java.util.concurrent.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:
java.util.concurrent.ExecutionException- if the translation fails
-
-