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/04/08 22:25:22 UTC

[6/7] incubator-tinkerpop git commit: Add some javadoc around Graph.edge/vertices.

Add some javadoc around Graph.edge/vertices.


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

Branch: refs/heads/TINKERPOP3-581
Commit: 54f9bce562d920004e88c905df42f6253a8ddc7d
Parents: 4b7990c
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Apr 8 10:00:09 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Apr 8 10:00:09 2015 -0400

----------------------------------------------------------------------
 .../tinkerpop/gremlin/structure/Graph.java      | 85 +++++++++++++++++++-
 1 file changed, 84 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/54f9bce5/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
index 376ab45..5066c06 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
@@ -158,7 +158,53 @@ public interface Graph extends AutoCloseable {
     }
 
     /**
-     * Get the {@link Vertex} objects in this graph with the provided vertex ids. If no ids are provided, get all vertices.
+     * Get the {@link Vertex} objects in this graph with the provided vertex ids. If no ids are provided, get all
+     * vertices.  Note that a vertex identifier does not need to correspond to the actual id used in the graph.  It
+     * needs to be a bit more flexible than that in that given the {@link Graph.Features} around id support, multiple
+     * arguments might be applicable here.
+     * <br/>
+     * If the graph return {@code true} for {@link Features.VertexFeatures#supportsNumericIds()} then it should support
+     * filters as with:
+     * <ul>
+     *     <li>g.V(v)</li>
+     *     <li>g.V(v.id())</li>
+     *     <li>g.V(1)</li>
+     *     <li>g.V(1L)</li>
+     *     <li>g.V(1.0d)</li>
+     *     <li>g.V(1.0f)</li>
+     *     <li>g.V("1")</li>
+     * </ul>
+     * <br/>
+     * If the graph return {@code true} for {@link Features.VertexFeatures#supportsCustomIds()} ()} then it should support
+     * filters as with:
+     * <ul>
+     *     <li>g.V(v)</li>
+     *     <li>g.V(v.id())</li>
+     *     <li>g.V(v.id().toString())</li>
+     * </ul>
+     * <br/>
+     * If the graph return {@code true} for {@link Features.VertexFeatures#supportsAnyIds()} ()} then it should support
+     * filters as with:
+     * <ul>
+     *     <li>g.V(v)</li>
+     *     <li>g.V(v.id())</li>
+     * </ul>
+     * <br/>
+     * If the graph return {@code true} for {@link Features.VertexFeatures#supportsStringIds()} ()} then it should support
+     * filters as with:
+     * <ul>
+     *     <li>g.V(v)</li>
+     *     <li>g.V(v.id().toString())</li>
+     *     <li>g.V("id")</li>
+     * </ul>
+     * <br/>
+     * If the graph return {@code true} for {@link Features.EdgeFeatures#supportsStringIds()} ()} then it should support
+     * filters as with:
+     * <ul>
+     *     <li>g.V(v)</li>
+     *     <li>g.V(v.id().toString())</li>
+     *     <li>g.V("id")</li>
+     * </ul>
      *
      * @param vertexIds the ids of the vertices to get
      * @return an {@link Iterator} of vertices that match the provided vertex ids
@@ -167,6 +213,43 @@ public interface Graph extends AutoCloseable {
 
     /**
      * Get the {@link Edge} objects in this graph with the provided edge ids. If no ids are provided, get all edges.
+     * Note that an edge identifier does not need to correspond to the actual id used in the graph.  It
+     * needs to be a bit more flexible than that in that given the {@link Graph.Features} around id support, multiple
+     * arguments might be applicable here.
+     * <br/>
+     * If the graph return {@code true} for {@link Features.EdgeFeatures#supportsNumericIds()} then it should support
+     * filters as with:
+     * <ul>
+     *     <li>g.E(e)</li>
+     *     <li>g.E(1)</li>
+     *     <li>g.E(1L)</li>
+     *     <li>g.E(1.0d)</li>
+     *     <li>g.E(1.0f)</li>
+     *     <li>g.E("1")</li>
+     * </ul>
+     * <br/>
+     * If the graph return {@code true} for {@link Features.EdgeFeatures#supportsCustomIds()} ()} then it should support
+     * filters as with:
+     * <ul>
+     *     <li>g.E(e)</li>
+     *     <li>g.E(e.id())</li>
+     *     <li>g.E(e.id().toString())</li>
+     * </ul>
+     * <br/>
+     * If the graph return {@code true} for {@link Features.EdgeFeatures#supportsAnyIds()} ()} then it should support
+     * filters as with:
+     * <ul>
+     *     <li>g.E(e)</li>
+     *     <li>g.E(e.id())</li>
+     * </ul>
+     * <br/>
+     * If the graph return {@code true} for {@link Features.EdgeFeatures#supportsStringIds()} ()} then it should support
+     * filters as with:
+     * <ul>
+     *     <li>g.E(e)</li>
+     *     <li>g.E(e.id().toString())</li>
+     *     <li>g.E("id")</li>
+     * </ul>
      *
      * @param edgeIds the ids of the edges to get
      * @return an {@link Iterator} of edges that match the provided edge ids