You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by dk...@apache.org on 2018/08/01 19:29:27 UTC

[03/50] [abbrv] tinkerpop git commit: TINKERPOP-1996 Removed use of graph.io() in docs

TINKERPOP-1996 Removed use of graph.io() in docs


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

Branch: refs/heads/TINKERPOP-1990
Commit: 5bf19e2d35aa2f050ecca0a7b2190553b0422720
Parents: 6d05805
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Jul 16 09:29:01 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Jul 19 13:40:10 2018 -0400

----------------------------------------------------------------------
 docs/src/recipes/centrality.asciidoc                   |  2 +-
 docs/src/reference/implementations-neo4j.asciidoc      |  5 +++--
 .../src/reference/implementations-tinkergraph.asciidoc |  8 ++++----
 docs/src/reference/the-traversal.asciidoc              | 13 +++++++------
 4 files changed, 15 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5bf19e2d/docs/src/recipes/centrality.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/recipes/centrality.asciidoc b/docs/src/recipes/centrality.asciidoc
index 8504589..0c1d4bc 100644
--- a/docs/src/recipes/centrality.asciidoc
+++ b/docs/src/recipes/centrality.asciidoc
@@ -156,7 +156,7 @@ give it the highest rank. Consider the following example using the Grateful Dead
 
 [gremlin-groovy]
 ----
-graph.io(graphml()).readGraph('data/grateful-dead.xml')
+g.io('data/grateful-dead.xml').read()
 g.V().repeat(groupCount('m').by('name').out()).times(5).cap('m').                <1>
   order(local).by(values, desc).limit(local, 10).next()                          <2>
 g.V().repeat(groupCount('m').by('name').out().timeLimit(100)).times(5).cap('m'). <3>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5bf19e2d/docs/src/reference/implementations-neo4j.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/implementations-neo4j.asciidoc b/docs/src/reference/implementations-neo4j.asciidoc
index 7e05221..1760bd6 100644
--- a/docs/src/reference/implementations-neo4j.asciidoc
+++ b/docs/src/reference/implementations-neo4j.asciidoc
@@ -93,8 +93,8 @@ labels), a linear scan of the vertex-label partition is still faster than a line
 [gremlin-groovy]
 ----
 graph = Neo4jGraph.open('/tmp/neo4j')
-graph.io(graphml()).readGraph('data/grateful-dead.xml')
 g = graph.traversal()
+g.io('data/grateful-dead.xml').read()
 g.tx().commit()
 clock(1000) {g.V().hasLabel('artist').has('name','Garcia').iterate()}  <1>
 graph.cypher("CREATE INDEX ON :artist(name)") <2>
