@Test public void testConfiguration() throws Exception { Configuration config=getMockConfiguration(); long nodeCount = config.g().V().count().next().longValue(); assertEquals(1,nodeCount); config.write(); assertTrue(config.getGraphFile().canRead()); config.getGraphFile().delete(); }
public Configuration(String graphFilePath, boolean readInis) { this.graphFilePath = graphFilePath; setGraph(TinkerGraph.open()); File graphFile = getGraphFile(); if (readInis) { fromIni(); write(); } else { if (graphFile.exists()) { read(graphFile); } } }
Configuration { public Configuration(String graphFilePath, boolean readInis) { this.graphFilePath = graphFilePath; setGraph(TinkerGraph.open()); File graphFile = getGraphFile(); if (readInis) { fromIni(); write(); } else { if (graphFile.exists()) { read(graphFile); } } } }
Configuration { public Configuration(String graphFilePath, boolean readInis) { this.graphFilePath = graphFilePath; setGraph(TinkerGraph.open()); File graphFile = getGraphFile(); if (readInis) { fromIni(); write(); } else { if (graphFile.exists()) { read(graphFile); } } } Configuration(String graphFilePath, boolean readInis);  Configuration(); }
Configuration { public Configuration(String graphFilePath, boolean readInis) { this.graphFilePath = graphFilePath; setGraph(TinkerGraph.open()); File graphFile = getGraphFile(); if (readInis) { fromIni(); write(); } else { if (graphFile.exists()) { read(graphFile); } } } Configuration(String graphFilePath, boolean readInis);  Configuration(); String getGraphFilePath(); void setGraphFilePath(String graphFilePath); void fromIni(); void addEnv(Environment env); TinkerGraph getGraph(); void setGraph(TinkerGraph graph); GraphTraversalSource g(); File getGraphFile(); void read(File graphFile); void write(File graphFile); String asString(); Map<String, Environment> getEnvironments(); Environment getEnvironmentFromVertex(Vertex v); void write(); }
Configuration { public Configuration(String graphFilePath, boolean readInis) { this.graphFilePath = graphFilePath; setGraph(TinkerGraph.open()); File graphFile = getGraphFile(); if (readInis) { fromIni(); write(); } else { if (graphFile.exists()) { read(graphFile); } } } Configuration(String graphFilePath, boolean readInis);  Configuration(); String getGraphFilePath(); void setGraphFilePath(String graphFilePath); void fromIni(); void addEnv(Environment env); TinkerGraph getGraph(); void setGraph(TinkerGraph graph); GraphTraversalSource g(); File getGraphFile(); void read(File graphFile); void write(File graphFile); String asString(); Map<String, Environment> getEnvironments(); Environment getEnvironmentFromVertex(Vertex v); void write(); static String STORE_MODE; static String STORE_EXTENSION; }