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 2015/08/25 14:34:57 UTC

[38/50] incubator-tinkerpop git commit: Remove describeSteps()

Remove describeSteps()


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

Branch: refs/heads/tp30
Commit: 5164f482d2e3974bf980f375e31a0d9fa9909340
Parents: 64900f0
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Aug 19 06:29:20 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Aug 19 06:29:20 2015 -0400

----------------------------------------------------------------------
 docs/src/gremlin-applications.asciidoc          | 13 -----
 .../plugin/UtilitiesGremlinPluginScript.groovy  | 58 +-------------------
 2 files changed, 1 insertion(+), 70 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5164f482/docs/src/gremlin-applications.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/gremlin-applications.asciidoc b/docs/src/gremlin-applications.asciidoc
index a64e626..471616a 100644
--- a/docs/src/gremlin-applications.asciidoc
+++ b/docs/src/gremlin-applications.asciidoc
@@ -1255,17 +1255,4 @@ A good implementation of the Gremlin APIs will validate their features against t
 [gremlin-groovy,modern]
 ----
 describeGraph(HadoopGraph)
-----
-
-[[describe-steps]]
-Describe Steps
-^^^^^^^^^^^^^^
-
-Gremlin steps are building blocks of the Gremlin language.  In most cases, a step will extend from a number of basic abstract steps that provide most of the functionality for a step of the implemented type.  A step will also possibly implement one or more marker interfaces that don't enforce any functionality, but provide more runtime information about how to classify it.  As there are many steps and many base steps and markers, it can be hard for those writing `TraversalStrategy` implementations to keep track of them all.
-
-The `describeSteps` function helps with this problem by generating a table that contains a list of all steps on the classpath and indicators that show which base classes and markers are associated with them.
-
-[gremlin-groovy,modern]
-----
-describeSteps()
 ----
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5164f482/gremlin-console/src/main/resources/org/apache/tinkerpop/gremlin/console/groovy/plugin/UtilitiesGremlinPluginScript.groovy
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/resources/org/apache/tinkerpop/gremlin/console/groovy/plugin/UtilitiesGremlinPluginScript.groovy b/gremlin-console/src/main/resources/org/apache/tinkerpop/gremlin/console/groovy/plugin/UtilitiesGremlinPluginScript.groovy
index 3b9d268..5f5e3c6 100644
--- a/gremlin-console/src/main/resources/org/apache/tinkerpop/gremlin/console/groovy/plugin/UtilitiesGremlinPluginScript.groovy
+++ b/gremlin-console/src/main/resources/org/apache/tinkerpop/gremlin/console/groovy/plugin/UtilitiesGremlinPluginScript.groovy
@@ -49,60 +49,4 @@ describeGraph = { Class<? extends org.apache.tinkerpop.gremlin.structure.Graph>
 "the implementation itself.  Compliant implementations will faithfully and ${lf}" +
 "honestly supply these Annotations to provide the most accurate depiction of ${lf}" +
 "their support."
-}
-
-describeSteps = {
-    def lf = System.getProperty("line.separator")
-    def steps = []
-    new io.github.lukehutch.fastclasspathscanner.FastClasspathScanner("org.apache.tinkerpop")
-        .matchClassesImplementing(org.apache.tinkerpop.gremlin.process.traversal.Step, { implementingClass ->
-        if (!java.lang.reflect.Modifier.isAbstract(implementingClass.modifiers))
-            steps << implementingClass
-    }).scan()
-
-    def longestNameLength = steps.collect{it.simpleName.length()}.max()
-    def header = "STEP".padRight(longestNameLength) + " | B | F | L | M | S |BYP|CON|MUT|PRO|RDB|RNG|SCO|"
-    def content = lf + header + lf
-    def lengthOfLine = header.length()
-    content = content + "-".multiply(lengthOfLine) + lf
-
-    def printXIfAssignable = { Class stepClass, Class marker  ->
-        (marker.isAssignableFrom(stepClass) ? " X " : "   ") + "|"
-    }
-
-    steps.sort{a,b -> a.simpleName <=> b.simpleName }.each { stepClass ->
-        def line = "${stepClass.simpleName}".padRight(longestNameLength)  + " |"
-        line = line + printXIfAssignable(stepClass, org.apache.tinkerpop.gremlin.process.traversal.step.branch.BranchStep)
-        line = line + printXIfAssignable(stepClass, org.apache.tinkerpop.gremlin.process.traversal.step.filter.FilterStep)
-        line = line + printXIfAssignable(stepClass, org.apache.tinkerpop.gremlin.process.traversal.step.map.FlatMapStep)
-        line = line + printXIfAssignable(stepClass, org.apache.tinkerpop.gremlin.process.traversal.step.map.MapStep)
-        line = line + printXIfAssignable(stepClass, org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SideEffectStep)
-        line = line + printXIfAssignable(stepClass, org.apache.tinkerpop.gremlin.process.traversal.step.Bypassing)
-        line = line + printXIfAssignable(stepClass, org.apache.tinkerpop.gremlin.process.traversal.step.filter.ConjunctionStep)
-        line = line + printXIfAssignable(stepClass, org.apache.tinkerpop.gremlin.process.traversal.step.Mutating)
-        line = line + printXIfAssignable(stepClass, org.apache.tinkerpop.gremlin.process.traversal.step.Profiling)
-        line = line + printXIfAssignable(stepClass, org.apache.tinkerpop.gremlin.process.traversal.step.util.ReducingBarrierStep)
-        line = line + printXIfAssignable(stepClass, org.apache.tinkerpop.gremlin.process.traversal.step.Ranging)
-        line = line + printXIfAssignable(stepClass, org.apache.tinkerpop.gremlin.process.traversal.step.Scoping)
-        line = line + lf
-        content = content + line
-    }
-
-    content = content + "-".multiply(lengthOfLine) + lf
-
-    content = content + "LEGEND${lf}" +
-            "B=" + org.apache.tinkerpop.gremlin.process.traversal.step.branch.BranchStep.simpleName + lf +
-            "F=" + org.apache.tinkerpop.gremlin.process.traversal.step.filter.FilterStep.simpleName + lf +
-            "L=" + org.apache.tinkerpop.gremlin.process.traversal.step.map.FlatMapStep.simpleName + lf +
-            "M=" + org.apache.tinkerpop.gremlin.process.traversal.step.map.MapStep.simpleName + lf +
-            "S=" + org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SideEffectStep.simpleName + lf +
-            "BYP=" + org.apache.tinkerpop.gremlin.process.traversal.step.Bypassing.simpleName + lf +
-            "CON=" + org.apache.tinkerpop.gremlin.process.traversal.step.filter.ConjunctionStep.simpleName + lf +
-            "MUT=" + org.apache.tinkerpop.gremlin.process.traversal.step.Mutating.simpleName + lf +
-            "PRO=" + org.apache.tinkerpop.gremlin.process.traversal.step.Profiling.simpleName + lf +
-            "RDB=" + org.apache.tinkerpop.gremlin.process.traversal.step.util.ReducingBarrierStep.simpleName + lf +
-            "RNG=" + org.apache.tinkerpop.gremlin.process.traversal.step.Ranging.simpleName + lf +
-            "SCO=" + org.apache.tinkerpop.gremlin.process.traversal.step.Scoping.simpleName
-
-    return content
-}
+}
\ No newline at end of file