Class SubgraphStrategy
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy<TraversalStrategy.DecorationStrategy>
-
- org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SubgraphStrategy
-
- All Implemented Interfaces:
Serializable,Comparable<Class<? extends TraversalStrategy>>,TraversalStrategy<TraversalStrategy.DecorationStrategy>,TraversalStrategy.DecorationStrategy
public final class SubgraphStrategy extends AbstractTraversalStrategy<TraversalStrategy.DecorationStrategy> implements TraversalStrategy.DecorationStrategy
ThisTraversalStrategyprovides a way to limit the view of aTraversal. By providingTraversalrepresentations that represent a form of filtering criterion for vertices and/or edges, this strategy will inject that criterion into the appropriate places of a traversal thus restricting what it traverses and returns.- Author:
- Stephen Mallette (http://stephen.genoprime.com), Marko A. Rodriguez (http://markorodriguez.com)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSubgraphStrategy.Builder-
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy
TraversalStrategy.DecorationStrategy, TraversalStrategy.FinalizationStrategy, TraversalStrategy.OptimizationStrategy, TraversalStrategy.ProviderOptimizationStrategy, TraversalStrategy.VerificationStrategy
-
-
Field Summary
Fields Modifier and Type Field Description static StringCHECK_ADJACENT_VERTICESstatic StringEDGESstatic StringVERTEX_PROPERTIESstatic StringVERTICES-
Fields inherited from interface org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy
STRATEGY
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply(Traversal.Admin<?,?> traversal)Set<Class<? extends TraversalStrategy.DecorationStrategy>>applyPost()The set of strategies that must be executed after this strategy is executed.static SubgraphStrategy.Builderbuild()static SubgraphStrategycreate(org.apache.commons.configuration2.Configuration configuration)org.apache.commons.configuration2.ConfigurationgetConfiguration()Get the configuration representation of this strategy.Traversal<Edge,?>getEdgeCriterion()Traversal<Vertex,?>getVertexCriterion()Traversal<VertexProperty,?>getVertexPropertyCriterion()-
Methods inherited from class org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy
equals, hashCode, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy
applyPrior
-
Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy.DecorationStrategy
compareTo, getTraversalCategory
-
-
-
-
Field Detail
-
VERTICES
public static final String VERTICES
- See Also:
- Constant Field Values
-
EDGES
public static final String EDGES
- See Also:
- Constant Field Values
-
VERTEX_PROPERTIES
public static final String VERTEX_PROPERTIES
- See Also:
- Constant Field Values
-
CHECK_ADJACENT_VERTICES
public static final String CHECK_ADJACENT_VERTICES
- See Also:
- Constant Field Values
-
-
Method Detail
-
apply
public void apply(Traversal.Admin<?,?> traversal)
- Specified by:
applyin interfaceTraversalStrategy<TraversalStrategy.DecorationStrategy>
-
getConfiguration
public org.apache.commons.configuration2.Configuration getConfiguration()
Description copied from interface:TraversalStrategyGet the configuration representation of this strategy. This is useful for converting a strategy into a serialized form.- Specified by:
getConfigurationin interfaceTraversalStrategy<TraversalStrategy.DecorationStrategy>- Returns:
- the configuration used to create this strategy
-
applyPost
public Set<Class<? extends TraversalStrategy.DecorationStrategy>> applyPost()
Description copied from interface:TraversalStrategyThe set of strategies that must be executed after this strategy is executed. If there are no ordering requirements, the default implementation returns an empty set.- Specified by:
applyPostin interfaceTraversalStrategy<TraversalStrategy.DecorationStrategy>- Returns:
- the set of strategies that must be executed post this one
-
getVertexPropertyCriterion
public Traversal<VertexProperty,?> getVertexPropertyCriterion()
-
create
public static SubgraphStrategy create(org.apache.commons.configuration2.Configuration configuration)
-
build
public static SubgraphStrategy.Builder build()
-
-