package com.tinkerpop.gremlin.structure.io;

import com.tinkerpop.gremlin.structure.Direction;
import com.tinkerpop.gremlin.structure.Edge;
import com.tinkerpop.gremlin.structure.Vertex;
import com.tinkerpop.gremlin.util.function.QuintFunction;

import java.io.IOException;
import java.io.InputStream;
import java.util.function.BiFunction;

/**
 * @author Stephen Mallette (http://stephen.genoprime.com)
 */
public interface GraphReader {

    public void readGraph(final InputStream inputStream) throws IOException;

    public Vertex readVertex(final InputStream inputStream, final Direction direction,
                             final BiFunction<Object, Object[], Vertex> vertexMaker,
                             final QuintFunction<Object, Object, Object, String, Object[], Edge> edgeAdder) throws IOException;

    public Vertex readVertex(final InputStream inputStream, final BiFunction<Object, Object[], Vertex> vertexMaker) throws IOException;  // only reads the vertex/properties, no edges

    public Edge readEdge(final InputStream inputStream, final QuintFunction<Object, Object, Object, String, Object[], Edge> edgeMaker) throws IOException;

}

@@ -441,566 +441,2820 @@
     
-public void readGraph(final InputStream inputStream) throws IOException;%0A%0A    public Vertex readVertex(final InputStream inputStream, final Direction direction,%0A                             final BiFunction%3CObject, Object%5B%5D, Vertex%3E vertexMaker,
+/**%0A     * Reads an entire graph from an %7B@link InputStream%7D.%0A     *%0A     * @param inputStream a stream containing a single vertex as defined by the accompanying %7B@link GraphWriter%7D%0A     */%0A    public void readGraph(final InputStream inputStream) throws IOException;%0A%0A    /**%0A     * Reads a single vertex from an %7B@link InputStream%7D.  This method will read vertex properties but not edges.%0A     *%0A     * @param inputStream a stream containing a single vertex as defined by the accompanying %7B@link GraphWriter%7D%0A     * @param vertexMaker a function to create a vertex where the first argument is the vertex identifer and the%0A     *                    second argument is the list of properties as key/value pairs which may include an%0A     *                    %7B@link com.tinkerpop.gremlin.structure.Element#LABEL%7D%0A     */%0A    public Vertex readVertex(final InputStream inputStream, final BiFunction%3CObject, Object%5B%5D, Vertex%3E vertexMaker) throws IOException;  // only reads the vertex/properties, no edges%0A
 %0A    
+/**%0A
      
-                    final QuintFunction%3CObject, Object, Object, String, Object%5B%5D, Edge%3E edgeAdder) throws IOException;%0A%0A    public Vertex readVertex(final InputStream inputStream, final BiFunction%3CObject, Object%5B%5D, Vertex%3E vertexMaker) throws IOException;  // only read
+* Reads a single vertex from an %7B@link InputStream%7D.  This method will read vertex properties as well as edges%0A     * given the direction supplied as an argument.%0A     *%0A     * @param inputStream a stream containing a single vertex as defined by the accompanying %7B@link GraphWriter%7D%0A     * @param direction   the direction of edges to read.%0A     * @param vertexMaker a function to create a vertex where the first argument is the vertex identifer and the%0A     *                    second argument is the list of properties for it which may include an%0A     *                    %7B@link com.tinkerpop.gremlin.structure.Element#LABEL%7D%0A     * @param edgeAdder   a function that creates an edge from the stream where the first argument is the edge%0A     *                    identifier, the second argument is the out vertex id, the third is the in vertex id,%0A     *                    the fourth is the label, and the fifth is the list of properties as key/value pairs.%0A     */%0A    public Vertex readVertex(final InputStream inputStream, final Direction direction,%0A                             final BiFunction%3CObject, Object%5B%5D, Vertex%3E vertexMaker,%0A                             final QuintFunction%3CObject, Object, Object, String, Object%5B%5D, Edge%3E edgeAdder) throws IOException;%0A%0A    /**%0A     * Reads a single edge from an %7B@link InputStream%7D.%0A     *%0A     * @param inputStream a stream containing a single vertex as defined by the accompanying %7B@link GraphWriter%7D%0A     * @param edgeMaker   a function that creates an edge from the stream where the first argument is the edge%0A     *                    identifier, the second argument i
 s the 
+out 
 vertex
-/properties, no edges%0A
+ id, the third is the in vertex id,%0A     *                    the fourth is the label, and the fifth is the list of properties as key/value pairs.%0A     */
 %0A   

Add javadoc.