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/28 19:53:56 UTC

[1/2] tinkerpop git commit: Get rid of references to deprecated addV() in docs CTR

Repository: tinkerpop
Updated Branches:
  refs/heads/master 54dad1d1c -> 1b9a2dc8f


Get rid of references to deprecated addV() in docs CTR


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

Branch: refs/heads/master
Commit: 965fc066c75a0e1684b9a631dc31ce31571322b6
Parents: 77ce515
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Feb 28 14:52:53 2017 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Feb 28 14:52:53 2017 -0500

----------------------------------------------------------------------
 docs/src/recipes/appendix.asciidoc              | 24 +++++-----
 docs/src/recipes/centrality.asciidoc            | 12 ++---
 docs/src/recipes/connected-components.asciidoc  | 12 ++---
 docs/src/recipes/cycle-detection.asciidoc       |  8 ++--
 docs/src/recipes/duplicate-vertex.asciidoc      |  6 +--
 docs/src/recipes/shortest-path.asciidoc         | 20 ++++----
 .../recipes/traversal-induced-values.asciidoc   | 18 +++----
 docs/src/recipes/tree.asciidoc                  | 50 ++++++++++----------
 .../reference/implementations-neo4j.asciidoc    |  2 +-
 docs/src/reference/the-graph.asciidoc           |  2 +-
 .../tutorials/getting-started/index.asciidoc    |  2 +-
 11 files changed, 78 insertions(+), 78 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/965fc066/docs/src/recipes/appendix.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/recipes/appendix.asciidoc b/docs/src/recipes/appendix.asciidoc
index 55fa45d..eccb6df 100644
--- a/docs/src/recipes/appendix.asciidoc
+++ b/docs/src/recipes/appendix.asciidoc
@@ -28,10 +28,10 @@ _For each person in a "follows" graph, determine the number of followers and lis
 
 [gremlin-groovy]
 ----
-g.addV('name','marko').as('marko').
-  addV('name','josh').as('josh').
-  addV('name','daniel').as('daniel').
-  addV('name','matthias').as('matthias').
+g.addV().property('name','marko').as('marko').
+  addV().property('name','josh').as('josh').
+  addV().property('name','daniel').as('daniel').
+  addV().property('name','matthias').as('matthias').
   addE('follows').from('josh').to('marko').
   addE('follows').from('matthias').to('josh').
   addE('follows').from('daniel').to('josh').
@@ -88,14 +88,14 @@ _Assuming a graph of students, classes and times, detect students who have a con
 
 [gremlin-groovy]
 ----
-g.addV(label, "student", "name", "Pete").as("s1").
-  addV(label, "student", "name", "Joe").as("s2").
-  addV(label, "class", "name", "Java's GC").as("c1").
-  addV(label, "class", "name", "FP Principles").as("c2").
-  addV(label, "class", "name", "Memory Management in C").as("c3").
-  addV(label, "class", "name", "Memory Management in C++").as("c4").
-  addV(label, "timeslot", "date", "11/25/2016", "fromTime", "10:00", "toTime", "11:00").as("t1").
-  addV(label, "timeslot", "date", "11/25/2016", "fromTime", "11:00", "toTime", "12:00").as("t2").
+g.addV("student").property("name", "Pete").as("s1").
+  addV("student").property("name", "Joe").as("s2").
+  addV("class").property("name", "Java's GC").as("c1").
+  addV("class").property("name", "FP Principles").as("c2").
+  addV("class").property("name", "Memory Management in C").as("c3").
+  addV("class").property("name", "Memory Management in C++").as("c4").
+  addV("timeslot").property("date", "11/25/2016").property("fromTime", "10:00").property("toTime", "11:00").as("t1").
+  addV("timeslot").property("date", "11/25/2016").property("fromTime", "11:00").property("toTime", "12:00").as("t2").
   addE("attends").from("s1").to("c1").
   addE("attends").from("s1").to("c2").
   addE("attends").from("s1").to("c3").

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/965fc066/docs/src/recipes/centrality.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/recipes/centrality.asciidoc b/docs/src/recipes/centrality.asciidoc
index f6fba30..276bd62 100644
--- a/docs/src/recipes/centrality.asciidoc
+++ b/docs/src/recipes/centrality.asciidoc
@@ -67,12 +67,12 @@ image:betweeness-example.png[width=600]
 
 [gremlin-groovy ]
 ----
