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 2015/04/06 16:23:44 UTC

incubator-tinkerpop git commit: got rid of the DSL section of the docs. With reintroduce in M9 when the SocialTraversal is fully written, tested on OLAP, and ready for users to create their own DSLs.

Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/master 60a79e078 -> 19e7297e7


got rid of the DSL section of the docs. With reintroduce in M9 when the SocialTraversal is fully written, tested on OLAP, and ready for users to create their own DSLs.


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

Branch: refs/heads/master
Commit: 19e7297e75a3a1883c489252f926e2b165b201b3
Parents: 60a79e0
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Mon Apr 6 08:23:43 2015 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Mon Apr 6 08:23:43 2015 -0600

----------------------------------------------------------------------
 docs/src/the-traversal.asciidoc | 62 ------------------------------------
 1 file changed, 62 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/19e7297e/docs/src/the-traversal.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/the-traversal.asciidoc b/docs/src/the-traversal.asciidoc
index 5b73e33..6ab181e 100644
--- a/docs/src/the-traversal.asciidoc
+++ b/docs/src/the-traversal.asciidoc
@@ -1706,65 +1706,3 @@ g.E() // shows only the edges defined in the edgeCriterion
 ----
 
 Note that `SubgraphStrategy` directly passes the edge and vertex criterion `Predicate` objects  to an injected `filter` step and as such may not take advantage of important optimizations provided by the various `Graph` implementations (given the use of lambda expressions).
-
-Domain Specific Languages
--------------------------
-
-CAUTION: As of TinkerPop x.y.z, the presented domain specific language framework has not been fully flushed out. Expect changes to the API until this "caution"-note is removed.
-
-image:gremlin-quill.png[width=200,float=right] The super interface of GraphTraversal is `Traversal`. It is possible for developers to create domain specific traversals by extending Traversal. For example, a `SocialTraversal` example is provided below.
-
-[source,java]
-----
- public interface SocialTraversal<S, E> extends Traversal<S, E> {
-
-     public SocialTraversal<S, Vertex> people(final String name);
-
-     public default SocialTraversal<S, Vertex> knows() {
-         final FlatMapStep<Vertex, Vertex> flatMapStep = new FlatMapStep<>(this);
-         flatMapStep.setFunction(v -> v.get().out("knows"));
-         return (SocialTraversal) this.asAdmin().addStep(flatMapStep);
-     }
-
-     public default SocialTraversal<S, Vertex> created() {
-         final FlatMapStep<Vertex, Vertex> flatMapStep = new FlatMapStep<>(this);
-         flatMapStep.setFunction(v -> v.get().out("created"));
-         return (SocialTraversal) this.asAdmin().addStep(flatMapStep);
-     }
-
-     public default SocialTraversal<S, String> name() {
-         MapStep<Vertex, String> mapStep = new MapStep<>(this);
-         mapStep.setFunction(v -> v.get().<String>value("name"));
-         return (SocialTraversal) this.asAdmin().addStep(mapStep);
-     }
-
-     public static <S> SocialTraversal<S, S> of(final Graph graph) {
-         return new DefaultSocialTraversal<>(graph);
-     }
-
-     public class DefaultSocialTraversal<S, E> extends DefaultTraversal<S, E> implements SocialTraversal<S, E> {
-         private final Graph graph;
-
-         public DefaultSocialTraversal(final Graph graph) {
-             super(Graph.class);
-             this.graph = graph;
-         }
-
-         public SocialTraversal<S, Vertex> people(final String name) {
-             return (SocialTraversal) this.asAdmin().addStep(new StartStep<>(this, this.graph.V().has("name", name)));
-         }
-
-     }
- }
-----
-
-//This traversal definition can now be used as follows.
-//
-//[gremlin-groovy,modern]
-//----
-//import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerFactory.SocialTraversal
-//g.of(SocialTraversal).people("marko").knows().name()
-//----
-//
-//By extending `Traversal`, users can create a DSL that is respective of the semantics of their data. Instead of querying in terms of vertices/edges/properties, they can query in terms of, for example, people, their friends, and their names.
-