You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2018/08/16 15:40:19 UTC
[31/50] tinkerpop git commit: TINKERPOP-1878 Removed more references
to "transpile"
TINKERPOP-1878 Removed more references to "transpile"
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/e22665be
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/e22665be
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/e22665be
Branch: refs/heads/TINKERPOP-1913
Commit: e22665be46e5becdc6d9cdd9498b04b668da6b5b
Parents: 2fbae88
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Aug 13 13:18:13 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Aug 13 14:39:24 2018 -0400
----------------------------------------------------------------------
.../gremlin/sparql/SparqlToGremlinCompiler.java | 20 ++++++++++----------
.../traversal/strategy/SparqlStrategy.java | 4 ++--
2 files changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e22665be/sparql-gremlin/src/main/java/org/apache/tinkerpop/gremlin/sparql/SparqlToGremlinCompiler.java
----------------------------------------------------------------------
diff --git a/sparql-gremlin/src/main/java/org/apache/tinkerpop/gremlin/sparql/SparqlToGremlinCompiler.java b/sparql-gremlin/src/main/java/org/apache/tinkerpop/gremlin/sparql/SparqlToGremlinCompiler.java
index 4e00045..8a454f6 100644
--- a/sparql-gremlin/src/main/java/org/apache/tinkerpop/gremlin/sparql/SparqlToGremlinCompiler.java
+++ b/sparql-gremlin/src/main/java/org/apache/tinkerpop/gremlin/sparql/SparqlToGremlinCompiler.java
@@ -51,7 +51,7 @@ import org.apache.tinkerpop.gremlin.structure.Graph;
import org.apache.tinkerpop.gremlin.structure.Vertex;
/**
- * The engine that transpiles SPARQL to Gremlin traversals thus enabling SPARQL to be executed on any TinkerPop-enabled
+ * The engine that compiles SPARQL to Gremlin traversals thus enabling SPARQL to be executed on any TinkerPop-enabled
* graph system.
*/
public class SparqlToGremlinCompiler {
@@ -75,23 +75,23 @@ public class SparqlToGremlinCompiler {
* Converts SPARQL to a Gremlin traversal.
*
* @param graph the {@link Graph} instance to execute the traversal from
- * @param sparqlQuery the query to transpile to Gremlin
+ * @param sparqlQuery the query to compile to Gremlin
*/
- public static GraphTraversal<Vertex, ?> transpile(final Graph graph, final String sparqlQuery) {
- return transpile(graph.traversal(), sparqlQuery);
+ public static GraphTraversal<Vertex, ?> compile(final Graph graph, final String sparqlQuery) {
+ return compile(graph.traversal(), sparqlQuery);
}
/**
* Converts SPARQL to a Gremlin traversal.
*
* @param g the {@link GraphTraversalSource} instance to execute the traversal from
- * @param sparqlQuery the query to transpile to Gremlin
+ * @param sparqlQuery the query to compile to Gremlin
*/
- public static GraphTraversal<Vertex, ?> transpile(final GraphTraversalSource g, final String sparqlQuery) {
- return transpile(g, QueryFactory.create(Prefixes.prepend(sparqlQuery), Syntax.syntaxSPARQL));
+ public static GraphTraversal<Vertex, ?> compile(final GraphTraversalSource g, final String sparqlQuery) {
+ return compile(g, QueryFactory.create(Prefixes.prepend(sparqlQuery), Syntax.syntaxSPARQL));
}
- private GraphTraversal<Vertex, ?> transpile(final Query query) {
+ private GraphTraversal<Vertex, ?> compile(final Query query) {
final Op op = Algebra.compile(query);
OpWalker.walk(op, new GremlinOpVisitor());
@@ -229,8 +229,8 @@ public class SparqlToGremlinCompiler {
return orderingIndex;
}
- private static GraphTraversal<Vertex, ?> transpile(final GraphTraversalSource g, final Query query) {
- return new SparqlToGremlinCompiler(g).transpile(query);
+ private static GraphTraversal<Vertex, ?> compile(final GraphTraversalSource g, final Query query) {
+ return new SparqlToGremlinCompiler(g).compile(query);
}
/**
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e22665be/sparql-gremlin/src/main/java/org/apache/tinkerpop/gremlin/sparql/process/traversal/strategy/SparqlStrategy.java
----------------------------------------------------------------------
diff --git a/sparql-gremlin/src/main/java/org/apache/tinkerpop/gremlin/sparql/process/traversal/strategy/SparqlStrategy.java b/sparql-gremlin/src/main/java/org/apache/tinkerpop/gremlin/sparql/process/traversal/strategy/SparqlStrategy.java
index 38956f8..05cfd47 100644
--- a/sparql-gremlin/src/main/java/org/apache/tinkerpop/gremlin/sparql/process/traversal/strategy/SparqlStrategy.java
+++ b/sparql-gremlin/src/main/java/org/apache/tinkerpop/gremlin/sparql/process/traversal/strategy/SparqlStrategy.java
@@ -36,7 +36,7 @@ import java.util.Set;
/**
* This {@link TraversalStrategy} is used in conjunction with the {@link SparqlTraversalSource} which has a single
* {@code sparql()} start step. That step adds a {@link ConstantStep} to the traversal with the SPARQL query within
- * it as a string value. This strategy finds that step and transpiles it to a Gremlin traversal which then replaces
+ * it as a string value. This strategy finds that step and compiles it to a Gremlin traversal which then replaces
* the {@link ConstantStep}.
*
* @author Stephen Mallette (http://stephen.genoprime.com)
@@ -69,7 +69,7 @@ public class SparqlStrategy extends AbstractTraversalStrategy<TraversalStrategy.
final Object[] injections = stepWithSparql.getInjections();
if (injections.length == 1 && injections[0] instanceof String) {
final String sparql = (String) injections[0];
- final Traversal<Vertex, ?> sparqlTraversal = SparqlToGremlinCompiler.transpile(
+ final Traversal<Vertex, ?> sparqlTraversal = SparqlToGremlinCompiler.compile(
traversal.getGraph().get(), sparql);
TraversalHelper.removeAllSteps(traversal);
sparqlTraversal.asAdmin().getSteps().forEach(s -> traversal.addStep(s));