-g.addV(id,'A').as('a').
-  addV(id,'B').as('b').
-  addV(id,'C').as('c').
-  addV(id,'D').as('d').
-  addV(id,'E').as('e').
-  addV(id,'F').as('f').
+g.addV().property(id,'A').as('a').
+  addV().property(id,'B').as('b').
+  addV().property(id,'C').as('c').
+  addV().property(id,'D').as('d').
+  addV().property(id,'E').as('e').
+  addV().property(id,'F').as('f').
   addE('next').from('a').to('b').
   addE('next').from('b').to('c').
   addE('next').from('b').to('d').

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/965fc066/docs/src/recipes/connected-components.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/recipes/connected-components.asciidoc b/docs/src/recipes/connected-components.asciidoc
index cfb93fb..250258d 100644
--- a/docs/src/recipes/connected-components.asciidoc
+++ b/docs/src/recipes/connected-components.asciidoc
@@ -25,12 +25,12 @@ image:connected-components.png[width=600]
 
 [gremlin-groovy]
 ----
-g.addV(id, "A").as("a").
-  addV(id, "B").as("b").
-  addV(id, "C").as("c").
-  addV(id, "D").as("d").
-  addV(id, "E").as("e").
-  addV(id, "F").
+g.addV().property(id, "A").as("a").
+  addV().property(id, "B").as("b").
+  addV().property(id, "C").as("c").
+  addV().property(id, "D").as("d").
+  addV().property(id, "E").as("e").
+  addV().property(id, "F").
   addE("link").from("a").to("b").
   addE("link").from("b").to("c").
   addE("link").from("d").to("e").iterate()

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/965fc066/docs/src/recipes/cycle-detection.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/recipes/cycle-detection.asciidoc b/docs/src/recipes/cycle-detection.asciidoc
index 7cebb00..f18b358 100644
--- a/docs/src/recipes/cycle-detection.asciidoc
+++ b/docs/src/recipes/cycle-detection.asciidoc
@@ -25,10 +25,10 @@ image:graph-cycle.png[width=250]
 
 [gremlin-groovy]
 ----
-g.addV(id,'a').as('a').
-  addV(id,'b').as('b').
-  addV(id,'c').as('c').
-  addV(id,'d').as('d').
+g.addV().property(id,'a').as('a').
+  addV().property(id,'b').as('b').
+  addV().property(id,'c').as('c').
+  addV().property(id,'d').as('d').
   addE('knows').from('a').to('b').
   addE('knows').from('b').to('c').
   addE('knows').from('c').to('a').

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/965fc066/docs/src/recipes/duplicate-vertex.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/recipes/duplicate-vertex.asciidoc b/docs/src/recipes/duplicate-vertex.asciidoc
index e0327f4..5730eee 100644
--- a/docs/src/recipes/duplicate-vertex.asciidoc
+++ b/docs/src/recipes/duplicate-vertex.asciidoc
@@ -26,9 +26,9 @@ Consider the following example with some duplicate vertices added to the "modern
 
 [gremlin-groovy,modern]
 ----
