tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [2/4] tinkerpop git commit: Added javadoc/reference docs for label/id steps CTR
Date Thu, 16 Feb 2017 22:14:04 GMT
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 <spmva@genoprime.com>
Authored: Thu Feb 16 16:58:13 2017 -0500
Committer: Stephen Mallette <spmva@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);


Mime
View raw message