code: public static AbstractGraphDatabase getSocialGraphDatabase(
  			final Configuration config) {
  		// prepare neo4j graph configuration
  		final Map<String, String> graphConfig = loadDatabaseConfig(config);
  
  		// load database from path specified
  		AbstractGraphDatabase database;
  		if (config.getReadOnly()) {
  			database = new EmbeddedReadOnlyGraphDatabase(
  					config.getDatabasePath(), graphConfig);
  		} else {
  			database = new EmbeddedGraphDatabase(config.getDatabasePath(),
  					graphConfig);
  		}
  
  		// load lucene indices
  		DATABASE = database;
  		loadLuceneIndices(database);
  
  		return database;
  	}
docs: open the neo4j graph database
  
  @param config
  Graphity configuration
  @return abstract graph database