tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [1/2] tinkerpop git commit: TINKERPOP-1986 Removed deprecated methods and updated docs accordingly
Date Thu, 12 Jul 2018 14:55:00 GMT
Repository: tinkerpop
Updated Branches:
  refs/heads/master 8c05c19ea -> 3852c8734


TINKERPOP-1986 Removed deprecated methods and updated docs accordingly


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

Branch: refs/heads/master
Commit: 310801695ab97b60f8032e2c0c15b6617e954234
Parents: b475d12
Author: Stephen Mallette <spmva@genoprime.com>
Authored: Mon Jun 18 12:38:45 2018 -0400
Committer: Stephen Mallette <spmva@genoprime.com>
Committed: Mon Jun 18 13:32:44 2018 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  3 +-
 docs/src/reference/gremlin-variants.asciidoc    |  4 +--
 docs/src/upgrade/release-3.4.x.asciidoc         |  7 ++++-
 .../gremlin/jsr223/GremlinScriptEngine.java     | 25 ---------------
 .../gremlin/jsr223/ImportCustomizer.java        |  8 -----
 .../strategy/decoration/PartitionStrategy.java  | 12 --------
 .../strategy/decoration/SubgraphStrategy.java   | 16 ----------
 .../decoration/PartitionStrategyTest.java       |  8 ++---
 .../PartitionStrategyTraverseTest.java          |  2 +-
 .../SubgraphStrategyTraverseTest.java           |  2 +-
 .../Strategy/Decoration/SubgraphStrategy.cs     | 22 +++++++-------
 .../DriverRemoteConnection/StrategiesTests.cs   | 20 ++++++------
 .../PartitionStrategyProcessTest.java           | 32 ++++++++++----------
 .../decoration/SubgraphStrategyProcessTest.java |  8 ++---
 .../decoration/TranslationStrategy.java         |  2 +-
 15 files changed, 58 insertions(+), 113 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/31080169/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index f7429fe..428a279 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -36,10 +36,11 @@ This release also includes changes from <<release-3-3-3, 3.3.3>>.
 * Allowed `GraphProvider` to expose a cached `Graph.Feature` object so that the test suite
could re-use them to speed test runs.
 * Fixed a bug in `ReducingBarrierStep`, that returned the provided seed value despite no
elements being available.
 * Changed the order of `select()` scopes. The order is now: maps, side-effects, paths.
-* Removed previously deprecated Credentials DSL infrastructure.
 * Moved `TraversalEngine` to `gremlin-test` as it has long been only used in testing infrastructure.
 * Events from `EventStrategy` raised from "new" mutations will now return a `KeyedVertexProperty`
or `KeyedProperty` as is appropriate.
 * `MutationListener#vertexPropertyChanged(Vertex, VertexProperty, Object, Object...)` no
longer has a default implementation.
+* Removed previously deprecated methods in `SubgraphStrategy` and `PartitionStrategy` builders.
+* Removed previously deprecated Credentials DSL infrastructure.
 * Removed previously deprecated `MutationListener#vertexPropertyChanged(Vertex, Property,
Object, Object...)`.
 * Removed previously deprecated `OpSelectorHandler` constructor.
 * Removed previously deprecated `close()` from `GremlinGroovyScriptEngine` which no longer
implements `AutoCloseable`.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/31080169/docs/src/reference/gremlin-variants.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/gremlin-variants.asciidoc b/docs/src/reference/gremlin-variants.asciidoc
index 8aa2435..9f8a216 100644
--- a/docs/src/reference/gremlin-variants.asciidoc
+++ b/docs/src/reference/gremlin-variants.asciidoc
@@ -417,8 +417,8 @@ class along with a collection of subclasses that mirror the standard Gremlin-Jav
 
 [source,csharp]
 ----
