Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- http ://localhost:8182/graphs/mygraph
- <graph>
- <graph-name>mygraph</graph-name>
- <graph-type>com.thinkaurelius.titan.tinkerpop.rexster.TitanGraphConfiguration</graph-type>
- <graph-location>C:/titan-server-jre6-0.4.4/bin/mygraph</graph-location>
- <graph-read-only>false</graph-read-only>
- <properties>
- <storage.backend>local</storage.backend>
- <buffer-size>100</buffer-size>
- </properties>
- <extensions>
- <allows>
- <allow>tp:gremlin</allow>
- </allows>
- </extensions>
- </graph>
- g = TitanFactory.open('mygraph');
- g.createKeyIndex('name', Vertex.class);
- v = g.addVertex(null);
- v.setProperty('name','x');
- v.setProperty('type','person');
- v.setProperty('age',20);
- v1 = g.addVertex(null);
- v1.setProperty('name','y');
- v1.setProperty('type','person');
- v1.setProperty('age',22);
- e = g.addEdge(null, v, v1, 'knows');
- e1 = g.addEdge(null, v1, v, 'knows');
- g.shutdown();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement