APISonar


org.apache.tinkerpop.gremlin.structure.Graph.io

> org > apache > tinkerpop > gremlin > structure > Graph > io
org APIs apache APIs tinkerpop APIs gremlin APIs structure APIs Graph APIs io APIs

Example 1
protected void readIntoGraph(final Graph g, final String path) throws IOException {
        final GraphReader reader = GryoReader.build()
                .mapper(g.io(GryoIo.build()).mapper().create())
                .create();
        try (final InputStream stream = AbstractGremlinTest.class.getResourceAsStream(path)) {
            reader.readGraph(stream, g);
        }
    }
Example 2
public void testPlayDK() throws Exception {

        Graph graph = TinkerGraph.open();
        GraphTraversalSource g = graph.traversal();
        graph.io(GraphMLIo.build()).readGraph("/projects/apache/tinkerpop/data/grateful-dead.xml");
        System.out.println(g.V().filter(outE("sungBy").count().is(0)).explain());
        System.out.println(g.V().filter(outE("sungBy").count().is(lt(1))).explain());
        System.out.println(g.V().filter(outE("sungBy").count().is(1)).explain());
    }