-g = g.WithStrategies(new SubgraphStrategy(vertexCriterion: HasLabel("person"),
-    edgeCriterion: Has("weight", Gt(0.5))));
+g = g.WithStrategies(new SubgraphStrategy(vertices: HasLabel("person"),
+    edges: Has("weight", Gt(0.5))));
 var names = g.V().Values("name").ToList();  // names: [marko, vadas, josh, peter]
 
 g = g.WithoutStrategies(typeof(SubgraphStrategy));

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/31080169/docs/src/upgrade/release-3.4.x.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.4.x.asciidoc b/docs/src/upgrade/release-3.4.x.asciidoc
index 8829569..06d5c4a 100644
--- a/docs/src/upgrade/release-3.4.x.asciidoc
+++ b/docs/src/upgrade/release-3.4.x.asciidoc
@@ -139,8 +139,12 @@ link:https://issues.apache.org/jira/browse/TINKERPOP-1831[TINKERPOP-1831]
 The following deprecated classes, methods or fields have been removed in this version:
 
 * `gremlin-core`
+** `org.apache.tinkerpop.gremlin.jsr223.ImportCustomizer#GREMLIN_CORE`
 ** `org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine`
 ** `org.apache.tinkerpop.gremlin.process.traversal.engine.*`
+** `org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategy.Builder#addReadPartition(String)`
+** `org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SubgraphStrategy.Builder#edgeCriterion(Traversal)`
+** `org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SubgraphStrategy.Builder#vertexCriterion(Traversal)`
 ** `org.apache.tinkerpop.gremlin.process.traversal.step.map.LambdaCollectingBarrierStep.Consumers`
 ** `org.apache.tinkerpop.gremlin.process.traversal.step.util.HasContainer#makeHasContainers(String,
P)`
 ** `org.apache.tinkerpop.gremlin.process.traversal.step.util.event.MutationListener#vertexPropertyChanged(Vertex,
Property, Object, Object...)`
@@ -171,7 +175,8 @@ See: link:https://issues.apache.org/jira/browse/TINKERPOP-1143[TINKERPOP-1143],
 link:https://issues.apache.org/jira/browse/TINKERPOP-1296[TINKERPOP-1296],
 link:https://issues.apache.org/jira/browse/TINKERPOP-1705[TINKERPOP-1705],
 link:https://issues.apache.org/jira/browse/TINKERPOP-1707[TINKERPOP-1707],
