Examples of removeVertex()


Examples of com.evelopers.unimod.glayout.graph.SimpleGraph.removeVertex()

        public void removeVertex(SimpleVertex v) {
            ListIterator li = graphs.listIterator();

            while (li.hasNext()) {
                SimpleGraph graph = (SimpleGraph) li.next();
                graph.removeVertex(v);
            }
        }

        public void addVertex(SimpleVertex v) {
            ListIterator li = graphs.listIterator();
View Full Code Here

Examples of com.evelopers.unimod.glayout.graph.containers.Face.removeVertex()

            sg.addEdge(se);
            f.addEdge(se);
            face.addEdge(se);
            face.addVertex(from);
            face.addVertex(to);
            face.removeVertex(v);
        }

        SimpleEdge[] edges = (SimpleEdge[]) v.getEdges()
                                             .toArray(new SimpleEdge[0]);
View Full Code Here

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

            assertTrue(false);
        } catch (UnsupportedOperationException e) {
            assertTrue(true);
        }
        try {
            graph.removeVertex(graph.getVertex(1));
            assertTrue(false);
        } catch (UnsupportedOperationException e) {
            assertTrue(true);
        }
        try {
View Full Code Here

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

                    for (final String key : keys) {
                        vertex.removeProperty(key);
                    }
                } else {
                    // delete vertex
                    graph.removeVertex(vertex);
                }
            } else {
                final String msg = "Vertex with [" + id + "] cannot be found.";
                logger.info(msg);
View Full Code Here

Examples of com.tinkerpop.blueprints.KeyIndexableGraph.removeVertex()

        Vertex v1 = graph.addVertex(null);
        v1.setProperty("foo", "42");
        vertexCount(graph, 1);

        graph.removeVertex(v1);
        vertexCount(graph, 0);
        assertEquals(0, count(graph.getVertices("foo", "42")));

        graph.shutdown();
    }
View Full Code Here

Examples of com.tinkerpop.blueprints.KeyIndexableGraph.removeVertex()

        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);
        }
View Full Code Here

Examples of com.tinkerpop.blueprints.MetaGraph.removeVertex()

        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);
        //         }
View Full Code Here

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

            final Object field = vertex.getProperty(keyFieldName);
            if (field != null)
              vertexCache.remove(field);
          }

          g.removeVertex(vertex);

          verticesRemoved.incrementAndGet();
        } finally {
          g.shutdown();
          endAsynchOperation();
View Full Code Here

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

    //retrieve the vertex associated to this node
    try{
      DbHelper.requestTransaction();
      OrientVertex vertex = db.getVertex(((ODocument)db.getRawGraph().load(rid))
                            .field(FIELD_LINK_TO_VERTEX));
      db.removeVertex(vertex);
      db.getRawGraph().delete(rid);
      DbHelper.commitTransaction();
    }catch (Throwable e){
      DbHelper.rollbackTransaction();
      throw e;
View Full Code Here

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

      // remove those foos in a transaction
      // Step 3a
      result = graph.getRawGraph().query(new OSQLSynchQuery<ODocument>("select * from Foo where address = 'test1'"));
      Assert.assertEquals(result.size(), 1);
      // Step 4a
      graph.removeVertex(graph.getVertex(result.get(0)));

      // Step 3b
      result = graph.getRawGraph().query(new OSQLSynchQuery<ODocument>("select * from Foo where address = 'test2'"));
      Assert.assertEquals(result.size(), 1);
      // Step 4b
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.