You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ok...@apache.org on 2017/07/05 13:16:20 UTC

[1/2] tinkerpop git commit: removed TraversalScriptFunction and TraversalScriptHelper. Deprecated a long long time ago -- I can still remember...

Repository: tinkerpop
Updated Branches:
  refs/heads/master 69053b9db -> 8343072ff


removed TraversalScriptFunction and TraversalScriptHelper. Deprecated a long long time ago -- I can still remember...


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

Branch: refs/heads/master
Commit: 6a4fcaf603d64c2bb6492640d21b8ad340b15009
Parents: e5022c3
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Fri Jun 30 15:33:34 2017 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Fri Jun 30 15:33:34 2017 -0600

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  2 +
 docs/src/upgrade/release-3.3.x.asciidoc         |  2 +
 .../traversal/util/TraversalScriptFunction.java | 71 --------------------
 .../traversal/util/TraversalScriptHelper.java   | 55 ---------------
 4 files changed, 4 insertions(+), 126 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6a4fcaf6/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 956a725..989a0c7 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,8 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.3.0 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+* Removed previously deprecated `TraversalScriptFunction` class.
+* Removed previously deprecated `TraversalScriptHelper` class.
 * Graphite and Ganglia are no longer packaged with the Gremlin Server distribution.
 * `TransactionException` is no longer a class of `AbstractTransaction` and it extends `RuntimeException`.
 * Included an ellipse on long property names that are truncated.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6a4fcaf6/docs/src/upgrade/release-3.3.x.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.3.x.asciidoc b/docs/src/upgrade/release-3.3.x.asciidoc
index 0f71714..3ef6bf0 100644
--- a/docs/src/upgrade/release-3.3.x.asciidoc
+++ b/docs/src/upgrade/release-3.3.x.asciidoc
@@ -202,6 +202,8 @@ The following deprecated classes, methods or fields have been removed in this ve
 ** `org.apache.tinkerpop.gremlin.jsr223.SingleGremlinScriptEngineManager#getInstance()`
 ** `org.apache.tinkerpop.gremlin.jsr223.GremlinScriptEngineManager#addModule(GremlinModule)`
 ** `org.apache.tinkerpop.gremlin.jsr223.console.PluginAcceptor`
+** `org.apache.tinkerpop.gremlin.process.traversal.util.TraversalScriptFunction`
+** `org.apache.tinkerpop.gremlin.process.traversal.util.TraversalScriptHelper`
 ** `org.apache.tinkerpop.gremlin.structure.Graph.Features.VertexPropertyFeatures#supportsAddProperty()`
 ** `org.apache.tinkerpop.gremlin.structure.Graph.Features.VertexPropertyFeatures#FEATURE_ADD_PROPERTY`
 ** `org.apache.tinkerpop.gremlin.structure.Graph.OptIn#SUITE_GROOVY_PROCESS_STANDARD`

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6a4fcaf6/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalScriptFunction.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalScriptFunction.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalScriptFunction.java
deleted file mode 100644
index fcd5408..0000000
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalScriptFunction.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tinkerpop.gremlin.process.traversal.util;
-
-import org.apache.tinkerpop.gremlin.jsr223.SingleGremlinScriptEngineManager;
-import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
-import org.apache.tinkerpop.gremlin.process.traversal.TraversalSource;
-import org.apache.tinkerpop.gremlin.structure.Graph;
-
-import javax.script.Bindings;
-import javax.script.ScriptEngine;
-import javax.script.ScriptException;
-import java.io.Serializable;
-import java.util.function.Function;
-
-/**
- * @author Marko A. Rodriguez (http://markorodriguez.com)
- * @deprecated As of release 3.2.0, replaced by {@link ScriptTraversal}.
- */
-public final class TraversalScriptFunction<S, E> implements Function<Graph, Traversal.Admin<S, E>>, Serializable {
-
-    private final TraversalSourceFactory traversalSourceFactory;
-    private final String scriptEngineName;
-    private final String traversalScript;
-    private final Object[] bindings;
-
-    public TraversalScriptFunction(final TraversalSource traversalSource, final String scriptEngineName, final String traversalScript, final Object... bindings) {
-        this.traversalSourceFactory = new TraversalSourceFactory<>(traversalSource);
-        this.scriptEngineName = scriptEngineName;
-        this.traversalScript = traversalScript;
-        this.bindings = bindings;
-        if (this.bindings.length % 2 != 0)
-            throw new IllegalArgumentException("The provided key/value bindings array length must be a multiple of two");
-    }
-
-    public Traversal.Admin<S, E> apply(final Graph graph) {
-        try {
-            final ScriptEngine engine = SingleGremlinScriptEngineManager.get(this.scriptEngineName);
-            final Bindings engineBindings = engine.createBindings();
-            engineBindings.put("g", this.traversalSourceFactory.createTraversalSource(graph));
-            for (int i = 0; i < this.bindings.length; i = i + 2) {
-                engineBindings.put((String) this.bindings[i], this.bindings[i + 1]);
-            }
-            final Traversal.Admin<S, E> traversal = (Traversal.Admin<S, E>) engine.eval(this.traversalScript, engineBindings);
-            if (!traversal.isLocked()) traversal.applyStrategies();
-            return traversal;
-        } catch (final ScriptException e) {
-            throw new IllegalStateException(e.getMessage(), e);
-        }
-    }
-
-    public String toString() {
-        return this.traversalScript;
-    }
-}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6a4fcaf6/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalScriptHelper.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalScriptHelper.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalScriptHelper.java
deleted file mode 100644
index 4fa6e69..0000000
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalScriptHelper.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tinkerpop.gremlin.process.traversal.util;
-
-import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
-import org.apache.tinkerpop.gremlin.process.traversal.TraversalSource;
-import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
-import org.apache.tinkerpop.gremlin.structure.Graph;
-
-/**
- * @author Marko A. Rodriguez (http://markorodriguez.com)
- * @deprecated As of release 3.2.0, replaced by {@link ScriptTraversal}.
- */
-@Deprecated
-public final class TraversalScriptHelper {
-
-    private TraversalScriptHelper() {
-    }
-
-    @Deprecated
-    public static <S, E> Traversal.Admin<S, E> compute(
-            final Graph graph,
-            final TraversalSource traversalSource,
-            final String scriptEngineName,
-            final String traversalScript,
-            final Object... bindings) {
-
-        try {
-            return new TraversalScriptFunction<S, E>(traversalSource, scriptEngineName, traversalScript, bindings).apply(graph);
-        } catch (final Exception e) {
-            throw new IllegalStateException(e.getMessage(), e);
-        }
-    }
-
-    @Deprecated
-    public static <S, E> Traversal.Admin<S, E> compute(final String script, final GraphTraversalSource g, final Object... bindings) {
-        return new ScriptTraversal<>(g, "gremlin-groovy", script, bindings);
-    }
-}


