Class GmlExporter<V,​E>

  • Type Parameters:
    V - the graph vertex type
    E - the graph edge type
    All Implemented Interfaces:
    GraphExporter<V,​E>

    @Deprecated
    public class GmlExporter<V,​E>
    extends Object
    implements GraphExporter<V,​E>
    Deprecated.
    In favor of GmlImporter.
    Exports a graph into a GML file (Graph Modeling Language).

    For a description of the format see http://www. infosun.fmi.uni-passau.de/Graphlet/GML/.

    The behavior of the exporter such as whether to print vertex labels, edge labels, and/or edge weights can be adjusted using the setParameter method. When exporting labels, the exporter escapes them as Java strings.

    Author:
    Dimitrios Michail
    • Field Detail

      • vertexIDProvider

        protected ComponentNameProvider<V> vertexIDProvider
        Deprecated.
        Provides an identifier for a vertex.
      • edgeIDProvider

        protected ComponentNameProvider<E> edgeIDProvider
        Deprecated.
        Provides an identifier for an edge.
    • Constructor Detail

      • GmlExporter

        public GmlExporter()
        Deprecated.
        Creates a new GmlExporter object with integer name providers for the vertex and edge IDs and null providers for the vertex and edge labels.
      • GmlExporter

        public GmlExporter​(ComponentNameProvider<V> vertexIDProvider,
                           ComponentNameProvider<V> vertexLabelProvider,
                           ComponentNameProvider<E> edgeIDProvider,
                           ComponentNameProvider<E> edgeLabelProvider)
        Deprecated.
        Constructs a new GmlExporter object with the given ID and label providers.
        Parameters:
        vertexIDProvider - for generating vertex IDs. Must not be null.
        vertexLabelProvider - for generating vertex labels. If null, vertex labels will be generated using the toString() method of the vertex object.
        edgeIDProvider - for generating vertex IDs. Must not be null.
        edgeLabelProvider - for generating edge labels. If null, edge labels will be generated using the toString() method of the edge object.
    • Method Detail

      • exportGraph

        public void exportGraph​(Graph<V,​E> g,
                                Writer writer)
        Deprecated.
        Exports an graph into a plain text GML format.
        Specified by:
        exportGraph in interface GraphExporter<V,​E>
        Parameters:
        writer - the writer
        g - the graph
      • isParameter

        public boolean isParameter​(GmlExporter.Parameter p)
        Deprecated.
        Return if a particular parameter of the exporter is enabled
        Parameters:
        p - the parameter
        Returns:
        true if the parameter is set, false otherwise
      • setParameter

        public void setParameter​(GmlExporter.Parameter p,
                                 boolean value)
        Deprecated.
        Set the value of a parameter of the exporter
        Parameters:
        p - the parameter
        value - the value to set
      • getVertexIDProvider

        public ComponentNameProvider<V> getVertexIDProvider()
        Deprecated.
        Get the vertex id provider
        Returns:
        the vertex id provider
      • setVertexIDProvider

        public void setVertexIDProvider​(ComponentNameProvider<V> vertexIDProvider)
        Deprecated.
        Set the vertex id provider
        Parameters:
        vertexIDProvider - the new vertex id provider. Must not be null.
      • getEdgeIDProvider

        public ComponentNameProvider<E> getEdgeIDProvider()
        Deprecated.
        Get the edge id provider
        Returns:
        The edge provider
      • setEdgeIDProvider

        public void setEdgeIDProvider​(ComponentNameProvider<E> edgeIDProvider)
        Deprecated.
        Set the edge id provider.
        Parameters:
        edgeIDProvider - the new edge id provider. Must not be null.