@@ -161,7 +161,8 @@ It is possible to leverage Cypher from within Gremlin by using the `Neo4jGraph.c
 [gremlin-groovy]
 ----
 graph = Neo4jGraph.open('/tmp/neo4j')
-graph.io(gryo()).readGraph('data/tinkerpop-modern.kryo')
+g = graph.traversal()
+g.io('data/tinkerpop-modern.kryo').read()
 graph.cypher('MATCH (a {name:"marko"}) RETURN a')
 graph.cypher('MATCH (a {name:"marko"}) RETURN a').select('a').out('knows').values('name')
 graph.close()

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5bf19e2d/docs/src/reference/implementations-tinkergraph.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/implementations-tinkergraph.asciidoc b/docs/src/reference/implementations-tinkergraph.asciidoc
index 5b04126..acd37dd 100644
--- a/docs/src/reference/implementations-tinkergraph.asciidoc
+++ b/docs/src/reference/implementations-tinkergraph.asciidoc
@@ -90,12 +90,12 @@ TinkerGraph over the Grateful Dead graph.
 ----
 graph = TinkerGraph.open()
 g = graph.traversal()
-graph.io(graphml()).readGraph('data/grateful-dead.xml')
+g.io('data/grateful-dead.xml').read()
 clock(1000) {g.V().has('name','Garcia').iterate()} <1>
 graph = TinkerGraph.open()
 g = graph.traversal()
 graph.createIndex('name',Vertex.class)
-graph.io(graphml()).readGraph('data/grateful-dead.xml')
+g.io('data/grateful-dead.xml').read()
 clock(1000){g.V().has('name','Garcia').iterate()} <2>
 ----
 
@@ -158,13 +158,13 @@ cardinality to `list` or else the data will import as `single`.  Consider the fo
 [gremlin-groovy]
 ----
 graph = TinkerGraph.open()
-graph.io(gryo()).readGraph("data/tinkerpop-crew.kryo")
 g = graph.traversal()
+g.io("data/tinkerpop-crew.kryo").read()
 g.V().properties()
 conf = new BaseConfiguration()
 conf.setProperty("gremlin.tinkergraph.defaultVertexPropertyCardinality","list")
 graph = TinkerGraph.open(conf)
-graph.io(gryo()).readGraph("data/tinkerpop-crew.kryo")
 g = graph.traversal()
+g.io("data/tinkerpop-crew.kryo").read()
 g.V().properties()
 ----

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5bf19e2d/docs/src/reference/the-traversal.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc
index 34f6b27..cca71f6 100644
--- a/docs/src/reference/the-traversal.asciidoc
+++ b/docs/src/reference/the-traversal.asciidoc
@@ -400,7 +400,8 @@ made more salient on a larger graph. Therefore, the example below leverages the
 [gremlin-groovy]
 ----
 graph = TinkerGraph.open()
-graph.io(graphml()).readGraph('data/grateful-dead.xml')
+g = graph.traversal()
+g.io('data/grateful-dead.xml').read()
 g = graph.traversal().withoutStrategies(LazyBarrierStrategy) <1>
 clockWithResult(1){g.V().both().both().both().count().next()} <2>
 clockWithResult(1){g.V().repeat(both()).times(3).count().next()} <3>
@@ -422,8 +423,8 @@ optimization scenario with the added benefit of reducing the risk of an out-of-m
 [gremlin-groovy]
 ----
 graph = TinkerGraph.open()
-graph.io(graphml()).readGraph('data/grateful-dead.xml')
-g = graph.traversal() <1>
+g = graph.traversal()  <1>
+g.io('data/grateful-dead.xml').read()
 clockWithResult(1){g.V().both().both().both().count().next()}
 g.V().both().both().both().count().iterate().toString()  <2>
 ----
@@ -1401,8 +1402,8 @@ songs which Jerry Garcia has both sung and written (using the Grateful Dead grap
 
 [gremlin-groovy]
 ----
-graph.io(graphml()).readGraph('data/grateful-dead.xml')
 g = graph.traversal()
+g.io('data/grateful-dead.xml').read()
 g.V().match(
         __.as('a').has('name', 'Garcia'),
         __.as('a').in('writtenBy').as('b'),
@@ -2493,8 +2494,8 @@ ranking.
 
 [gremlin-groovy]
 ----
-graph.io(graphml()).readGraph('data/grateful-dead.xml')
 g = graph.traversal()
+g.io('data/grateful-dead.xml').read()
 g.V().hasLabel('song').out('followedBy').groupCount().by('name').
       order(local).by(values,desc).limit(local, 5)
 g.V().hasLabel('song').out('followedBy').groupCount().by('name').
@@ -2507,8 +2508,8 @@ Similarly, for extracting the values from a path or map.
 
 [gremlin-groovy]
 ----
-graph.io(graphml()).readGraph('data/grateful-dead.xml')
 g = graph.traversal()
+g.io('data/grateful-dead.xml').read()
 g.V().hasLabel('song').out('sungBy').groupCount().by('name') <1>
 g.V().hasLabel('song').out('sungBy').groupCount().by('name').select(values) <2>
 g.V().hasLabel('song').out('sungBy').groupCount().by('name').select(values).unfold().