tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [13/38] tinkerpop git commit: added to() and from() to the-traversal step documentation and then reference it with @see in GraphTraversal JavaDoc.
Date Mon, 27 Mar 2017 18:05:26 GMT
added to() and from() to the-traversal step documentation and then reference it with @see in
GraphTraversal JavaDoc.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/9ffd250b
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/9ffd250b
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/9ffd250b

Branch: refs/heads/TINKERPOP-1642
Commit: 9ffd250ba6f20c38bda402f561d514607b07632e
Parents: 28a05d7
Author: Marko A. Rodriguez <okrammarko@gmail.com>
Authored: Thu Mar 16 12:19:08 2017 -0600
Committer: Marko A. Rodriguez <okrammarko@gmail.com>
Committed: Thu Mar 16 12:19:08 2017 -0600

----------------------------------------------------------------------
 docs/src/reference/the-traversal.asciidoc         | 17 +++++++++++++++++
 .../traversal/dsl/graph/GraphTraversal.java       | 18 ++++++++++--------
 2 files changed, 27 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9ffd250b/docs/src/reference/the-traversal.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc
index c333373..31c0621 100644
--- a/docs/src/reference/the-traversal.asciidoc
+++ b/docs/src/reference/the-traversal.asciidoc
@@ -716,6 +716,14 @@ g.V().has('name', within('marko', 'vadas', 'josh')).as('person').
 <1> Normally the `V()`-step will iterate over all vertices. However, graph strategies
can fold `HasContainer`'s into a `GraphStep` to allow index lookups.
 <2> Whether the graph system provider supports mid-traversal `V()` index lookups or
not can easily be determined by inspecting the `toString()` output of the iterated traversal.
If `has` conditions were folded into the `V()`-step, an index - if one exists - will be used.
 
+[[from-step]]
+From Step
+~~~~~~~~~
+
+The `from()`-step is not an actual step, but instead is a "step-modulator" similar to <<as-step,`as()`>>
and
+<<by-step,`by()`>>. If a step is able to accept traversals or strings then `from()`
is the
+means by which they are added. The general pattern is `step().from()`. See <<to-step,`to()`>>-step.
+
 [[group-step]]
 Group Step
 ~~~~~~~~~~
@@ -2194,6 +2202,15 @@ note that the internal clock of `timeLimit()`-step starts when the
first travers
 reached, any `next()` evaluation of the step will yield a `NoSuchElementException` and any
`hasNext()` evaluation will
 yield `false`.
 
+[[to-step]]
+To Step
+~~~~~~~
+
+The `to()`-step is not an actual step, but instead is a "step-modulator" similar to <<as-step,`as()`>>
and
+<<by-step,`by()`>>. If a step is able to accept traversals or strings then `to()`
is the
+means by which they are added. The general pattern is `step().to()`. See <<from-step,`from()`>>-step.
+
+
 [[tree-step]]
 Tree Step
 ~~~~~~~~~

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9ffd250b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
index 0b95479..bde1dea 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
@@ -1028,11 +1028,11 @@ public interface GraphTraversal<S, E> extends Traversal<S,
E> {
     }
 
     /**
-     * When used as a modifier to {@link #addE(String)} this method specifies the step label
to use for selecting the
-     * incoming vertex of the newly added {@link Edge}.
+     * Provide {@code to()}-modulation to respective steps.
      *
-     * @param toStepLabel the step label of the incoming vertex
-     * @return the traversal with the modified {@link AddEdgeStep}
+     * @param toStepLabel the step label to modulate to.
+     * @return the traversal with the modified {@link FromToModulating} step.
+     * @see <a href="http://tinkerpop.apache.org/docs/${project.version}/reference/#to-step"
target="_blank">Reference Documentation - To Step</a>
      * @since 3.1.0-incubating
      */
     public default GraphTraversal<S, E> to(final String toStepLabel) {
@@ -1042,11 +1042,11 @@ public interface GraphTraversal<S, E> extends Traversal<S,
E> {
     }
 
     /**
-     * When used as a modifier to {@link #addE(String)} this method specifies the step label
to use for selecting the
-     * outgoing vertex of the newly added {@link Edge}.
+     * Provide {@code from()}-modulation to respective steps.
      *
-     * @param fromStepLabel the step label of the outgoing vertex
-     * @return the traversal with the modified {@link AddEdgeStep}
+     * @param fromStepLabel the step label to modulate to.
+     * @return the traversal with the modified {@link FromToModulating} step.
+     * @see <a href="http://tinkerpop.apache.org/docs/${project.version}/reference/#from-step"
target="_blank">Reference Documentation - From Step</a>
      * @since 3.1.0-incubating
      */
     public default GraphTraversal<S, E> from(final String fromStepLabel) {
@@ -1061,6 +1061,7 @@ public interface GraphTraversal<S, E> extends Traversal<S,
E> {
      *
      * @param toVertex the traversal for selecting the incoming vertex
      * @return the traversal with the modified {@link AddEdgeStep}
+     * @see <a href="http://tinkerpop.apache.org/docs/${project.version}/reference/#addedge-step"
target="_blank">Reference Documentation - From Step</a>
      * @since 3.1.0-incubating
      */
     public default GraphTraversal<S, E> to(final Traversal<E, Vertex> toVertex)
{
@@ -1075,6 +1076,7 @@ public interface GraphTraversal<S, E> extends Traversal<S,
E> {
      *
      * @param fromVertex the traversal for selecting the outgoing vertex
      * @return the traversal with the modified {@link AddEdgeStep}
+     * @see <a href="http://tinkerpop.apache.org/docs/${project.version}/reference/#addedge-step"
target="_blank">Reference Documentation - From Step</a>
      * @since 3.1.0-incubating
      */
     public default GraphTraversal<S, E> from(final Traversal<E, Vertex> fromVertex)
{


Mime
View raw message