Package com.tinkerpop.blueprints

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


            assertEquals(edgeLabels.size(), 2);
            assertEquals(edgeLabels.contains("has high fived"), true);
            assertEquals(edgeLabels.contains("knows"), false);
            assertEquals(edgeLabels.contains("created"), true);
        }
        graph.shutdown();
    }

    public void testReadingTinkerGraphExample3MappingIDs() throws Exception {
        Graph graph = graphTest.generateGraph();
        if (graph.getFeatures().supportsEdgeIteration && graph.getFeatures().supportsVertexIteration) {
View Full Code Here


            assertEquals(edgeLabels.size(), 2);
            assertEquals(edgeLabels.contains("has high fived"), false);
            assertEquals(edgeLabels.contains("knows"), true);
            assertEquals(edgeLabels.contains("created"), true);
        }
        graph.shutdown();
    }

    public void testReadingTinkerGraphExample3MappingAll() throws Exception {
        Graph graph = graphTest.generateGraph();
        if (graph.getFeatures().supportsEdgeIteration && graph.getFeatures().supportsVertexIteration) {
View Full Code Here

            assertEquals(edgeLabels.size(), 2);
            assertEquals(edgeLabels.contains("has high fived"), true);
            assertEquals(edgeLabels.contains("knows"), false);
            assertEquals(edgeLabels.contains("created"), true);
        }
        graph.shutdown();
    }

    public void testMigratingTinkerGraphExample3() throws Exception {
        Graph graph = graphTest.generateGraph();
        if (!graph.getFeatures().ignoresSuppliedIds && graph.getFeatures().supportsEdgeIteration && graph.getFeatures().supportsVertexIteration) {
View Full Code Here

                vertices.add(e.getVertex(Direction.OUT));
            }
            assertEquals(vertices.size(), 1);
            assertTrue(vertices.contains(josh));
        }
        graph.shutdown();
    }
}
View Full Code Here

            new GraphSONWriter(graph).outputGraph(baos, null, null, GraphSONMode.NORMAL, true);
            final String writtenGraphSON = new String(baos.toByteArray());

            assertEquals(readGraphSON, writtenGraphSON);
        }
        graph.shutdown();
    }

    static String readFile(final InputStream inputStream, final Charset encoding) throws IOException {
        byte[] encoded = toByteArray(inputStream);
        return encoding.decode(ByteBuffer.wrap(encoded)).toString();
View Full Code Here

            assertEquals(softwareVertices.size(), 2);
            for (Vertex v : softwareVertices) {
                assertEquals(v.getProperty("lang"), "java");
            }
        }
        graph.shutdown();
    }

    public void testTinkerGraphVertexAndEdges() throws Exception {
        Graph graph = this.graphTest.generateGraph();
        if (graph.getFeatures().supportsVertexIteration) {
View Full Code Here

                vertices.add(e.getVertex(Direction.OUT));
            }
            assertEquals(vertices.size(), 1);
            assertTrue(vertices.contains(josh));
        }
        graph.shutdown();
    }

    public void testReadingTinkerGraphExample3() throws Exception {
        Graph graph = this.graphTest.generateGraph();
        if (!graph.getFeatures().ignoresSuppliedIds && graph.getFeatures().supportsEdgeIteration && graph.getFeatures().supportsVertexIteration) {
View Full Code Here

            assertEquals(edgeKeys.contains("weight"), true);
            assertEquals(edgeKeys.contains("_id"), true);
            assertEquals(edgeKeys.contains("_label"), true);
            assertEquals(edgeKeys.size(), 3);
        }
        graph.shutdown();
    }

    public void testReadingTinkerGraphExample3MappingLabels() throws Exception {
        Graph graph = this.graphTest.generateGraph();
        if (graph.getFeatures().supportsEdgeIteration && graph.getFeatures().supportsVertexIteration) {
View Full Code Here

            assertEquals(edgeLabels.size(), 2);
            assertEquals(edgeLabels.contains("has high fived"), true);
            assertEquals(edgeLabels.contains("knows"), false);
            assertEquals(edgeLabels.contains("created"), true);
        }
        graph.shutdown();
    }

    public void testReadingTinkerGraphExample3MappingIDs() throws Exception {
        Graph graph = this.graphTest.generateGraph();
        if (graph.getFeatures().supportsEdgeIteration && graph.getFeatures().supportsVertexIteration) {
View Full Code Here

            assertEquals(edgeLabels.size(), 2);
            assertEquals(edgeLabels.contains("has high fived"), false);
            assertEquals(edgeLabels.contains("knows"), true);
            assertEquals(edgeLabels.contains("created"), true);
        }
        graph.shutdown();
    }

    public void testReadingTinkerGraphExample3MappingAll() throws Exception {
        Graph graph = this.graphTest.generateGraph();
        if (graph.getFeatures().supportsEdgeIteration && graph.getFeatures().supportsVertexIteration) {
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.