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/30 19:53:34 UTC

[4/4] incubator-tinkerpop git commit: Update javadoc in IO packages.

Update javadoc in IO packages.


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

Branch: refs/heads/master
Commit: e2e76c707e431b92b5f59b6ca2b7a79851445a93
Parents: 290a5e3
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Apr 30 13:53:13 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Apr 30 13:53:13 2015 -0400

----------------------------------------------------------------------
 .../gremlin/structure/io/graphml/GraphMLIo.java | 20 +++++++
 .../structure/io/graphml/GraphMLMapper.java     |  4 ++
 .../structure/io/graphml/GraphMLReader.java     | 35 +++++++++++
 .../structure/io/graphml/GraphMLWriter.java     | 40 +++++++++++++
 .../structure/io/graphson/GraphSONIo.java       | 17 +++++-
 .../structure/io/graphson/GraphSONReader.java   | 63 +++++++++++++++++---
 .../structure/io/graphson/GraphSONWriter.java   | 35 ++++++-----
 .../io/graphson/LegacyGraphSONReader.java       | 35 +++++++++++
 .../gremlin/structure/io/gryo/GryoReader.java   |  5 +-
 9 files changed, 224 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e2e76c70/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLIo.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLIo.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLIo.java
index 3e7c631..e334b67 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLIo.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLIo.java
@@ -21,6 +21,7 @@ package org.apache.tinkerpop.gremlin.structure.io.graphml;
 import org.apache.tinkerpop.gremlin.structure.Graph;
 import org.apache.tinkerpop.gremlin.structure.io.Io;
 import org.apache.tinkerpop.gremlin.structure.io.IoRegistry;
