Interface GraphWriter

    • Method Detail

      • writeGraph

        void writeGraph​(OutputStream outputStream,
                        Graph g)
                 throws IOException
        Write the entire graph to a stream.
        Parameters:
        outputStream - the stream to write to.
        g - the graph to write to stream.
        Throws:
        IOException
      • writeVertex

        void writeVertex​(OutputStream outputStream,
                         Vertex v,
                         Direction direction)
                  throws IOException
        Write a vertex to a stream with its associated edges. Only write edges as defined by the requested direction.
        Parameters:
        outputStream - the stream to write to.
        v - the vertex to write.
        direction - the direction of edges to write or null if no edges are to be written.
        Throws:
        IOException
      • writeVertex

        void writeVertex​(OutputStream outputStream,
                         Vertex v)
                  throws IOException
        Write a vertex to a stream without writing its edges.
        Parameters:
        outputStream - the stream to write to.
        v - the vertex to write.
        Throws:
        IOException
      • writeVertices

        default void writeVertices​(OutputStream outputStream,
                                   Iterator<Vertex> vertexIterator,
                                   Direction direction)
                            throws IOException
        Write a list of vertices from a Traversal to a stream with its associated edges. Only write edges as defined by the requested direction.
        Parameters:
        outputStream - the stream to write to.
        vertexIterator - a traversal that returns a list of vertices.
        direction - the direction of edges to write or null if no edges are to be written.
        Throws:
        IOException
      • writeVertices

        default void writeVertices​(OutputStream outputStream,
                                   Iterator<Vertex> vertexIterator)
                            throws IOException
        Write a vertex to a stream without writing its edges.
        Parameters:
        outputStream - the stream to write to.
        vertexIterator - a iterator that returns a list of vertices.
        Throws:
        IOException
      • writeEdge

        void writeEdge​(OutputStream outputStream,
                       Edge e)
                throws IOException
        Write an edge to a stream.
        Parameters:
        outputStream - the stream to write to.
        e - the edge to write.
        Throws:
        IOException
      • writeVertexProperty

        void writeVertexProperty​(OutputStream outputStream,
                                 VertexProperty vp)
                          throws IOException
        Write a vertex property to a stream.
        Parameters:
        outputStream - the stream to write to.
        vp - the vertex property to write.
        Throws:
        IOException
      • writeProperty

        void writeProperty​(OutputStream outputStream,
                           Property p)
                    throws IOException
        Write a property to a stream.
        Parameters:
        outputStream - the stream to write to.
        p - the property to write.
        Throws:
        IOException
      • writeObject

        void writeObject​(OutputStream outputStream,
                         Object object)
                  throws IOException
        Writes an arbitrary object to the stream.
        Parameters:
        outputStream - the stream to write to.
        object - the object to write which will use the standard serializer set.
        Throws:
        IOException