Last active
March 31, 2016 01:00
-
-
Save amcp/f83a422fec48c2adf7a6 to your computer and use it in GitHub Desktop.
Titan Tupl Dependency Graph
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Configure and open an in-memory titan-tupl graph | |
conf = new BaseConfiguration() | |
conf.setProperty("storage.backend", "jp.classmethod.titan.diskstorage.tupl.TuplStoreManager") | |
g = com.thinkaurelius.titan.core.TitanFactory.open(conf) | |
//Create the vertices | |
titan = g.addVertex("name", "Titan") | |
structure = g.addVertex("name", "Gremlin Structure") | |
graphtraversal = g.addVertex("name", "GraphTraversal") | |
gremlin = g.addVertex("name", "Gremlin") | |
traversal = g.addVertex("name", "Traversal") | |
graphcomputer = g.addVertex("name", "GraphComputer and VertexProgram") | |
gremlinserver = g.addVertex("name", "GremlinServer") | |
classmethodStorageBackend = g.addVertex("name", "Classmethod Tupl Storage Backend for Titan") | |
tupl = g.addVertex("name", "Tupl") | |
//Create the edges | |
titan.addEdge("implements", structure) | |
graphtraversal.addEdge("builds-on", structure) | |
gremlin.addEdge("builds-on", structure) | |
traversal.addEdge("builds-on", structure) | |
graphcomputer.addEdge("builds-on", structure) | |
gremlinserver.addEdge("builds-on", structure) | |
titan.addEdge("backed-by", classmethodStorageBackend) | |
classmethodStorageBackend.addEdge("uses", tupl) | |
//Commit the changes to the backend | |
g.tx().commit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment