Mercurial > hg > Members > nobuyasu > TOModel
view app/models/TPGraph.java @ 4:e12d0b6dbe02 draft default tip
add some files
author | e085711 |
---|---|
date | Wed, 26 Sep 2012 14:43:57 +0900 |
parents | |
children |
line wrap: on
line source
package models; import com.tinkerpop.blueprints.Graph; import com.tinkerpop.blueprints.impls.tg.TinkerGraph; public class TPGraph { private static TPGraph instance = new TPGraph(); private TPGraph() { } public static TPGraph getInstance() { return instance; } private Graph graph; private String path; public void setPath(String path) { this.path = path; } public Graph newGraph() { graph = new TinkerGraph(path); return graph; } public Graph getGraph() { return graph; } public void shutdownGraph() { graph.shutdown(); } }