Package com.tinkerpop.blueprints.impls.neo4j2

Examples of com.tinkerpop.blueprints.impls.neo4j2.Neo4j2Graph.shutdown()


                assertEquals(e.getLabel(), "created");
                counter++;
            }
        }
        assertEquals(counter, 2);
        graph.shutdown();
    }

    public void testIndexParameters() throws Exception {
        final String directory = this.getWorkingDirectory();
        final Neo4j2BatchGraph batch = new Neo4j2BatchGraph(directory);
View Full Code Here


            counter++;
            assertEquals(itty.next().getProperty("name"), "marko");
        }
        assertEquals(counter, 1);

        graph.shutdown();
    }

    private String getWorkingDirectory() {
        String directory = this.computeTestDataRoot().getAbsolutePath();
        deleteDirectory(new File(directory));
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

        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

            assertEquals(edgeIndex.count("unique", idA + "-" + idB), 1);
            assertEquals(edgeIndex.get("unique", idA + "-" + idB).iterator().next(), edge);
            assertTrue(edges.contains(edge));
        }

        graph.shutdown();
    }

    public void testElementPropertyManipulation() {
        final String directory = this.getWorkingDirectory();
        final Neo4j2BatchGraph batch = new Neo4j2BatchGraph(directory);
View Full Code Here

            Edge edge = graph.getEdge(id);
            assertNull(edge.getProperty("blah"));
            assertEquals(edge.getPropertyKeys().size(), 1);
            assertEquals(edge.getProperty("weight"), 0.5);
        }
        graph.shutdown();

    }

    public void testToStringMethods() {
        final String directory = this.getWorkingDirectory();
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.