Examples of removeVertex()


Examples of com.tinkerpop.blueprints.impls.orient.OrientGraph.removeVertex()

      // Step 3b
      result = graph.getRawGraph().query(new OSQLSynchQuery<ODocument>("select * from Foo where address = 'test2'"));
      Assert.assertEquals(result.size(), 1);
      // Step 4b
      graph.removeVertex(graph.getVertex(result.get(0)));

      // Step 3c
      result = graph.getRawGraph().query(new OSQLSynchQuery<ODocument>("select * from Foo where address = 'test3'"));
      Assert.assertEquals(result.size(), 1);
      // Step 4c
View Full Code Here

Examples of com.tinkerpop.blueprints.impls.orient.OrientGraph.removeVertex()

      // Step 3c
      result = graph.getRawGraph().query(new OSQLSynchQuery<ODocument>("select * from Foo where address = 'test3'"));
      Assert.assertEquals(result.size(), 1);
      // Step 4c
      graph.removeVertex(graph.getVertex(result.get(0)));

      // Step 6
      graph.commit();

      // just show what is there
View Full Code Here

Examples of com.tinkerpop.blueprints.impls.orient.OrientGraph.removeVertex()

      graph.commit();

      List<ODocument> foos = graph.getRawGraph().query(new OSQLSynchQuery("select * from Foo"));
      Assert.assertEquals(foos.size(), 1);

      graph.removeVertex(graph.getVertex(foos.get(0)));
    } finally {
      graph.shutdown();
    }
  }

View Full Code Here

Examples of com.tinkerpop.blueprints.impls.tg.TinkerGraph.removeVertex()

    public void testIdGenerationInGML() throws IOException {
        TinkerGraph graph1 = new TinkerGraph();
        GMLReader.inputGraph(graph1, GMLReader.class.getResourceAsStream("simple.gml"));

        Vertex toRemove = graph1.getVertex("123");
        graph1.removeVertex(toRemove);

        String file = "/tmp/simple-" + UUID.randomUUID() + ".gml";
        GMLWriter.outputGraph(graph1, file);

        TinkerGraph graph2 = new TinkerGraph();
View Full Code Here

Examples of com.tinkerpop.blueprints.pgm.Graph.removeVertex()

            }
        }
        /* We try to locate vertex in graph before to delete it. Indeed, mainly due cascade delete, this vertex may have already been removed */
        Vertex notYetDeleted = service.getDriver().loadVertexFor(objectVertexId, service.getContainedClass().getName());
        if(notYetDeleted!=null)
          database.removeVertex(notYetDeleted);
    }


    /**
     * Delete value mapped by a single property.
View Full Code Here

Examples of com.tinkerpop.blueprints.pgm.Graph.removeVertex()

            }
        }
        /* We try to locate vertex in graph before to delete it. Indeed, mainly due cascade delete, this vertex may have already been removed */
        Vertex notYetDeleted = service.getDriver().loadVertexFor(objectVertexId, service.getContainedClass().getName());
        if(notYetDeleted!=null)
          database.removeVertex(notYetDeleted);
    }


    private void deleteSingle(AbstractBluePrintsBackedFinderService<? extends Graph, ?, ?> service, Graph database, Property p, Object toDelete, Vertex objectVertex, Collection<CascadeType> toCascade, Map<String, Object> objectsBeingAccessed) {
        // there should be only one vertex to delete
View Full Code Here

Examples of com.tinkerpop.blueprints.pgm.Graph.removeVertex()

            }
        }
        /* We try to locate vertex in graph before to delete it. Indeed, mainly due cascade delete, this vertex may have already been removed */
        Vertex notYetDeleted = service.getDriver().loadVertexFor(objectVertexId, service.getContainedClass().getName());
        if(notYetDeleted!=null)
          database.removeVertex(notYetDeleted);
    }


    private void deleteSingle(AbstractBluePrintsBackedFinderService<? extends Graph, ?, ?> service, Graph database, Property p, Object toDelete, Vertex objectVertex, Collection<CascadeType> toCascade, Map<String, Object> objectsBeingAccessed) {
        // there should be only one vertex to delete
View Full Code Here

Examples of com.tinkerpop.blueprints.pgm.Graph.removeVertex()

            }
        }
        /* We try to locate vertex in graph before to delete it. Indeed, mainly due cascade delete, this vertex may have already been removed */
        Vertex notYetDeleted = service.getDriver().loadVertexFor(objectVertexId, service.getContainedClass().getName());
        if(notYetDeleted!=null)
          database.removeVertex(notYetDeleted);
    }


    /**
     * Delete value mapped by a single property.
View Full Code Here

Examples of com.tinkerpop.blueprints.pgm.Graph.removeVertex()

      } else {
        deleteSingle(service, database, p, toDelete, objectVertex, toCascade, objectsBeingAccessed);
      }
    }
    // What to do with incoming edges ?
    database.removeVertex(objectVertex);
  }


  private void deleteSingle(AbstractBluePrintsBackedFinderService<? extends Graph, ?, ?> service, Graph database, Property p, Object toDelete, Vertex objectVertex, Collection<CascadeType> toCascade, Map<String, Object> objectsBeingAccessed) {
    // there should be only one vertex to delete
View Full Code Here

Examples of com.tinkerpop.blueprints.pgm.Graph.removeVertex()

      } else {
        deleteSingle(service, database, p, toDelete, objectVertex, toCascade, objectsBeingAccessed);
      }
    }
    // What to do with incoming edges ?
    database.removeVertex(objectVertex);
  }


  private void deleteSingle(AbstractBluePrintsBackedFinderService<? extends Graph, ?, ?> service, Graph database, Property p, Object toDelete, Vertex objectVertex, Collection<CascadeType> toCascade, Map<String, Object> objectsBeingAccessed) {
    // there should be only one vertex to delete
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.