org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration

## 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 Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `SubgraphStrategy.Builder` | `checkAdjacentVertices(boolean enable)` Enables the strategy to apply the `vertices(Traversal)` filter to the adjacent vertices of an edge.
    `SubgraphStrategy` | `create()`
    `SubgraphStrategy.Builder` | `edgeCriterion(Traversal<Edge,?> predicate)` Deprecated. As of release 3.2.2, replaced by `Builder#edges`.
    `SubgraphStrategy.Builder` | `edges(Traversal<Edge,?> edgePredicate)` The traversal predicate that defines the edges to include in the subgraph.
    `SubgraphStrategy.Builder` | `vertexCriterion(Traversal<Vertex,?> predicate)` Deprecated.
    `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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### checkAdjacentVertices

          public SubgraphStrategy.Builder checkAdjacentVertices(boolean enable)

      Enables the strategy to apply the `vertices(Traversal)` filter to the adjacent vertices of an edge. If using this strategy for OLAP then this value should be set to `false` 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 is `true`.

    - #### vertices

          public SubgraphStrategy.Builder vertices(Traversal<Vertex,?> vertexPredicate)

      The traversal predicate that defines the vertices to include in the subgraph. If `checkAdjacentVertices(boolean)` is `true` 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.

    - #### vertexCriterion

          @Deprecated
          public SubgraphStrategy.Builder vertexCriterion(Traversal<Vertex,?> predicate)

      Deprecated.

    - #### edgeCriterion

          @Deprecated
          public SubgraphStrategy.Builder edgeCriterion(Traversal<Edge,?> predicate)

      Deprecated. As of release 3.2.2, replaced by `Builder#edges`.

    - #### create

          public SubgraphStrategy create()

Copyright © 2013–2020 Apache Software Foundation. All rights reserved.