Package com.tinkerpop.gremlin.java

Examples of com.tinkerpop.gremlin.java.GremlinPipeline


    public void testCompliance() {
        ComplianceTest.testCompliance(this.getClass());
    }

    public void test_g_v1_out_ifThenElseXlang_eq_java__it__outX_name() {
        super.test_g_v1_out_ifThenElseXlang_eq_java__it__outX_name(new GremlinPipeline(g.getVertex(1)).out().ifThenElse(new PipeFunction<Vertex, Boolean>() {
                                                                                                                            public Boolean compute(Vertex vertex) {
                                                                                                                                return vertex.getProperty("lang") != null && vertex.getProperty("lang").equals("java");
                                                                                                                            }
                                                                                                                        }, new PipeFunction<Vertex, Vertex>() {
                                                                                                                            public Vertex compute(Vertex vertex) {
                                                                                                                                return vertex;
                                                                                                                            }
                                                                                                                        }, new PipeFunction<Vertex, Iterable<Vertex>>() {
                                                                                                                            public Iterable<Vertex> compute(Vertex vertex) {
                                                                                                                                return new GremlinPipeline(vertex).out();
                                                                                                                            }
                                                                                                                        }
        ));

        super.test_g_v1_out_ifThenElseXlang_eq_java__it__outX_name(new GremlinPipeline(g.getVertex(1)).optimize(false).out().ifThenElse(new PipeFunction<Vertex, Boolean>() {
                                                                                                                                            public Boolean compute(Vertex vertex) {
                                                                                                                                                return vertex.getProperty("lang") != null && vertex.getProperty("lang").equals("java");
                                                                                                                                            }
                                                                                                                                        }, new PipeFunction<Vertex, Vertex>() {
                                                                                                                                            public Vertex compute(Vertex vertex) {
                                                                                                                                                return vertex;
                                                                                                                                            }
                                                                                                                                        }, new PipeFunction<Vertex, Iterable<Vertex>>() {
                                                                                                                                            public Iterable<Vertex> compute(Vertex vertex) {
                                                                                                                                                return new GremlinPipeline(vertex).out();
                                                                                                                                            }
                                                                                                                                        }
        ));
    }
View Full Code Here


    public void testCompliance() {
        ComplianceTest.testCompliance(this.getClass());
    }

    public void test_g_V_propertyXnameX_store_cap() {
        super.test_g_V_propertyXnameX_store_cap(new GremlinPipeline(g).V().property("name").store().cap());
        super.test_g_V_propertyXnameX_store_cap(new GremlinPipeline(g).optimize(false).V().property("name").store().cap());
    }
View Full Code Here

        super.test_g_V_propertyXnameX_store_cap(new GremlinPipeline(g).V().property("name").store().cap());
        super.test_g_V_propertyXnameX_store_cap(new GremlinPipeline(g).optimize(false).V().property("name").store().cap());
    }

    public void test_g_V_storeXnameX_cap() {
        super.test_g_V_storeXnameX_cap(new GremlinPipeline(g.getVertices()).store(new PipeFunction<Vertex, String>() {
            public String compute(Vertex vertex) {
                return (String) vertex.getProperty("name");
            }
        }).cap());

        super.test_g_V_storeXnameX_cap(new GremlinPipeline(g).optimize(false).V().store(new PipeFunction<Vertex, String>() {
            public String compute(Vertex vertex) {
                return (String) vertex.getProperty("name");
            }
        }).cap());
    }
View Full Code Here

    public void testCompliance() {
        ComplianceTest.testCompliance(this.getClass());
    }

    public void test_g_V_filterXfalseX() {
        super.test_g_V_filterXfalseX(new GremlinPipeline(g.getVertices()).filter(new PipeFunction<Vertex, Boolean>() {
            public Boolean compute(Vertex vertex) {
                return false;
            }
        }));

        super.test_g_V_filterXfalseX(new GremlinPipeline(g).optimize(false).V().filter(new PipeFunction<Vertex, Boolean>() {
            public Boolean compute(Vertex vertex) {
                return false;
            }
        }));
    }
View Full Code Here

    public void testCompliance() {
        ComplianceTest.testCompliance(this.getClass());
    }

    public void test_g_v1_out_loopX1_loops_lt_3X_propertyXnameX() {
        super.test_g_v1_out_loopX1_loops_lt_3X_propertyXnameX(new GremlinPipeline(g.getVertex(1)).out().loop(1, new PipeFunction<LoopPipe.LoopBundle, Boolean>() {
            public Boolean compute(LoopPipe.LoopBundle bundle) {
                return bundle.getLoops() < 3;
            }
        }).property("name"));

        super.test_g_v1_out_loopX1_loops_lt_3X_propertyXnameX(new GremlinPipeline(g.getVertex(1)).optimize(false).out().loop(1, new PipeFunction<LoopPipe.LoopBundle, Boolean>() {
            public Boolean compute(LoopPipe.LoopBundle bundle) {
                return bundle.getLoops() < 3;
            }
        }).property("name"));
    }
