Package com.tinkerpop.gremlin.structure

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


                            final Vertex v = f.apply(args);
                            // this  means that the next strategy and those below it executed including
                            // the implementation
                            assertEquals("working2", v.property("anonymous").value());
                            // now do something with that vertex after the fact
                            v.properties("anonymous").remove();
                            v.property("anonymous", "working1");
                            return v;
                        };

                    }
View Full Code Here


                            final Vertex v = f.apply(args);
                            // this  means that the next strategy and those below it executed including
                            // the implementation
                            assertEquals("working3", v.property("anonymous").value());
                            // now do something with that vertex after the fact
                            v.properties("anonymous").remove();
                            v.property("anonymous", "working2");
                            return v;
                        };
                    }
                },
View Full Code Here

                @Override
                public UnaryOperator<Supplier<Void>> getRemoveVertexStrategy(final Strategy.Context<StrategyWrappedVertex> ctx) {
                    return (t) -> () -> {
                        final Vertex v = ctx.getCurrent().getBaseVertex();
                        v.bothE().remove();
                        v.properties().forEachRemaining(Property::remove);
                        v.property("deleted", true);
                        return null;
                    };
                }
            });
View Full Code Here

            });

            final Vertex toRemove = g.addVertex("name", "pieter");
            toRemove.addEdge("likes", g.addVertex("feature", "Strategy"));

            assertEquals(1, toRemove.properties().count().next().intValue());
            assertEquals(new Long(1), toRemove.bothE().count().next());
            assertFalse(toRemove.property("deleted").isPresent());

            swg.v(toRemove.id()).remove();
View Full Code Here

            swg.v(toRemove.id()).remove();

            final Vertex removed = g.v(toRemove.id());
            assertNotNull(removed);
            assertEquals(1, removed.properties().count().next().intValue());
            assertEquals(new Long(0), removed.bothE().count().next());
            assertTrue(removed.property("deleted").isPresent());
        }

        @Test
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.