Search in sources :

Example 1 with CreateGraphStep

use of com.alibaba.maxgraph.tinkerpop.steps.CreateGraphStep in project GraphScope by alibaba.

the class MaxGraphTraversalSource method createGraph.

public GraphTraversal<Element, Element> createGraph(final String graphName) {
    final GraphTraversalSource clone = this.clone();
    clone.getBytecode().addStep(CustomSymbols.graph_source);
    final GraphTraversal.Admin<Vertex, Vertex> traversal = new DefaultMaxGraphTraversal<>(clone);
    return (DefaultMaxGraphTraversal) traversal.addStep(new CreateGraphStep<>(traversal, graphName));
}
Also used : GraphTraversalSource(org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource) Vertex(org.apache.tinkerpop.gremlin.structure.Vertex) GraphTraversal(org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal) CreateGraphStep(com.alibaba.maxgraph.tinkerpop.steps.CreateGraphStep)

Aggregations

CreateGraphStep (com.alibaba.maxgraph.tinkerpop.steps.CreateGraphStep)1 GraphTraversal (org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal)1 GraphTraversalSource (org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource)1 Vertex (org.apache.tinkerpop.gremlin.structure.Vertex)1