Search in sources :

Example 61 with GremlinPipeline

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

the class SplitMergeStepsTest method test_g_v1_outXknowsX_copySplitXpropertyXnameX__propertyXageXX_exhaustMerge_path.

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

Example 62 with GremlinPipeline

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

the class BackStepTest method test_g_v1_out_backX1X.

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

Example 63 with GremlinPipeline

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

the class BackStepTest method test_g_v4_out_asXhereX_filterXlang_eq_javaX_backXhereX.

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

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

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

Example 64 with GremlinPipeline

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

the class DedupStepTest method test_g_V_both_dedup_name.

public void test_g_V_both_dedup_name() {
    super.test_g_V_both_dedup_name(new GremlinPipeline(g.getVertices()).both().dedup().property("name"));
    super.test_g_V_both_dedup_name(new GremlinPipeline(g.getVertices()).optimize(false).both().dedup().property("name"));
}
Also used : GremlinPipeline(com.tinkerpop.gremlin.java.GremlinPipeline)

Example 65 with GremlinPipeline

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

the class ExceptStepTest method test_g_v1_out_exceptXg_v2X.

public void test_g_v1_out_exceptXg_v2X() {
    super.test_g_v1_out_exceptXg_v2X(new GremlinPipeline(g.getVertex(1)).out().except(Arrays.asList(g.getVertex(2))));
    super.test_g_v1_out_exceptXg_v2X(new GremlinPipeline(g.getVertex(1)).optimize(false).out().except(Arrays.asList(g.getVertex(2))));
}
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