A Workspace, a ImportController, and a Container are created. However, I do not know how to assign the subGraph to that container. In the toolkit examples, generate method is always used to create a random graph assigned to a container, and I have not find an example of assigning a predefined graph.
- Code: Select all
Workspace workspace_new = pc.newWorkspace(pc.getCurrentProject());
ImportController importController_new = Lookup.getDefault().lookup(ImportController.class);
Graph subGraph = dynamicGraph.getSnapshotGraph(low, high);
Container container_new = Lookup.getDefault().lookup(ContainerFactory.class).newContainer();
<<missing code to assign subGraph to container_new>>
importController_new.process(container_new, new DefaultProcessor(), workspace_new);