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/09 19:10:04 UTC
incubator-tinkerpop git commit: Added another `edge()` method in
`ScriptElementFactory` that allows to set explicit edge ids.
Repository: incubator-tinkerpop
Updated Branches:
refs/heads/TINKERPOP-1137 [created] 50d5dd9bd
Added another `edge()` method in `ScriptElementFactory` that allows to set explicit edge ids.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/50d5dd9b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/50d5dd9b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/50d5dd9b
Branch: refs/heads/TINKERPOP-1137
Commit: 50d5dd9bdb52633d9655f5a476f9885e6ff298d7
Parents: b07400c
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Tue Feb 9 19:08:54 2016 +0100
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Tue Feb 9 19:08:54 2016 +0100
----------------------------------------------------------------------
docs/src/reference/implementations.asciidoc | 1 +
.../gremlin/hadoop/structure/io/script/ScriptRecordReader.java | 4 ++++
2 files changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/50d5dd9b/docs/src/reference/implementations.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/implementations.asciidoc b/docs/src/reference/implementations.asciidoc
index 439123d..6b29ae7 100644
--- a/docs/src/reference/implementations.asciidoc
+++ b/docs/src/reference/implementations.asciidoc
@@ -1551,6 +1551,7 @@ Vertex vertex(Object id); // get or create the vertex with the given id
Vertex vertex(Object id, String label); // get or create the vertex with the given id and label
Edge edge(Vertex out, Vertex in); // create an edge between the two given vertices
Edge edge(Vertex out, Vertex in, String label); // create an edge between the two given vertices using the given label
+Edge edge(Vertex out, Vertex in, Object id, String label); // create an edge between the two given vertices using the given edge id and label
An appropriate `parse()` for the above adjacency list file is:
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/50d5dd9b/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/script/ScriptRecordReader.java
----------------------------------------------------------------------
diff --git a/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/script/ScriptRecordReader.java b/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/script/ScriptRecordReader.java
index 4cc1602..b5e1cc0 100644
--- a/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/script/ScriptRecordReader.java
+++ b/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/script/ScriptRecordReader.java
@@ -138,5 +138,9 @@ public final class ScriptRecordReader extends RecordReader<NullWritable, VertexW
public Edge edge(final Vertex out, final Vertex in, final String label) {
return out.addEdge(label, in);
}
+
+ public Edge edge(final Vertex out, final Vertex in, final Object id, final String label) {
+ return out.addEdge(label, in, T.id, id);
+ }
}
}