Example #1
0
 // TODO unit test that
 static boolean removeEdge(Graph graph, Relationship relationship) {
   Edge edge = graph.getEdge(relationship.getId());
   if (null != edge) {
     graph.removeEdge(edge);
     return true;
   } else {
     return false;
   }
 }
  private void cleanupGraphStore(Graph graph) {
    for (Edge edge : graph.getEdges()) {
      graph.removeEdge(edge);
    }

    for (Vertex vertex : graph.getVertices()) {
      graph.removeVertex(vertex);
    }

    graph.shutdown();
  }