Class GraphMLWriter
java.lang.Object
org.apache.tinkerpop.gremlin.structure.io.graphml.GraphMLWriter
- All Implemented Interfaces:
GraphWriter
GraphMLWriter writes a Graph to a GraphML OutputStream. Note that this format is lossy, in the sense that data
types and features of Gremlin Structure not supported by GraphML are not serialized. This format is meant for
external export of a graph to tools outside of Gremlin Structure graphs. Note that GraphML does not support
the notion of multi-properties or properties on properties and will throw an exception when writing a
graph elements that have such things.
- Author:
- Marko A. Rodriguez (http://markorodriguez.com), Joshua Shinavier (http://fortytwo.net), Stephen Mallette (http://stephen.genoprime.com)
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.structure.io.GraphWriter
GraphWriter.WriterBuilder<T extends GraphWriter> -
Method Summary
Modifier and TypeMethodDescriptionstatic GraphMLWriter.Builderbuild()voidwriteEdge(OutputStream outputStream, Edge e) This method is not supported for this writer.voidwriteGraph(OutputStream outputStream, Graph g) Write the data in a Graph to a GraphML OutputStream.voidwriteObject(OutputStream outputStream, Object object) This method is not supported for this writer.voidwriteProperty(OutputStream outputStream, Property p) This method is not supported for this writer.voidwriteVertex(OutputStream outputStream, Vertex v) This method is not supported for this writer.voidwriteVertex(OutputStream outputStream, Vertex v, Direction direction) This method is not supported for this writer.voidwriteVertexProperty(OutputStream outputStream, VertexProperty vp) This method is not supported for this writer.voidwriteVertices(OutputStream outputStream, Iterator<Vertex> vertexIterator) This method is not supported for this writer.voidwriteVertices(OutputStream outputStream, Iterator<Vertex> vertexIterator, Direction direction) This method is not supported for this writer.
-
Method Details
-
writeVertex
public void writeVertex(OutputStream outputStream, Vertex v, Direction direction) throws IOException This method is not supported for this writer.- Specified by:
writeVertexin interfaceGraphWriter- 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:
UnsupportedOperationException- when called.IOException
-
writeVertex
This method is not supported for this writer.- Specified by:
writeVertexin interfaceGraphWriter- Parameters:
outputStream- the stream to write to.v- the vertex to write.- Throws:
UnsupportedOperationException- when called.IOException
-
writeEdge
This method is not supported for this writer.- Specified by:
writeEdgein interfaceGraphWriter- Parameters:
outputStream- the stream to write to.e- the edge to write.- Throws:
UnsupportedOperationException- when called.IOException
-
writeVertices
public void writeVertices(OutputStream outputStream, Iterator<Vertex> vertexIterator, Direction direction) throws IOException This method is not supported for this writer.- Specified by:
writeVerticesin interfaceGraphWriter- 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:
UnsupportedOperationException- when called.IOException
-
writeVertices
public void writeVertices(OutputStream outputStream, Iterator<Vertex> vertexIterator) throws IOException This method is not supported for this writer.- Specified by:
writeVerticesin interfaceGraphWriter- Parameters:
outputStream- the stream to write to.vertexIterator- a iterator that returns a list of vertices.- Throws:
UnsupportedOperationException- when called.IOException
-
writeVertexProperty
This method is not supported for this writer.- Specified by:
writeVertexPropertyin interfaceGraphWriter- Parameters:
outputStream- the stream to write to.vp- the vertex property to write.- Throws:
UnsupportedOperationException- when called.IOException
-
writeProperty
This method is not supported for this writer.- Specified by:
writePropertyin interfaceGraphWriter- Parameters:
outputStream- the stream to write to.p- the property to write.- Throws:
UnsupportedOperationException- when called.IOException
-
writeObject
This method is not supported for this writer.- Specified by:
writeObjectin interfaceGraphWriter- Parameters:
outputStream- the stream to write to.object- the object to write which will use the standard serializer set.- Throws:
UnsupportedOperationException- when called.IOException
-
writeGraph
Write the data in a Graph to a GraphML OutputStream.- Specified by:
writeGraphin interfaceGraphWriter- Parameters:
outputStream- the GraphML OutputStream to write the Graph data tog- the graph to write to stream.- Throws:
IOException- thrown if there is an error generating the GraphML data
-
build
-