You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2017/02/16 22:14:03 UTC
[1/4] tinkerpop git commit: Added links to reference docs in
GraphTraversal javadoc for Vertex ops CTR
Repository: tinkerpop
Updated Branches:
refs/heads/master 9b4a32f2f -> 24d8422ee
Added links to reference docs in GraphTraversal javadoc for Vertex ops CTR
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/1780823a
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/1780823a
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/1780823a
Branch: refs/heads/master
Commit: 1780823a48e0ac99d5d66e64ba34d9d42e3fedad
Parents: ff96e3c
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Feb 16 16:37:50 2017 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Feb 16 16:37:50 2017 -0500
----------------------------------------------------------------------
.../process/traversal/dsl/graph/GraphTraversal.java | 13 +++++++++++++
1 file changed, 13 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1780823a/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 d6e6cfd..29f3b0a 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
@@ -290,6 +290,7 @@ public interface GraphTraversal<S, E> extends Traversal<S, E> {
* @param direction the direction to traverse from the current vertex
* @param edgeLabels the edge labels to traverse
* @return the traversal with an appended {@link VertexStep}.
+ * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#vertex-steps">Reference Documentation - Vertex Step</a>
*/
public default GraphTraversal<S, Vertex> to(final Direction direction, final String... edgeLabels) {
this.asAdmin().getBytecode().addStep(Symbols.to, direction, edgeLabels);
@@ -301,6 +302,7 @@ public interface GraphTraversal<S, E> extends Traversal<S, E> {
*
* @param edgeLabels the edge labels to traverse
* @return the traversal with an appended {@link VertexStep}.
+ * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#vertex-steps">Reference Documentation - Vertex Step</a>
*/
public default GraphTraversal<S, Vertex> out(final String... edgeLabels) {
this.asAdmin().getBytecode().addStep(Symbols.out, edgeLabels);
@@ -312,6 +314,7 @@ public interface GraphTraversal<S, E> extends Traversal<S, E> {
*
* @param edgeLabels the edge labels to traverse
* @return the traversal with an appended {@link VertexStep}.
+ * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#vertex-steps">Reference Documentation - Vertex Step</a>
*/
public default GraphTraversal<S, Vertex> in(final String... edgeLabels) {
this.asAdmin().getBytecode().addStep(Symbols.in, edgeLabels);
@@ -323,6 +326,7 @@ public interface GraphTraversal<S, E> extends Traversal<S, E> {
*
* @param edgeLabels the edge labels to traverse
* @return the traversal with an appended {@link VertexStep}.
+ * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#vertex-steps">Reference Documentation - Vertex Step</a>
*/
public default GraphTraversal<S, Vertex> both(final String... edgeLabels) {
this.asAdmin().getBytecode().addStep(Symbols.both, edgeLabels);
@@ -335,6 +339,7 @@ public interface GraphTraversal<S, E> extends Traversal<S, E> {
* @param direction the direction to traverse from the current vertex
* @param edgeLabels the edge labels to traverse
* @return the traversal with an appended {@link VertexStep}.
+ * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#vertex-steps">Reference Documentation - Vertex Step</a>
*/
public default GraphTraversal<S, Edge> toE(final Direction direction, final String... edgeLabels) {
this.asAdmin().getBytecode().addStep(Symbols.toE, direction, edgeLabels);
@@ -346,6 +351,7 @@ public interface GraphTraversal<S, E> extends Traversal<S, E> {
*
* @param edgeLabels the edge labels to traverse
* @return the traversal with an appended {@link VertexStep}.
+ * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#vertex-steps">Reference Documentation - Vertex Step</a>
*/
public default GraphTraversal<S, Edge> outE(final String... edgeLabels) {
this.asAdmin().getBytecode().addStep(Symbols.outE, edgeLabels);
@@ -357,6 +363,7 @@ public interface GraphTraversal<S, E> extends Traversal<S, E> {
*
* @param edgeLabels the edge labels to traverse
* @return the traversal with an appended {@link VertexStep}.
+ * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#vertex-steps">Reference Documentation - Vertex Step</a>
*/
public default GraphTraversal<S, Edge> inE(final String... edgeLabels) {
this.asAdmin().getBytecode().addStep(Symbols.inE, edgeLabels);
@@ -368,6 +375,7 @@ public interface GraphTraversal<S, E> extends Traversal<S, E> {
*
* @param edgeLabels the edge labels to traverse
* @return the traversal with an appended {@link VertexStep}.
+ * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#vertex-steps">Reference Documentation - Vertex Step</a>
*/
public default GraphTraversal<S, Edge> bothE(final String... edgeLabels) {
this.asAdmin().getBytecode().addStep(Symbols.bothE, edgeLabels);
@@ -379,6 +387,7 @@ public interface GraphTraversal<S, E> extends Traversal<S, E> {
*
* @param direction the direction to traverser from the current edge
* @return the traversal with an appended {@link EdgeVertexStep}.
+ * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#vertex-steps">Reference Documentation - Vertex Step</a>
*/
public default GraphTraversal<S, Vertex> toV(final Direction direction) {
this.asAdmin().getBytecode().addStep(Symbols.toV, direction);
@@ -389,6 +398,7 @@ public interface GraphTraversal<S, E> extends Traversal<S, E> {
* Map the {@link Edge} to its incoming/head incident {@link Vertex}.
*
* @return the traversal with an appended {@link EdgeVertexStep}.
+ * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#vertex-steps">Reference Documentation - Vertex Step</a>
*/
public default GraphTraversal<S, Vertex> inV() {
this.asAdmin().getBytecode().addStep(Symbols.inV);
@@ -399,6 +409,7 @@ public interface GraphTraversal<S, E> extends Traversal<S, E> {
* Map the {@link Edge} to its outgoing/tail incident {@link Vertex}.
*
* @return the traversal with an appended {@link EdgeVertexStep}.
+ * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#vertex-steps">Reference Documentation - Vertex Step</a>
*/
public default GraphTraversal<S, Vertex> outV() {
this.asAdmin().getBytecode().addStep(Symbols.outV);
@@ -409,6 +420,7 @@ public interface GraphTraversal<S, E> extends Traversal<S, E> {
* Map the {@link Edge} to its incident vertices.
*
* @return the traversal with an appended {@link EdgeVertexStep}.
+ * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#vertex-steps">Reference Documentation - Vertex Step</a>
*/
public default GraphTraversal<S, Vertex> bothV() {
this.asAdmin().getBytecode().addStep(Symbols.bothV);
@@ -419,6 +431,7 @@ public interface GraphTraversal<S, E> extends Traversal<S, E> {
* Map the {@link Edge} to the incident vertex that was not just traversed from in the path history.
*
* @return the traversal with an appended {@link EdgeOtherVertexStep}.
+ * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#vertex-steps">Reference Documentation - Vertex Step</a>
*/
public default GraphTraversal<S, Vertex> otherV() {
this.asAdmin().getBytecode().addStep(Symbols.otherV);
[4/4] tinkerpop git commit: Merge branch 'tp32'
Posted by sp...@apache.org.
Merge branch 'tp32'
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/24d8422e
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/24d8422e
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/24d8422e
Branch: refs/heads/master
Commit: 24d8422eeb19e2371a37a16ca3d43b8d4507f318
Parents: 9b4a32f 14c7df9
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Feb 16 17:13:52 2017 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Feb 16 17:13:52 2017 -0500
----------------------------------------------------------------------
docs/src/reference/the-traversal.asciidoc | 27 +++++++
.../traversal/dsl/graph/GraphTraversal.java | 75 +++++++++++++++++++-
2 files changed, 100 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/24d8422e/docs/src/reference/the-traversal.asciidoc
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/24d8422e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
----------------------------------------------------------------------
diff --cc gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
index bd5a04d,c5a65e0..5e0149e
--- 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
@@@ -710,21 -714,46 +738,46 @@@ public interface GraphTraversal<S, E> e
return this.asAdmin().addStep(new SumGlobalStep<>(this.asAdmin()));
}
+ /**
+ * Map the traversal stream to its reduction as a sum of the {@link Traverser#get} values multiplied by their
+ * {@link Traverser#bulk} given the specified {@link Scope} (i.e. sum the traverser values up to this point).
+ *
+ * @return the traversal with an appended {@link SumGlobalStep} or {@link SumLocalStep} depending on the {@link Scope}.
+ * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#sum-step">Reference Documentation - Sum Step</a>
+ */
public default <E2 extends Number> GraphTraversal<S, E2> sum(final Scope scope) {
this.asAdmin().getBytecode().addStep(Symbols.sum, scope);
- return this.asAdmin().addStep(scope.equals(Scope.global) ? new SumGlobalStep<>(this.asAdmin()) : new SumLocalStep(this.asAdmin()));
+ return this.asAdmin().addStep(scope.equals(Scope.global) ? new SumGlobalStep<>(this.asAdmin()) : new SumLocalStep<>(this.asAdmin()));
}
+ /**
+ * Determines the largest value in the stream.
+ *
+ * @return the traversal with an appended {@link MaxGlobalStep}.
+ * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#max-step">Reference Documentation - Max Step</a>
+ */
public default <E2 extends Number> GraphTraversal<S, E2> max() {
this.asAdmin().getBytecode().addStep(Symbols.max);
return this.asAdmin().addStep(new MaxGlobalStep<>(this.asAdmin()));
}
+ /**
+ * Determines the largest value in the stream given the {@link Scope}.
+ *
+ * @return the traversal with an appended {@link MaxGlobalStep} or {@link MaxLocalStep} depending on the {@link Scope}
+ * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#max-step">Reference Documentation - Max Step</a>
+ */
public default <E2 extends Number> GraphTraversal<S, E2> max(final Scope scope) {
this.asAdmin().getBytecode().addStep(Symbols.max, scope);
- return this.asAdmin().addStep(scope.equals(Scope.global) ? new MaxGlobalStep<>(this.asAdmin()) : new MaxLocalStep(this.asAdmin()));
+ return this.asAdmin().addStep(scope.equals(Scope.global) ? new MaxGlobalStep<>(this.asAdmin()) : new MaxLocalStep<>(this.asAdmin()));
}
+ /**
+ * Determines the smallest value in the stream.
+ *
+ * @return the traversal with an appended {@link MinGlobalStep}.
+ * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#min-step">Reference Documentation - Min Step</a>
+ */
public default <E2 extends Number> GraphTraversal<S, E2> min() {
this.asAdmin().getBytecode().addStep(Symbols.min);
return this.asAdmin().addStep(new MinGlobalStep<>(this.asAdmin()));
@@@ -740,9 -781,15 +805,15 @@@
return this.asAdmin().addStep(new MeanGlobalStep<>(this.asAdmin()));
}
+ /**
+ * Determines the mean value in the stream given the {@link Scope}.
+ *
+ * @return the traversal with an appended {@link MeanGlobalStep} or {@link MeanLocalStep} depending on the {@link Scope}
+ * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#mean-step">Reference Documentation - Mean Step</a>
+ */
public default <E2 extends Number> GraphTraversal<S, E2> mean(final Scope scope) {
this.asAdmin().getBytecode().addStep(Symbols.mean, scope);
- return this.asAdmin().addStep(scope.equals(Scope.global) ? new MeanGlobalStep<>(this.asAdmin()) : new MeanLocalStep(this.asAdmin()));
+ return this.asAdmin().addStep(scope.equals(Scope.global) ? new MeanGlobalStep(this.asAdmin()) : new MeanLocalStep(this.asAdmin()));
}
public default <K, V> GraphTraversal<S, Map<K, V>> group() {
[3/4] tinkerpop git commit: More javadocs in GraphTraversal for
mean/min/max/order CTR
Posted by sp...@apache.org.
More javadocs in GraphTraversal for mean/min/max/order CTR
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/14c7df95
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/14c7df95
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/14c7df95
Branch: refs/heads/master
Commit: 14c7df95a4254625986837fbcf2842beaf415da3
Parents: 4215f3a
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Feb 16 17:13:12 2017 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Feb 16 17:13:12 2017 -0500
----------------------------------------------------------------------
.../traversal/dsl/graph/GraphTraversal.java | 60 +++++++++++++++++++-
1 file changed, 58 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/14c7df95/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 1dcdd43..c5a65e0 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
@@ -444,6 +444,7 @@ public interface GraphTraversal<S, E> extends Traversal<S, E> {
* Order all the objects in the traversal up to this point and then emit them one-by-one in their ordered sequence.
*
* @return the traversal with an appended {@link OrderGlobalStep}.
+ * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#order-step">Reference Documentation - Order Step</a>
*/
public default GraphTraversal<S, E> order() {
this.asAdmin().getBytecode().addStep(Symbols.order);
@@ -455,6 +456,7 @@ public interface GraphTraversal<S, E> extends Traversal<S, E> {
*
* @param scope whether the ordering is the current local object or the entire global stream.
* @return the traversal with an appended {@link OrderGlobalStep} or {@link OrderLocalStep}.
+ * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#order-step">Reference Documentation - Order Step</a>
*/
public default GraphTraversal<S, E> order(final Scope scope) {
this.asAdmin().getBytecode().addStep(Symbols.order, scope);
@@ -677,60 +679,114 @@ public interface GraphTraversal<S, E> extends Traversal<S, E> {
}
/**
- * Map the traversal stream to its reduction as a sum of the {@link Traverser#bulk} values (i.e. count the number of traversers up to this point).
+ * Map the traversal stream to its reduction as a sum of the {@link Traverser#bulk} values (i.e. count the number
+ * of traversers up to this point).
*
* @return the traversal with an appended {@link CountGlobalStep}.
+ * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#count-step">Reference Documentation - Count Step</a>
*/
public default GraphTraversal<S, Long> count() {
this.asAdmin().getBytecode().addStep(Symbols.count);
return this.asAdmin().addStep(new CountGlobalStep<>(this.asAdmin()));
}
+ /**
+ * Map the traversal stream to its reduction as a sum of the {@link Traverser#bulk} values given the specified
+ * {@link Scope} (i.e. count the number of traversers up to this point).
+ *
+ * @return the traversal with an appended {@link CountGlobalStep} or {@link CountLocalStep} depending on the {@link Scope}
+ * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#count-step">Reference Documentation - Count Step</a>
+ */
public default GraphTraversal<S, Long> count(final Scope scope) {
this.asAdmin().getBytecode().addStep(Symbols.count, scope);
return this.asAdmin().addStep(scope.equals(Scope.global) ? new CountGlobalStep<>(this.asAdmin()) : new CountLocalStep<>(this.asAdmin()));
}
/**
- * Map the traversal stream to its reduction as a sum of the {@link Traverser#get} values multiplied by their {@link Traverser#bulk} (i.e. sum the traverser values up to this point).
+ * Map the traversal stream to its reduction as a sum of the {@link Traverser#get} values multiplied by their
+ * {@link Traverser#bulk} (i.e. sum the traverser values up to this point).
*
* @return the traversal with an appended {@link SumGlobalStep}.
+ * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#sum-step">Reference Documentation - Sum Step</a>
*/
public default <E2 extends Number> GraphTraversal<S, E2> sum() {
this.asAdmin().getBytecode().addStep(Symbols.sum);
return this.asAdmin().addStep(new SumGlobalStep<>(this.asAdmin()));
}
+ /**
+ * Map the traversal stream to its reduction as a sum of the {@link Traverser#get} values multiplied by their
+ * {@link Traverser#bulk} given the specified {@link Scope} (i.e. sum the traverser values up to this point).
+ *
+ * @return the traversal with an appended {@link SumGlobalStep} or {@link SumLocalStep} depending on the {@link Scope}.
+ * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#sum-step">Reference Documentation - Sum Step</a>
+ */
public default <E2 extends Number> GraphTraversal<S, E2> sum(final Scope scope) {
this.asAdmin().getBytecode().addStep(Symbols.sum, scope);
return this.asAdmin().addStep(scope.equals(Scope.global) ? new SumGlobalStep<>(this.asAdmin()) : new SumLocalStep(this.asAdmin()));
}
+ /**
+ * Determines the largest value in the stream.
+ *
+ * @return the traversal with an appended {@link MaxGlobalStep}.
+ * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#max-step">Reference Documentation - Max Step</a>
+ */
public default <E2 extends Number> GraphTraversal<S, E2> max() {
this.asAdmin().getBytecode().addStep(Symbols.max);
return this.asAdmin().addStep(new MaxGlobalStep<>(this.asAdmin()));
}
+ /**
+ * Determines the largest value in the stream given the {@link Scope}.
+ *
+ * @return the traversal with an appended {@link MaxGlobalStep} or {@link MaxLocalStep} depending on the {@link Scope}
+ * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#max-step">Reference Documentation - Max Step</a>
+ */
public default <E2 extends Number> GraphTraversal<S, E2> max(final Scope scope) {
this.asAdmin().getBytecode().addStep(Symbols.max, scope);
return this.asAdmin().addStep(scope.equals(Scope.global) ? new MaxGlobalStep<>(this.asAdmin()) : new MaxLocalStep(this.asAdmin()));
}
+ /**
+ * Determines the smallest value in the stream.
+ *
+ * @return the traversal with an appended {@link MinGlobalStep}.
+ * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#min-step">Reference Documentation - Min Step</a>
+ */
public default <E2 extends Number> GraphTraversal<S, E2> min() {
this.asAdmin().getBytecode().addStep(Symbols.min);
return this.asAdmin().addStep(new MinGlobalStep<>(this.asAdmin()));
}
+ /**
+ * Determines the smallest value in the stream given the {@link Scope}.
+ *
+ * @return the traversal with an appended {@link MinGlobalStep} or {@link MinLocalStep} depending on the {@link Scope}
+ * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#min-step">Reference Documentation - Min Step</a>
+ */
public default <E2 extends Number> GraphTraversal<S, E2> min(final Scope scope) {
this.asAdmin().getBytecode().addStep(Symbols.min, scope);
return this.asAdmin().addStep(scope.equals(Scope.global) ? new MinGlobalStep<E2>(this.asAdmin()) : new MinLocalStep<>(this.asAdmin()));
}
+ /**
+ * Determines the mean value in the stream.
+ *
+ * @return the traversal with an appended {@link MeanGlobalStep}.
+ * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#mean-step">Reference Documentation - Mean Step</a>
+ */
public default <E2 extends Number> GraphTraversal<S, E2> mean() {
this.asAdmin().getBytecode().addStep(Symbols.mean);
return this.asAdmin().addStep(new MeanGlobalStep<>(this.asAdmin()));
}
+ /**
+ * Determines the mean value in the stream given the {@link Scope}.
+ *
+ * @return the traversal with an appended {@link MeanGlobalStep} or {@link MeanLocalStep} depending on the {@link Scope}
+ * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#mean-step">Reference Documentation - Mean Step</a>
+ */
public default <E2 extends Number> GraphTraversal<S, E2> mean(final Scope scope) {
this.asAdmin().getBytecode().addStep(Symbols.mean, scope);
return this.asAdmin().addStep(scope.equals(Scope.global) ? new MeanGlobalStep<>(this.asAdmin()) : new MeanLocalStep(this.asAdmin()));
[2/4] tinkerpop git commit: Added javadoc/reference docs for label/id
steps CTR
Posted by sp...@apache.org.
Added javadoc/reference docs for label/id steps CTR
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/4215f3aa
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/4215f3aa
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/4215f3aa
Branch: refs/heads/master
Commit: 4215f3aa64234c786a2cdeab163c6c304940065d
Parents: 1780823
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Feb 16 16:58:13 2017 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Feb 16 16:58:13 2017 -0500
----------------------------------------------------------------------
docs/src/reference/the-traversal.asciidoc | 27 ++++++++++++++++++++
.../traversal/dsl/graph/GraphTraversal.java | 2 ++
2 files changed, 29 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4215f3aa/docs/src/reference/the-traversal.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc
index ed76a7a..b41cf4a 100644
--- a/docs/src/reference/the-traversal.asciidoc
+++ b/docs/src/reference/the-traversal.asciidoc
@@ -807,6 +807,20 @@ the key,value pairs for those verticies.
TinkerPop does not support a regular expression predicate, although specific graph databases that leverage TinkerPop
may provide a partial match extension.
+[[id-step]]
+Id Step
+~~~~~~~
+
+The `id()`-step (*map*) takes an `Element` and extracts its identifier from it.
+
+[gremlin-groovy,modern]
+----
+g.V().id()
+g.V(1).out().id().is(2)
+g.V(1).outE().id()
+g.V(1).properties().id()
+----
+
[[inject-step]]
Inject Step
~~~~~~~~~~~
@@ -855,6 +869,19 @@ g.V().where(__.in('created').values('age').
<2> Find projects having two or more contributors.
<3> Find projects whose contributors average age is between 30 and 35.
+[[label-step]]
+Label Step
+~~~~~~~~~~
+
+The `label()`-step (*map*) takes an `Element` and extracts its label from it.
+
+[gremlin-groovy,modern]
+----
+g.V().label()
+g.V(1).outE().label()
+g.V(1).properties().label()
+----
+
[[limit-step]]
Limit Step
~~~~~~~~~~
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4215f3aa/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 29f3b0a..1dcdd43 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
@@ -242,6 +242,7 @@ public interface GraphTraversal<S, E> extends Traversal<S, E> {
* Map the {@link Element} to its {@link Element#id}.
*
* @return the traversal with an appended {@link IdStep}.
+ * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#id-step">Reference Documentation - Id Step</a>
*/
public default GraphTraversal<S, Object> id() {
this.asAdmin().getBytecode().addStep(Symbols.id);
@@ -252,6 +253,7 @@ public interface GraphTraversal<S, E> extends Traversal<S, E> {
* Map the {@link Element} to its {@link Element#label}.
*
* @return the traversal with an appended {@link LabelStep}.
+ * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#label-step">Reference Documentation - Label Step</a>
*/
public default GraphTraversal<S, String> label() {
this.asAdmin().getBytecode().addStep(Symbols.label);