Search in sources :

Example 51 with GremlinPipeline

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

the class StoreStepTest method test_g_V_storeXnameX_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());
}
Also used : Vertex(com.tinkerpop.blueprints.Vertex) GremlinPipeline(com.tinkerpop.gremlin.java.GremlinPipeline)

Example 52 with GremlinPipeline

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

the class TableStepTest method test_g_v1_asXaX_out_properyXnameX_asXbX_table_cap.

public void test_g_v1_asXaX_out_properyXnameX_asXbX_table_cap() {
    super.test_g_v1_asXaX_out_properyXnameX_asXbX_table_cap(new GremlinPipeline(g.getVertex(1)).as("a").out().property("name").as("b").table().cap());
    super.test_g_v1_asXaX_out_properyXnameX_asXbX_table_cap(new GremlinPipeline(g.getVertex(1)).optimize(false).as("a").out().property("name").as("b").table().cap());
}
Also used : GremlinPipeline(com.tinkerpop.gremlin.java.GremlinPipeline)

Example 53 with GremlinPipeline

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

the class TableStepTest method test_g_v1_asXaX_out_asXbX_tableXnameX_cap.

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

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

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

Example 54 with GremlinPipeline

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

the class TreeStepTest method test_g_v1_out_out_treeXnameX_cap.

public void test_g_v1_out_out_treeXnameX_cap() {
    super.test_g_v1_out_out_treeXnameX_cap(new GremlinPipeline(graph.getVertex(1)).out().out().tree(new PipeFunction<Vertex, String>() {

        public String compute(Vertex vertex) {
            return (String) vertex.getProperty("name");
        }
    }).cap());
    super.test_g_v1_out_out_treeXnameX_cap(new GremlinPipeline(graph.getVertex(1)).optimize(false).out().out().tree(new PipeFunction<Vertex, String>() {

        public String compute(Vertex vertex) {
            return (String) vertex.getProperty("name");
        }
    }).cap());
}
Also used : Vertex(com.tinkerpop.blueprints.Vertex) GremlinPipeline(com.tinkerpop.gremlin.java.GremlinPipeline)

Example 55 with GremlinPipeline

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

the class GatherStepTest method test_g_v1_out_gather.

public void test_g_v1_out_gather(final Pipe<Vertex, List<Vertex>> pipe) {
    super.test_g_v1_out_gather(new GremlinPipeline(g.getVertex(1)).out().gather());
    super.test_g_v1_out_gather(new GremlinPipeline(g.getVertex(1)).optimize(false).out().gather());
}
Also used : 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