Advertisement
Guest User

Untitled

a guest
Sep 15th, 2014
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. http ://localhost:8182/graphs/mygraph
  2.  
  3. <graph>
  4. <graph-name>mygraph</graph-name>
  5. <graph-type>com.thinkaurelius.titan.tinkerpop.rexster.TitanGraphConfiguration</graph-type>
  6. <graph-location>C:/titan-server-jre6-0.4.4/bin/mygraph</graph-location>
  7. <graph-read-only>false</graph-read-only>
  8. <properties>
  9. <storage.backend>local</storage.backend>
  10. <buffer-size>100</buffer-size>
  11. </properties>
  12. <extensions>
  13. <allows>
  14. <allow>tp:gremlin</allow>
  15. </allows>
  16. </extensions>
  17. </graph>
  18.  
  19. g = TitanFactory.open('mygraph');
  20. g.createKeyIndex('name', Vertex.class);
  21. v = g.addVertex(null);
  22. v.setProperty('name','x');
  23. v.setProperty('type','person');
  24. v.setProperty('age',20);
  25. v1 = g.addVertex(null);
  26. v1.setProperty('name','y');
  27.  
  28. v1.setProperty('type','person');
  29.  
  30. v1.setProperty('age',22);
  31. e = g.addEdge(null, v, v1, 'knows');
  32. e1 = g.addEdge(null, v1, v, 'knows');
  33. g.shutdown();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement