Search in sources :

Example 11 with GremlinPipeline

use of com.tinkerpop.gremlin.java.GremlinPipeline in project gremlin by tinkerpop.

the class TraversalStepsTest method test_g_v1_outXknows_createdX.

public void test_g_v1_outXknows_createdX() {
    super.test_g_v1_outXknows_createdX(new GremlinPipeline(g.getVertex(1)).out("knows", "created"));
    super.test_g_v1_outXknows_createdX(new GremlinPipeline(g.getVertex(1)).optimize(false).out("knows", "created"));
}
Also used : GremlinPipeline(com.tinkerpop.gremlin.java.GremlinPipeline)

Example 12 with GremlinPipeline

use of com.tinkerpop.gremlin.java.GremlinPipeline in project gremlin by tinkerpop.

the class TraversalStepsTest method test_g_v1_out.

public void test_g_v1_out() {
    super.test_g_v1_out(new GremlinPipeline(g.getVertex(1)).out());
    super.test_g_v1_out(new GremlinPipeline(g.getVertex(1)).optimize(false).out());
}
Also used : GremlinPipeline(com.tinkerpop.gremlin.java.GremlinPipeline)

Example 13 with GremlinPipeline

use of com.tinkerpop.gremlin.java.GremlinPipeline in project gremlin by tinkerpop.

the class LoopStepTest method test_g_v1_out_loopX1_loops_lt_3X_propertyXnameX.

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"));
}
Also used : GremlinPipeline(com.tinkerpop.gremlin.java.GremlinPipeline) LoopPipe(com.tinkerpop.pipes.branch.LoopPipe)

Example 14 with GremlinPipeline

use of com.tinkerpop.gremlin.java.GremlinPipeline in project gremlin by tinkerpop.

the class LoopStepTest method test_g_v1_asXhereX_out_loopXhere_loops_lt_3X_propertyXnameX.

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"));
}
Also used : GremlinPipeline(com.tinkerpop.gremlin.java.GremlinPipeline) LoopPipe(com.tinkerpop.pipes.branch.LoopPipe)

Example 15 with GremlinPipeline

use of com.tinkerpop.gremlin.java.GremlinPipeline in project gremlin by tinkerpop.

the class BackStepTest method test_g_v4_out_filterXlang_eq_javaX_backX1X.

public void test_g_v4_out_filterXlang_eq_javaX_backX1X() {
    super.test_g_v4_out_filterXlang_eq_javaX_backX1X(new GremlinPipeline(g.getVertex(4)).out().filter(new PipeFunction<Vertex, Boolean>() {

        public Boolean compute(Vertex v) {
            return v.getProperty("lang").equals("java");
        }
    }).back(1));
    super.test_g_v4_out_filterXlang_eq_javaX_backX1X(new GremlinPipeline(g.getVertex(4)).optimize(false).out().filter(new PipeFunction<Vertex, Boolean>() {

        public Boolean compute(Vertex v) {
            return v.getProperty("lang").equals("java");
        }
    }).back(1));
}
Also used : Vertex(com.tinkerpop.blueprints.Vertex) GremlinPipeline(com.tinkerpop.gremlin.java.GremlinPipeline)

Aggregations

GremlinPipeline (com.tinkerpop.gremlin.java.GremlinPipeline)93 Vertex (com.tinkerpop.blueprints.Vertex)28 PipeFunction (com.tinkerpop.pipes.PipeFunction)13 Pipe (com.tinkerpop.pipes.Pipe)6 HashMap (java.util.HashMap)4 Request (org.apache.atlas.catalog.Request)3 VertexWrapper (org.apache.atlas.catalog.VertexWrapper)3 ResourceDefinition (org.apache.atlas.catalog.definition.ResourceDefinition)3 AtlasGraph (org.apache.atlas.repository.graphdb.AtlasGraph)3 Test (org.testng.annotations.Test)3 LoopPipe (com.tinkerpop.pipes.branch.LoopPipe)2 PropertyFilterPipe (com.tinkerpop.pipes.filter.PropertyFilterPipe)2 Table (com.tinkerpop.pipes.util.structures.Table)2 ArrayList (java.util.ArrayList)2 HashSet (java.util.HashSet)2 List (java.util.List)2 Test (org.junit.Test)2 OException (com.orientechnologies.common.exception.OException)1 OIdentifiable (com.orientechnologies.orient.core.db.record.OIdentifiable)1 OCommandExecutionException (com.orientechnologies.orient.core.exception.OCommandExecutionException)1