[2/2] tinkerpop git commit: Merge branch 'TINKERPOP-1169'

Posted by ok...@apache.org.
Merge branch 'TINKERPOP-1169'


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

Branch: refs/heads/master
Commit: 8343072ffe97699c04f5b036de29faa3c8e9cee4
Parents: 69053b9 6a4fcaf
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Wed Jul 5 07:16:13 2017 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Wed Jul 5 07:16:13 2017 -0600

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  2 +
 docs/src/upgrade/release-3.3.x.asciidoc         |  2 +
 .../traversal/util/TraversalScriptFunction.java | 71 --------------------
 .../traversal/util/TraversalScriptHelper.java   | 55 ---------------
 4 files changed, 4 insertions(+), 126 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8343072f/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --cc CHANGELOG.asciidoc
index 3a61c49,989a0c7..6f47550
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -26,8 -26,8 +26,10 @@@ image::https://raw.githubusercontent.co
  TinkerPop 3.3.0 (Release Date: NOT OFFICIALLY RELEASED YET)
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
 +* Removed previously deprecated `TraversalSource.Builder` class.
 +* Removed previously deprecated `ConnectiveP`, `AndP`, `OrP` constructors.
+ * Removed previously deprecated `TraversalScriptFunction` class.
+ * Removed previously deprecated `TraversalScriptHelper` class.
  * Graphite and Ganglia are no longer packaged with the Gremlin Server distribution.
  * `TransactionException` is no longer a class of `AbstractTransaction` and it extends `RuntimeException`.
  * Included an ellipse on long property names that are truncated.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8343072f/docs/src/upgrade/release-3.3.x.asciidoc
----------------------------------------------------------------------
diff --cc docs/src/upgrade/release-3.3.x.asciidoc
index 04e5615,3ef6bf0..ececefa
--- a/docs/src/upgrade/release-3.3.x.asciidoc
+++ b/docs/src/upgrade/release-3.3.x.asciidoc
@@@ -202,10 -202,8 +202,12 @@@ The following deprecated classes, metho
  ** `org.apache.tinkerpop.gremlin.jsr223.SingleGremlinScriptEngineManager#getInstance()`
  ** `org.apache.tinkerpop.gremlin.jsr223.GremlinScriptEngineManager#addModule(GremlinModule)`
  ** `org.apache.tinkerpop.gremlin.jsr223.console.PluginAcceptor`
 +** `org.apache.tinkerpop.gremlin.process.traversal.TraversalSource.Builder`
 +** `org.apache.tinkerpop.gremlin.process.traversal.util.ConnectiveP(P...)`
 +** `org.apache.tinkerpop.gremlin.process.traversal.util.AndP(P...)`
 +** `org.apache.tinkerpop.gremlin.process.traversal.util.OrP(P...)`
+ ** `org.apache.tinkerpop.gremlin.process.traversal.util.TraversalScriptFunction`
+ ** `org.apache.tinkerpop.gremlin.process.traversal.util.TraversalScriptHelper`
  ** `org.apache.tinkerpop.gremlin.structure.Graph.Features.VertexPropertyFeatures#supportsAddProperty()`
  ** `org.apache.tinkerpop.gremlin.structure.Graph.Features.VertexPropertyFeatures#FEATURE_ADD_PROPERTY`
  ** `org.apache.tinkerpop.gremlin.structure.Graph.OptIn#SUITE_GROOVY_PROCESS_STANDARD`