With the appropriate storage backend running a new titan graph can be initialised via:
graph = TitanFactory.open("config.properties");
Wehere config.properties
defines several configurations relevant to the storage backend. Titan provides some sample configs in its downloadable package. For example conf/titan-cassandra.properties
A shorthand can also be used when you want to ignore most configuration options:
For example for a Cassandra backend:
graph = TitanFactory.open("cassandra:localhost")
For a Berkeley DB backend:
graph = TitanFactory.open('berkeleyje:/tmp/graph')
All the above commands will create a Titan Graph which persists the relevant backend. If this is the first time executing these commands the graph will initially be empty.