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 2016/01/29 13:42:00 UTC

svn commit: r1727568 - /incubator/tinkerpop/site/docs/3.1.1-SNAPSHOT/tutorials/the-gremlin-console/index.html

Author: spmallette
Date: Fri Jan 29 12:42:00 2016
New Revision: 1727568

URL: http://svn.apache.org/viewvc?rev=1727568&view=rev
Log:
Minor tweaks to consolue tutorial.

Modified:
    incubator/tinkerpop/site/docs/3.1.1-SNAPSHOT/tutorials/the-gremlin-console/index.html

Modified: incubator/tinkerpop/site/docs/3.1.1-SNAPSHOT/tutorials/the-gremlin-console/index.html
URL: http://svn.apache.org/viewvc/incubator/tinkerpop/site/docs/3.1.1-SNAPSHOT/tutorials/the-gremlin-console/index.html?rev=1727568&r1=1727567&r2=1727568&view=diff
==============================================================================
--- incubator/tinkerpop/site/docs/3.1.1-SNAPSHOT/tutorials/the-gremlin-console/index.html (original)
+++ incubator/tinkerpop/site/docs/3.1.1-SNAPSHOT/tutorials/the-gremlin-console/index.html Fri Jan 29 12:42:00 2016
@@ -836,7 +836,7 @@ inspire you to new levels of usage. Whil
 read, as it is possible that a "feature" will be discussed that may be useful to you.</p>
 </div>
 <div class="paragraph">
-<p>The following points summarize the key features discussed of each use case:</p>
+<p>The following points summarize the key features discussed in each use case:</p>
 </div>
 <div class="ulist">
 <ul>
@@ -922,7 +922,9 @@ gremlin&gt; g = graph.traversal() <span
 </li>
 <li>
 <p>Creates the <code>TraversalSource</code> which is the API for
-<a href="http://tinkerpop.apache.org/docs/3.1.1-SNAPSHOT/reference/#_the_graph_process">processing</a> or traversing that <code>Graph</code>.</p>
+<a href="http://tinkerpop.apache.org/docs/3.1.1-SNAPSHOT/reference/#_the_graph_process">processing</a> or
+<a href="http://tinkerpop.apache.org/docs/3.1.1-SNAPSHOT/tutorials/getting-started/#_graph_traversal_staying_simple">traversing</a>
+that <code>Graph</code>.</p>
 </li>
 </ol>
 </div>
@@ -973,7 +975,7 @@ gremlin&gt; g = graph.traversal()
 <div class="paragraph">
 <p><span class="image" style="float: right"><img src="../../images/grateful-gremlin.png" alt="grateful-gremlin" width="110"></span> As you might have noticed from the diagrams of these graphs or from
 the output of the Gremlin Console itself, these toy graphs are small (only a few vertices and edges each). It is nice
-to have a small graph when learning Gremlin so that you can easily see if you are getting the results you expect. Even
+to have a small graph when learning Gremlin, so that you can easily see if you are getting the results you expect. Even
 though these graphs are "small", they are robust enough in structure to try out many different kinds of traversals.
 However, if you find that a larger graph might be helpful, there is another option: The Grateful Dead
 (<a href="http://tinkerpop.apache.org/docs/3.1.1-SNAPSHOT/images/grateful-dead-schema.png">schema</a>).</p>
@@ -1003,7 +1005,7 @@ If you find yourself in a position where
 <a href="http://groups.google.com/group/gremlin-users">Gremlin Users mailing list</a> about a traversal that you are having
 trouble with in your application, try to convert the gist of it to one of the toy graphs.  Taking this step will make it
 easier for advanced Gremlin users to help you, which should lead to a faster response time for your problem. In
-addition, there is the added benefit that the mailing list post will likely be more relevant to other users, as it is
+addition, there is the added benefit that the mailing list post will be more relevant to other users, as it is
 not written solely in the context of your domain.
 </td>
 </tr>
@@ -1087,7 +1089,7 @@ a good way to go about your Gremlin educ
 <div class="paragraph">
 <p><span class="image" style="float: right"><img src="../../images/gremlin-working-on-tinkerpop.png" alt="gremlin-working-on-tinkerpop" width="350"></span> <em>You are an application developer and the TinkerPop stack
 will be central to your application architecture. You need to develop a series of services that will execute queries