-link:https://issues.apache.org/jira/browse/TINKERPOP-1954[TINKERPOP-1954]
+link:https://issues.apache.org/jira/browse/TINKERPOP-1954[TINKERPOP-1954],
+link:https://issues.apache.org/jira/browse/TINKERPOP-1986[TINKERPOP-1986]
 
 ==== Modifications to reducing barrier steps
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/31080169/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/GremlinScriptEngine.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/GremlinScriptEngine.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/GremlinScriptEngine.java
index addca82..2df511c 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/GremlinScriptEngine.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/GremlinScriptEngine.java
@@ -38,31 +38,6 @@ public interface GremlinScriptEngine extends ScriptEngine {
     public GremlinScriptEngineFactory getFactory();
 
     /**
-     * Evaluates {@link Traversal} {@link Bytecode}. This method assumes that the traversal
source to execute the
-     * bytecode against is in the global bindings and is named "g".
-     *
-     * @deprecated As of release 3.2.7, replaced by {@link #eval(Bytecode, String)}.
-     */
-    @Deprecated
-    public default Traversal.Admin eval(final Bytecode bytecode) throws ScriptException {
-        final Bindings bindings = this.createBindings();
-        bindings.putAll(bytecode.getBindings());
-        return eval(bytecode, bindings);
-    }
-
-    /**
-     * Evaluates {@link Traversal} {@link Bytecode} with the specified {@code Bindings}.
These {@code Bindings}
-     * supplied to this method will be merged with global engine bindings and override them
where keys match. This
-     * method assumes that the traversal source to execute against is named "g".
-     *
-     * @deprecated As of release 3.2.7, replaced by {@link #eval(Bytecode, Bindings, String)}.
-     */
-    @Deprecated
-    public default Traversal.Admin eval(final Bytecode bytecode, final Bindings bindings)
throws ScriptException {
-        return eval(bytecode, bindings, "g");
-    }
-
-    /**
      * Evaluates {@link Traversal} {@link Bytecode} against a traversal source in the global
bindings of the
      * {@code ScriptEngine}.
      *

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/31080169/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/ImportCustomizer.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/ImportCustomizer.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/ImportCustomizer.java
index b44072b..24cf70a 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/ImportCustomizer.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/ImportCustomizer.java
@@ -30,14 +30,6 @@ import java.util.stream.Collectors;
  * @author Stephen Mallette (http://stephen.genoprime.com)
  */
 public interface ImportCustomizer extends Customizer {
-    /**
-     * @deprecated As of release 3.2.4, not replaced.
-     */
-    @Deprecated
-    public static final ImportCustomizer GREMLIN_CORE = DefaultImportCustomizer.build()
-            .addClassImports(CoreImports.getClassImports())
-            .addEnumImports(CoreImports.getEnumImports())
-            .addMethodImports(CoreImports.getMethodImports()).create();
 
     /**
      * Gets the set of classes to be imported to the {@link GremlinScriptEngine}.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/31080169/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategy.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategy.java
index 877c2df..15079cb 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategy.java
@@ -418,18 +418,6 @@ public final class PartitionStrategy extends AbstractTraversalStrategy<Traversal
         }
 
         /**
-         * Specifies the partition of the graph to read from.  It is possible to assign multiple
partition keys so
-         * as to read from multiple partitions at the same time.
-         *
-         * @deprecated As of release 3.2.3, replaced by {@link Builder#readPartitions(List)}.
-         */
-        @Deprecated
-        public Builder addReadPartition(final String readPartition) {
-            this.readPartitions.add(readPartition);
-            return this;
-        }
-
-        /**
          * Creates the {@code PartitionStrategy}.
          */
         public PartitionStrategy create() {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/31080169/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java
index 467689f..10619c2 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java
@@ -378,22 +378,6 @@ public final class SubgraphStrategy extends AbstractTraversalStrategy<TraversalS
             return this;
         }
 
-        @Deprecated
-        /**
-         * @deprecated As of release 3.2.2, replaced by {@code Builder#vertices}.
-         */
-        public Builder vertexCriterion(final Traversal<Vertex, ?> predicate) {
-            return this.vertices(predicate);
-        }
-
-        /**
-         * @deprecated As of release 3.2.2, replaced by {@code Builder#edges}.
-         */
-        @Deprecated
-        public Builder edgeCriterion(final Traversal<Edge, ?> predicate) {
-            return this.edges(predicate);
-        }
-
         public SubgraphStrategy create() {
             if (null == this.vertexCriterion && null == this.edgeCriterion &&
null == this.vertexPropertyCriterion)
                 throw new IllegalStateException("A subgraph must be filtered by a vertex,
edge, or vertex property criterion");

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/31080169/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategyTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategyTest.java
b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategyTest.java
index 8ca8e3a..071706a 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategyTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategyTest.java
@@ -37,7 +37,7 @@ public class PartitionStrategyTest {
     @Test
     public void shouldConstructPartitionStrategy() {
         final PartitionStrategy strategy = PartitionStrategy.build()
-                .partitionKey("p").writePartition("a").addReadPartition("a").create();
+                .partitionKey("p").writePartition("a").readPartitions("a").create();
         assertEquals("a", strategy.getReadPartitions().iterator().next());
         assertEquals(1, strategy.getReadPartitions().size());
         assertEquals("p", strategy.getPartitionKey());
@@ -47,9 +47,9 @@ public class PartitionStrategyTest {
     public void shouldConstructPartitionStrategyWithMultipleReadPartitions() {
         final PartitionStrategy strategy = PartitionStrategy.build()
                 .partitionKey("p").writePartition("a")
-                .addReadPartition("a")
-                .addReadPartition("b")
-                .addReadPartition("c").create();
+                .readPartitions("a")
+                .readPartitions("b")
+                .readPartitions("c").create();
 
         assertTrue(IteratorUtils.asList(strategy.getReadPartitions().iterator()).contains("a"));
         assertTrue(IteratorUtils.asList(strategy.getReadPartitions().iterator()).contains("b"));

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/31080169/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategyTraverseTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategyTraverseTest.java
b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategyTraverseTest.java
index a8f809a..c137099 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategyTraverseTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategyTraverseTest.java
@@ -96,7 +96,7 @@ public class PartitionStrategyTraverseTest {
     @Test
     public void shouldIncludeAdditionalHasStepsAndAppendPartitionOnMutatingSteps() {
         final PartitionStrategy strategy = PartitionStrategy.build()
-                .partitionKey("p").writePartition("a").addReadPartition("a").create();
+                .partitionKey("p").writePartition("a").readPartitions("a").create();
 
         if (hasMutatingStep) {
             if (TraversalHelper.hasStepOfAssignableClass(AddEdgeStep.class, traversal.asAdmin()))
{

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/31080169/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategyTraverseTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategyTraverseTest.java
b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategyTraverseTest.java
index c0778e0..ad5686e 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategyTraverseTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategyTraverseTest.java
@@ -91,7 +91,7 @@ public class SubgraphStrategyTraverseTest {
 
     @Test
     public void shouldSubgraph() {
-        final SubgraphStrategy strategy = SubgraphStrategy.build().edgeCriterion(__.identity()).vertexCriterion(__.identity()).create();
+        final SubgraphStrategy strategy = SubgraphStrategy.build().edges(__.identity()).vertices(__.identity()).create();
         strategy.apply(traversal.asAdmin());
 
         final List<TraversalFilterStep> steps = TraversalHelper.getStepsOfClass(TraversalFilterStep.class,
traversal.asAdmin());

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/31080169/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/Decoration/SubgraphStrategy.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/Decoration/SubgraphStrategy.cs
b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/Decoration/SubgraphStrategy.cs
index 1ba87d0..ae6a46e 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/Decoration/SubgraphStrategy.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/Decoration/SubgraphStrategy.cs
@@ -38,18 +38,18 @@ namespace Gremlin.Net.Process.Traversal.Strategy.Decoration
         /// <summary>
         ///     Initializes a new instance of the <see cref="SubgraphStrategy" /> class.
         /// </summary>
-        /// <param name="vertexCriterion">Constrains vertices for the <see cref="ITraversal"
/>.</param>
-        /// <param name="edgeCriterion">Constrains edges for the <see cref="ITraversal"
/>.</param>
-        /// <param name="vertexPropertyCriterion">Constrains vertex properties for
the <see cref="ITraversal" />.</param>
-        public SubgraphStrategy(ITraversal vertexCriterion = null, ITraversal edgeCriterion
= null,
-            ITraversal vertexPropertyCriterion = null)
+        /// <param name="vertices">Constrains vertices for the <see cref="ITraversal"
/>.</param>
+        /// <param name="edges">Constrains edges for the <see cref="ITraversal"
/>.</param>
+        /// <param name="vertexProperties">Constrains vertex properties for the <see
cref="ITraversal" />.</param>
+        public SubgraphStrategy(ITraversal vertices = null, ITraversal edges = null,
+            ITraversal vertexProperties = null)
         {
-            if (vertexCriterion != null)
-                Configuration["vertices"] = vertexCriterion;
-            if (edgeCriterion != null)
-                Configuration["edges"] = edgeCriterion;
-            if (vertexPropertyCriterion != null)
-                Configuration["vertexProperties"] = vertexPropertyCriterion;
+            if (vertices != null)
+                Configuration["vertices"] = vertices;
+            if (edges != null)
+                Configuration["edges"] = edges;
+            if (vertexProperties != null)
+                Configuration["vertexProperties"] = vertexProperties;
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/31080169/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Traversal/DriverRemoteConnection/StrategiesTests.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Traversal/DriverRemoteConnection/StrategiesTests.cs
b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Traversal/DriverRemoteConnection/StrategiesTests.cs
index 2e99778..c05100c 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Traversal/DriverRemoteConnection/StrategiesTests.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Traversal/DriverRemoteConnection/StrategiesTests.cs
@@ -43,7 +43,7 @@ namespace Gremlin.Net.IntegrationTest.Process.Traversal.DriverRemoteConnection
             var g =
                 graph.Traversal()
                     .WithRemote(connection)
-                    .WithStrategies(new SubgraphStrategy(vertexCriterion: __.HasLabel("person")));
+                    .WithStrategies(new SubgraphStrategy(vertices: __.HasLabel("person")));
 
             var count = g.V().Count().Next();
 
@@ -58,8 +58,8 @@ namespace Gremlin.Net.IntegrationTest.Process.Traversal.DriverRemoteConnection
             var g =
                 graph.Traversal()
                     .WithRemote(connection)
-                    .WithStrategies(new SubgraphStrategy(vertexCriterion: __.HasLabel("person"),
-                        edgeCriterion: __.HasLabel("created")));
+                    .WithStrategies(new SubgraphStrategy(vertices: __.HasLabel("person"),
+                        edges: __.HasLabel("created")));
 
             var count = g.E().Count().Next();
 
@@ -74,7 +74,7 @@ namespace Gremlin.Net.IntegrationTest.Process.Traversal.DriverRemoteConnection
             var g =
                 graph.Traversal()
                     .WithRemote(connection)
-                    .WithStrategies(new SubgraphStrategy(vertexCriterion: __.HasLabel("person")));
+                    .WithStrategies(new SubgraphStrategy(vertices: __.HasLabel("person")));
 
             var count = g.V().Label().Dedup().Count().Next();
 
@@ -89,7 +89,7 @@ namespace Gremlin.Net.IntegrationTest.Process.Traversal.DriverRemoteConnection
             var g =
                 graph.Traversal()
                     .WithRemote(connection)
-                    .WithStrategies(new SubgraphStrategy(vertexCriterion: __.HasLabel("person")));
+                    .WithStrategies(new SubgraphStrategy(vertices: __.HasLabel("person")));
 
             var label = g.V().Label().Dedup().Next();
 
@@ -104,7 +104,7 @@ namespace Gremlin.Net.IntegrationTest.Process.Traversal.DriverRemoteConnection
             var g =
                 graph.Traversal()
                     .WithRemote(connection)
-                    .WithStrategies(new SubgraphStrategy(vertexCriterion: __.Has("name",
"marko")));
+                    .WithStrategies(new SubgraphStrategy(vertices: __.Has("name", "marko")));
 
             var count = g.V().Count().Next();
 
@@ -119,7 +119,7 @@ namespace Gremlin.Net.IntegrationTest.Process.Traversal.DriverRemoteConnection
             var g =
                 graph.Traversal()
                     .WithRemote(connection)
-                    .WithStrategies(new SubgraphStrategy(edgeCriterion: __.Limit<object>(0)));
+                    .WithStrategies(new SubgraphStrategy(edges: __.Limit<object>(0)));
 
             var count = g.E().Count().Next();
 
@@ -134,7 +134,7 @@ namespace Gremlin.Net.IntegrationTest.Process.Traversal.DriverRemoteConnection
             var g =
                 graph.Traversal()
                     .WithRemote(connection)
-                    .WithStrategies(new SubgraphStrategy(vertexCriterion: __.Has("name",
"marko")));
+                    .WithStrategies(new SubgraphStrategy(vertices: __.Has("name", "marko")));
 
             var label = g.V().Label().Dedup().Next();
 
@@ -149,7 +149,7 @@ namespace Gremlin.Net.IntegrationTest.Process.Traversal.DriverRemoteConnection
             var g =
                 graph.Traversal()
                     .WithRemote(connection)
-                    .WithStrategies(new SubgraphStrategy(vertexCriterion: __.Has("name",
"marko")));
+                    .WithStrategies(new SubgraphStrategy(vertices: __.Has("name", "marko")));
 
             var name = g.V().Values<string>("name").Next();
 
@@ -196,7 +196,7 @@ namespace Gremlin.Net.IntegrationTest.Process.Traversal.DriverRemoteConnection
             var graph = new Graph();
             var connection = _connectionFactory.CreateRemoteConnection();
             var g = graph.Traversal().WithRemote(connection)
-                .WithStrategies(new SubgraphStrategy(vertexCriterion: __.HasLabel("person")))
+                .WithStrategies(new SubgraphStrategy(vertices: __.HasLabel("person")))
                 .WithoutStrategies(typeof(SubgraphStrategy));
 
             var count = g.V().Count().Next();

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/31080169/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategyProcessTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategyProcessTest.java
b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategyProcessTest.java
index 917e2b1..a31e028 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategyProcessTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategyProcessTest.java
@@ -117,15 +117,15 @@ public class PartitionStrategyProcessTest extends AbstractGremlinProcessTest
{
     public void shouldAppendPartitionToAllVertexProperties() {
         final GraphTraversalSource gOverA = g.withStrategies(PartitionStrategy.build()
                 .includeMetaProperties(true)
-                .partitionKey(partition).writePartition("A").addReadPartition("A").create());
+                .partitionKey(partition).writePartition("A").readPartitions("A").create());
 
         final GraphTraversalSource gOverB = g.withStrategies(PartitionStrategy.build()
                 .includeMetaProperties(true)
-                .partitionKey(partition).writePartition("B").addReadPartition("B").create());
+                .partitionKey(partition).writePartition("B").readPartitions("B").create());
 
         final GraphTraversalSource gOverAB = g.withStrategies(PartitionStrategy.build()
                 .includeMetaProperties(true)
-                .partitionKey(partition).writePartition("B").addReadPartition("B").addReadPartition("A").create());
+                .partitionKey(partition).writePartition("B").readPartitions("B","A").create());
 
         final Vertex v = gOverA.addV().property("any", "thing").property("some", "thing").next();
 
@@ -179,7 +179,7 @@ public class PartitionStrategyProcessTest extends AbstractGremlinProcessTest
{
     public void shouldHidePartitionKeyForValues() {
         final GraphTraversalSource gOverA = g.withStrategies(PartitionStrategy.build()
                 .includeMetaProperties(true)
-                .partitionKey(partition).writePartition("A").addReadPartition("A").create());
+                .partitionKey(partition).writePartition("A").readPartitions("A").create());
         final Vertex v = gOverA.addV().property("any", "thing").next();
 
         try {
@@ -210,7 +210,7 @@ public class PartitionStrategyProcessTest extends AbstractGremlinProcessTest
{
     public void shouldHidePartitionKeyForProperties() {
         final GraphTraversalSource gOverA = g.withStrategies(PartitionStrategy.build()
                 .includeMetaProperties(true)
-                .partitionKey(partition).writePartition("A").addReadPartition("A").create());
+                .partitionKey(partition).writePartition("A").readPartitions("A").create());
         final Vertex v = gOverA.addV().property("any", "thing").next();
 
         try {
@@ -252,7 +252,7 @@ public class PartitionStrategyProcessTest extends AbstractGremlinProcessTest
{
     public void shouldHidePartitionKeyForPropertyMapWithEmptyKeys() {
         final GraphTraversalSource gOverA = g.withStrategies(PartitionStrategy.build()
                 .includeMetaProperties(true)
-                .partitionKey(partition).writePartition("A").addReadPartition("A").create());
+                .partitionKey(partition).writePartition("A").readPartitions("A").create());
         final Vertex v = gOverA.addV().property("any", "thing").next();
 
         assertEquals(1L, (long) gOverA.V(v).propertyMap().count().next());
@@ -265,7 +265,7 @@ public class PartitionStrategyProcessTest extends AbstractGremlinProcessTest
{
     public void shouldHidePartitionKeyForValueMap() {
         final GraphTraversalSource gOverA = g.withStrategies(PartitionStrategy.build()
                 .includeMetaProperties(true)
-                .partitionKey(partition).writePartition("A").addReadPartition("A").create());
+                .partitionKey(partition).writePartition("A").readPartitions("A").create());
         final Vertex v = gOverA.addV().property("any", "thing").next();
 
         try {
@@ -282,7 +282,7 @@ public class PartitionStrategyProcessTest extends AbstractGremlinProcessTest
{
     public void shouldHidePartitionKeyForValueMapWithEmptyKeys() {
         final GraphTraversalSource gOverA = g.withStrategies(PartitionStrategy.build()
                 .includeMetaProperties(true)
-                .partitionKey(partition).writePartition("A").addReadPartition("A").create());
+                .partitionKey(partition).writePartition("A").readPartitions("A").create());
         final Vertex v = gOverA.addV().property("any", "thing").next();
 
         assertEquals(1L, (long) gOverA.V(v).valueMap().count().next());
@@ -293,7 +293,7 @@ public class PartitionStrategyProcessTest extends AbstractGremlinProcessTest
{
     @FeatureRequirementSet(FeatureRequirementSet.Package.SIMPLE)
     public void shouldAppendPartitionToEdge() {
         final PartitionStrategy partitionStrategy = PartitionStrategy.build()
-                .partitionKey(partition).writePartition("A").addReadPartition("A").create();
+                .partitionKey(partition).writePartition("A").readPartitions("A").create();
         final GraphTraversalSource source = g.withStrategies(partitionStrategy);
         final Vertex v1 = source.addV().property("any", "thing").next();
         final Vertex v2 = source.addV().property("some", "thing").next();
@@ -317,15 +317,15 @@ public class PartitionStrategyProcessTest extends AbstractGremlinProcessTest
{
     @FeatureRequirementSet(FeatureRequirementSet.Package.VERTICES_ONLY)
     public void shouldWriteVerticesToMultiplePartitions() {
         final PartitionStrategy partitionStrategyAA = PartitionStrategy.build()
-                .partitionKey(partition).writePartition("A").addReadPartition("A").create();
+                .partitionKey(partition).writePartition("A").readPartitions("A").create();
         final GraphTraversalSource sourceAA = g.withStrategies(partitionStrategyAA);
 
         final PartitionStrategy partitionStrategyBA = PartitionStrategy.build()
-                .partitionKey(partition).writePartition("B").addReadPartition("A").create();
+                .partitionKey(partition).writePartition("B").readPartitions("A").create();
         final GraphTraversalSource sourceBA = g.withStrategies(partitionStrategyBA);
 
         final PartitionStrategy partitionStrategyBB = PartitionStrategy.build()
-                .partitionKey(partition).writePartition("B").addReadPartition("B").create();
+                .partitionKey(partition).writePartition("B").readPartitions("B").create();
         final GraphTraversalSource sourceBB = g.withStrategies(partitionStrategyBB);
 
         final PartitionStrategy partitionStrategyBAB = PartitionStrategy.build()
@@ -354,7 +354,7 @@ public class PartitionStrategyProcessTest extends AbstractGremlinProcessTest
{
     @FeatureRequirementSet(FeatureRequirementSet.Package.VERTICES_ONLY)
     public void shouldThrowExceptionOnVInDifferentPartition() {
         final PartitionStrategy partitionStrategyAA = PartitionStrategy.build()
-                .partitionKey(partition).writePartition("A").addReadPartition("A").create();
+                .partitionKey(partition).writePartition("A").readPartitions("A").create();
         final GraphTraversalSource sourceAA = g.withStrategies(partitionStrategyAA);
 
         final PartitionStrategy partitionStrategyA = PartitionStrategy.build()
@@ -376,7 +376,7 @@ public class PartitionStrategyProcessTest extends AbstractGremlinProcessTest
{
     @FeatureRequirementSet(FeatureRequirementSet.Package.SIMPLE)
     public void shouldThrowExceptionOnEInDifferentPartition() {
         final PartitionStrategy partitionStrategyAA = PartitionStrategy.build()
-                .partitionKey(partition).writePartition("A").addReadPartition("A").create();
+                .partitionKey(partition).writePartition("A").readPartitions("A").create();
         final GraphTraversalSource sourceAA = g.withStrategies(partitionStrategyAA);
 
         final PartitionStrategy partitionStrategyA = PartitionStrategy.build()
@@ -407,7 +407,7 @@ public class PartitionStrategyProcessTest extends AbstractGremlinProcessTest
{
         final GraphTraversalSource sourceBA = g.withStrategies(partitionStrategyBA);
 
         final PartitionStrategy partitionStrategyCAB = PartitionStrategy.build()
-                .partitionKey(partition).writePartition("C").addReadPartition("A").addReadPartition("B").create();
+                .partitionKey(partition).writePartition("C").readPartitions("A","B").create();
         final GraphTraversalSource sourceCAB = g.withStrategies(partitionStrategyCAB);
 
         final PartitionStrategy partitionStrategyC = PartitionStrategy.build()
@@ -425,7 +425,7 @@ public class PartitionStrategyProcessTest extends AbstractGremlinProcessTest
{
             put(PartitionStrategy.READ_PARTITIONS, Arrays.asList("A", "B", "C"));
         }})));
         final PartitionStrategy partitionStrategyCC = PartitionStrategy.build()
-                .partitionKey(partition).writePartition("C").addReadPartition("C").create();
+                .partitionKey(partition).writePartition("C").readPartitions("C").create();
         final GraphTraversalSource sourceCC = g.withStrategies(partitionStrategyCC);
 
         final PartitionStrategy partitionStrategyCBC = PartitionStrategy.build()

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/31080169/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategyProcessTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategyProcessTest.java
b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategyProcessTest.java
index f06b0f7..9968842 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategyProcessTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategyProcessTest.java
@@ -68,7 +68,7 @@ public class SubgraphStrategyProcessTest extends AbstractGremlinProcessTest
{
     public void shouldFilterVertexCriterion() throws Exception {
         final Traversal<Vertex, ?> vertexCriterion = has("name", P.within("josh", "lop",
"ripple"));
 
-        final GraphTraversalSource sg = g.withStrategies(SubgraphStrategy.build().vertexCriterion(vertexCriterion).create());
+        final GraphTraversalSource sg = g.withStrategies(SubgraphStrategy.build().vertices(vertexCriterion).create());
 
         // three vertices are included in the subgraph
         assertEquals(6, g.V().count().next().longValue());
@@ -154,7 +154,7 @@ public class SubgraphStrategyProcessTest extends AbstractGremlinProcessTest
{
                 has("weight", 1.0d).hasLabel("created") // 10
         );
 
-        final SubgraphStrategy strategy = SubgraphStrategy.build().edgeCriterion(edgeCriterion).create();
+        final SubgraphStrategy strategy = SubgraphStrategy.build().edges(edgeCriterion).create();
         final GraphTraversalSource sg = g.withStrategies(strategy);
 
         // all vertices are here
@@ -422,7 +422,7 @@ public class SubgraphStrategyProcessTest extends AbstractGremlinProcessTest
{
         // this will exclude "peter"
         final Traversal<Vertex, ?> vertexCriterion = has("name", P.within("ripple",
"josh", "marko"));
 
-        final GraphTraversalSource sg = g.withStrategies(SubgraphStrategy.build().vertexCriterion(vertexCriterion).create());
+        final GraphTraversalSource sg = g.withStrategies(SubgraphStrategy.build().vertices(vertexCriterion).create());
 
         assertEquals(9, g.V().as("a").out().in().as("b").dedup("a", "b").count().next().intValue());
         assertEquals(2, sg.V().as("a").out().in().as("b").dedup("a", "b").count().next().intValue());
@@ -436,7 +436,7 @@ public class SubgraphStrategyProcessTest extends AbstractGremlinProcessTest
{
     public void shouldGetExcludedVertex() throws Exception {
         final Traversal<Vertex, ?> vertexCriterion = has("name", P.within("josh", "lop",
"ripple"));
 
-        final GraphTraversalSource sg = g.withStrategies(SubgraphStrategy.build().vertexCriterion(vertexCriterion).create());
+        final GraphTraversalSource sg = g.withStrategies(SubgraphStrategy.build().vertices(vertexCriterion).create());
 
         sg.V(convertToVertexId("marko")).next();
     }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/31080169/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/TranslationStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/TranslationStrategy.java
b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/TranslationStrategy.java
index 0736c02..df4758d 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/TranslationStrategy.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/TranslationStrategy.java
@@ -99,7 +99,7 @@ public final class TranslationStrategy extends AbstractTraversalStrategy<Travers
                 final Bindings bindings = scriptEngine.createBindings();
                 bindings.putAll(scriptEngine.getContext().getBindings(ScriptContext.ENGINE_SCOPE));
                 bindings.put(this.translator.getTraversalSource().toString(), this.traversalSource);
-                translatedTraversal = (Traversal.Admin<?, ?>) scriptEngine.eval(bytecode,
bindings);
+                translatedTraversal = (Traversal.Admin<?, ?>) scriptEngine.eval(bytecode,
bindings, this.translator.getTraversalSource().toString());
             } catch (final Exception e) {
                 throw new IllegalArgumentException(e.getMessage(), e);
             }


Mime
View raw message