Permalink
Browse files

Update to use the Gremlin 2.0 API

  • Loading branch information...
1 parent 5e8c4b9 commit 0cab927550f1fbef847da5ca881e593f4643a9b0 @varju varju committed with varju May 25, 2012
Showing with 86 additions and 79 deletions.
  1. +2 −2 gremlin-scala/pom.xml
  2. +12 −5 gremlin-scala/src/main/scala/com/tinkerpop/gremlin/scala/GremlinScalaPipeline.scala
  3. +3 −3 gremlin-scala/src/main/scala/com/tinkerpop/gremlin/scala/ScalaEdge.scala
  4. +1 −1 gremlin-scala/src/main/scala/com/tinkerpop/gremlin/scala/ScalaElement.scala
  5. +7 −7 gremlin-scala/src/main/scala/com/tinkerpop/gremlin/scala/ScalaGraph.scala
  6. +3 −3 gremlin-scala/src/main/scala/com/tinkerpop/gremlin/scala/ScalaVertex.scala
  7. +1 −1 gremlin-scala/src/main/scala/com/tinkerpop/gremlin/scala/console/Console.scala
  8. +2 −2 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/FunctionStepTest.scala
  9. +2 −2 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/UtilitiesTest.scala
  10. +2 −2 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/branch/IfThenElseStepTest.scala
  11. +4 −4 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/branch/LoopStepTest.scala
  12. +2 −2 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/branch/SplitMergeStepsTest.scala
  13. +2 −2 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/filter/BackStepTest.scala
  14. +4 −4 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/filter/DedupStepTest.scala
  15. +2 −2 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/filter/ExceptStepTest.scala
  16. +2 −2 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/filter/FilterStepTest.scala
  17. +1 −1 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/filter/HasNotStepTest.scala
  18. +1 −1 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/filter/HasStepTest.scala
  19. +1 −1 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/filter/RangeStepTest.scala
  20. +2 −2 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/filter/RetainStepTest.scala
  21. +4 −4 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/sideeffect/AggregateStepTest.scala
  22. +2 −2 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/sideeffect/GroupByStepTest.scala
  23. +5 −5 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/sideeffect/GroupCountStepTest.scala
  24. +2 −2 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/sideeffect/SideEffectStepTest.scala
  25. +4 −4 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/sideeffect/StoreStepTest.scala
  26. +2 −2 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/sideeffect/TableStepTest.scala
  27. +2 −2 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/sideeffect/TreeStepTest.scala
  28. +2 −2 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/transform/MapStepTest.scala
  29. +2 −2 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/transform/PathStepTest.scala
  30. +2 −2 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/transform/SelectStepTest.scala
  31. +2 −2 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/transform/TransformStepTest.scala
  32. +1 −1 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/transform/TraversalStepsTest.scala
