Examples of iterators()


Examples of com.tinkerpop.gremlin.structure.Vertex.iterators()

        final Vertex vertexBeforeTx = client.submit("v=g.addVertex(\"name\",\"stephen\")").all().get().get(0).getVertex();
        assertEquals("stephen", vertexBeforeTx.iterators().valueIterator("name").next());

        final Vertex vertexFromV = client.submit("g.V().next()").all().get().get(0).getVertex();
        assertEquals("stephen", vertexFromV.iterators().valueIterator("name").next());

        final Vertex vertexFromBinding = client.submit("v").all().get().get(0).getVertex();
        assertEquals("stephen", vertexFromBinding.iterators().valueIterator("name").next());

        final Vertex vertexAfterTx = client.submit("v.property(\"color\",\"blue\"); g.tx().commit(); v").all().get().get(0).getVertex();
View Full Code Here

Examples of com.tinkerpop.gremlin.structure.Vertex.iterators()

        final Vertex vertexFromV = client.submit("g.V().next()").all().get().get(0).getVertex();
        assertEquals("stephen", vertexFromV.iterators().valueIterator("name").next());

        final Vertex vertexFromBinding = client.submit("v").all().get().get(0).getVertex();
        assertEquals("stephen", vertexFromBinding.iterators().valueIterator("name").next());

        final Vertex vertexAfterTx = client.submit("v.property(\"color\",\"blue\"); g.tx().commit(); v").all().get().get(0).getVertex();
        assertEquals("stephen", vertexAfterTx.iterators().valueIterator("name").next());
        assertEquals("blue", vertexAfterTx.iterators().valueIterator("color").next());
View Full Code Here

Examples of com.tinkerpop.gremlin.structure.Vertex.iterators()

        final Vertex vertexFromBinding = client.submit("v").all().get().get(0).getVertex();
        assertEquals("stephen", vertexFromBinding.iterators().valueIterator("name").next());

        final Vertex vertexAfterTx = client.submit("v.property(\"color\",\"blue\"); g.tx().commit(); v").all().get().get(0).getVertex();
        assertEquals("stephen", vertexAfterTx.iterators().valueIterator("name").next());
        assertEquals("blue", vertexAfterTx.iterators().valueIterator("color").next());

        cluster.close();
    }
View Full Code Here

Examples of com.tinkerpop.gremlin.structure.Vertex.iterators()

        final Vertex vertexFromBinding = client.submit("v").all().get().get(0).getVertex();
        assertEquals("stephen", vertexFromBinding.iterators().valueIterator("name").next());

        final Vertex vertexAfterTx = client.submit("v.property(\"color\",\"blue\"); g.tx().commit(); v").all().get().get(0).getVertex();
        assertEquals("stephen", vertexAfterTx.iterators().valueIterator("name").next());
        assertEquals("blue", vertexAfterTx.iterators().valueIterator("color").next());

        cluster.close();
    }

    @Test
View Full Code Here

Examples of com.tinkerpop.gremlin.structure.Vertex.iterators()

            output.writeBoolean(direction != null);
            if (direction != null) {
                final Vertex v = (Vertex) e;
                kryo.writeObject(output, direction);
                if (direction == Direction.BOTH || direction == Direction.OUT)
                    writeDirectionalEdges(output, Direction.OUT, v.iterators().edgeIterator(Direction.OUT));

                if (direction == Direction.BOTH || direction == Direction.IN)
                    writeDirectionalEdges(output, Direction.IN, v.iterators().edgeIterator(Direction.IN));
            }
View Full Code Here

Examples of com.tinkerpop.gremlin.structure.Vertex.iterators()

                kryo.writeObject(output, direction);
                if (direction == Direction.BOTH || direction == Direction.OUT)
                    writeDirectionalEdges(output, Direction.OUT, v.iterators().edgeIterator(Direction.OUT));

                if (direction == Direction.BOTH || direction == Direction.IN)
                    writeDirectionalEdges(output, Direction.IN, v.iterators().edgeIterator(Direction.IN));
            }

            kryo.writeClassAndObject(output, VertexTerminator.INSTANCE);
        }
    }
View Full Code Here

