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 2016/02/11 13:42:30 UTC

[08/10] incubator-tinkerpop git commit: reverted changes in ScriptInput parser in order to verify that backwards compatibility is preserved

reverted changes in ScriptInput parser in order to verify that backwards compatibility is preserved


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

Branch: refs/heads/master
Commit: 4f885f04b92b92ff0ee8a30a781bee837fac8287
Parents: 3cc0d8a
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Wed Feb 10 23:38:23 2016 +0100
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Wed Feb 10 23:38:23 2016 +0100

----------------------------------------------------------------------
 .../structure/io/script/script-input-grateful-dead.groovy      | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4f885f04/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/script/script-input-grateful-dead.groovy
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/script/script-input-grateful-dead.groovy b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/script/script-input-grateful-dead.groovy
index 38ff99a..b334207 100644
--- a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/script/script-input-grateful-dead.groovy
+++ b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/script/script-input-grateful-dead.groovy
@@ -20,7 +20,7 @@
 def parse(line, factory) {
     def (vertex, outEdges, inEdges) = line.split(/\t/, 3)
     def (v1id, v1label, v1props) = vertex.split(/,/, 3)
-    def v1 = graph.addVertex(T.id, v1id.toInteger(), T.label, v1label)
+    def v1 = factory.vertex(v1id.toInteger(), v1label)
     switch (v1label) {
         case "song":
             def (name, songType, performances) = v1props.split(/,/)
@@ -43,8 +43,8 @@ def parse(line, factory) {
             } else {
                 (eLabel, otherV, weight) = parts
             }
-            def v2 = graph.addVertex(T.id, otherV.toInteger())
-            def e = out ? v1.addOutEdge(eLabel, v2) : v1.addInEdge(eLabel, v2)
+            def v2 = factory.vertex(otherV.toInteger())
+            def e = factory.edge(out ? v1 : v2, out ? v2 : v1, eLabel)
             if (weight != null) e.property("weight", weight.toInteger())
         }
     }