Package com.tinkerpop.blueprints

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


    Assert.assertEquals(0, count(v2.getEdges(v1, Direction.IN, "aaa")));
    Assert.assertEquals(1, count(v2.getEdges(v1, Direction.IN, "targets")));
    Assert.assertEquals(0, count(v2.getEdges(v1, Direction.IN, "bbb")));
    Assert.assertEquals(1, count(v2.getEdges(v1, Direction.IN)));

    graph.shutdown();
  }

  @Test
  public void testComplexMapProperty() throws Exception {
    // complex map properties have problems when unmarshalled from disk to
View Full Code Here


    ((TransactionalGraph) graph).commit();

    // have to shutdown the graph so that the map will read back out as an
    // OTrackedMap. Maps that exist in memory
    // do not show the problem.
    graph.shutdown();

    graph = graphTest.generateGraph("complex-map");

    final Vertex v1 = graph.getVertex(v.getId());
    assertNotNull(v1);
View Full Code Here

    // is that the keys/values in the OTrackedMap appear like this:
    // mobileTelephone=null:null
    final Map d = v1.getProperty("deliveryAddress");
    assertNotNull(d);
    assertTrue(d.containsKey("telefax"));
    graph.shutdown();
    //graphTest.dropGraph(((OrientGraphTest) graphTest).getWorkingDirectory() + "/complex-map");
  }
}
View Full Code Here

        assertNotNull(graph.getVertex(1L));
        assertNull(graph.getVertex(100L));
        assertNull(graph.getEdge(100L));

        graph.shutdown();
    }

    public void testAddingVerticesWithUserIdsThenSettingProperties() {
        List<Long> ids = new ArrayList<Long>(Arrays.asList(100L, 5L, 10L, 4L, 10000L));
        final String directory = this.getWorkingDirectory();
View Full Code Here

            assertEquals(graph.getVertex(id).getPropertyKeys().size(), 1);
        }
        assertNull(graph.getVertex(1L));
        assertNull(graph.getVertex(2L));
        assertNull(graph.getVertex(200000L));
        graph.shutdown();
    }

    public void testAddingVerticesWithUserIdsAsStringsThenSettingProperties() {
        List<Object> ids = new ArrayList<Object>(Arrays.asList(100L, 5.0d, "10", 4.0f, "10000.00"));
        final String directory = this.getWorkingDirectory();
View Full Code Here

    public void testSparkseeGraph() throws Exception {
        double totalTime = 0.0d;
        Graph graph = graphTest.generateGraph();
        GraphMLReader.inputGraph(graph, GraphMLReader.class.getResourceAsStream("graph-example-2.xml"));
        graph.shutdown();

        for (int i = 0; i < TOTAL_RUNS; i++) {
            graph = graphTest.generateGraph();
            this.stopWatch();
            int counter = 0;
View Full Code Here

            }
            vv.close();
            double currentTime = this.stopWatch();
            totalTime = totalTime + currentTime;
            BaseTest.printPerformance(graph.toString(), counter, "SparkseeGraph elements touched (run=" + i + ")", currentTime);
            graph.shutdown();
        }
        BaseTest.printPerformance("SparkseeGraph", 1, "SparkseeGraph experiment average", totalTime / (double) TOTAL_RUNS);
    }
}
View Full Code Here

        assertNotNull(graph.getVertex(5l));
        assertNotNull(graph.getVertex(10l));
        assertNotNull(graph.getVertex(4l));
        assertNotNull(graph.getVertex(10000));

        graph.shutdown();

    }

    public void testAddingVerticesEdgesWithIndices() {
        final String directory = this.getWorkingDirectory();
View Full Code Here

        } finally {
            assertTrue(excep);
        }

        printPerformance(graph.toString(), null, "testSparkseeVertexLabel", this.stopWatch());
        graph.shutdown();
    }

    public void testKeyIndex() {
        KeyIndexableGraph graph = (KeyIndexableGraph) graphTest.generateGraph();
        ((SparkseeGraph) graph).typeScope.set(true);
View Full Code Here

        for (Method method : testSuite.getClass().getDeclaredMethods()) {
            if (method.getName().startsWith("test")) {
                System.out.println("Testing " + method.getName() + "...");
                Graph graph = this.generateGraph();
                method.invoke(testSuite);
                graph.shutdown();
            }
        }
    }

    public Object convertId(final Object id) {
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.