Package com.tinkerpop.gremlin.structure

Examples of com.tinkerpop.gremlin.structure.Edge.property()


                assertNotNull(UUID.fromString(e.property(strategy.getIdKey()).value().toString()));
                assertEquals("this", e.property("try").value());

                final Edge found = g.e(e.id());
                assertNotNull(UUID.fromString(found.id().toString()));
                assertNotNull(UUID.fromString(found.property(strategy.getIdKey()).value().toString()));
                assertEquals("this", found.property("try").value());
            });
        }
    }
View Full Code Here


                assertEquals("this", e.property("try").value());

                final Edge found = g.e(e.id());
                assertNotNull(UUID.fromString(found.id().toString()));
                assertNotNull(UUID.fromString(found.property(strategy.getIdKey()).value().toString()));
                assertEquals("this", found.property("try").value());
            });
        }
    }

    public static class VertexIdMakerIdGraphStrategyTest extends AbstractGremlinTest {
View Full Code Here

            final Vertex v = g.addVertex("something", "else");
            final Edge e = v.addEdge("self", v, "try", "this");
            tryCommit(g, c -> {
                assertNotNull(e);
                assertEquals("100", e.id());
                assertEquals("100", e.property(strategy.getIdKey()).value());
                assertEquals("this", e.property("try").value());

                final Edge found = g.e("100");
                assertEquals("100", found.id());
                assertEquals("100", found.property(strategy.getIdKey()).value());
View Full Code Here

            final Edge e = v.addEdge("self", v, "try", "this");
            tryCommit(g, c -> {
                assertNotNull(e);
                assertEquals("100", e.id());
                assertEquals("100", e.property(strategy.getIdKey()).value());
                assertEquals("this", e.property("try").value());

                final Edge found = g.e("100");
                assertEquals("100", found.id());
                assertEquals("100", found.property(strategy.getIdKey()).value());
                assertEquals("this", found.property("try").value());
View Full Code Here

                assertEquals("100", e.property(strategy.getIdKey()).value());
                assertEquals("this", e.property("try").value());

                final Edge found = g.e("100");
                assertEquals("100", found.id());
                assertEquals("100", found.property(strategy.getIdKey()).value());
                assertEquals("this", found.property("try").value());
            });
        }
    }
View Full Code Here

                assertEquals("this", e.property("try").value());

                final Edge found = g.e("100");
                assertEquals("100", found.id());
                assertEquals("100", found.property(strategy.getIdKey()).value());
                assertEquals("this", found.property("try").value());
            });
        }
    }

    public static class VertexIdNotSupportedIdGraphStrategyTest extends AbstractGremlinTest {
View Full Code Here

                assertNotNull(iae);
            }

            try {
                final Edge e = v.addEdge("self", v, T.id, o, "something", "else");
                e.property(strategy.getIdKey(), "this should toss and exception as supportsVertexId=false");
                fail("An exception should be tossed here because supportsEdgeId=true");
            } catch (IllegalArgumentException iae) {
                assertNotNull(iae);
            }
        }
View Full Code Here

    public void serializeEdge() throws Exception {
        final Graph g = TinkerGraph.open();
        final Vertex v1 = g.addVertex();
        final Vertex v2 = g.addVertex();
        final Edge e = v1.addEdge("test", v2);
        e.property("abc", 123);

        final Iterable<Edge> iterable = g.E().toList();
        final String results = SERIALIZER.serializeResponseAsString(ResponseMessage.build(msg).result(iterable).create());

        final JSONObject json = new JSONObject(results);
View Full Code Here

            }
        }

        final Edge e = outV.addEdge(detachedEdge.label(), inV, T.id, detachedEdge.id());
        detachedEdge.properties.entrySet().forEach(kv ->
                        kv.getValue().forEach(p -> e.<Object>property(kv.getKey(), p.value()))
        );

        return e;
    }
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.