Class DrawflowGraphFormat.GraphReader
java.lang.Object
de.iip_ecosphere.platform.configuration.easyProducer.DrawflowGraphFormat.GraphReader
- Enclosing class:
DrawflowGraphFormat
Implements a graph reader.
- Author:
- Holger Eichelberger, SSE
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate GraphFactoryprivate Map<String, IvmlGraphMapper.IvmlGraphNode> private Map<String, IvmlGraphMapper.IvmlGraphEdge> private DecisionVariableProvider -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateGraphReader(GraphFactory factory, DecisionVariableProvider varProvider) Creates a graph reader instance. -
Method Summary
Modifier and TypeMethodDescriptionprivate org.json.simple.JSONObjectoptional(org.json.simple.JSONObject base, org.json.simple.JSONObject optional) Returnsoptionalif this is an object with contents, elsebase.private IvmlGraphMapper.IvmlGraphReads a JSON representation and returns an IVML graph.private voidReads the edges forid/node.
-
Field Details
-
factory
-
varProvider
-
id2Nodes
-
ids2Edges
-
-
Constructor Details
-
GraphReader
Creates a graph reader instance.- Parameters:
factory- the graph factoryvarProvider- the variability provider
-
-
Method Details
-
optional
private org.json.simple.JSONObject optional(org.json.simple.JSONObject base, org.json.simple.JSONObject optional) Returnsoptionalif this is an object with contents, elsebase.- Parameters:
base- the base object to be returned ifoptionalis no valid objectoptional- the optional object, may also be null- Returns:
baseoroptional
-
read
Reads a JSON representation and returns an IVML graph.- Parameters:
graph- the graph to read- Returns:
- the IVML graph representation
- Throws:
ExecutionException- if parsinggraphfails
-
readEdges
Reads the edges forid/node.- Parameters:
id- the node idnode- the nodeinputEdges- are we reading input or output edges
-