Examples of writeVertex()


Examples of com.thinkaurelius.faunus.formats.rexster.util.VertexToFaunusBinary.writeVertex()

                final DataOutputStream dos = new DataOutputStream(out);

                final Iterable<Vertex> vertices = graph.getVertices();
                for (Vertex vertex : vertices) {
                    if (counter >= start && counter < end) {
                        vertexToFaunusBinary.writeVertex(vertex, dos);

                        if (logger.isDebugEnabled() && counter % WRITE_STATUS_EVERY == 0) {
                            logger.debug(String.format("Request [%s] at [%s] on the way to [%s].",
                                    requestIdentifier, vertexCount, verticesInSplit));
                        }
View Full Code Here

Examples of com.tinkerpop.gremlin.structure.io.graphson.GraphSONWriter.writeVertex()

        final Vertex v2 = g.addVertex();
        v1.addEdge("friends", v2, "weight", 0.5f);

        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
            final GraphSONWriter writer = GraphSONWriter.build().customModule(graphProvider.createConfiguredGraphSONModule()).create();
            writer.writeVertex(os, v1);

            final AtomicBoolean called = new AtomicBoolean(false);
            final GraphSONReader reader = GraphSONReader.build().customModule(graphProvider.createConfiguredGraphSONModule()).create();
            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
                reader.readVertex(bais, detachedVertex -> {
View Full Code Here

Examples of com.tinkerpop.gremlin.structure.io.graphson.GraphSONWriter.writeVertex()

        v1.addEdge("friends", v2, "weight", 0.5f);

        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
            final GraphSONWriter writer = GraphSONWriter.build().customModule(graphProvider.createConfiguredGraphSONModule()).create();
            final DetachedVertex dv = DetachedVertex.detach(v1);
            writer.writeVertex(os, dv);

            final AtomicBoolean called = new AtomicBoolean(false);
            final GraphSONReader reader = GraphSONReader.build().customModule(graphProvider.createConfiguredGraphSONModule()).create();
            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
                reader.readVertex(bais, detachedVertex -> {
View Full Code Here

Examples of com.tinkerpop.gremlin.structure.io.graphson.GraphSONWriter.writeVertex()

        v1.addEdge("friends", v2, "weight", 0.5f);

        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
            final GraphSONWriter writer = GraphSONWriter.build().customModule(graphProvider.createConfiguredGraphSONModule()).create();
            final DetachedVertex dv = DetachedVertex.detach(v1, true);
            writer.writeVertex(os, dv);

            final AtomicBoolean called = new AtomicBoolean(false);
            final GraphSONReader reader = GraphSONReader.build().customModule(graphProvider.createConfiguredGraphSONModule()).create();
            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
                reader.readVertex(bais, detachedVertex -> {
View Full Code Here

Examples of com.tinkerpop.gremlin.structure.io.graphson.GraphSONWriter.writeVertex()

        final Vertex v2 = g.addVertex();
        v1.addEdge("friends", v2, "weight", 0.5d);

        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
            final GraphSONWriter writer = GraphSONWriter.build().customModule(graphProvider.createConfiguredGraphSONModule()).create();
            writer.writeVertex(os, v1);

            final AtomicBoolean called = new AtomicBoolean(false);
            final GraphSONReader reader = GraphSONReader.build().customModule(graphProvider.createConfiguredGraphSONModule()).create();
            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
                reader.readVertex(bais, detachedVertex -> {
View Full Code Here

Examples of com.tinkerpop.gremlin.structure.io.graphson.GraphSONWriter.writeVertex()

        final Vertex v2 = g.addVertex(T.label, "person");
        final Edge e = v1.addEdge("friends", v2, "weight", 0.5f);

        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
            final GraphSONWriter writer = GraphSONWriter.build().customModule(graphProvider.createConfiguredGraphSONModule()).create();
            writer.writeVertex(os, v1, Direction.OUT);

            final AtomicBoolean calledVertex = new AtomicBoolean(false);
            final AtomicBoolean calledEdge = new AtomicBoolean(false);
            final GraphSONReader reader = GraphSONReader.build().customModule(graphProvider.createConfiguredGraphSONModule()).create();
            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
View Full Code Here

Examples of com.tinkerpop.gremlin.structure.io.graphson.GraphSONWriter.writeVertex()

        final Vertex v2 = g.addVertex(T.label, "person");
        final Edge e = v2.addEdge("friends", v1, "weight", 0.5f);

        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
            final GraphSONWriter writer = GraphSONWriter.build().customModule(graphProvider.createConfiguredGraphSONModule()).create();
            writer.writeVertex(os, v1, Direction.IN);
            os.close();

            final AtomicBoolean calledVertex = new AtomicBoolean(false);
            final AtomicBoolean calledEdge = new AtomicBoolean(false);
            final GraphSONReader reader = GraphSONReader.build().customModule(graphProvider.createConfiguredGraphSONModule()).create();
View Full Code Here

Examples of com.tinkerpop.gremlin.structure.io.graphson.GraphSONWriter.writeVertex()

        final Edge e1 = v2.addEdge("friends", v1, "weight", 0.5f);
        final Edge e2 = v1.addEdge("friends", v2, "weight", 1.0f);

        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
            final GraphSONWriter writer = GraphSONWriter.build().customModule(graphProvider.createConfiguredGraphSONModule()).create();
            writer.writeVertex(os, v1, Direction.BOTH);

            final AtomicBoolean vertexCalled = new AtomicBoolean(false);
            final AtomicBoolean edge1Called = new AtomicBoolean(false);
            final AtomicBoolean edge2Called = new AtomicBoolean(false);
View Full Code Here

Examples of com.tinkerpop.gremlin.structure.io.graphson.GraphSONWriter.writeVertex()

        final Edge e2 = v1.addEdge("friends", v2, "weight", 1.0f);

        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
            final GraphSONWriter writer = GraphSONWriter.build()
                    .customModule(graphProvider.createConfiguredGraphSONModule()).embedTypes(true).create();
            writer.writeVertex(os, v1, Direction.BOTH);

            final AtomicBoolean vertexCalled = new AtomicBoolean(false);
            final AtomicBoolean edge1Called = new AtomicBoolean(false);
            final AtomicBoolean edge2Called = new AtomicBoolean(false);
View Full Code Here

Examples of com.tinkerpop.gremlin.structure.io.graphson.GraphSONWriter.writeVertex()

        final Edge e1 = v2.addEdge("friends", v1, "weight", 0.5f);
        v1.addEdge("friends", v2, "weight", 1.0f);

        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
            final GraphSONWriter writer = GraphSONWriter.build().customModule(graphProvider.createConfiguredGraphSONModule()).create();
            writer.writeVertex(os, v1, Direction.BOTH);

            final AtomicBoolean vertexCalled = new AtomicBoolean(false);
            final AtomicBoolean edgeCalled = new AtomicBoolean(false);

            final GraphSONReader reader = GraphSONReader.build().customModule(graphProvider.createConfiguredGraphSONModule()).create();
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.