Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3F367200C2C for ; Thu, 16 Feb 2017 23:14:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 3DFFF160B61; Thu, 16 Feb 2017 22:14:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8DBE3160B72 for ; Thu, 16 Feb 2017 23:14:04 +0100 (CET) Received: (qmail 44433 invoked by uid 500); 16 Feb 2017 22:14:03 -0000 Mailing-List: contact commits-help@tinkerpop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tinkerpop.apache.org Delivered-To: mailing list commits@tinkerpop.apache.org Received: (qmail 44424 invoked by uid 99); 16 Feb 2017 22:14:03 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Feb 2017 22:14:03 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 62EC7DFD9E; Thu, 16 Feb 2017 22:14:03 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: spmallette@apache.org To: commits@tinkerpop.apache.org Date: Thu, 16 Feb 2017 22:14:04 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [2/4] tinkerpop git commit: Added javadoc/reference docs for label/id steps CTR archived-at: Thu, 16 Feb 2017 22:14:05 -0000 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 Authored: Thu Feb 16 16:58:13 2017 -0500 Committer: Stephen Mallette 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 extends Traversal { * Map the {@link Element} to its {@link Element#id}. * * @return the traversal with an appended {@link IdStep}. + * @see Reference Documentation - Id Step */ public default GraphTraversal id() { this.asAdmin().getBytecode().addStep(Symbols.id); @@ -252,6 +253,7 @@ public interface GraphTraversal extends Traversal { * Map the {@link Element} to its {@link Element#label}. * * @return the traversal with an appended {@link LabelStep}. + * @see Reference Documentation - Label Step */ public default GraphTraversal label() { this.asAdmin().getBytecode().addStep(Symbols.label);