}
}
private void resetGraph() {
final MetaGraph graph = (MetaGraph) this.generateGraph();
// since we don't have graph.clear() anymore we manually reset the graph.
Iterator<Vertex> vertexItty = graph.getVertices().iterator();
List<Vertex> verticesToRemove = new ArrayList<Vertex>();
while (vertexItty.hasNext()) {
verticesToRemove.add(vertexItty.next());
}
for (Vertex vertexToRemove : verticesToRemove) {
graph.removeVertex(vertexToRemove);
}
// for (String key : graph.getIndexedKeys(Vertex.class)) {
// graph.dropKeyIndex(key, Vertex.class);
// }