Search in sources :

Example 26 with GremlinPipeline

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

the class IntervalStepTest method test_g_v1_outE_intervalXweight_0_06X_inV.

public void test_g_v1_outE_intervalXweight_0_06X_inV() {
    super.test_g_v1_outE_intervalXweight_0_06X_inV(new GremlinPipeline(g.getVertex(1)).outE().interval("weight", 0.0f, 0.6f).inV());
    super.test_g_v1_outE_intervalXweight_0_06X_inV(new GremlinPipeline(g.getVertex(1)).optimize(false).outE().interval("weight", 0.0f, 0.6f).inV());
}
Also used : GremlinPipeline(com.tinkerpop.gremlin.java.GremlinPipeline)

Example 27 with GremlinPipeline

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

the class RangeStepTest method test_g_v1_outXknowsX_outEXcreatedX_rangeX0_0X_inV.

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

Example 28 with GremlinPipeline

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

the class RangeStepTest method test_g_v1_outXcreatedX_inXcreatedX_rangeX1_2X.

public void test_g_v1_outXcreatedX_inXcreatedX_rangeX1_2X() {
    super.test_g_v1_outXcreatedX_inXcreatedX_rangeX1_2X(new GremlinPipeline((g.getVertex(1))).out("created").in("created").range(1, 2));
    super.test_g_v1_outXcreatedX_inXcreatedX_rangeX1_2X(new GremlinPipeline((g.getVertex(1))).optimize(false).out("created").in("created").range(1, 2));
}
Also used : GremlinPipeline(com.tinkerpop.gremlin.java.GremlinPipeline)

Example 29 with GremlinPipeline

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

the class RangeStepTest method test_g_v1_out_rangeX0_1X.

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

Example 30 with GremlinPipeline

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

the class GroupByStepTest method test_g_V_groupByXlang_nameX.

public void test_g_V_groupByXlang_nameX() {
    Map<?, List<?>> m = new HashMap<Object, List<?>>();
    super.test_g_V_groupByXlang_nameX(new GremlinPipeline(g.getVertices()).groupBy(m, new PipeFunction<Vertex, String>() {

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

        public String compute(Vertex vertex) {
            return (String) vertex.getProperty("name");
        }
    }), (Map) m);
    m = new HashMap<Object, List<?>>();
    super.test_g_V_groupByXlang_nameX(new GremlinPipeline(g.getVertices()).optimize(false).groupBy(m, new PipeFunction<Vertex, String>() {

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

        public String compute(Vertex vertex) {
            return (String) vertex.getProperty("name");
        }
    }), (Map) m);
}
Also used : Vertex(com.tinkerpop.blueprints.Vertex) GremlinPipeline(com.tinkerpop.gremlin.java.GremlinPipeline) HashMap(java.util.HashMap) List(java.util.List) PipeFunction(com.tinkerpop.pipes.PipeFunction)

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