Class DrawflowGraphFormat.GraphReader

java.lang.Object
de.iip_ecosphere.platform.configuration.DrawflowGraphFormat.GraphReader
Enclosing class:
DrawflowGraphFormat

private static class DrawflowGraphFormat.GraphReader extends Object
Implements a graph reader.
Author:
Holger Eichelberger, SSE
  • Field Details

  • Constructor Details

    • GraphReader

      private GraphReader(GraphFactory factory, DecisionVariableProvider varProvider)
      Creates a graph reader instance.
      Parameters:
      factory - the graph factory
      varProvider - the variability provider
  • Method Details

    • optional

      private org.json.simple.JSONObject optional(org.json.simple.JSONObject base, org.json.simple.JSONObject optional)
      Returns optional if this is an object with contents, else base.
      Parameters:
      base - the base object to be returned if optional is no valid object
      optional - the optional object, may also be null
      Returns:
      base or optional
    • read

      Reads a JSON representation and returns an IVML graph.
      Parameters:
      graph - the graph to read
      Returns:
      the IVML graph representation
      Throws:
      ExecutionException - if parsing graph fails
    • readEdges

      private void readEdges(Object id, org.json.simple.JSONObject node, boolean inputEdges)
      Reads the edges for id/node.
      Parameters:
      id - the node id
      node - the node
      inputEdges - are we reading input or output edges