View Full Code Here

            }
        }).property("name"));
    }

    public void test_g_v1_asXhereX_out_loopXhere_loops_lt_3X_propertyXnameX() {
        super.test_g_v1_asXhereX_out_loopXhere_loops_lt_3X_propertyXnameX(new GremlinPipeline(g.getVertex(1)).as("here").out().loop("here", new PipeFunction<LoopPipe.LoopBundle, Boolean>() {
            public Boolean compute(LoopPipe.LoopBundle bundle) {
                return bundle.getLoops() < 3;
            }
        }).property("name"));

        super.test_g_v1_asXhereX_out_loopXhere_loops_lt_3X_propertyXnameX(new GremlinPipeline(g.getVertex(1)).optimize(false).as("here").out().loop("here", new PipeFunction<LoopPipe.LoopBundle, Boolean>() {
            public Boolean compute(LoopPipe.LoopBundle bundle) {
                return bundle.getLoops() < 3;
            }
        }).property("name"));
    }
View Full Code Here

            }
        }));
    }

    public void test_g_V_filterXtrueX() {
        super.test_g_V_filterXtrueX(new GremlinPipeline(g).V().filter(new PipeFunction<Vertex, Boolean>() {
            public Boolean compute(Vertex vertex) {
                return true;
            }
        }));

        super.test_g_V_filterXtrueX(new GremlinPipeline(g.getVertices()).optimize(false).filter(new PipeFunction<Vertex, Boolean>() {
            public Boolean compute(Vertex vertex) {
                return true;
            }
        }));
    }
View Full Code Here

            }
        }).property("name"));
    }

    public void test_g_V_out_loopX1_loops_lt_3X_propertyXnameX() {
        super.test_g_V_out_loopX1_loops_lt_3X_propertyXnameX(new GremlinPipeline(g.getVertices()).out().loop(1, new PipeFunction<LoopPipe.LoopBundle, Boolean>() {
            public Boolean compute(LoopPipe.LoopBundle bundle) {
                return bundle.getLoops() < 3;
            }
        }).property("name"));

        super.test_g_V_out_loopX1_loops_lt_3X_propertyXnameX(new GremlinPipeline(g).optimize(false).V().out().loop(1, new PipeFunction<LoopPipe.LoopBundle, Boolean>() {
            public Boolean compute(LoopPipe.LoopBundle bundle) {
                return bundle.getLoops() < 3;
            }
        }).property("name"));
    }
View Full Code Here

            }
        }));
    }

    public void test_g_V_filterXlang_eq_javaX() {
        super.test_g_V_filterXlang_eq_javaX(new GremlinPipeline(g.getVertices()).filter(new PipeFunction<Vertex, Boolean>() {
            public Boolean compute(Vertex vertex) {
                String lang = (String) vertex.getProperty("lang");
                return lang != null && lang.equals("java");
            }
        }));

        super.test_g_V_filterXlang_eq_javaX(new GremlinPipeline(g).optimize(false).V().filter(new PipeFunction<Vertex, Boolean>() {
            public Boolean compute(Vertex vertex) {
                String lang = (String) vertex.getProperty("lang");
                return lang != null && lang.equals("java");
            }
        }));
View Full Code Here

            }
        }));
    }

    public void test_g_v1_out_filterXage_gt_30X() {
        super.test_g_v1_out_filterXage_gt_30X(new GremlinPipeline(g.getVertex(1)).out().filter(new PipeFunction<Vertex, Boolean>() {
            public Boolean compute(Vertex vertex) {
                Integer age = (Integer) vertex.getProperty("age");
                return age != null && age > 30;
            }
        }));

        super.test_g_v1_out_filterXage_gt_30X(new GremlinPipeline(g.getVertex(1)).optimize(false).out().filter(new PipeFunction<Vertex, Boolean>() {
            public Boolean compute(Vertex vertex) {
                Integer age = (Integer) vertex.getProperty("age");
                return age != null && age > 30;
            }
        }));
View Full Code Here

TOP

Related Classes of com.tinkerpop.gremlin.java.GremlinPipeline

Copyright © 2018 www.massapicom. 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.