-g.addV(label, 'person', 'name', 'vadas', 'age', 27)
-g.addV(label, 'person', 'name', 'vadas', 'age', 22) // not a duplicate because "age" value
-g.addV(label, 'person', 'name', 'marko', 'age', 29)
+g.addV('person').property('name', 'vadas').property('age', 27)
+g.addV('person').property('name', 'vadas').property('age', 22) // not a duplicate because "age" value
+g.addV('person').property('name', 'marko').property('age', 29)
 g.V().hasLabel("person").
   group().
     by(values("name", "age").fold()).

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/965fc066/docs/src/recipes/shortest-path.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/recipes/shortest-path.asciidoc b/docs/src/recipes/shortest-path.asciidoc
index 004bf1e..b9ecec8 100644
--- a/docs/src/recipes/shortest-path.asciidoc
+++ b/docs/src/recipes/shortest-path.asciidoc
@@ -26,11 +26,11 @@ is a simple example that identifies the shortest path between vertex "1" and ver
 
 [gremlin-groovy]
 ----
-g.addV(id, 1).as('1').
-  addV(id, 2).as('2').
-  addV(id, 3).as('3').
-  addV(id, 4).as('4').
-  addV(id, 5).as('5').
+g.addV().property(id, 1).as('1').
+  addV().property(id, 2).as('2').
+  addV().property(id, 3).as('3').
+  addV().property(id, 4).as('4').
+  addV().property(id, 5).as('5').
   addE('knows').from('1').to('2').
   addE('knows').from('2').to('4').
   addE('knows').from('4').to('5').
@@ -56,11 +56,11 @@ but includes a "weight" on the edges, that will be used to help determine the "c
 
 [gremlin-groovy]
 ----
-g.addV(id, 1).as('1').
-  addV(id, 2).as('2').
-  addV(id, 3).as('3').
-  addV(id, 4).as('4').
-  addV(id, 5).as('5').
+g.addV().property(id, 1).as('1').
+  addV().property(id, 2).as('2').
+  addV().property(id, 3).as('3').
+  addV().property(id, 4).as('4').
+  addV().property(id, 5).as('5').
   addE('knows').from('1').to('2').property('weight', 1.25).
   addE('knows').from('2').to('4').property('weight', 1.5).
   addE('knows').from('4').to('5').property('weight', 0.25).

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/965fc066/docs/src/recipes/traversal-induced-values.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/recipes/traversal-induced-values.asciidoc b/docs/src/recipes/traversal-induced-values.asciidoc
index 03affbe..d2376ef 100644
--- a/docs/src/recipes/traversal-induced-values.asciidoc
+++ b/docs/src/recipes/traversal-induced-values.asciidoc
@@ -63,12 +63,12 @@ image:traversal-induced-values-3.png[width=600]
 
 [gremlin-groovy]
 ----
-g.addV("name", "alice", label, "user").as("u1").
-  addV("name", "jen", label, "user").as("u2").
-  addV("name", "dave", label, "user").as("u3").
-  addV("name", "the wild bunch", label, "movie").as("m1").
-  addV("name", "young guns", label, "movie").as("m2").
-  addV("name", "unforgiven", label, "movie").as("m3").
+g.addV("user").property("name", "alice").as("u1").
+  addV("user").property("name", "jen").as("u2").
+  addV("user").property("name", "dave").as("u3").
+  addV("movie").property("name", "the wild bunch").as("m1").
+  addV("movie").property("name", "young guns").as("m2").
+  addV("movie").property("name", "unforgiven").as("m3").
   addE("friend").from("u1").to("u2").
   addE("friend").from("u1").to("u3").
   addE("like").from("u2").to("m1").
@@ -133,9 +133,9 @@ Using Gremlin `sack()`, this kind of operation could be specified as a single tr
 
 [gremlin-groovy]
 ----
