Search in sources :

Example 36 with GremlinPipeline

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

the class TraversalStepsTest method test_g_v1_outX1_knowsX_name.

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

Example 37 with GremlinPipeline

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

the class TraversalStepsTest method test_g_V_out_out.

public void test_g_V_out_out() {
    super.test_g_V_out_out(new GremlinPipeline(g.getVertices()).out().out());
    super.test_g_V_out_out(new GremlinPipeline(g).V().out().out());
    super.test_g_V_out_out(new GremlinPipeline(g.getVertices()).optimize(false).out().out());
    super.test_g_V_out_out(new GremlinPipeline(g).optimize(false).V().out().out());
}
Also used : GremlinPipeline(com.tinkerpop.gremlin.java.GremlinPipeline)

Example 38 with GremlinPipeline

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

the class TraversalStepsTest method test_g_v1_outEXknows_createdX_inV.

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

Example 39 with GremlinPipeline

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

the class StoreStepTest method test_g_V_propertyXnameX_store_cap.

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

Example 40 with GremlinPipeline

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

the class TableStepTest method test_g_v1_asXaX_out_propertyXnameX_asXbX_tableXname_lengthX_cap.

public void test_g_v1_asXaX_out_propertyXnameX_asXbX_tableXname_lengthX_cap() {
    super.test_g_v1_asXaX_out_propertyXnameX_asXbX_tableXname_lengthX_cap(new GremlinPipeline(g.getVertex(1)).as("a").out().property("name").as("b").table(new Table(), new PipeFunction<Vertex, String>() {

        public String compute(Vertex vertex) {
            return (String) vertex.getProperty("name");
        }
    }, new PipeFunction<String, Integer>() {

        public Integer compute(String name) {
            return name.length();
        }
    }).cap());
    super.test_g_v1_asXaX_out_propertyXnameX_asXbX_tableXname_lengthX_cap(new GremlinPipeline(g.getVertex(1)).optimize(false).as("a").out().property("name").as("b").table(new Table(), new PipeFunction<Vertex, String>() {

        public String compute(Vertex vertex) {
            return (String) vertex.getProperty("name");
        }
    }, new PipeFunction<String, Integer>() {

        public Integer compute(String name) {
            return name.length();
        }
    }).cap());
}
Also used : Vertex(com.tinkerpop.blueprints.Vertex) GremlinPipeline(com.tinkerpop.gremlin.java.GremlinPipeline) Table(com.tinkerpop.pipes.util.structures.Table)

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