-against a graph database in support of the front-end of the software.</em></p>
+against a graph database in support of the application front-end.</em></p>
 </div>
 <div class="paragraph">
 <p>Most application developers use an IDE, such as <a href="https://en.wikipedia.org/wiki/IntelliJ_IDEA">Intellij</a>, to help
@@ -1121,7 +1123,8 @@ methods.</p>
 <div class="paragraph">
 <p>Consider an example where you are developing an application that uses TinkerGraph and the data from the "modern"
 toy graph. You want to encapsulate some logic for a graph traversal that finds a "person" vertex, iterates outgoing
-edges and groups the adjacent vertices as "value maps".</p>
+edges and groups the adjacent vertices as
+<a href="http://tinkerpop.apache.org/docs/3.1.1-SNAPSHOT/reference/#valuemap-step">"value maps"</a>.</p>
 </div>
 <div id="static-imports" class="paragraph">
 <p>As you have read the TinkerPop documentation and have been experimenting with Gremlin for a while, you head to your
@@ -1162,12 +1165,18 @@ in that environment.
 </tr>
 </table>
 </div>
+<div class="imageblock" style="text-align: center">
+<div class="content">
+<img src="../../images/tinkerpop-modern.png" alt="tinkerpop modern" width="500">
+</div>
+</div>
 <div class="paragraph">
-<p>In the "modern" graph, calling <code>groupAround</code> with "1" as the <code>vertexId</code> argument, should return a <code>Map</code> with two keys:
-"knows" and "created", where the "knows" key should have vertices "2" and "4" and the "created" key should have
-vertex "3". As you are a good developer, you know to write a unit test to validate this outcome.  You write your
-test, compile your application, and execute your test only to find it failing on the "knows" key, which only has one
-vertex associated to it instead of two.</p>
+<p>The diagram above displays the "modern" graph for reference.  Assuming that <code>g</code> refers to a <code>TraversalSource</code> generated
+from a <code>Graph</code> instance that refers to that graph, calling <code>groupAround</code> with "1" as the <code>vertexId</code> argument, should
+return a <code>Map</code> with two keys: "knows" and "created", where the "knows" key should have vertices "2" and "4" and the
+"created" key should have vertex "3". As you are a good developer, you know to write a unit test to validate this
+outcome.  You write your test, compile your application, and execute your test only to find it failing on the "knows"
+key, which only has one vertex associated to it instead of two.</p>
 </div>
 <div id="result-iteration" class="paragraph">
 <p>As you have the Gremlin Console open you decide to debug the problem there.  You copy your Gremlin code from
@@ -1554,13 +1563,13 @@ gremlin&gt; l.collect{
 </div>
 <div class="paragraph">
 <p>You had to apply a bit of brute force, but now you have the rows and columns you wanted, with the data normalized and
-flattened in such a way that each year since "2004" is represented all the way up to 2016.</p>
+flattened in such a way that each year since "2004" is represented all the way up to "2016".</p>
 </div>
 <div class="paragraph">
 <p><span class="image" style="float: right"><img src="../../images/gremlin-asciiart.png" alt="gremlin-asciiart" width="225"></span> Unfortunately, you are unsatisfied. The added Groovy processing of
 "l" feels "wrong" despite it producing the correct output.  It has that unfortunate hack for dealing with the
 possibility that the "endTime" property contains a "null" value, thus hard-coding the "2017" year into the it (you
-want the years through 2016).  You also recall that the Gremlin language has advanced considerably in TinkerPop 3.x
+want the years through "2016").  You also recall that the Gremlin language has advanced considerably in TinkerPop 3.x
 and that it is usually possible to eliminate closures and other direct processing with Groovy. With those issues in
 mind, you look to enhance your work.</p>
 </div>
@@ -1891,7 +1900,7 @@ knowledge on what the console can do for
 </div>
 <div id="footer">
 <div id="footer-text">
-Last updated 2016-01-26 12:59:18 -05:00
+Last updated 2016-01-29 07:23:55 -05:00
 </div>
 </div>
 </body>