Class GremlinLang

    • Constructor Detail

      • GremlinLang

        public GremlinLang()
      • GremlinLang

        public GremlinLang​(String sourceName,
                           Object... arguments)
    • Method Detail

      • getGremlin

        public String getGremlin()
        Get gremlin-lang compatible representation of Traversal
        Returns:
        gremlin-lang compatible String
      • getGremlin

        public String getGremlin​(String g)
        Get gremlin-lang compatible representation of Traversal. "g" is expected for gremlin-lang. "__" can be used for an anonymous GraphTraversal.
        Parameters:
        g - GraphTraversalSource name
        Returns:
        gremlin-lang compatible String
      • getParameters

        public Map<String,​Object> getParameters()
        Get parameters used in Traversal.
        Returns:
        parameters Map
      • addG

        public void addG​(String g)
        The alias to set.
      • reset

        public void reset()
        Reset parameter naming counter. Mainly intended to make testing easier
      • addSource

        public void addSource​(String sourceName,
                              Object... arguments)
        Add a TraversalSource instruction to the GremlinLang.
        Parameters:
        sourceName - the traversal source method name (e.g. withSack())
        arguments - the traversal source method arguments
      • addStep

        public void addStep​(String stepName,
                            Object... arguments)
        Add a Traversal instruction to the GremlinLang.
        Parameters:
        stepName - the traversal method name (e.g. out())
        arguments - the traversal method arguments
      • getOptionsStrategies

        public List<org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy> getOptionsStrategies()
        Provides a way to get configuration of a Traversal.
        Returns:
        list of OptionsStrategy
      • isEmpty

        public boolean isEmpty()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object