Search in sources :

Example 16 with GremlinPipeline

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

the class BackStepTest method test_g_v1_outE_inV_hasXname_vadasX_backX2X.

public void test_g_v1_outE_inV_hasXname_vadasX_backX2X() {
    super.test_g_v1_outE_inV_hasXname_vadasX_backX2X(new GremlinPipeline(g.getVertex(1)).outE().inV().has("name", "vadas").back(2));
    super.test_g_v1_outE_inV_hasXname_vadasX_backX2X(new GremlinPipeline(g.getVertex(1)).optimize(false).outE().inV().has("name", "vadas").back(2));
}
Also used : GremlinPipeline(com.tinkerpop.gremlin.java.GremlinPipeline)

Example 17 with GremlinPipeline

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

the class BackStepTest method test_g_v1_outE_asXhereX_inV_hasXname_vadasX_backXhereX.

public void test_g_v1_outE_asXhereX_inV_hasXname_vadasX_backXhereX() {
    super.test_g_v1_outE_asXhereX_inV_hasXname_vadasX_backXhereX(new GremlinPipeline(g.getVertex(1)).outE().as("here").inV().has("name", "vadas").back("here"));
    super.test_g_v1_outE_asXhereX_inV_hasXname_vadasX_backXhereX(new GremlinPipeline(g.getVertex(1)).optimize(false).outE().as("here").inV().has("name", "vadas").back("here"));
}
Also used : GremlinPipeline(com.tinkerpop.gremlin.java.GremlinPipeline)

Example 18 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_propertyXnameX.

public void test_g_v4_out_asXhereX_filterXlang_eq_javaX_backXhereX_propertyXnameX() {
    super.test_g_v4_out_asXhereX_filterXlang_eq_javaX_backXhereX_propertyXnameX(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").property("name"));
    super.test_g_v4_out_asXhereX_filterXlang_eq_javaX_backXhereX_propertyXnameX(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").property("name"));
}
Also used : Vertex(com.tinkerpop.blueprints.Vertex) GremlinPipeline(com.tinkerpop.gremlin.java.GremlinPipeline) PipeFunction(com.tinkerpop.pipes.PipeFunction)

Example 19 with GremlinPipeline

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

the class BackStepTest method test_g_v1_asXhereX_out_backXhereX.

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

Example 20 with GremlinPipeline

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

the class ExceptStepTest method test_g_v1_outXcreatedX_inXcreatedX_exceptXg_v1X_propertyXnameX.

public void test_g_v1_outXcreatedX_inXcreatedX_exceptXg_v1X_propertyXnameX() {
    super.test_g_v1_outXcreatedX_inXcreatedX_exceptXg_v1X_propertyXnameX(new GremlinPipeline(g.getVertex(1)).out("created").in("created").except(Arrays.asList(g.getVertex(1))).property("name"));
    super.test_g_v1_outXcreatedX_inXcreatedX_exceptXg_v1X_propertyXnameX(new GremlinPipeline(g.getVertex(1)).optimize(false).out("created").in("created").except(Arrays.asList(g.getVertex(1))).property("name"));
}
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