Class SubgraphStrategy.Builder
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SubgraphStrategy.Builder
-
- Enclosing class:
- SubgraphStrategy
public static final class SubgraphStrategy.Builder extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SubgraphStrategy.Builder
checkAdjacentVertices(boolean enable)
Enables the strategy to apply thevertices(Traversal)
filter to the adjacent vertices of an edge.SubgraphStrategy
create()
SubgraphStrategy.Builder
edges(Traversal<Edge,?> edgePredicate)
The traversal predicate that defines the edges to include in the subgraph.SubgraphStrategy.Builder
vertexProperties(Traversal<VertexProperty,?> vertexPropertyPredicate)
The traversal predicate that defines the vertex properties to include in the subgraph.SubgraphStrategy.Builder
vertices(Traversal<Vertex,?> vertexPredicate)
The traversal predicate that defines the vertices to include in the subgraph.
-
-
-
Method Detail
-
checkAdjacentVertices
public SubgraphStrategy.Builder checkAdjacentVertices(boolean enable)
Enables the strategy to apply thevertices(Traversal)
filter to the adjacent vertices of an edge. If using this strategy for OLAP then this value should be set tofalse
as checking adjacent vertices will force the traversal to leave the local star graph (which is not possible in OLAP) and will cause an error. By default, this value istrue
.
-
vertices
public SubgraphStrategy.Builder vertices(Traversal<Vertex,?> vertexPredicate)
The traversal predicate that defines the vertices to include in the subgraph. IfcheckAdjacentVertices(boolean)
istrue
then this predicate will also be applied to the adjacent vertices of edges. Take care when setting this value for OLAP based traversals as the traversal predicate cannot be written in such a way as to leave the local star graph and can thus only evaluate the current vertex and its related edges.
-
edges
public SubgraphStrategy.Builder edges(Traversal<Edge,?> edgePredicate)
The traversal predicate that defines the edges to include in the subgraph.
-
vertexProperties
public SubgraphStrategy.Builder vertexProperties(Traversal<VertexProperty,?> vertexPropertyPredicate)
The traversal predicate that defines the vertex properties to include in the subgraph.
-
create
public SubgraphStrategy create()
-
-