-g.addV(label, 'tank', 'name', 'a', 'amount', 100.0).as('a').
-  addV(label, 'tank', 'name', 'b', 'amount', 0.0).as('b').
-  addV(label, 'tank', 'name', 'c', 'amount', 0.0).as('c').
+g.addV('tank').property('name', 'a').property('amount', 100.0).as('a').
+  addV('tank').property('name', 'b').property('amount', 0.0).as('b').
+  addV('tank').property('name', 'c').property('amount', 0.0).as('c').
   addE('drain').property('factor', 0.5).from('a').to('b').
   addE('drain').property('factor', 0.1).from('b').to('c').iterate()
 a = g.V().has('name','a').next()

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/965fc066/docs/src/recipes/tree.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/recipes/tree.asciidoc b/docs/src/recipes/tree.asciidoc
index 7069277..48dcf1b 100644
--- a/docs/src/recipes/tree.asciidoc
+++ b/docs/src/recipes/tree.asciidoc
@@ -32,13 +32,13 @@ The following code simply sets up the graph depicted above using "hasParent" for
 
 [gremlin-groovy]
 ----
-g.addV(id, 'A').as('a').
-  addV(id, 'B').as('b').
-  addV(id, 'C').as('c').
-  addV(id, 'D').as('d').
-  addV(id, 'E').as('e').
-  addV(id, 'F').as('f').
-  addV(id, 'G').as('g').
+g.addV().property(id, 'A').as('a').
+  addV().property(id, 'B').as('b').
+  addV().property(id, 'C').as('c').
+  addV().property(id, 'D').as('d').
+  addV().property(id, 'E').as('e').
+  addV().property(id, 'F').as('f').
+  addV().property(id, 'G').as('g').
   addE('hasParent').from('a').to('b').
   addE('hasParent').from('b').to('c').
   addE('hasParent').from('d').to('c').
@@ -118,13 +118,13 @@ Finding the maximum depth of a tree starting from a specified root vertex can be
 
 [gremlin-groovy]
 ----
-g.addV('name', 'A').as('a').
-  addV('name', 'B').as('b').
-  addV('name', 'C').as('c').
-  addV('name', 'D').as('d').
-  addV('name', 'E').as('e').
-  addV('name', 'F').as('f').
-  addV('name', 'G').as('g').
+g.addV().property('name', 'A').as('a').
+  addV().property('name', 'B').as('b').
+  addV().property('name', 'C').as('c').
+  addV().property('name', 'D').as('d').
+  addV().property('name', 'E').as('e').
+  addV().property('name', 'F').as('f').
+  addV().property('name', 'G').as('g').
   addE('hasParent').from('a').to('b').
   addE('hasParent').from('b').to('c').
   addE('hasParent').from('d').to('c').
@@ -171,17 +171,17 @@ The Gremlin script below creates the graph depicted in the graph above:
 
 [gremlin-groovy]
 ----
-g.addV(label, 'year', 'name', '2016').as('y2016').
-  addV(label, 'month', 'name', 'may').as('m05').
-  addV(label, 'month', 'name', 'june').as('m06').
-  addV(label, 'day', 'name', '30').as('d30').
-  addV(label, 'day', 'name', '31').as('d31').
-  addV(label, 'day', 'name', '01').as('d01').
-  addV(label, 'event', 'name', 'A').as('eA').
-  addV(label, 'event', 'name', 'B').as('eB').
-  addV(label, 'event', 'name', 'C').as('eC').
-  addV(label, 'event', 'name', 'D').as('eD').
-  addV(label, 'event', 'name', 'E').as('eE').
+g.addV('year').property('name', '2016').as('y2016').
+  addV('month').property('name', 'may').as('m05').
+  addV('month').property('name', 'june').as('m06').
+  addV('day').property('name', '30').as('d30').
+  addV('day').property('name', '31').as('d31').
+  addV('day').property('name', '01').as('d01').
+  addV('event').property('name', 'A').as('eA').
+  addV('event').property('name', 'B').as('eB').
+  addV('event').property('name', 'C').as('eC').
+  addV('event').property('name', 'D').as('eD').
+  addV('event').property('name', 'E').as('eE').
   addE('may').from('y2016').to('m05').
   addE('june').from('y2016').to('m06').
   addE('day30').from('m05').to('d30').

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/965fc066/docs/src/reference/implementations-neo4j.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/implementations-neo4j.asciidoc b/docs/src/reference/implementations-neo4j.asciidoc
index 83f230c..bc3f824 100644
--- a/docs/src/reference/implementations-neo4j.asciidoc
+++ b/docs/src/reference/implementations-neo4j.asciidoc
@@ -135,7 +135,7 @@ conf.setProperty('gremlin.neo4j.multiProperties',true)
 conf.setProperty('gremlin.neo4j.metaProperties',true)
 graph = Neo4jGraph.open(conf)
 g = graph.traversal()
