Permalink
Browse files

More steps

  • Loading branch information...
Darrick Wiebe
Darrick Wiebe committed Aug 26, 2012
1 parent 85876ea commit 42b66a3382f1813a4032202aa8bc7eebe28b1e8e
Showing with 49 additions and 1 deletion.
  1. +49 −1 src/pacer/graph.clj
View
@@ -1,7 +1,10 @@
(ns pacer.graph
(:import
(com.tinkerpop.blueprints.impls.tg TinkerGraph)
- (com.tinkerpop.gremlin.pipes.transform InEdgesPipe OutEdgesPipe))
+ (com.tinkerpop.gremlin.pipes.transform InEdgesPipe OutEdgesPipe BothEdgesPipe
+ InPipe OutPipe BothPipe
+ InVertexPipe OutVertexPipe BothVerticesPipe
+ ))
(:use [clojure.pprint :only [pprint]]
[clojure.string :only [join]]
pacer.step))
@@ -73,3 +76,48 @@
:pipe (fn pipe [in]
(BothEdgesPipe. (strs labels))) })
+(defn out [& labels]
+ { :source-type :vertex
+ :type :vertex
+ :name (name+ "Out" labels)
+ :labels labels
+ :pipe (fn pipe [in]
+ (OutPipe. (strs labels))) })
+
+(defn in [& labels]
+ { :source-type :vertex
+ :type :vertex
+ :name (name+ "In" labels)
+ :labels labels
+ :pipe (fn pipe [in]
+ (InPipe. (strs labels))) })
+
+(defn both [& labels]
+ { :source-type :vertex
+ :type :vertex
+ :name (name+ "Both" labels)
+ :labels labels
+ :pipe (fn pipe [in]
+ (BothPipe. (strs labels))) })
+
+(defn out-v []
+ { :source-type :edge
+ :type :vertex
+ :name "OutV"
+ :pipe (fn pipe [in]
+ (OutVertexPipe.)) })
+
+(defn in-v []
+ { :source-type :edge
+ :type :vertex
+ :name "InV"
+ :pipe (fn pipe [in]
+ (InVertexPipe.)) })
+
+(defn both-v []
+ { :source-type :edge
+ :type :vertex
+ :name "BothV"
+ :pipe (fn pipe [in]
+ (BothVerticesPipe.)) })
+

0 comments on commit 42b66a3

Please sign in to comment.