You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ok...@apache.org on 2015/05/12 21:26:03 UTC

incubator-tinkerpop git commit: updated docs --- removed except and retain step sections. added where-step section. updated processor.groovy as an import changed and a few imports were no longer needed.

Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/master 09285567d -> 03fd69df2


updated docs --- removed except and retain step sections. added where-step section. updated processor.groovy as an import changed and a few imports were no longer needed.


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

Branch: refs/heads/master
Commit: 03fd69df271b6dfeb97209dd0f087f6d62462f20
Parents: 0928556
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Tue May 12 13:25:58 2015 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Tue May 12 13:25:58 2015 -0600

----------------------------------------------------------------------
 docs/preprocessor/processor.groovy |  5 +---
 docs/src/the-traversal.asciidoc    | 42 ++++++---------------------------
 2 files changed, 8 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/03fd69df/docs/preprocessor/processor.groovy
----------------------------------------------------------------------
diff --git a/docs/preprocessor/processor.groovy b/docs/preprocessor/processor.groovy
index 093f82b..cff8fb9 100644
--- a/docs/preprocessor/processor.groovy
+++ b/docs/preprocessor/processor.groovy
@@ -20,7 +20,7 @@
 /**
  * @author Daniel Kuppitz (http://gremlin.guru)
  */
-import org.apache.tinkerpop.gremlin.process.computer.util.ScriptEngineCache
+import org.apache.tinkerpop.gremlin.util.ScriptEngineCache
 import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerFactory
 import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph
 
@@ -31,10 +31,7 @@ def STATEMENT_PREFIX = "gremlin> "
 def STATEMENT_CONTINUATION_PREFIX = "         "
 
 def header = """
-    import org.apache.tinkerpop.gremlin.process.graph.traversal.strategy.*
-    import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerFactory.SocialTraversal
     import org.apache.tinkerpop.gremlin.tinkergraph.structure.*
-    import static java.util.Comparator.*
 """
 
 def imports = new org.apache.tinkerpop.gremlin.console.ConsoleImportCustomizerProvider()

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/03fd69df/docs/src/the-traversal.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/the-traversal.asciidoc b/docs/src/the-traversal.asciidoc
index b273e6c..87c061b 100644
--- a/docs/src/the-traversal.asciidoc
+++ b/docs/src/the-traversal.asciidoc
@@ -139,8 +139,8 @@ link:http://en.wikipedia.org/wiki/Automated_reasoning[Reasoning] is the process
 ----
 g.V(1).as('a').out('created')
 g.V(1).as('a').out('created').in('created')
-g.V(1).as('a').out('created').in('created').except('a') <1>
-g.V(1).as('a').out('created').in('created').except('a').
+g.V(1).as('a').out('created').in('created').where(neq('a')) <1>
+g.V(1).as('a').out('created').in('created').where(neq('a')).
    addOutE('co-developer','a').outV().
    addInE('co-developer','a')
 g.V(1).out('co-developer').values('name')
@@ -193,7 +193,7 @@ g.V(1).out('created').aggregate('x') <2>
 g.V(1).out('created').aggregate('x').in('created') <3>
 g.V(1).out('created').aggregate('x').in('created').out('created') <4>
 g.V(1).out('created').aggregate('x').in('created').out('created').
-       except('x').values('name') <5>
+       where(without('x')).values('name') <5>
 ----
 
 <1> What has marko created?
@@ -429,20 +429,6 @@ g.V().drop()
 g.V()
 ----
 
-[[except-step]]
-Except Step
-~~~~~~~~~~~
-
-The `except()`-step (*filter*) can be used to remove objects from the traversal stream. If `except()` is provided a string, then the excepting object is located at `traverser.sideEffects(string)` or `traverser.path(string)`. If `except()` is provided a collection, then any object contained in that collection is filtered out. Please see the related <<retain-step,`retain()`>>-step.
-
-[gremlin-groovy,modern]
-----
-g.V(1).as('x').out('created').in('created')
-g.V(1).as('x').out('created').in('created').except('x') // co-developers
-g.V(1).as('x').out('created').in('created').values('name')
-g.V(1).as('x').out('created').in('created').values('name').except(['marko','stephen'])
-----
-
 [[fold-step]]
 Fold Step
 ~~~~~~~~~
@@ -1049,20 +1035,6 @@ g.V(1).repeat(out()).until(outE().count().is(0L)).path().by('name') <3>
 
 WARNING: The anonymous traversal of `emit()` and `until()` (not `repeat()`) process their current objects "locally." In OLAP, where the atomic unit of computing is the the vertex and its local "star graph," it is important that the anonymous traversals do not leave the confines of the vertex's star graph. In other words, they can not traverse to an adjacent vertex's properties or edges.
 
-[[retain-step]]
-Retain Step
-~~~~~~~~~~~
-
-The `retain()`-step (*filter*) can be used to filter objects from the traversal stream that don't match the provided criteria. If `retain()` is provided a string, the retaining object is retrieved via `traverser.sideEffect(string)` or `traverser.path(string)`. If `retain()` is provided a collection, then any object not contained in that collection is filtered out. Please see the related <<except-step,`except()`>>-step.
-
-[gremlin-groovy,modern]
-----
-g.V(1).as('x').out('created').in('created')
-g.V(1).as('x').out('created').in('created').retain('x')
-g.V(1).as('x').out('created').in('created').values('name')
-g.V(1).as('x').out('created').in('created').values('name').retain(['marko','stephen'])
-----
-
 [[sack-step]]
 Sack Step
 ~~~~~~~~~
@@ -1458,12 +1430,12 @@ The `where()`-step filters the current object based on either the object itself
 
 [gremlin-groovy,modern]
 ----
-g.V().has('name','marko').as('a').
-  out('created').in('created').as('b').
-  where('a',neq('b')).values('name') <1>
+g.V(1).as('a').out('created').in('created').where(neq('a')) <1>
+g.withSideEffect('a'){['josh','peter']}.V(1).out('created').in('created').values('name').where(within('a')) <2>
 ----
 
-<1> Who are Marko's collaborators, where Marko can not be his own collaborator?
+<1> Who are marko's collaborators, where marko can not be his own collaborator?
+<2> Of the co-creators of marko, only keep those whose name is josh or peter.
 
 Please see <<using-where-with-match,`match().where()`>> and <<using-where-with-select,`select().where()`>> for how `where()` can be used in conjection with `Map<String,Object>` projecting steps.