+import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONMapper;
 
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
@@ -29,6 +30,10 @@ import java.io.InputStream;
 import java.io.OutputStream;
 
 /**
+ * Constructs GraphML IO implementations given a {@link Graph} and {@link IoRegistry}. Implementers of the {@link Graph}
+ * interfaces do not have to register any special serializers to the {@link IoRegistry} as GraphML does not support
+ * such things.
+ *
  * @author Stephen Mallette (http://stephen.genoprime.com)
  */
 public class GraphMLIo implements Io<GraphMLReader.Builder, GraphMLWriter.Builder, GraphMLMapper.Builder> {
@@ -38,21 +43,33 @@ public class GraphMLIo implements Io<GraphMLReader.Builder, GraphMLWriter.Builde
         this.graph = graph;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public GraphMLReader.Builder reader() {
         return GraphMLReader.build();
     }
 
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public GraphMLWriter.Builder writer() {
         return GraphMLWriter.build();
     }
 
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public GraphMLMapper.Builder mapper() {
         return GraphMLMapper.build();
     }
 
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public void writeGraph(final String file) throws IOException {
         try (final OutputStream out = new FileOutputStream(file)) {
@@ -60,6 +77,9 @@ public class GraphMLIo implements Io<GraphMLReader.Builder, GraphMLWriter.Builde
         }
     }
 
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public void readGraph(final String file) throws IOException {
         try (final InputStream in = new FileInputStream(file)) {

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e2e76c70/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLMapper.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLMapper.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLMapper.java
index 1443c19..6d37c2e 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLMapper.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLMapper.java
@@ -18,10 +18,14 @@
  */
 package org.apache.tinkerpop.gremlin.structure.io.graphml;
 
+import org.apache.tinkerpop.gremlin.structure.io.Io;
 import org.apache.tinkerpop.gremlin.structure.io.IoRegistry;
 import org.apache.tinkerpop.gremlin.structure.io.Mapper;
 
 /**
+ * This is an "empty" implementation only present for compatibility with {@link Io}.  GraphML is a "whole graph"
+ * serialization format and does not have the notion of generic serialization functions.
+ *
  * @author Stephen Mallette (http://stephen.genoprime.com)
  */
 public class GraphMLMapper implements Mapper<Object> {

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e2e76c70/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLReader.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLReader.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLReader.java
index 47a26a8..bcb462d 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLReader.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLReader.java
@@ -201,6 +201,11 @@ public class GraphMLReader implements GraphReader {
         }
     }
 
+    /**
+     * This method is not supported for this reader.
+     *
+     * @throws UnsupportedOperationException when called.
+     */
     @Override
     public Iterator<Vertex> readVertices(final InputStream inputStream,
                                          final Function<Attachable<Vertex>, Vertex> vertexAttachMethod,
@@ -209,11 +214,21 @@ public class GraphMLReader implements GraphReader {
         throw Io.Exceptions.readerFormatIsForFullGraphSerializationOnly(this.getClass());
     }
 
+    /**
+     * This method is not supported for this reader.
+     *
+     * @throws UnsupportedOperationException when called.
+     */
     @Override
     public Vertex readVertex(final InputStream inputStream, final Function<Attachable<Vertex>, Vertex> vertexAttachMethod) throws IOException {
         throw Io.Exceptions.readerFormatIsForFullGraphSerializationOnly(this.getClass());
     }
 
+    /**
+     * This method is not supported for this reader.
+     *
+     * @throws UnsupportedOperationException when called.
+     */
     @Override
     public Vertex readVertex(final InputStream inputStream, final Function<Attachable<Vertex>, Vertex> vertexAttachMethod,
                              final Function<Attachable<Edge>, Edge> edgeAttachMethod,
@@ -221,23 +236,43 @@ public class GraphMLReader implements GraphReader {
         throw Io.Exceptions.readerFormatIsForFullGraphSerializationOnly(this.getClass());
     }
 
+    /**
+     * This method is not supported for this reader.
+     *
+     * @throws UnsupportedOperationException when called.
+     */
     @Override
     public Edge readEdge(final InputStream inputStream, final Function<Attachable<Edge>, Edge> edgeAttachMethod) throws IOException {
         throw Io.Exceptions.readerFormatIsForFullGraphSerializationOnly(this.getClass());
     }
 
+    /**
+     * This method is not supported for this reader.
+     *
+     * @throws UnsupportedOperationException when called.
+     */
     @Override
     public VertexProperty readVertexProperty(final InputStream inputStream,
                                              final Function<Attachable<VertexProperty>, VertexProperty> vertexPropertyAttachMethod) throws IOException {
         throw Io.Exceptions.readerFormatIsForFullGraphSerializationOnly(this.getClass());
     }
 
+    /**
+     * This method is not supported for this reader.
+     *
+     * @throws UnsupportedOperationException when called.
+     */
     @Override
     public Property readProperty(final InputStream inputStream,
                                  final Function<Attachable<Property>, Property> propertyAttachMethod) throws IOException {
         throw Io.Exceptions.readerFormatIsForFullGraphSerializationOnly(this.getClass());
     }
 
+    /**
+     * This method is not supported for this reader.
+     *
+     * @throws UnsupportedOperationException when called.
+     */
     @Override
     public <C> C readObject(final InputStream inputStream, final Class<? extends C> clazz) throws IOException {
         throw Io.Exceptions.readerFormatIsForFullGraphSerializationOnly(this.getClass());

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e2e76c70/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLWriter.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLWriter.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLWriter.java
index b000d1e..5ff950b 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLWriter.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLWriter.java
@@ -77,41 +77,81 @@ public class GraphMLWriter implements GraphWriter {
         this.vertexLabelKey = vertexLabelKey;
     }
 
+    /**
+     * This method is not supported for this writer.
+     *
+     * @throws UnsupportedOperationException when called.
+     */
     @Override
     public void writeVertex(final OutputStream outputStream, final Vertex v, Direction direction) throws IOException {
         throw Io.Exceptions.writerFormatIsForFullGraphSerializationOnly(this.getClass());
     }
 
+    /**
+     * This method is not supported for this writer.
+     *
+     * @throws UnsupportedOperationException when called.
+     */
     @Override
     public void writeVertex(final OutputStream outputStream, final Vertex v) throws IOException {
         throw Io.Exceptions.writerFormatIsForFullGraphSerializationOnly(this.getClass());
     }
 
+    /**
+     * This method is not supported for this writer.
+     *
+     * @throws UnsupportedOperationException when called.
+     */
     @Override
     public void writeEdge(final OutputStream outputStream, final Edge e) throws IOException {
         throw Io.Exceptions.writerFormatIsForFullGraphSerializationOnly(this.getClass());
     }
 
+    /**
+     * This method is not supported for this writer.
+     *
+     * @throws UnsupportedOperationException when called.
+     */
     @Override
     public void writeVertices(final OutputStream outputStream, final Iterator<Vertex> vertexIterator, final Direction direction) throws IOException {
         throw Io.Exceptions.writerFormatIsForFullGraphSerializationOnly(this.getClass());
     }
 
+    /**
+     * This method is not supported for this writer.
+     *
+     * @throws UnsupportedOperationException when called.
+     */
     @Override
     public void writeVertices(final OutputStream outputStream, final Iterator<Vertex> vertexIterator) throws IOException {
         throw Io.Exceptions.writerFormatIsForFullGraphSerializationOnly(this.getClass());
     }
 
+    /**
+     * This method is not supported for this writer.
+     *
+     * @throws UnsupportedOperationException when called.
+     */
     @Override
     public void writeVertexProperty(final OutputStream outputStream, final VertexProperty vp) throws IOException {
         throw Io.Exceptions.writerFormatIsForFullGraphSerializationOnly(this.getClass());
     }
 
+    /**
+     * This method is not supported for this writer.
+     *
+     * @throws UnsupportedOperationException when called.
+     */
     @Override
     public void writeProperty(final OutputStream outputStream, final Property p) throws IOException {
         throw Io.Exceptions.writerFormatIsForFullGraphSerializationOnly(this.getClass());
     }
 
+    /**
+     * This method is not supported for this writer.
+     *
+     * @throws UnsupportedOperationException when called.
+     */
     @Override
     public void writeObject(final OutputStream outputStream, final Object object) throws IOException {
         throw Io.Exceptions.writerFormatIsForFullGraphSerializationOnly(this.getClass());

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e2e76c70/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONIo.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONIo.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONIo.java
index 3aabaf2..57cfc62 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONIo.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONIo.java
@@ -29,7 +29,7 @@ import java.io.InputStream;
 import java.io.OutputStream;
 
 /**
- * Constructs Gryo IO implementations given a {@link Graph} and {@link IoRegistry}. Implementers of the {@link Graph}
+ * Constructs GraphSON IO implementations given a {@link Graph} and {@link IoRegistry}. Implementers of the {@link Graph}
  * interfaces should see the {@link GraphSONMapper} for information on the expectations for the {@link IoRegistry}.
  *
  * @author Stephen Mallette (http://stephen.genoprime.com)
@@ -43,21 +43,33 @@ public class GraphSONIo implements Io<GraphSONReader.Builder, GraphSONWriter.Bui
         this.graph = graph;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public GraphSONReader.Builder reader() {
         return GraphSONReader.build().mapper(mapper().create());
     }
 
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public GraphSONWriter.Builder writer() {
         return GraphSONWriter.build().mapper(mapper().create());
     }
 
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public GraphSONMapper.Builder mapper() {
         return GraphSONMapper.build().addRegistry(this.registry);
     }
 
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public void writeGraph(final String file) throws IOException {
         try (final OutputStream out = new FileOutputStream(file)) {
@@ -65,6 +77,9 @@ public class GraphSONIo implements Io<GraphSONReader.Builder, GraphSONWriter.Bui
         }
     }
 
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public void readGraph(final String file) throws IOException {
         try (final InputStream in = new FileInputStream(file)) {

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e2e76c70/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONReader.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONReader.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONReader.java
index fd5b12b..79365af 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONReader.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONReader.java
@@ -27,7 +27,10 @@ import org.apache.tinkerpop.gremlin.structure.Property;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.apache.tinkerpop.gremlin.structure.VertexProperty;
 import org.apache.tinkerpop.gremlin.structure.io.GraphReader;
+import org.apache.tinkerpop.gremlin.structure.io.GraphWriter;
+import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoWriter;
 import org.apache.tinkerpop.gremlin.structure.util.Attachable;
+import org.apache.tinkerpop.gremlin.structure.util.Host;
 import org.apache.tinkerpop.gremlin.structure.util.batch.BatchGraph;
 import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedEdge;
 import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedProperty;
@@ -42,6 +45,7 @@ import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
+import java.io.OutputStream;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -72,7 +76,12 @@ public class GraphSONReader implements GraphReader {
     }
 
     /**
-     * {@inheritDoc}
+     * Read data into a {@link Graph} from output generated by any of the {@link GraphSONWriter} {@code writeVertex} or
+     * {@code writeVertices} methods or by {@link GryoWriter#writeGraph(OutputStream, Graph)}.
+     *
+     * @param inputStream a stream containing an entire graph of vertices and edges as defined by the accompanying
+     *                    {@link GraphSONWriter#writeGraph(OutputStream, Graph)}.
+     * @param graphToWriteTo the graph to write to when reading from the stream.
      */
     @Override
     public void readGraph(final InputStream inputStream, final Graph graphToWriteTo) throws IOException {
@@ -98,7 +107,15 @@ public class GraphSONReader implements GraphReader {
     }
 
     /**
-     * {@inheritDoc}
+     * Read {@link Vertex} objects from output generated by any of the {@link GraphSONWriter} {@code writeVertex} or
+     * {@code writeVertices} methods or by {@link GraphSONWriter#writeGraph(OutputStream, Graph)}.
+     *
+     * @param inputStream a stream containing at least one {@link Vertex} as defined by the accompanying
+     *                    {@link GraphWriter#writeVertices(OutputStream, Iterator, Direction)} or
+     *                    {@link GraphWriter#writeVertices(OutputStream, Iterator)} methods.
+     * @param vertexAttachMethod a function that creates re-attaches a {@link Vertex} to a {@link Host} object.
+     * @param edgeAttachMethod a function that creates re-attaches a {@link Edge} to a {@link Host} object.
+     * @param attachEdgesOfThisDirection only edges of this direction are passed to the {@code edgeMaker}.
      */
     @Override
     public Iterator<Vertex> readVertices(final InputStream inputStream,
@@ -110,7 +127,12 @@ public class GraphSONReader implements GraphReader {
     }
 
     /**
-     * {@inheritDoc}
+     * Read a {@link Vertex}  from output generated by any of the {@link GraphSONWriter} {@code writeVertex} or
+     * {@code writeVertices} methods or by {@link GraphSONWriter#writeGraph(OutputStream, Graph)}.
+     *
+     * @param inputStream a stream containing at least a single vertex as defined by the accompanying
+     *                    {@link GraphWriter#writeVertex(OutputStream, Vertex)}.
+     * @param vertexAttachMethod a function that creates re-attaches a {@link Vertex} to a {@link Host} object.
      */
     @Override
     public Vertex readVertex(final InputStream inputStream, final Function<Attachable<Vertex>, Vertex> vertexAttachMethod) throws IOException {
@@ -118,7 +140,14 @@ public class GraphSONReader implements GraphReader {
     }
 
     /**
-     * {@inheritDoc}
+     * Read a {@link Vertex} from output generated by any of the {@link GraphSONWriter} {@code writeVertex} or
+     * {@code writeVertices} methods or by {@link GraphSONWriter#writeGraph(OutputStream, Graph)}.
+     *
+     * @param inputStream a stream containing at least one {@link Vertex} as defined by the accompanying
+     *                    {@link GraphWriter#writeVertices(OutputStream, Iterator, Direction)} method.
+     * @param vertexAttachMethod a function that creates re-attaches a {@link Vertex} to a {@link Host} object.
+     * @param edgeAttachMethod a function that creates re-attaches a {@link Edge} to a {@link Host} object.
+     * @param attachEdgesOfThisDirection only edges of this direction are passed to the {@code edgeMaker}.
      */
     @Override
     public Vertex readVertex(final InputStream inputStream,
@@ -139,7 +168,12 @@ public class GraphSONReader implements GraphReader {
     }
 
     /**
-     * {@inheritDoc}
+     * Read an {@link Edge} from output generated by {@link GraphSONWriter#writeEdge(OutputStream, Edge)} or via
+     * an {@link Edge} passed to {@link GraphSONWriter#writeObject(OutputStream, Object)}.
+     *
+     * @param inputStream a stream containing at least one {@link Edge} as defined by the accompanying
+     *                    {@link GraphWriter#writeEdge(OutputStream, Edge)} method.
+     * @param edgeAttachMethod a function that creates re-attaches a {@link Edge} to a {@link Host} object.
      */
     @Override
     public Edge readEdge(final InputStream inputStream, final Function<Attachable<Edge>, Edge> edgeAttachMethod) throws IOException {
@@ -157,7 +191,14 @@ public class GraphSONReader implements GraphReader {
     }
 
     /**
-     * {@inheritDoc}
+     * Read a {@link VertexProperty} from output generated by
+     * {@link GraphSONWriter#writeVertexProperty(OutputStream, VertexProperty)} or via an {@link VertexProperty} passed
+     * to {@link GraphSONWriter#writeObject(OutputStream, Object)}.
+     *
+     * @param inputStream a stream containing at least one {@link VertexProperty} as written by the accompanying
+     *                    {@link GraphWriter#writeVertexProperty(OutputStream, VertexProperty)} method.
+     * @param vertexPropertyAttachMethod a function that creates re-attaches a {@link VertexProperty} to a
+     *                                   {@link Host} object.
      */
     @Override
     public VertexProperty readVertexProperty(final InputStream inputStream,
@@ -171,7 +212,12 @@ public class GraphSONReader implements GraphReader {
     }
 
     /**
-     * {@inheritDoc}
+     * Read a {@link Property} from output generated by  {@link GraphSONWriter#writeProperty(OutputStream, Property)} or
+     * via an {@link Property} passed to {@link GraphSONWriter#writeObject(OutputStream, Object)}.
+     *
+     * @param inputStream a stream containing at least one {@link Property} as written by the accompanying
+     *                    {@link GraphWriter#writeProperty(OutputStream, Property)} method.
+     * @param propertyAttachMethod a function that creates re-attaches a {@link Property} to a {@link Host} object.
      */
     @Override
     public Property readProperty(final InputStream inputStream,
@@ -202,7 +248,8 @@ public class GraphSONReader implements GraphReader {
         }
 
         /**
-         * Number of mutations to perform before a commit is executed.
+         * Number of mutations to perform before a commit is executed when using
+         * {@link GraphSONReader#readGraph(InputStream, Graph)}.
          */
         public Builder batchSize(final long batchSize) {
             this.batchSize = batchSize;

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e2e76c70/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONWriter.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONWriter.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONWriter.java
index d1c2430..bbbfb3b 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONWriter.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONWriter.java
@@ -53,8 +53,8 @@ public class GraphSONWriter implements GraphWriter {
      * Writes a {@link Graph} to stream in an adjacency list format where vertices are written with edges from both
      * directions.  Under this serialization model, edges are grouped by label.
      *
-     * @param outputStream The stream to write to.
-     * @param g The graph to write to stream.
+     * @param outputStream the stream to write to.
+     * @param g the graph to write to stream.
      */
     @Override
     public void writeGraph(final OutputStream outputStream, final Graph g) throws IOException {
@@ -75,8 +75,8 @@ public class GraphSONWriter implements GraphWriter {
     /**
      * Writes a single {@link Vertex} with no edges serialized.
      *
-     * @param outputStream The stream to write to.
-     * @param v            The vertex to write.
+     * @param outputStream the stream to write to.
+     * @param v            the vertex to write.
      */
     @Override
     public void writeVertex(final OutputStream outputStream, final Vertex v) throws IOException {
@@ -87,9 +87,9 @@ public class GraphSONWriter implements GraphWriter {
      * Writes a list of vertices in adjacency list format where vertices are written with edges from both
      * directions.  Under this serialization model, edges are grouped by label.
      *
-     * @param outputStream The stream to write to.
-     * @param vertexIterator    A traversal that returns a list of vertices.
-     * @param direction    If direction is null then no edges are written.
+     * @param outputStream the stream to write to.
+     * @param vertexIterator    a traversal that returns a list of vertices.
+     * @param direction    if direction is null then no edges are written.
      */
     @Override
     public void writeVertices(final OutputStream outputStream, final Iterator<Vertex> vertexIterator, final Direction direction) throws IOException {
@@ -109,8 +109,8 @@ public class GraphSONWriter implements GraphWriter {
     /**
      * Writes a list of vertices without edges.
      *
-     * @param outputStream The stream to write to.
-     * @param vertexIterator    A iterator that returns a list of vertices.
+     * @param outputStream the stream to write to.
+     * @param vertexIterator    a iterator that returns a list of vertices.
      */
     @Override
     public void writeVertices(final OutputStream outputStream, final Iterator<Vertex> vertexIterator) throws IOException {
@@ -124,8 +124,8 @@ public class GraphSONWriter implements GraphWriter {
      * {@link #writeVertices(OutputStream, Iterator, Direction)} in that the edge label is part of the object and
      * vertex labels are included with their identifiers.
      *
-     * @param outputStream The stream to write to.
-     * @param e The edge to write.
+     * @param outputStream the stream to write to.
+     * @param e the edge to write.
      */
     @Override
     public void writeEdge(final OutputStream outputStream, final Edge e) throws IOException {
@@ -135,8 +135,8 @@ public class GraphSONWriter implements GraphWriter {
     /**
      * Write a {@link VertexProperty} object to the stream.
      *
-     * @param outputStream The stream to write to.
-     * @param vp The vertex property to write.
+     * @param outputStream the stream to write to.
+     * @param vp the vertex property to write.
      */
     @Override
     public void writeVertexProperty(final OutputStream outputStream, final VertexProperty vp) throws IOException {
@@ -146,8 +146,8 @@ public class GraphSONWriter implements GraphWriter {
     /**
      * Write a {@link Property} object to the stream.
      *
-     * @param outputStream The stream to write to.
-     * @param p The property to write.
+     * @param outputStream the stream to write to.
+     * @param p the property to write.
      */
     @Override
     public void writeProperty(final OutputStream outputStream, final Property p) throws IOException {
@@ -159,9 +159,8 @@ public class GraphSONWriter implements GraphWriter {
      * thus the format of the GraphSON for a {@link Vertex} will be somewhat different from the format supplied
      * when using {@link #writeVertex(OutputStream, Vertex, Direction)}. For example, edges will never be included.
      *
-     * @param outputStream The stream to write to
-     * @param object The object to write which will use the standard serializer set
-     * @throws IOException
+     * @param outputStream the stream to write to
+     * @param object the object to write which will use the standard serializer set
      */
     @Override
     public void writeObject(final OutputStream outputStream, final Object object) throws IOException {

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e2e76c70/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/LegacyGraphSONReader.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/LegacyGraphSONReader.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/LegacyGraphSONReader.java
index 3b37bed..11fd97b 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/LegacyGraphSONReader.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/LegacyGraphSONReader.java
@@ -121,6 +121,11 @@ public class LegacyGraphSONReader implements GraphReader {
 
     }
 
+    /**
+     * This method is not supported for this reader.
+     *
+     * @throws UnsupportedOperationException when called.
+     */
     @Override
     public Iterator<Vertex> readVertices(final InputStream inputStream,
                                          final Function<Attachable<Vertex>, Vertex> vertexAttachMethod,
@@ -129,16 +134,31 @@ public class LegacyGraphSONReader implements GraphReader {
         throw Io.Exceptions.readerFormatIsForFullGraphSerializationOnly(this.getClass());
     }
 
+    /**
+     * This method is not supported for this reader.
+     *
+     * @throws UnsupportedOperationException when called.
+     */
     @Override
     public Edge readEdge(final InputStream inputStream, final Function<Attachable<Edge>, Edge> edgeAttachMethod) throws IOException {
         throw Io.Exceptions.readerFormatIsForFullGraphSerializationOnly(this.getClass());
     }
 
+    /**
+     * This method is not supported for this reader.
+     *
+     * @throws UnsupportedOperationException when called.
+     */
     @Override
     public Vertex readVertex(final InputStream inputStream, final Function<Attachable<Vertex>, Vertex> vertexAttachMethod) throws IOException {
         throw Io.Exceptions.readerFormatIsForFullGraphSerializationOnly(this.getClass());
     }
 
+    /**
+     * This method is not supported for this reader.
+     *
+     * @throws UnsupportedOperationException when called.
+     */
     @Override
     public Vertex readVertex(final InputStream inputStream, final Function<Attachable<Vertex>, Vertex> vertexAttachMethod,
                              final Function<Attachable<Edge>, Edge> edgeAttachMethod,
@@ -146,18 +166,33 @@ public class LegacyGraphSONReader implements GraphReader {
         throw Io.Exceptions.readerFormatIsForFullGraphSerializationOnly(this.getClass());
     }
 
+    /**
+     * This method is not supported for this reader.
+     *
+     * @throws UnsupportedOperationException when called.
+     */
     @Override
     public VertexProperty readVertexProperty(final InputStream inputStream,
                                              final Function<Attachable<VertexProperty>, VertexProperty> vertexPropertyAttachMethod) throws IOException {
         throw Io.Exceptions.readerFormatIsForFullGraphSerializationOnly(this.getClass());
     }
 
+    /**
+     * This method is not supported for this reader.
+     *
+     * @throws UnsupportedOperationException when called.
+     */
     @Override
     public Property readProperty(final InputStream inputStream,
                                  final Function<Attachable<Property>, Property> propertyAttachMethod) throws IOException {
         throw Io.Exceptions.readerFormatIsForFullGraphSerializationOnly(this.getClass());
     }
 
+    /**
+     * This method is not supported for this reader.
+     *
+     * @throws UnsupportedOperationException when called.
+     */
     @Override
     public <C> C readObject(final InputStream inputStream, final Class<? extends C> clazz) throws IOException {
         throw Io.Exceptions.readerFormatIsForFullGraphSerializationOnly(this.getClass());

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e2e76c70/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoReader.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoReader.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoReader.java
index c87a73b..70eae85 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoReader.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoReader.java
@@ -28,7 +28,6 @@ import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedVertexProper
 import org.apache.tinkerpop.gremlin.structure.util.star.StarGraph;
 import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
 import org.apache.tinkerpop.shaded.kryo.Kryo;
-import org.apache.tinkerpop.gremlin.structure.T;
 import org.apache.tinkerpop.gremlin.structure.Direction;
 import org.apache.tinkerpop.gremlin.structure.Edge;
 import org.apache.tinkerpop.gremlin.structure.Graph;
@@ -249,8 +248,8 @@ public class GryoReader implements GraphReader {
         }
 
         /**
-         * Set the size between commits when reading into the {@link Graph} instance.  This value defaults to
-         * {@link BatchGraph#DEFAULT_BUFFER_SIZE}.
+         * Number of mutations to perform before a commit is executed when using
+         * {@link GryoReader#readGraph(InputStream, Graph)}.
          */
         public Builder batchSize(final long batchSize) {
             this.batchSize = batchSize;