use of com.tinkerpop.gremlin.java.GremlinPipeline in project gremlin by tinkerpop.
the class SelectStepTest method test_g_v1_asXaX_outXknowsX_asXbX_selectXnameX.
public void test_g_v1_asXaX_outXknowsX_asXbX_selectXnameX() {
super.test_g_v1_asXaX_outXknowsX_asXbX_selectXnameX(new GremlinPipeline(g.getVertex(1)).as("a").out("knows").as("b").select(new PipeFunction<Vertex, String>() {
public String compute(Vertex vertex) {
return (String) vertex.getProperty("name");
}
}));
super.test_g_v1_asXaX_outXknowsX_asXbX_selectXnameX(new GremlinPipeline(g.getVertex(1)).optimize(false).as("a").out("knows").as("b").select(new PipeFunction<Vertex, String>() {
public String compute(Vertex vertex) {
return (String) vertex.getProperty("name");
}
}));
}
use of com.tinkerpop.gremlin.java.GremlinPipeline in project gremlin by tinkerpop.
the class SelectStepTest method test_g_v1_asXaX_outXknowsX_asXbX_select.
public void test_g_v1_asXaX_outXknowsX_asXbX_select() {
super.test_g_v1_asXaX_outXknowsX_asXbX_select(new GremlinPipeline(g.getVertex(1)).as("a").out("knows").as("b").select());
super.test_g_v1_asXaX_outXknowsX_asXbX_select(new GremlinPipeline(g.getVertex(1)).optimize(false).as("a").out("knows").as("b").select());
}
use of com.tinkerpop.gremlin.java.GremlinPipeline in project gremlin by tinkerpop.
the class TransformStepTest method test_g_v1_out_transformXnameX_transformXlengthX.
public void test_g_v1_out_transformXnameX_transformXlengthX() {
super.test_g_v1_out_transformXnameX_transformXlengthX(new GremlinPipeline(g.getVertex(1)).out().transform(new PipeFunction<Vertex, String>() {
public String compute(Vertex vertex) {
return (String) vertex.getProperty("name");
}
}).transform(new PipeFunction<String, Integer>() {
public Integer compute(String name) {
return name.length();
}
}));
super.test_g_v1_out_transformXnameX_transformXlengthX(new GremlinPipeline(g.getVertex(1)).optimize(false).out().transform(new PipeFunction<Vertex, String>() {
public String compute(Vertex vertex) {
return (String) vertex.getProperty("name");
}
}).transform(new PipeFunction<String, Integer>() {
public Integer compute(String name) {
return name.length();
}
}));
}
use of com.tinkerpop.gremlin.java.GremlinPipeline in project gremlin by tinkerpop.
the class TransformStepTest method test_g_v1_outE_label_transformXlengthX.
public void test_g_v1_outE_label_transformXlengthX() {
super.test_g_v1_outE_label_transformXlengthX(new GremlinPipeline(g.getVertex(1)).outE().label().transform(new PipeFunction<String, Integer>() {
public Integer compute(String name) {
return name.length();
}
}));
super.test_g_v1_outE_label_transformXlengthX(new GremlinPipeline(g.getVertex(1)).optimize(false).outE().label().transform(new PipeFunction<String, Integer>() {
public Integer compute(String name) {
return name.length();
}
}));
}
use of com.tinkerpop.gremlin.java.GremlinPipeline in project gremlin by tinkerpop.
the class TransformStepTest method test_g_V_asXaX_out_transformXa_nameX.
public void test_g_V_asXaX_out_transformXa_nameX() {
super.test_g_V_asXaX_out_transformXa_nameX(new GremlinPipeline(g).V().as("a").out().transform(new PipesFunction() {
public Object compute(Object argument) {
return ((Vertex) this.asMap.get("a")).getProperty("name");
}
}));
super.test_g_V_asXaX_out_transformXa_nameX(new GremlinPipeline(g.getVertices()).optimize(false).as("a").out().transform(new PipesFunction() {
public Object compute(Object argument) {
return ((Vertex) this.asMap.get("a")).getProperty("name");
}
}));
}
Aggregations