@@ -0,0 +1,1879 @@
+package com.xmunch.atomspace.visualization;%0A%0Aimport com.xmunch.atomspace.aux.GlobalValues;%0Aimport com.xmunch.atomspace.aux.VertexType;%0Aimport com.xmunch.atomspace.aux.VisualizationParams;%0A%0Apublic class VisualizationSpace %7B%0A%09private UbigraphClient graph;%0A%0A%09public VisualizationSpace() %7B%0A%09%09graph = new UbigraphClient();%0A%09%09graph.clear();%0A%09%09setEdgeStyle();%0A%09%7D%0A%0A%09public void createEdge(String from, String to) %7B%0A%09%09graph.newEdge(Integer.valueOf(from), Integer.valueOf(to));%0A%09%7D%0A%0A%09public void createVertex(String id, String vertexType, String label) %7B%0A%09%09Integer identifier = Integer.valueOf(id);%0A%09%09graph.newVertex(identifier);%0A%09%09%0A%09%09graph.setVertexAttribute(%0A%09%09%09%09identifier, %0A%09%09%09%09VisualizationParams.SHAPE.get(),%0A%09%09%09%09VisualizationParams.SPHERE.get());%0A%09%09%0A%09%09graph.setVertexAttribute(%0A%09%09%09%09identifier,%0A%09%09%09%09VisualizationParams.SIZE.get(),%0A%09%09%09%09GlobalValues.ONE.get());%0A%09%09%0A%09%09graph.setVertexAttribute(%0A%09%09%09%09identifier,%0A%09%09%09%09VisualizationParams.LABEL.get(),%0A%09%09%09%09label);%0A%09%09%0A%09%09graph.setVertexAttribute(%0A%09%09%09%09identifier,%0A%09%09%09%09VisualizationParams.COLOR.get(),%0A%09%09%09%09getTypeColor(vertexType));%0A%09%0A%09%7D%0A%0A%09private String getTypeColor(String vertexType) %7B%0A%09%09String color = new String();%0A%09%09%0A%09%09switch (VertexType.valueOf(vertexType))%7B%0A%09%09case A:%0A%09%09%09color = GlobalValues.BLUE.get();%0A%09%09%09break;%0A%09%09case B:%0A%09%09%09color = GlobalValues.GREEN.get();%0A%09%09%09break;%0A%09%09case C:%0A%09%09%09color = GlobalValues.YELLOW.get();%0A%09%09%09break;%0A%09%09case D:%0A%09%09%09color = GlobalValues.WHITE.get();%0A%09%09%09break;%0A%09%09case E:%0A%09%09%09color = GlobalValues.PINK.get();%0A%09%09%09break;%0A%09%09case F:%0A%09%09%09color = GlobalValues.RED.get();%0A%09%09%09break;%0A%09%09%7D%0A%09%09%0A%09%09return color;%0A%09%7D%0A%0A%09private void setEdgeStyle() %7B%0A%09%09graph.setEdgeStyleAttribute(0, VisualizationParams.WIDTH.get(), GlobalValues.ONE.get());%0A%09%09graph.setEdgeStyleAttribute(0, VisualizationParams.COLOR.get(), GlobalValues.YELLOW.get());%0A%09%09graph.setEdgeStyleAttribute(0, VisualizationParams.ARROW.get(), GlobalValues.TRUE.get());%0A%09%7D%0A%0A%7D%0A

Create VisualizationSpace