Class GraphMLWriter
- java.lang.Object
- 
- org.apache.tinkerpop.gremlin.structure.io.graphml.GraphMLWriter
 
- 
- All Implemented Interfaces:
- GraphWriter
 
 public final class GraphMLWriter extends Object implements 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 SummaryNested Classes Modifier and Type Class Description static classGraphMLWriter.Builder- 
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.structure.io.GraphWriterGraphWriter.WriterBuilder<T extends GraphWriter>
 
- 
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static 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 Detail- 
writeVertexpublic void writeVertex(OutputStream outputStream, Vertex v, Direction direction) throws IOException This method is not supported for this writer.- Specified by:
- writeVertexin interface- GraphWriter
- 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
 
 - 
writeVertexpublic void writeVertex(OutputStream outputStream, Vertex v) throws IOException This method is not supported for this writer.- Specified by:
- writeVertexin interface- GraphWriter
- Parameters:
- outputStream- the stream to write to.
- v- the vertex to write.
- Throws:
- UnsupportedOperationException- when called.
- IOException
 
 - 
writeEdgepublic void writeEdge(OutputStream outputStream, Edge e) throws IOException This method is not supported for this writer.- Specified by:
- writeEdgein interface- GraphWriter
- Parameters:
- outputStream- the stream to write to.
- e- the edge to write.
- Throws:
- UnsupportedOperationException- when called.
- IOException
 
 - 
writeVerticespublic void writeVertices(OutputStream outputStream, Iterator<Vertex> vertexIterator, Direction direction) throws IOException This method is not supported for this writer.- Specified by:
- writeVerticesin interface- GraphWriter
- 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
 
 - 
writeVerticespublic void writeVertices(OutputStream outputStream, Iterator<Vertex> vertexIterator) throws IOException This method is not supported for this writer.- Specified by:
- writeVerticesin interface- GraphWriter
- Parameters:
- outputStream- the stream to write to.
- vertexIterator- a iterator that returns a list of vertices.
- Throws:
- UnsupportedOperationException- when called.
- IOException
 
 - 
writeVertexPropertypublic void writeVertexProperty(OutputStream outputStream, VertexProperty vp) throws IOException This method is not supported for this writer.- Specified by:
- writeVertexPropertyin interface- GraphWriter
- Parameters:
- outputStream- the stream to write to.
- vp- the vertex property to write.
- Throws:
- UnsupportedOperationException- when called.
- IOException
 
 - 
writePropertypublic void writeProperty(OutputStream outputStream, Property p) throws IOException This method is not supported for this writer.- Specified by:
- writePropertyin interface- GraphWriter
- Parameters:
- outputStream- the stream to write to.
- p- the property to write.
- Throws:
- UnsupportedOperationException- when called.
- IOException
 
 - 
writeObjectpublic void writeObject(OutputStream outputStream, Object object) throws IOException This method is not supported for this writer.- Specified by:
- writeObjectin interface- GraphWriter
- Parameters:
- outputStream- the stream to write to.
- object- the object to write which will use the standard serializer set.
- Throws:
- UnsupportedOperationException- when called.
- IOException
 
 - 
writeGraphpublic void writeGraph(OutputStream outputStream, Graph g) throws IOException Write the data in a Graph to a GraphML OutputStream.- Specified by:
- writeGraphin interface- GraphWriter
- Parameters:
- outputStream- the GraphML OutputStream to write the Graph data to
- g- the graph to write to stream.
- Throws:
- IOException- thrown if there is an error generating the GraphML data
 
 - 
buildpublic static GraphMLWriter.Builder build() 
 
- 
 
-