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 java.io.IOException;
import java.io.OutputStream;

/**
 * Functions for writing a graph and its elements to a different format.
 *
 * @author Stephen Mallette (http://stephen.genoprime.com)
 */
public interface GraphWriter {

    public void writeGraph(final OutputStream outputStream) throws IOException;

    public void writeVertex(final OutputStream outputStream, final Vertex v, final Direction direction) throws IOException;

    public void writeVertex(final OutputStream outputStream, final Vertex v) throws IOException; // only writes the vertex/properties, no edges

    public void writeEdge(final OutputStream outputStream, final Edge E) throws IOException;

}

@@ -414,16 +414,75 @@
 iter %7B%0A%0A
+    /**%0A     * Write the entire graph to a stream.%0A     */%0A
     publ
@@ -562,128 +562,601 @@
     
-public void writeVertex(final OutputStream outputStream, final Vertex v, final Direction direction) throws IOException;%0A
+/**%0A     * Write a vertex to a stream with its associated edges.  Only write edges as defined by the requested direction.%0A     *%0A     * @param outputStream The stream to write to.%0A     * @param v The vertex to write.%0A     * @param direction If direction is null then no edges are written.%0A     */%0A    public void writeVertex(final OutputStream outputStream, final Vertex v, final Direction direction) throws IOException;%0A%0A    /**%0A     * Write a vertex to a stream without writing its edges.%0A     *%0A     * @param outputStream The stream to write to.%0A     * @param v The vertex to write.%0A     */
 %0A   
@@ -1252,56 +1252,59 @@
 ion;
- // only writes the vertex/properties, no edges%0A
+%0A%0A    /**%0A     * Write an edge to a stream.%0A     */
 %0A   

Update javadoc.