You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by dk...@apache.org on 2015/04/20 16:17:42 UTC

[05/23] incubator-tinkerpop git commit: Fix javadoc warnings in gremlin-test.

Fix javadoc warnings in gremlin-test.


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

Branch: refs/heads/io-docs
Commit: 287553ec5907a40225479ae9805bde9ccd0bb6d0
Parents: cd6d0a8
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Apr 17 07:30:01 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Apr 17 07:30:01 2015 -0400

----------------------------------------------------------------------
 .../tinkerpop/gremlin/AbstractGremlinSuite.java | 19 +++---
 .../apache/tinkerpop/gremlin/GraphProvider.java | 64 ++++++++++----------
 .../gremlin/process/ProcessComputerSuite.java   |  2 +-
 .../structure/StructureStandardSuite.java       | 10 +--
 4 files changed, 50 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/287553ec/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinSuite.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinSuite.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinSuite.java
index 469a10a..a578908 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinSuite.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinSuite.java
@@ -72,8 +72,9 @@ public abstract class AbstractGremlinSuite extends Suite {
      * Indicates that this suite is for testing a gremlin flavor and is therefore not responsible for validating
      * the suite against what the {@link Graph} implementation opts-in for. This setting will let Gremlin flavor
      * developers run their test cases against a {@link Graph} without the need for the {@link Graph} to supply
-     * an {@link Graph.OptIn} annotation.  Not having that annotation is a likely case for flavors while they are
-     * under development and a {@link Graph.OptIn} is not possible.
+     * an {@link org.apache.tinkerpop.gremlin.structure.Graph.OptIn} annotation.  Not having that annotation is a
+     * likely case for flavors while they are under development and a
+     * {@link org.apache.tinkerpop.gremlin.structure.Graph.OptIn} is not possible.
      */
     private final boolean gremlinFlavorSuite;
 
@@ -84,10 +85,12 @@ public abstract class AbstractGremlinSuite extends Suite {
      * @param builder Required for JUnit Suite construction
      * @param testsToExecute The list of tests to execute
      * @param testsToEnforce The list of tests to "enforce" such that a check is made to ensure that in this list,
-     *                       there exists an implementation in the testsToExecute (use {@code null} for no enforcement.
-     * @param gremlinFlavorSuite Ignore validation of {@link Graph.OptIn} annotations which is typically reserved for
-     *                           structure tests
-     * @param traversalEngineType The {@link TraversalEngine.Type} to enforce on this suite
+     *                       there exists an implementation in the testsToExecute (use {@code null} for no
+     *                       enforcement).
+     * @param gremlinFlavorSuite Ignore validation of {@link org.apache.tinkerpop.gremlin.structure.Graph.OptIn}
+     *                           annotations which is typically reserved for structure tests
+     * @param traversalEngineType The {@link org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine.Type} to
+     *                            enforce on this suite
      */
     public AbstractGremlinSuite(final Class<?> klass, final RunnerBuilder builder, final Class<?>[] testsToExecute,
                                 final Class<?>[] testsToEnforce, final boolean gremlinFlavorSuite,
@@ -162,7 +165,7 @@ public abstract class AbstractGremlinSuite extends Suite {
     /**
      * Filter a list of test classes through the GREMLIN_TESTS environment variable list.
      */
-    private static Class<?>[] filterSpecifiedTests(Class<?>[] allTests) {
+    private static Class<?>[] filterSpecifiedTests(final Class<?>[] allTests) {
         if (null == allTests) return allTests;
 
         Class<?>[] filteredTests;
@@ -225,7 +228,7 @@ public abstract class AbstractGremlinSuite extends Suite {
     }
 
     /**
-     * Filter for tests in the suite which is controlled by the {@link Graph.OptOut} annotation.
+     * Filter for tests in the suite which is controlled by the {@link org.apache.tinkerpop.gremlin.structure.Graph.OptOut} annotation.
      */
     public static class OptOutTestFilter extends Filter {
 

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/287553ec/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/GraphProvider.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/GraphProvider.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/GraphProvider.java
index fbc2cd2..9e15f70 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/GraphProvider.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/GraphProvider.java
@@ -78,20 +78,20 @@ public interface GraphProvider {
     }};
 
     /**
-     * Create a {@link org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource} from a {@link Graph} instance.  The default implementation uses the
-     * {@link org.apache.tinkerpop.gremlin.process.traversal.engine.StandardTraversalEngine} so vendors should
-     * override as necessary if their implementation is testing something that requires a different engine type,
-     * like those tests for {@link org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine.Type}.
+     * Create a {@link GraphTraversalSource} from a {@link Graph} instance.  The default implementation uses the
+     * {@link StandardTraversalEngine} so vendors should override as necessary if their implementation is testing
+     * something that requires a different engine type, like those tests for
+     * {@link org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine.Type}.
      */
     public default GraphTraversalSource traversal(final Graph graph) {
         return GraphTraversalSource.standard().create(graph);
     }
 
     /**
-     * Create a {@link org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource} from a {@link Graph} instance.  The default implementation uses the
-     * {@link org.apache.tinkerpop.gremlin.process.traversal.engine.StandardTraversalEngine} so vendors should
-     * override as necessary if their implementation is testing something that requires a different engine type,
-     * like those tests for {@link org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine.Type}.
+     * Create a {@link GraphTraversalSource} from a {@link Graph} instance.  The default implementation uses the
+     * {@link StandardTraversalEngine} so vendors should override as necessary if their implementation is testing
+     * something that requires a different engine type, like those tests for
+     * {@link org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine.Type}.
      * <br/>
      * Implementations should apply strategies as necessary to the
      * {@link org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource.Builder} before calling
@@ -105,17 +105,17 @@ public interface GraphProvider {
 
     /**
      * Creates a new {@link org.apache.tinkerpop.gremlin.structure.Graph} instance using the default
-     * {@link org.apache.commons.configuration.Configuration} from {@link #standardGraphConfiguration(Class, String, LoadGraphWith.GraphData)}.
-     * The default implementation converts the passes the
+     * {@code org.apache.commons.configuration.Configuration} from
+     * {@link #standardGraphConfiguration(Class, String, LoadGraphWith.GraphData)}.
      */
     default public Graph standardTestGraph(final Class<?> test, final String testMethodName, final LoadGraphWith.GraphData loadGraphWith) {
         return GraphFactory.open(standardGraphConfiguration(test, testMethodName, loadGraphWith));
     }
 
     /**
-     * Creates a new {@link org.apache.tinkerpop.gremlin.structure.Graph} instance from the Configuration object using
-     * {@link org.apache.tinkerpop.gremlin.structure.util.GraphFactory}. The assumption here is that the {@code Configuration}
-     * has been created by one of the {@link #newGraphConfiguration(String, Class, String, LoadGraphWith.GraphData)} methods and has therefore
+     * Creates a new {@link Graph} instance from the Configuration object using {@link GraphFactory}. The assumption
+     * here is that the {@code Configuration} has been created by one of the
+     * {@link #newGraphConfiguration(String, Class, String, LoadGraphWith.GraphData)} methods and has therefore
      * already been modified by the implementation as necessary for {@link Graph} creation.
      */
     default public Graph openTestGraph(final Configuration config) {
@@ -123,10 +123,10 @@ public interface GraphProvider {
     }
 
     /**
-     * Gets the {@link org.apache.commons.configuration.Configuration} object that can construct a {@link org.apache.tinkerpop.gremlin.structure.Graph} instance from {@link org.apache.tinkerpop.gremlin.structure.util.GraphFactory}.
-     * Note that this method should create a {@link org.apache.tinkerpop.gremlin.structure.Graph} using the {@code graphName} of "standard", meaning it
-     * should always return a configuration instance that generates the same {@link org.apache.tinkerpop.gremlin.structure.Graph} from the
-     * {@link org.apache.tinkerpop.gremlin.structure.util.GraphFactory}.
+     * Gets the {@code Configuration} object that can construct a {@link Graph} instance from {@link GraphFactory}.
+     * Note that this method should create a {@link Graph} using the {@code graphName} of "standard", meaning it
+     * should always return a configuration instance that generates the same {@link Graph} from the
+     * {@link GraphFactory}.
      */
     default public Configuration standardGraphConfiguration(final Class<?> test, final String testMethodName, final LoadGraphWith.GraphData loadGraphWith) {
         return newGraphConfiguration("standard", test, testMethodName, Collections.<String, Object>emptyMap(), loadGraphWith);
@@ -135,7 +135,7 @@ public interface GraphProvider {
     /**
      * If possible (usually with persisted graph) clear the space on disk given the configuration that would be used
      * to construct the graph.  The default implementation simply calls
-     * {@link #clear(org.apache.tinkerpop.gremlin.structure.Graph, org.apache.commons.configuration.Configuration)} with
+     * {@link #clear(Graph, org.apache.commons.configuration.Configuration)} with
      * a null graph argument.
      */
     public default void clear(final Configuration configuration) throws Exception {
@@ -143,9 +143,9 @@ public interface GraphProvider {
     }
 
     /**
-     * Clears a {@link org.apache.tinkerpop.gremlin.structure.Graph} of all data and settings.  Implementations will have
-     * different ways of handling this. For a brute force approach, implementers can simply delete data directories
-     * provided in the configuration. Implementers may choose a more elegant approach if it exists.
+     * Clears a {@link Graph} of all data and settings.  Implementations will have different ways of handling this.
+     * For a brute force approach, implementers can simply delete data directories provided in the configuration.
+     * Implementers may choose a more elegant approach if it exists.
      * <br/>
      * Implementations should be able to accept an argument of null for the Graph, in which case the only action
      * that can be performed is a clear given the configuration.  The method will typically be called this way
@@ -174,7 +174,7 @@ public interface GraphProvider {
     /**
      * When implementing this method ensure that a test suite can override any settings EXCEPT the
      * "gremlin.graph" setting which should be defined by the implementer. It should provide a
-     * {@link org.apache.commons.configuration.Configuration} that will generate a graph unique to that {@code graphName}.
+     * {@code Configuration} that will generate a graph unique to that {@code graphName}.
      *
      * @param graphName              a unique test graph name
      * @param test                   the test class
@@ -191,7 +191,7 @@ public interface GraphProvider {
     /**
      * When implementing this method ensure that a test suite can override any settings EXCEPT the
      * "gremlin.graph" setting which should be defined by the implementer. It should provide a
-     * {@link org.apache.commons.configuration.Configuration} that will generate a graph unique to that {@code graphName}.
+     * {@code Configuration} that will generate a graph unique to that {@code graphName}.
      *
      * @param graphName      a unique test graph name
      * @param test           the test class
@@ -206,11 +206,11 @@ public interface GraphProvider {
     }
 
     /**
-     * Tests are annotated with a {@link org.apache.tinkerpop.gremlin.LoadGraphWith} annotation. These annotations tell
-     * the test what kind of data to preload into the graph instance.  It is up to the implementation to load the
-     * graph with the data specified by that annotation. This method also represents the place where indices should
-     * be configured according the the {@link Graph} implementation's API. Implementers can use the {@code testClass}
-     * and {@code testName} arguments to implement test specific configurations to their graphs.
+     * Tests are annotated with a {@link LoadGraphWith} annotation. These annotations tell the test what kind of data
+     * to preload into the graph instance.  It is up to the implementation to load the graph with the data specified
+     * by that annotation. This method also represents the place where indices should be configured according the
+     * the {@link Graph} implementation's API. Implementers can use the {@code testClass} and {@code testName}
+     * arguments to implement test specific configurations to their graphs.
      *
      * @param graph         the {@link Graph} instance to load data into constructed by this {@code GraphProvider}
      * @param loadGraphWith the annotation for the currently running test - this value may be null if no graph
@@ -228,11 +228,11 @@ public interface GraphProvider {
      * <li>{@link Element}</li>
      * <li>{@link DefaultGraphTraversal}</li>
      * <li>{@link Graph}</li>
-     * <li>{@link Graph.Variables}</li>
+     * <li>{@link org.apache.tinkerpop.gremlin.structure.Graph.Variables}</li>
      * <li>{@link GraphTraversal}</li>
-     * <li>{@link org.apache.tinkerpop.gremlin.process.traversal.traverser.B_O_P_PA_S_SE_SL_Traverser}</li>
+     * <li>{@link B_O_P_PA_S_SE_SL_Traverser}</li>
      * <li>{@link Property}</li>
-     * <li>{@link org.apache.tinkerpop.gremlin.process.traversal.traverser.B_O_PA_S_SE_SL_Traverser}</li>
+     * <li>{@link B_O_PA_S_SE_SL_Traverser}</li>
      * <li>{@link Traversal}</li>
      * <li>{@link Traverser}</li>
      * <li>{@link Vertex}</li>
@@ -245,7 +245,7 @@ public interface GraphProvider {
      * <li>{@link Edge}</li>
      * <li>{@link Element}</li>
      * <li>{@link Graph}</li>
-     * <li>{@link Graph.Variables}</li>
+     * <li>{@link org.apache.tinkerpop.gremlin.structure.Graph.Variables}</li>
      * <li>{@link Property}</li>
      * <li>{@link Vertex}</li>
      * <li>{@link VertexProperty}</li>

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/287553ec/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java
index ebf3a7f..84556e2 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java
@@ -83,7 +83,7 @@ import java.util.stream.Stream;
  * {@link Graph} implementation.  This test suite covers traversal operations around {@link GraphComputer} and should
  * be implemented by vendors to validate that their implementations are compliant with that Gremlin language.
  * Implementations that use this test suite should return {@code true} for
- * {@link Graph.Features.GraphFeatures#supportsComputer()}.
+ * {@link org.apache.tinkerpop.gremlin.structure.Graph.Features.GraphFeatures#supportsComputer()}.
  * <br/>
  * For more information on the usage of this suite, please see {@link StructureStandardSuite}.
  *

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/287553ec/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/StructureStandardSuite.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/StructureStandardSuite.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/StructureStandardSuite.java
index b5e73bb..0bd86d0 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/StructureStandardSuite.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/StructureStandardSuite.java
@@ -51,16 +51,18 @@ import java.util.stream.Stream;
  * "Suite" implements {@link GraphProvider} as a convenience only. It could be implemented in a
  * separate class file):
  * <code>
- * @RunWith(StructureStandardSuite.class)
- * @StructureStandardSuite.GraphProviderClass(TinkerGraphStructureStandardTest.class)
+ * &#064;RunWith(StructureStandardSuite.class)
+ * &#064;StructureStandardSuite.GraphProviderClass(TinkerGraphStructureStandardTest.class)
  * public class TinkerGraphStructureStandardTest implements GraphProvider {
  * }
  * </code>
  * Implementing {@link GraphProvider} provides a way for the {@code StructureStandardSuite} to instantiate
  * {@link Graph} instances from the implementation being tested to inject into tests in the suite.  The
- * {@code StructureStandardSuite} will utilized Features defined in the suite to determine which tests will be executed.
+ * {@code StructureStandardSuite} will utilized Features defined in the suite to determine which tests will be
+ * executed. Note that while the above example demonstrates configuration of this suite, this approach generally
+ * applies to all other test suites.
  * <br/>
- * Set the {@code gremlin.tests} environment variable to a comma separated list of test classes to execute.
+ * Set the {@code GREMLIN_TESTS} environment variable to a comma separated list of test classes to execute.
  * This setting can be helpful to restrict execution of tests to specific ones being focused on during development.
 
  * @author Stephen Mallette (http://stephen.genoprime.com)