Search in sources :

Example 21 with GremlinPipeline

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

the class FilterStepTest method test_g_v1_out_filterXage_gt_30X.

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

        public Boolean compute(Vertex vertex) {
            Integer age = (Integer) vertex.getProperty("age");
            return age != null && age > 30;
        }
    }));
    super.test_g_v1_out_filterXage_gt_30X(new GremlinPipeline(g.getVertex(1)).optimize(false).out().filter(new PipeFunction<Vertex, Boolean>() {

        public Boolean compute(Vertex vertex) {
            Integer age = (Integer) vertex.getProperty("age");
            return age != null && age > 30;
        }
    }));
}
Also used : Vertex(com.tinkerpop.blueprints.Vertex) GremlinPipeline(com.tinkerpop.gremlin.java.GremlinPipeline) PipeFunction(com.tinkerpop.pipes.PipeFunction)

Example 22 with GremlinPipeline

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

the class HasNotStepTest method test_g_V_hasNotXname_markoX.

public void test_g_V_hasNotXname_markoX() {
    super.test_g_V_hasNotXname_markoX(new GremlinPipeline(g).V().hasNot("name", "marko"));
    super.test_g_V_hasNotXname_markoX(new GremlinPipeline(g).optimize(false).V().hasNot("name", "marko"));
}
Also used : GremlinPipeline(com.tinkerpop.gremlin.java.GremlinPipeline)

Example 23 with GremlinPipeline

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

the class HasNotStepTest method test_g_V_hasNotXblahX.

public void test_g_V_hasNotXblahX() {
    super.test_g_V_hasNotXblahX(new GremlinPipeline(g).V().hasNot("blah"));
    super.test_g_V_hasNotXblahX(new GremlinPipeline(g.getVertices()).optimize(false).hasNot("blah"));
}
Also used : GremlinPipeline(com.tinkerpop.gremlin.java.GremlinPipeline)

Example 24 with GremlinPipeline

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

the class HasStepTest method test_g_E_hasXlabelXknowsX.

public void test_g_E_hasXlabelXknowsX() {
    super.test_g_E_hasXlabelXknowsX(new GremlinPipeline(g).E().has("label", T.eq, "knows"));
    super.test_g_E_hasXlabelXknowsX(new GremlinPipeline(g).optimize(false).E().has("label", T.eq, "knows"));
}
Also used : GremlinPipeline(com.tinkerpop.gremlin.java.GremlinPipeline)

Example 25 with GremlinPipeline

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

the class HasStepTest method test_g_V_hasXname_blahX.

public void test_g_V_hasXname_blahX() {
    super.test_g_V_hasXname_blahX(new GremlinPipeline(g.getVertices()).has("name", "blah"));
    super.test_g_V_hasXname_blahX(new GremlinPipeline(g.getVertices()).optimize(false).has("name", "blah"));
}
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