public class GraphMLWriter extends Object implements GraphWriter
| Modifier and Type | Class and Description |
|---|---|
static class |
GraphMLWriter.Builder |
| Modifier and Type | Method and Description |
|---|---|
static GraphMLWriter.Builder |
build() |
void |
writeEdge(OutputStream outputStream,
Edge e)
Write an edge to a stream.
|
void |
writeGraph(OutputStream outputStream,
Graph g)
Write the data in a Graph to a GraphML OutputStream.
|
void |
writeVertex(OutputStream outputStream,
Vertex v)
Write a vertex to a stream without writing its edges.
|
void |
writeVertex(OutputStream outputStream,
Vertex v,
Direction direction)
Write a vertex to a stream with its associated edges.
|
void |
writeVertices(OutputStream outputStream,
Traversal<?,Vertex> traversal)
Write a vertex to a stream without writing its edges.
|
void |
writeVertices(OutputStream outputStream,
Traversal<?,Vertex> traversal,
Direction direction)
Write a list of vertices from a
Traversal to a stream with its associated edges. |
public void writeVertex(OutputStream outputStream, Vertex v, Direction direction) throws IOException
GraphWriterwriteVertex in interface GraphWriteroutputStream - The stream to write to.v - The vertex to write.direction - If direction is null then no edges are written.IOExceptionpublic void writeVertex(OutputStream outputStream, Vertex v) throws IOException
GraphWriterwriteVertex in interface GraphWriteroutputStream - The stream to write to.v - The vertex to write.IOExceptionpublic void writeEdge(OutputStream outputStream, Edge e) throws IOException
GraphWriterwriteEdge in interface GraphWriterIOExceptionpublic void writeVertices(OutputStream outputStream, Traversal<?,Vertex> traversal, Direction direction) throws IOException
GraphWriterTraversal to a stream with its associated edges. Only write edges as
defined by the requested direction.writeVertices in interface GraphWriteroutputStream - The stream to write to.traversal - A traversal that returns a list of vertices.direction - If direction is null then no edges are written.IOExceptionpublic void writeVertices(OutputStream outputStream, Traversal<?,Vertex> traversal) throws IOException
GraphWriterwriteVertices in interface GraphWriteroutputStream - The stream to write to.traversal - A traversal that returns a list of vertices.IOExceptionpublic void writeGraph(OutputStream outputStream, Graph g) throws IOException
writeGraph in interface GraphWriteroutputStream - the GraphML OutputStream to write the Graph data toIOException - thrown if there is an error generating the GraphML datapublic static GraphMLWriter.Builder build()
Copyright © 2013–2015 Apache Software Foundation. All rights reserved.