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 2017/04/28 20:08:09 UTC

[1/2] tinkerpop git commit: TINKERPOP-786 Added a bunch of javadoc

Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-786 820a059e4 -> 946c52c9f


TINKERPOP-786 Added a bunch of javadoc


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

Branch: refs/heads/TINKERPOP-786
Commit: 37418bd4416d939a2cb29cb54df891729058a186
Parents: 820a059
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Apr 28 16:07:00 2017 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Apr 28 16:07:00 2017 -0400

----------------------------------------------------------------------
 .../process/traversal/dsl/GremlinDsl.java        | 19 +++++++++++++++++--
 .../traversal/dsl/GremlinDslProcessor.java       |  2 ++
 .../traversal/dsl/ProcessorException.java        |  2 ++
 3 files changed, 21 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/37418bd4/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/GremlinDsl.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/GremlinDsl.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/GremlinDsl.java
index d08736e..15b93d6 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/GremlinDsl.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/GremlinDsl.java
@@ -27,7 +27,21 @@ import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
 /**
- * An annotation that specifies that an interface is meant to be used a DSL extension to a {@link GraphTraversal}.
+ * An annotation that specifies that an interface is meant to be used to produce Gremlin DSL. This annotation should
+ * be applied to an interface that extends {@link GraphTraversal}. This interface should be suffixed with
+ * {@code TraversalDsl}. The DSL classes will be generated to the package of the annotated class or the to the value
+ * specified in the {@link #packageName()} and will use the part of the interface name up to the suffix to generate
+ * the classes. Therefore, assuming an interface, annotated with {@code GremlinDsl}, called {@code SocialTraversalDsl},
+ * there will be three classes generated:
+ *
+ * <ul>
+ *     <li>{@code SocialTraversal} - an interface that is an extension to {@code SocialTraversalDsl}</li>
+ *     <li>{@code DefaultSocialTraversal} - an implementation of the {@code SocialTraversal}</li>
+ *     <li>{@code SocialTraversalSource} - an extension of {@link GraphTraversalSource} which spawns {@code DefaultSocialTraversal} instances</li>
+ * </ul>
+ *
+ * Together these generated classes provide all the infrastructure required to properly Gremlin traversals enhanced
+ * with domain specific steps.
  *
  * @author Stephen Mallette (http://stephen.genoprime.com)
  */
@@ -42,7 +56,8 @@ public @interface GremlinDsl {
     public String packageName() default "";
 
     /**
-     * Defines the optional canonical name of the {@link GraphTraversalSource} that this DSL should extend from.
+     * Defines the optional canonical name of the {@link GraphTraversalSource} that this DSL should extend from. If
+     * this value is not supplied the generated "source" will simply extend from {@link GraphTraversalSource}.
      */
     public String traversalSource() default "org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource";
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/37418bd4/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/GremlinDslProcessor.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/GremlinDslProcessor.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/GremlinDslProcessor.java
index 6a09ef5..9e23410 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/GremlinDslProcessor.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/GremlinDslProcessor.java
@@ -65,6 +65,8 @@ import java.util.function.Predicate;
 import java.util.stream.Collectors;
 
 /**
+ * A custom Java annotation processor for the {@link GremlinDsl} annotation that helps to generate DSLs classes.
+ *
  * @author Stephen Mallette (http://stephen.genoprime.com)
  */
 @SupportedAnnotationTypes("org.apache.tinkerpop.gremlin.process.traversal.dsl.GremlinDsl")

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/37418bd4/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/ProcessorException.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/ProcessorException.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/ProcessorException.java
index c84278e..3051890 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/ProcessorException.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/ProcessorException.java
@@ -21,6 +21,8 @@ package org.apache.tinkerpop.gremlin.process.traversal.dsl;
 import javax.lang.model.element.Element;
 
 /**
+ * Exception thrown by the {@link GremlinDslProcessor}.
+ *
  * @author Stephen Mallette (http://stephen.genoprime.com)
  */
 public class ProcessorException extends Exception {


[2/2] tinkerpop git commit: TINKERPOP-786 Deleted an unused interface

Posted by sp...@apache.org.
TINKERPOP-786 Deleted an unused interface


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

Branch: refs/heads/TINKERPOP-786
Commit: 946c52c9f8f063d8605ea4a7b64800349ea38a76
Parents: 37418bd
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Apr 28 16:07:52 2017 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Apr 28 16:07:52 2017 -0400

----------------------------------------------------------------------
 .../dsl/GremlinDslAnnotatedInterface.java       | 32 --------------------
 1 file changed, 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/946c52c9/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/GremlinDslAnnotatedInterface.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/GremlinDslAnnotatedInterface.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/GremlinDslAnnotatedInterface.java
deleted file mode 100644
index 2f6db74..0000000
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/GremlinDslAnnotatedInterface.java
+++ /dev/null
@@ -1,32 +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.dsl;
-
-import javax.lang.model.element.TypeElement;
-
-/**
- * @author Stephen Mallette (http://stephen.genoprime.com)
- */
-class GremlinDslAnnotatedInterface {
-    private final TypeElement annotatedInterfaceElement;
-
-    public GremlinDslAnnotatedInterface(final TypeElement interfaceElement) {
-        annotatedInterfaceElement = interfaceElement;
-    }
-}