View
4 gremlin-scala/pom.xml
@@ -5,10 +5,10 @@
<parent>
<groupId>com.tinkerpop.gremlin</groupId>
<artifactId>gremlin</artifactId>
- <version>1.6-SNAPSHOT</version>
+ <version>2.0.0</version>
</parent>
<artifactId>gremlin-scala</artifactId>
- <version>1.6-SNAPSHOT</version>
+ <version>2.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Gremlin-Scala: Gremlin for the Scala Language</name>
<developers>
View
17 gremlin-scala/src/main/scala/com/tinkerpop/gremlin/scala/GremlinScalaPipeline.scala
@@ -1,8 +1,9 @@
package com.tinkerpop.gremlin.scala
import com.tinkerpop.gremlin.java.GremlinPipeline
-import com.tinkerpop.blueprints.pgm._
+import com.tinkerpop.blueprints._
import com.tinkerpop.pipes.{PipeFunction, Pipe}
+import com.tinkerpop.pipes.util.{FluentUtility, StartPipe}
import com.tinkerpop.pipes.branch.LoopPipe.LoopBundle
import java.util.{Map => JMap, List => JList, Iterator => JIterator, Collection => JCollection, ArrayList => JArrayList}
import com.tinkerpop.gremlin.Tokens
@@ -44,8 +45,8 @@ class GremlinScalaPipeline[S, E] extends GremlinPipeline[S, E] {
override def bothV: GremlinScalaPipeline[S, Vertex] =
super.bothV.asInstanceOf[GremlinScalaPipeline[S, Vertex]]
- override def E: GremlinScalaPipeline[S, Edge] =
- super.E.asInstanceOf[GremlinScalaPipeline[S, Edge]]
+ def E(graph: Graph): GremlinScalaPipeline[Edge, Edge] =
+ manualStart(graph.getEdges)
override def idEdge(graph: Graph): GremlinScalaPipeline[S, Edge] =
super.idEdge(graph).asInstanceOf[GremlinScalaPipeline[S, Edge]]
@@ -83,8 +84,8 @@ class GremlinScalaPipeline[S, E] extends GremlinPipeline[S, E] {
def property[F <: Element](key: String): GremlinScalaPipeline[S, Object] =
super.property(key).asInstanceOf[GremlinScalaPipeline[S, Object]]
- override def V: GremlinScalaPipeline[S, Vertex] =
- super.V.asInstanceOf[GremlinScalaPipeline[S, Vertex]]
+ def V(graph: Graph): GremlinScalaPipeline[Vertex, Vertex] =
+ manualStart(graph.getVertices)
def step[F](f: JIterator[E] => F): GremlinScalaPipeline[S, F] =
super.step(f).asInstanceOf[GremlinScalaPipeline[S, F]]
@@ -355,4 +356,10 @@ class GremlinScalaPipeline[S, E] extends GremlinPipeline[S, E] {
override def start(starts: S): GremlinScalaPipeline[S, S] = {
super.start(starts).asInstanceOf[GremlinScalaPipeline[S, S]]
}
+
+ private def manualStart[T](start: Any): GremlinScalaPipeline[T, T] = {
+ val pipe = this.add(new StartPipe[S](start));
+ FluentUtility.setStarts(this, start);
+ pipe.asInstanceOf[GremlinScalaPipeline[T, T]]
+ }
}
View
6 gremlin-scala/src/main/scala/com/tinkerpop/gremlin/scala/ScalaEdge.scala
@@ -1,8 +1,8 @@
package com.tinkerpop.gremlin.scala
-import com.tinkerpop.blueprints.pgm.{Vertex, Edge}
+import com.tinkerpop.blueprints.{Vertex, Edge}
-/**Adds convenience methods to [[com.tinkerpop.blueprints.pgm.Edge]]. */
+/**Adds convenience methods to [[com.tinkerpop.blueprints.Edge]]. */
class ScalaEdge(val edge: Edge) extends ScalaElement(edge) {
def inV: GremlinScalaPipeline[Edge, Vertex] =
new GremlinScalaPipeline[Edge, Vertex].start(edge).inV().asInstanceOf[GremlinScalaPipeline[Edge, Vertex]]
@@ -17,7 +17,7 @@ class ScalaEdge(val edge: Edge) extends ScalaElement(edge) {
new GremlinScalaPipeline[Edge, Edge].start(edge).asInstanceOf[GremlinScalaPipeline[Edge, Edge]];
}
-/**Implicit conversions between [[com.tinkerpop.blueprints.pgm.Edge]] and [[com.tinkerpop.gremlin.scala.ScalaEdge]]. */
+/**Implicit conversions between [[com.tinkerpop.blueprints.Edge]] and [[com.tinkerpop.gremlin.scala.ScalaEdge]]. */
object ScalaEdge {
implicit def wrap(edge: Edge) = new ScalaEdge(edge)
View
2 gremlin-scala/src/main/scala/com/tinkerpop/gremlin/scala/ScalaElement.scala
@@ -1,6 +1,6 @@
package com.tinkerpop.gremlin.scala
-import com.tinkerpop.blueprints.pgm.Element
+import com.tinkerpop.blueprints.Element
import java.util.{Map => JMap}
/**
View
14 gremlin-scala/src/main/scala/com/tinkerpop/gremlin/scala/ScalaGraph.scala
@@ -1,12 +1,12 @@
package com.tinkerpop.gremlin.scala
-import com.tinkerpop.blueprints.pgm.{Graph, Vertex, Edge}
+import com.tinkerpop.blueprints.{Graph, Vertex, Edge}
-/**Adds convenience methods to [[com.tinkerpop.blueprints.pgm.Graph]]. */
+/**Adds convenience methods to [[com.tinkerpop.blueprints.Graph]]. */
class ScalaGraph(val graph: Graph) {
/**Returns all vertices. */
- def V: GremlinScalaPipeline[Graph, Vertex] =
- new GremlinScalaPipeline[Graph, Vertex].start(graph).V().asInstanceOf[GremlinScalaPipeline[Graph, Vertex]]
+ def V: GremlinScalaPipeline[Vertex, Vertex] =
+ new GremlinScalaPipeline[Graph, Vertex].start(graph).V(graph).asInstanceOf[GremlinScalaPipeline[Vertex, Vertex]]
/**Returns the vertices with the specified IDs. */
def V(ids: Any*): Iterable[Vertex] = ids.map(graph.getVertex(_)) //TODO should'nt V and V(1,2) return the same type???
@@ -15,8 +15,8 @@ class ScalaGraph(val graph: Graph) {
def v(id: Any): Vertex = graph getVertex id
/**Returns all edges. */
- def E: GremlinScalaPipeline[Graph, Edge] =
- new GremlinScalaPipeline[Graph, Edge].start(graph).E().asInstanceOf[GremlinScalaPipeline[Graph, Edge]]
+ def E: GremlinScalaPipeline[Edge, Edge] =
+ new GremlinScalaPipeline[Graph, Edge].start(graph).E(graph).asInstanceOf[GremlinScalaPipeline[Edge, Edge]]
/**Returns the edges with the specified IDs. */
def E(ids: Any*): Iterable[Edge] = ids map {
@@ -32,7 +32,7 @@ class ScalaGraph(val graph: Graph) {
//TODO def += for addVertex and addEdge?
}
-/**Implicit conversions between [[com.tinkerpop.blueprints.pgm.Graph]] and [[com.tinkerpop.gremlin.scala.ScalaGraph]]. */
+/**Implicit conversions between [[com.tinkerpop.blueprints.Graph]] and [[com.tinkerpop.gremlin.scala.ScalaGraph]]. */
object ScalaGraph {
implicit def wrap(graph: Graph) = new ScalaGraph(graph)
View
6 gremlin-scala/src/main/scala/com/tinkerpop/gremlin/scala/ScalaVertex.scala
@@ -1,9 +1,9 @@
package com.tinkerpop.gremlin.scala
import java.util.{Map => JMap}
-import com.tinkerpop.blueprints.pgm.{Vertex, Edge}
+import com.tinkerpop.blueprints.{Vertex, Edge}
-/**Adds convenience methods to [[com.tinkerpop.blueprints.pgm.Vertex]]. */
+/**Adds convenience methods to [[com.tinkerpop.blueprints.Vertex]]. */
class ScalaVertex(val vertex: Vertex) extends ScalaElement(vertex) {
def out: GremlinScalaPipeline[Vertex, Vertex] =
new GremlinScalaPipeline[Vertex, Vertex].start(vertex).out().asInstanceOf[GremlinScalaPipeline[Vertex, Vertex]]
@@ -45,7 +45,7 @@ class ScalaVertex(val vertex: Vertex) extends ScalaElement(vertex) {
new GremlinScalaPipeline[Vertex, Vertex].start(vertex).asInstanceOf[GremlinScalaPipeline[Vertex, Vertex]];
}
-/**Implicit conversions between [[com.tinkerpop.blueprints.pgm.Vertex]] and [[com.tinkerpop.gremlin.scala.ScalaVertex]]. */
+/**Implicit conversions between [[com.tinkerpop.blueprints.Vertex]] and [[com.tinkerpop.gremlin.scala.ScalaVertex]]. */
object ScalaVertex {
implicit def wrap(vertex: Vertex) = new ScalaVertex(vertex)
View
2 gremlin-scala/src/main/scala/com/tinkerpop/gremlin/scala/console/Console.scala
@@ -36,7 +36,7 @@ class GremlinILoop extends ILoop {
//printWelcome() is the only decent place to init the intp while process() is setting things up...
intp beQuietDuring {
//calling addImports separately for each import is really slow, so only call it once
- val imports = Imports.getImports("*", "_") :+ "com.tinkerpop.gremlin.scala._"
+ val imports = Imports.getImports.map(_.replace("*", "_")) :+ "com.tinkerpop.gremlin.scala._"
intp.addImports(imports: _*)
}
}
View
4 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/FunctionStepTest.scala
@@ -1,7 +1,7 @@
package com.tinkerpop.gremlin.scala
-import com.tinkerpop.blueprints.pgm.Vertex
-import com.tinkerpop.blueprints.pgm.impls.tg.TinkerGraphFactory
+import com.tinkerpop.blueprints.Vertex
+import com.tinkerpop.blueprints.impls.tg.TinkerGraphFactory
import com.tinkerpop.gremlin.test.ComplianceTest
import java.util.{Iterator => JIterator}
View
4 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/UtilitiesTest.scala
@@ -1,8 +1,8 @@
package com.tinkerpop.gremlin.scala
-import com.tinkerpop.blueprints.pgm.impls.tg.TinkerGraphFactory
+import com.tinkerpop.blueprints.impls.tg.TinkerGraphFactory
import com.tinkerpop.gremlin.test.ComplianceTest
-import com.tinkerpop.blueprints.pgm.Vertex
+import com.tinkerpop.blueprints.Vertex
/**
* @author Marko A. Rodriguez (http://markorodriguez.com)
View
4 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/branch/IfThenElseStepTest.scala
@@ -1,8 +1,8 @@
package com.tinkerpop.gremlin.scala.branch
-import com.tinkerpop.blueprints.pgm.impls.tg.TinkerGraphFactory
+import com.tinkerpop.blueprints.impls.tg.TinkerGraphFactory
import com.tinkerpop.gremlin.test.ComplianceTest
-import com.tinkerpop.blueprints.pgm.Vertex
+import com.tinkerpop.blueprints.Vertex
import com.tinkerpop.gremlin.scala._
import com.tinkerpop.pipes.Pipe
View
8 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/branch/LoopStepTest.scala
@@ -1,11 +1,11 @@
package com.tinkerpop.gremlin.scala.branch
-import com.tinkerpop.blueprints.pgm.impls.tg.TinkerGraphFactory
+import com.tinkerpop.blueprints.impls.tg.TinkerGraphFactory
import com.tinkerpop.gremlin.test.ComplianceTest
import com.tinkerpop.pipes.branch.LoopPipe.LoopBundle
import com.tinkerpop.gremlin.scala._
import com.tinkerpop.pipes.Pipe
-import com.tinkerpop.blueprints.pgm.{Graph, Vertex}
+import com.tinkerpop.blueprints.{Graph, Vertex}
/**
* @author Marko A. Rodriguez (http://markorodriguez.com)
@@ -28,11 +28,11 @@ class LoopStepTest extends com.tinkerpop.gremlin.test.branch.LoopStepTest {
}
def test_g_V_out_loopX1_loops_lt_3X_propertyXnameX() {
- super.test_g_V_out_loopX1_loops_lt_3X_propertyXnameX(g.V.out.loop(1, {lb: LoopBundle[Vertex] => lb.loops < 3}).property("name").asInstanceOf[Pipe[Graph, String]]);
+ super.test_g_V_out_loopX1_loops_lt_3X_propertyXnameX(g.V.out.loop(1, {lb: LoopBundle[Vertex] => lb.loops < 3}).property("name").asInstanceOf[Pipe[Vertex, String]]);
}
def test_g_V_asXhereX_out_loopXhere_loops_lt_3X_propertyXnameX() {
- super.test_g_V_asXhereX_out_loopXhere_loops_lt_3X_propertyXnameX(g.V.as("here").out().loop("here", {lb: LoopBundle[Vertex] => lb.loops < 3}).property("name").asInstanceOf[Pipe[Graph, String]]);
+ super.test_g_V_asXhereX_out_loopXhere_loops_lt_3X_propertyXnameX(g.V.as("here").out().loop("here", {lb: LoopBundle[Vertex] => lb.loops < 3}).property("name").asInstanceOf[Pipe[Vertex, String]]);
}
View
4 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/branch/SplitMergeStepsTest.scala
@@ -1,9 +1,9 @@
package com.tinkerpop.gremlin.scala.branch
-import com.tinkerpop.blueprints.pgm.impls.tg.TinkerGraphFactory
+import com.tinkerpop.blueprints.impls.tg.TinkerGraphFactory
import com.tinkerpop.gremlin.test.ComplianceTest
import com.tinkerpop.gremlin.scala._
-import com.tinkerpop.blueprints.pgm.Vertex
+import com.tinkerpop.blueprints.Vertex
import com.tinkerpop.pipes.Pipe
/**
View
4 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/filter/BackStepTest.scala
@@ -1,8 +1,8 @@
package com.tinkerpop.gremlin.scala.filter
-import com.tinkerpop.blueprints.pgm.impls.tg.TinkerGraphFactory
+import com.tinkerpop.blueprints.impls.tg.TinkerGraphFactory
import com.tinkerpop.gremlin.test.ComplianceTest
-import com.tinkerpop.blueprints.pgm.Vertex
+import com.tinkerpop.blueprints.Vertex
import com.tinkerpop.gremlin.scala._
import com.tinkerpop.pipes.Pipe
View
8 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/filter/DedupStepTest.scala
@@ -1,10 +1,10 @@
package com.tinkerpop.gremlin.scala.filter
-import com.tinkerpop.blueprints.pgm.impls.tg.TinkerGraphFactory
+import com.tinkerpop.blueprints.impls.tg.TinkerGraphFactory
import com.tinkerpop.gremlin.test.ComplianceTest
import com.tinkerpop.gremlin.scala._
import com.tinkerpop.pipes.Pipe
-import com.tinkerpop.blueprints.pgm.{Graph, Vertex}
+import com.tinkerpop.blueprints.{Graph, Vertex}
/**
* @author Marko A. Rodriguez (http://markorodriguez.com)
@@ -19,10 +19,10 @@ class DedupStepTest extends com.tinkerpop.gremlin.test.filter.DedupStepTest {
}
def test_g_V_both_dedup_name() {
- super.test_g_V_both_dedup_name(g.V.both().dedup.property("name").asInstanceOf[Pipe[Graph, String]]);
+ super.test_g_V_both_dedup_name(g.V.both().dedup.property("name").asInstanceOf[Pipe[Vertex, String]]);
}
def test_g_V_both_dedupXlangX_name() {
- super.test_g_V_both_dedupXlangX_name(g.V.both().dedup {v: Vertex => v("lang")}.property("name").asInstanceOf[Pipe[Graph, String]])
+ super.test_g_V_both_dedupXlangX_name(g.V.both().dedup {v: Vertex => v("lang")}.property("name").asInstanceOf[Pipe[Vertex, String]])
}
}
View
4 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/filter/ExceptStepTest.scala
@@ -1,8 +1,8 @@
package com.tinkerpop.gremlin.scala.filter
-import com.tinkerpop.blueprints.pgm.impls.tg.TinkerGraphFactory
+import com.tinkerpop.blueprints.impls.tg.TinkerGraphFactory
import com.tinkerpop.gremlin.test.ComplianceTest
-import com.tinkerpop.blueprints.pgm.Vertex
+import com.tinkerpop.blueprints.Vertex
import java.util.{ArrayList, HashSet}
import com.tinkerpop.gremlin.scala._
import com.tinkerpop.pipes.Pipe
View
4 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/filter/FilterStepTest.scala
@@ -1,8 +1,8 @@
package com.tinkerpop.gremlin.scala.filter
-import com.tinkerpop.blueprints.pgm.impls.tg.TinkerGraphFactory
+import com.tinkerpop.blueprints.impls.tg.TinkerGraphFactory
import com.tinkerpop.gremlin.test.ComplianceTest
-import com.tinkerpop.blueprints.pgm.Vertex
+import com.tinkerpop.blueprints.Vertex
import java.lang.{Integer => JInteger}
import com.tinkerpop.gremlin.scala._
View
2 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/filter/HasNotStepTest.scala
@@ -1,6 +1,6 @@
package com.tinkerpop.gremlin.scala.filter
-import com.tinkerpop.blueprints.pgm.impls.tg.TinkerGraphFactory
+import com.tinkerpop.blueprints.impls.tg.TinkerGraphFactory
import com.tinkerpop.gremlin.test.ComplianceTest
import com.tinkerpop.gremlin.scala._
import com.tinkerpop.gremlin.Tokens.T
View
2 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/filter/HasStepTest.scala
@@ -1,6 +1,6 @@
package com.tinkerpop.gremlin.scala.filter
-import com.tinkerpop.blueprints.pgm.impls.tg.TinkerGraphFactory
+import com.tinkerpop.blueprints.impls.tg.TinkerGraphFactory
import com.tinkerpop.gremlin.test.ComplianceTest
import com.tinkerpop.gremlin.scala._
import com.tinkerpop.gremlin.Tokens.T
View
2 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/filter/RangeStepTest.scala
@@ -1,6 +1,6 @@
package com.tinkerpop.gremlin.scala.filter
-import com.tinkerpop.blueprints.pgm.impls.tg.TinkerGraphFactory
+import com.tinkerpop.blueprints.impls.tg.TinkerGraphFactory
import com.tinkerpop.gremlin.scala._
import com.tinkerpop.gremlin.test.ComplianceTest
View
4 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/filter/RetainStepTest.scala
@@ -1,8 +1,8 @@
package com.tinkerpop.gremlin.scala.filter
-import com.tinkerpop.blueprints.pgm.impls.tg.TinkerGraphFactory
+import com.tinkerpop.blueprints.impls.tg.TinkerGraphFactory
import com.tinkerpop.gremlin.test.ComplianceTest
-import com.tinkerpop.blueprints.pgm.Vertex
+import com.tinkerpop.blueprints.Vertex
import java.util.{HashSet, ArrayList}
import com.tinkerpop.gremlin.scala._
View
8 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/sideeffect/AggregateStepTest.scala
@@ -1,11 +1,11 @@
package com.tinkerpop.gremlin.scala.sideeffect
-import com.tinkerpop.blueprints.pgm.impls.tg.TinkerGraphFactory
+import com.tinkerpop.blueprints.impls.tg.TinkerGraphFactory
import com.tinkerpop.gremlin.test.ComplianceTest
import com.tinkerpop.gremlin.scala._
import java.util.ArrayList
import com.tinkerpop.pipes.Pipe
-import com.tinkerpop.blueprints.pgm.{Vertex, Graph}
+import com.tinkerpop.blueprints.{Vertex, Graph}
/**
* @author Marko A. Rodriguez (http://markorodriguez.com)
@@ -26,10 +26,10 @@ class AggregateStepTest extends com.tinkerpop.gremlin.test.sideeffect.AggregateS
}
def test_g_V_propertyXnameX_aggregate_cap() {
- super.test_g_V_propertyXnameX_aggregate_cap(g.V.property("name").aggregate().cap.asInstanceOf[Pipe[Graph, java.util.List[String]]]);
+ super.test_g_V_propertyXnameX_aggregate_cap(g.V.property("name").aggregate().cap.asInstanceOf[Pipe[Vertex, java.util.List[String]]]);
}
def test_g_V_aggregateXnameX_cap() {
- super.test_g_V_aggregateXnameX_cap(g.V.aggregate {v: Vertex => v("name")}.cap.asInstanceOf[Pipe[Graph, java.util.List[String]]]);
+ super.test_g_V_aggregateXnameX_cap(g.V.aggregate {v: Vertex => v("name")}.cap.asInstanceOf[Pipe[Vertex, java.util.List[String]]]);
}
}
View
4 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/sideeffect/GroupByStepTest.scala
@@ -1,8 +1,8 @@
package com.tinkerpop.gremlin.scala.sideeffect
import com.tinkerpop.gremlin.test.ComplianceTest
-import com.tinkerpop.blueprints.pgm.impls.tg.TinkerGraphFactory
-import com.tinkerpop.blueprints.pgm.Vertex
+import com.tinkerpop.blueprints.impls.tg.TinkerGraphFactory
+import com.tinkerpop.blueprints.Vertex
import com.tinkerpop.gremlin.scala._
/**
View
10 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/sideeffect/GroupCountStepTest.scala
@@ -1,9 +1,9 @@
package com.tinkerpop.gremlin.scala.sideeffect
-import com.tinkerpop.blueprints.pgm.impls.tg.TinkerGraphFactory
+import com.tinkerpop.blueprints.impls.tg.TinkerGraphFactory
import com.tinkerpop.gremlin.test.ComplianceTest
import com.tinkerpop.gremlin.scala._
-import com.tinkerpop.blueprints.pgm.{Graph, Vertex}
+import com.tinkerpop.blueprints.{Graph, Vertex}
import com.tinkerpop.pipes.Pipe
import com.tinkerpop.pipes.util.structures.{Pair => TPair}
@@ -21,7 +21,7 @@ class GroupCountStepTest extends com.tinkerpop.gremlin.test.sideeffect.GroupCoun
def test_g_V_outXcreatedX_groupCountXm__nameX() {
val m = new java.util.HashMap[String, Number]();
- super.test_g_V_outXcreatedX_groupCountXm__nameX(g.V.out("created").groupCount(m, {v: Vertex => v("name")}).asInstanceOf[Pipe[Graph, Vertex]], m);
+ super.test_g_V_outXcreatedX_groupCountXm__nameX(g.V.out("created").groupCount(m, {v: Vertex => v("name")}).asInstanceOf[Pipe[Vertex, Vertex]], m);
}
// TODO: Why is the implicit converstion of a => to a PipeFunction not being respected?
@@ -32,13 +32,13 @@ class GroupCountStepTest extends com.tinkerpop.gremlin.test.sideeffect.GroupCoun
//val pipeline = g.V.out("created").groupCount(m, {v: Vertex => v("name")}, com.tinkerpop.gremlin.scala.functionToPipeFunction({p: TPair[_, Number] => (p.getB.longValue() + 2l).asInstanceOf[Number]})).asInstanceOf[Pipe[Graph, Vertex]]
//attempting to get implicit working
- val pipeline = g.V.out("created").groupCount(m, {v: Vertex => v("name")}, {p: TPair[_, Number] => (p.getB.longValue() + 2l).asInstanceOf[Number]}).asInstanceOf[Pipe[Graph, Vertex]]
+ val pipeline = g.V.out("created").groupCount(m, {v: Vertex => v("name")}, {p: TPair[_, Number] => (p.getB.longValue() + 2l).asInstanceOf[Number]}).asInstanceOf[Pipe[Vertex, Vertex]]
super.test_g_V_outXcreatedX_groupCountXm__name__plus_2X(pipeline, m);
}
def test_g_V_outXcreatedX_groupCountXnameX_cap() {
- super.test_g_V_outXcreatedX_groupCountXnameX_cap(g.V.out("created").groupCount {v: Vertex => v("name")}.cap.asInstanceOf[Pipe[Graph, java.util.Map[String, Number]]]);
+ super.test_g_V_outXcreatedX_groupCountXnameX_cap(g.V.out("created").groupCount {v: Vertex => v("name")}.cap.asInstanceOf[Pipe[Vertex, java.util.Map[String, Number]]]);
}
}
View
4 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/sideeffect/SideEffectStepTest.scala
@@ -1,8 +1,8 @@
package com.tinkerpop.gremlin.scala.sideeffect
-import com.tinkerpop.blueprints.pgm.impls.tg.TinkerGraphFactory
+import com.tinkerpop.blueprints.impls.tg.TinkerGraphFactory
import com.tinkerpop.gremlin.test.ComplianceTest
-import com.tinkerpop.blueprints.pgm.Vertex
+import com.tinkerpop.blueprints.Vertex
import com.tinkerpop.gremlin.scala._
import com.tinkerpop.pipes.Pipe
import junit.framework.Assert._
View
8 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/sideeffect/StoreStepTest.scala
@@ -1,10 +1,10 @@
package com.tinkerpop.gremlin.scala.sideeffect
-import com.tinkerpop.blueprints.pgm.impls.tg.TinkerGraphFactory
+import com.tinkerpop.blueprints.impls.tg.TinkerGraphFactory
import com.tinkerpop.gremlin.test.ComplianceTest
import com.tinkerpop.gremlin.scala._
import com.tinkerpop.pipes.Pipe
-import com.tinkerpop.blueprints.pgm.{Graph, Vertex}
+import com.tinkerpop.blueprints.{Graph, Vertex}
/**
* @author Marko A. Rodriguez (http://markorodriguez.com)
@@ -19,10 +19,10 @@ class StoreStepTest extends com.tinkerpop.gremlin.test.sideeffect.StoreStepTest
}
def test_g_V_propertyXnameX_store_cap() {
- super.test_g_V_propertyXnameX_store_cap(g.V.property("name").store().cap.asInstanceOf[Pipe[Graph, java.util.List[String]]]);
+ super.test_g_V_propertyXnameX_store_cap(g.V.property("name").store().cap.asInstanceOf[Pipe[Vertex, java.util.List[String]]]);
}
def test_g_V_storeXnameX_cap() {
- super.test_g_V_storeXnameX_cap(g.V.store {v: Vertex => v("name")}.cap.asInstanceOf[Pipe[Graph, java.util.List[String]]]);
+ super.test_g_V_storeXnameX_cap(g.V.store {v: Vertex => v("name")}.cap.asInstanceOf[Pipe[Vertex, java.util.List[String]]]);
}
}
View
4 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/sideeffect/TableStepTest.scala
@@ -1,8 +1,8 @@
package com.tinkerpop.gremlin.scala.sideeffect
-import com.tinkerpop.blueprints.pgm.impls.tg.TinkerGraphFactory
+import com.tinkerpop.blueprints.impls.tg.TinkerGraphFactory
import com.tinkerpop.gremlin.test.ComplianceTest
-import com.tinkerpop.blueprints.pgm.Vertex
+import com.tinkerpop.blueprints.Vertex
import com.tinkerpop.gremlin.scala._
import com.tinkerpop.pipes.util.structures.Table
import com.tinkerpop.pipes.Pipe
View
4 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/sideeffect/TreeStepTest.scala
@@ -1,8 +1,8 @@
package com.tinkerpop.gremlin.scala.sideeffect
-import com.tinkerpop.blueprints.pgm.impls.tg.TinkerGraphFactory
+import com.tinkerpop.blueprints.impls.tg.TinkerGraphFactory
import com.tinkerpop.gremlin.test.ComplianceTest
-import com.tinkerpop.blueprints.pgm.Vertex
+import com.tinkerpop.blueprints.Vertex
import com.tinkerpop.gremlin.scala._
import com.tinkerpop.pipes.Pipe
import com.tinkerpop.pipes.util.structures.Tree
View
4 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/transform/MapStepTest.scala
@@ -1,9 +1,9 @@
package com.tinkerpop.gremlin.scala.transform
-import com.tinkerpop.blueprints.pgm.impls.tg.TinkerGraphFactory
+import com.tinkerpop.blueprints.impls.tg.TinkerGraphFactory
import com.tinkerpop.gremlin.test.ComplianceTest
import com.tinkerpop.gremlin.scala._
-import com.tinkerpop.blueprints.pgm.Vertex
+import com.tinkerpop.blueprints.Vertex
class MapStepTest extends com.tinkerpop.gremlin.test.transform.MapStepTest {
val g = TinkerGraphFactory.createTinkerGraph()
View
4 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/transform/PathStepTest.scala
@@ -1,7 +1,7 @@
package com.tinkerpop.gremlin.scala.transform
-import com.tinkerpop.blueprints.pgm.Vertex
-import com.tinkerpop.blueprints.pgm.impls.tg.TinkerGraphFactory
+import com.tinkerpop.blueprints.Vertex
+import com.tinkerpop.blueprints.impls.tg.TinkerGraphFactory
import com.tinkerpop.gremlin.test.ComplianceTest
import com.tinkerpop.gremlin.scala._
import com.tinkerpop.pipes.branch.LoopPipe.LoopBundle
View
4 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/transform/SelectStepTest.scala
@@ -1,9 +1,9 @@
package com.tinkerpop.gremlin.scala.transform
-import com.tinkerpop.blueprints.pgm.impls.tg.TinkerGraphFactory
+import com.tinkerpop.blueprints.impls.tg.TinkerGraphFactory
import com.tinkerpop.gremlin.test.ComplianceTest
import com.tinkerpop.gremlin.scala._
-import com.tinkerpop.blueprints.pgm.Vertex
+import com.tinkerpop.blueprints.Vertex
import java.util.Arrays
/**
View
4 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/transform/TransformStepTest.scala
@@ -1,9 +1,9 @@
package com.tinkerpop.gremlin.scala.transform
import com.tinkerpop.gremlin.test.ComplianceTest
-import com.tinkerpop.blueprints.pgm.Vertex
+import com.tinkerpop.blueprints.Vertex
import com.tinkerpop.gremlin.scala._
-import com.tinkerpop.blueprints.pgm.impls.tg.TinkerGraphFactory
+import com.tinkerpop.blueprints.impls.tg.TinkerGraphFactory
class TransformStepTest extends com.tinkerpop.gremlin.test.transform.TransformStepTest {
val g = TinkerGraphFactory.createTinkerGraph()
View
2 gremlin-scala/src/test/scala/com/tinkerpop/gremlin/scala/transform/TraversalStepsTest.scala
@@ -1,6 +1,6 @@
package com.tinkerpop.gremlin.scala.transform
-import com.tinkerpop.blueprints.pgm.impls.tg.TinkerGraphFactory
+import com.tinkerpop.blueprints.impls.tg.TinkerGraphFactory
import com.tinkerpop.gremlin.test.ComplianceTest
import com.tinkerpop.gremlin.scala._

0 comments on commit 0cab927

Please sign in to comment.