N - node value typeE - edge value typepublic final class GraphMLWriter<N,E> extends Object implements GraphWriter<N,E>
| Modifier and Type | Class and Description |
|---|---|
static interface |
GraphMLWriter.ValueHandler<V>
Value handler.
|
| Constructor and Description |
|---|
GraphMLWriter()
Create a new GraphML writer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
setEdgeValueHandler(GraphMLWriter.ValueHandler<E> edgeValueHandler)
Set the edge value handler for this GraphML writer to
edgeValueHandler. |
void |
setNodeValueHandler(GraphMLWriter.ValueHandler<N> nodeValueHandler)
Set the node value handler for this GraphML writer to
nodeValueHandler. |
void |
write(Graph<N,E> graph,
File file)
Write the specified graph to the specified file.
|
void |
write(Graph<N,E> graph,
OutputStream outputStream)
Write the specified graph to the specified output stream.
|
public void setNodeValueHandler(GraphMLWriter.ValueHandler<N> nodeValueHandler)
nodeValueHandler.nodeValueHandler - node value handlerpublic void setEdgeValueHandler(GraphMLWriter.ValueHandler<E> edgeValueHandler)
edgeValueHandler.edgeValueHandler - edge value handlerpublic void write(Graph<N,E> graph, File file) throws IOException
write in interface GraphWriter<N,E>graph - graph to write, must not be nullfile - file to write to, must not be nullIOException - if an IO error occurspublic void write(Graph<N,E> graph, OutputStream outputStream) throws IOException
write in interface GraphWriter<N,E>graph - graph to write, must not be nulloutputStream - output stream to write to, must not be nullIOException - if an IO error occursCopyright (c) 2008-2013 held jointly by the individual authors. Licensed under the GNU Lesser General Public License (LGPL).