Class GraphMLWriter

java.lang.Object
org.graffiti.plugin.io.AbstractOutputSerializer
org.graffiti.plugins.ios.exporters.graphml.GraphMLWriter
All Implemented Interfaces:
OutputSerializer, Serializer
Direct Known Subclasses:
GraphMLgzWriter

public class GraphMLWriter
extends AbstractOutputSerializer
Class GraphMLWriter is the main class for writing a graph to a graphML file. This class uses the JAXP API to build a DOM tree which is then written to a specified OutputStream.
Author:
ruediger
  • Constructor Details

    • GraphMLWriter

      public GraphMLWriter()
      Constructs a new GraphMLWriter.
  • Method Details

    • getExtensions

      public String[] getExtensions()
      Description copied from interface: Serializer
      The file extensions the serializer can read or write.
      Returns:
      DOCUMENT ME!
    • getFileTypeDescriptions

      public String[] getFileTypeDescriptions()
      Description copied from interface: Serializer
      The file type descriptions of the files the serializer can read or write.
      Returns:
      DOCUMENT ME!
    • validFor

      public boolean validFor​(Graph g)
      Description copied from class: AbstractOutputSerializer
      As standard, an output serializer will be valid writer for any type of graph
      Specified by:
      validFor in interface OutputSerializer
      Overrides:
      validFor in class AbstractOutputSerializer
      Parameters:
      g - The graph to be serialized
      Returns:
    • write

      public void write​(OutputStream stream, Graph g) throws IOException
      Description copied from interface: OutputSerializer
      Writes the contents of the given graph to a stream.
      Parameters:
      stream - The output stream to save the graph to.
      g - The graph to save.
      Throws:
      IOException