/** {@inheritDoc} */ @Override public BasicOperator deserialize(final JSONObject serializedOperator) throws JSONException { /* * instanciate the subgraphcontainer formatter, which is used for * subgraph execution */ final SubgraphContainerFormatter serializer = new SubgraphContainerFormatter(this.dataset, this.operatorCreator, this.application); final JSONObject _serializedOperator = serializedOperator.getJSONObject("subgraph"); final Root r = serializer.deserialize(_serializedOperator); /* * deserialize the key of the subgraph container */ final String subgraphKey = (String) serializedOperator.get("key"); Object obj = null; try { obj = JsonReader.jsonToJava(subgraphKey); } catch (final IOException e) { e.printStackTrace(); } /* * read out the subgraphType, otherwise set default */ String subgraphType = (String) serializedOperator.get("type"); if (subgraphType == null) { subgraphType = SubgraphContainer.class.getName(); } /* * create the subgraph container with the given key and executer */ return this.invoke(subgraphType, r, obj, this.executer); }