Examples of com.tinkerpop.gremlin.structure.VertexProperty.iterators()

                        && (p.id().equals(123) || p.id().equals(124))
                        && (p.value().equals("a") || p.value().equals("c"))));

        // there should be only one with properties on properties
        final VertexProperty propertyOnProperty = propertyX.stream().filter(p -> p.iterators().propertyIterator().hasNext()).findAny().get();
        assertEquals("a", propertyOnProperty.iterators().propertyIterator("propX1a").next().value());
        assertEquals(1, propertyOnProperty.iterators().propertyIterator("propX11").next().value());
        assertEquals(123.01d, propertyOnProperty.iterators().propertyIterator("same").next().value());
        assertEquals("something", propertyOnProperty.iterators().propertyIterator("extra").next().value());
        assertEquals(4, StreamFactory.stream(propertyOnProperty.iterators().propertyIterator()).count());
        assertEquals("ha", propertyOnProperty.iterators().hiddenPropertyIterator("propX1ha").next().value());
View Full Code Here

Examples of com.tinkerpop.gremlin.structure.VertexProperty.iterators()

                        && (p.value().equals("a") || p.value().equals("c"))));

        // there should be only one with properties on properties
        final VertexProperty propertyOnProperty = propertyX.stream().filter(p -> p.iterators().propertyIterator().hasNext()).findAny().get();
        assertEquals("a", propertyOnProperty.iterators().propertyIterator("propX1a").next().value());
        assertEquals(1, propertyOnProperty.iterators().propertyIterator("propX11").next().value());
        assertEquals(123.01d, propertyOnProperty.iterators().propertyIterator("same").next().value());
        assertEquals("something", propertyOnProperty.iterators().propertyIterator("extra").next().value());
        assertEquals(4, StreamFactory.stream(propertyOnProperty.iterators().propertyIterator()).count());
        assertEquals("ha", propertyOnProperty.iterators().hiddenPropertyIterator("propX1ha").next().value());
        assertEquals(11, propertyOnProperty.iterators().hiddenPropertyIterator("propX1h1").next().value());
View Full Code Here

Examples of com.tinkerpop.gremlin.structure.VertexProperty.iterators()

        // there should be only one with properties on properties
        final VertexProperty propertyOnProperty = propertyX.stream().filter(p -> p.iterators().propertyIterator().hasNext()).findAny().get();
        assertEquals("a", propertyOnProperty.iterators().propertyIterator("propX1a").next().value());
        assertEquals(1, propertyOnProperty.iterators().propertyIterator("propX11").next().value());
        assertEquals(123.01d, propertyOnProperty.iterators().propertyIterator("same").next().value());
        assertEquals("something", propertyOnProperty.iterators().propertyIterator("extra").next().value());
        assertEquals(4, StreamFactory.stream(propertyOnProperty.iterators().propertyIterator()).count());
        assertEquals("ha", propertyOnProperty.iterators().hiddenPropertyIterator("propX1ha").next().value());
        assertEquals(11, propertyOnProperty.iterators().hiddenPropertyIterator("propX1h1").next().value());
        assertEquals(321.01d, propertyOnProperty.iterators().hiddenPropertyIterator("same").next().value());
View Full Code Here

Examples of com.tinkerpop.gremlin.structure.VertexProperty.iterators()

        // there should be only one with properties on properties
        final VertexProperty propertyOnProperty = propertyX.stream().filter(p -> p.iterators().propertyIterator().hasNext()).findAny().get();
        assertEquals("a", propertyOnProperty.iterators().propertyIterator("propX1a").next().value());
        assertEquals(1, propertyOnProperty.iterators().propertyIterator("propX11").next().value());
        assertEquals(123.01d, propertyOnProperty.iterators().propertyIterator("same").next().value());
        assertEquals("something", propertyOnProperty.iterators().propertyIterator("extra").next().value());
        assertEquals(4, StreamFactory.stream(propertyOnProperty.iterators().propertyIterator()).count());
        assertEquals("ha", propertyOnProperty.iterators().hiddenPropertyIterator("propX1ha").next().value());
        assertEquals(11, propertyOnProperty.iterators().hiddenPropertyIterator("propX1h1").next().value());
        assertEquals(321.01d, propertyOnProperty.iterators().hiddenPropertyIterator("same").next().value());
        assertEquals(3, StreamFactory.stream(propertyOnProperty.iterators().hiddenPropertyIterator()).count());
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.