Workspace workspace = projectController.getCurrentWorkspace();
AttributeController attributeController = Lookup.getDefault().lookup(AttributeController.class);
AttributeModel attributeModel = attributeController.getModel();
GraphController graphController = Lookup.getDefault().lookup(GraphController.class);
GraphModel graphModel = graphController.getModel();
HierarchicalDirectedGraph graph = graphModel.getHierarchicalDirectedGraph();
Node n1 = graphModel.factory().newNode("n1");
graph.addNode(n1);
Node n2 = graphModel.factory().newNode("n2");
graph.addNode(n2);
Node n3 = graphModel.factory().newNode("n3");
graph.addNode(n3);
Node n4 = graphModel.factory().newNode("n4");
graph.addNode(n4, n3);
Edge e1 = graphModel.factory().newEdge(n1, n2, 1f, true);
graph.addEdge(e1);
Edge e2 = graphModel.factory().newEdge(n2, n4, 3f, true);
graph.addEdge(e2);
Edge e3 = graphModel.factory().newEdge(n2, n1, 1f, true);
graph.addEdge(e3);
AttributeColumn nodeCol1 = attributeModel.getNodeTable().addColumn("col1", "Column 1", AttributeType.STRING, AttributeOrigin.DATA, "default value col1");
AttributeColumn nodeCol2 = attributeModel.getNodeTable().addColumn("col2 listint", AttributeType.LIST_INTEGER);
attributeModel.getNodeTable().addColumn("col3 listchar", AttributeType.LIST_CHARACTER);
attributeModel.getNodeTable().addColumn("col4 int", AttributeType.INT);