-g.addV('name','michael','name','michael hunger','name','mhunger')
+g.addV().property('name','michael').property('name','michael hunger').property('name','mhunger')
 g.V().properties('name').property('acl', 'public')
 g.V(0).valueMap()
 g.V(0).properties()

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/965fc066/docs/src/reference/the-graph.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-graph.asciidoc b/docs/src/reference/the-graph.asciidoc
index be0dd3e..07acf26 100644
--- a/docs/src/reference/the-graph.asciidoc
+++ b/docs/src/reference/the-graph.asciidoc
@@ -82,7 +82,7 @@ A running example using vertex properties is provided below to demonstrate and e
 ----
 graph = TinkerGraph.open()
 g = graph.traversal()
-v = g.addV('name','marko','name','marko a. rodriguez').next()
+v = g.addV().property('name','marko').property('name','marko a. rodriguez').next()
 g.V(v).properties('name').count() <1>
 v.property(list, 'name', 'm. a. rodriguez') <2>
 g.V(v).properties('name').count()

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/965fc066/docs/src/tutorials/getting-started/index.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/tutorials/getting-started/index.asciidoc b/docs/src/tutorials/getting-started/index.asciidoc
index 337061b..c5f98ce 100644
--- a/docs/src/tutorials/getting-started/index.asciidoc
+++ b/docs/src/tutorials/getting-started/index.asciidoc
@@ -493,7 +493,7 @@ graph.createIndex('userId', Vertex.class) <1>
 g = graph.traversal()
 
 getOrCreate = { id ->
-  g.V().has('userId', id).tryNext().orElseGet{ g.addV('userId', id).next() }
+  g.V().has('userId', id).tryNext().orElseGet{ g.addV().property('userId', id).next() }
 }
 
 new File('wiki-Vote.txt').eachLine {


[2/2] 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/1b9a2dc8
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/1b9a2dc8
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/1b9a2dc8

Branch: refs/heads/master
Commit: 1b9a2dc8f7ee5e7495b8142cc977b4d09372beb4
Parents: 54dad1d 965fc06
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Feb 28 14:53:47 2017 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Feb 28 14:53:47 2017 -0500

----------------------------------------------------------------------
 docs/src/recipes/appendix.asciidoc              | 24 +++++-----
 docs/src/recipes/centrality.asciidoc            | 12 ++---
 docs/src/recipes/connected-components.asciidoc  | 12 ++---
 docs/src/recipes/cycle-detection.asciidoc       |  8 ++--
 docs/src/recipes/duplicate-vertex.asciidoc      |  6 +--
 docs/src/recipes/shortest-path.asciidoc         | 20 ++++----
 .../recipes/traversal-induced-values.asciidoc   | 18 +++----
 docs/src/recipes/tree.asciidoc                  | 50 ++++++++++----------
 .../reference/implementations-neo4j.asciidoc    |  2 +-
 docs/src/reference/the-graph.asciidoc           |  2 +-
 .../tutorials/getting-started/index.asciidoc    |  2 +-
 11 files changed, 78 insertions(+), 78 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1b9a2dc8/docs/src/reference/implementations-neo4j.asciidoc
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1b9a2dc8/docs/src/reference/the-graph.asciidoc
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1b9a2dc8/docs/src/tutorials/getting-started/index.asciidoc
----------------------------------------------------------------------