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
GraphWriter
writeVertex
in interface GraphWriter
outputStream
- The stream to write to.v
- The vertex to write.direction
- If direction is null then no edges are written.IOException
public void writeVertex(OutputStream outputStream, Vertex v) throws IOException
GraphWriter
writeVertex
in interface GraphWriter
outputStream
- The stream to write to.v
- The vertex to write.IOException
public void writeEdge(OutputStream outputStream, Edge e) throws IOException
GraphWriter
writeEdge
in interface GraphWriter
IOException
public void writeVertices(OutputStream outputStream, Traversal<?,Vertex> traversal, Direction direction) throws IOException
GraphWriter
Traversal
to a stream with its associated edges. Only write edges as
defined by the requested direction.writeVertices
in interface GraphWriter
outputStream
- The stream to write to.traversal
- A traversal that returns a list of vertices.direction
- If direction is null then no edges are written.IOException
public void writeVertices(OutputStream outputStream, Traversal<?,Vertex> traversal) throws IOException
GraphWriter
writeVertices
in interface GraphWriter
outputStream
- The stream to write to.traversal
- A traversal that returns a list of vertices.IOException
public void writeGraph(OutputStream outputStream, Graph g) throws IOException
writeGraph
in interface GraphWriter
outputStream
- 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.