Class HtmlGraph


  • public class HtmlGraph
    extends GraphStreamWrapper
    A graph that can be dumped as an html page using javascript to visualize the graphs. This graph effectively wraps a GraphmlGraph instance to provide visualization.
    • Constructor Summary

      Constructors 
      Constructor Description
      HtmlGraph​(GraphmlGraph graph, boolean includeSubnodes, java.util.SortedMap<java.lang.Integer,​org.apache.commons.lang3.tuple.Pair<java.lang.String,​SerializableNodeDescription>> map, java.lang.String description, java.lang.String descriptionLabel)
      Builds the graph.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dump​(java.io.Writer writer)
      Dumps this graph through the given Writer.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • HtmlGraph

        public HtmlGraph​(GraphmlGraph graph,
                         boolean includeSubnodes,
                         java.util.SortedMap<java.lang.Integer,​org.apache.commons.lang3.tuple.Pair<java.lang.String,​SerializableNodeDescription>> map,
                         java.lang.String description,
                         java.lang.String descriptionLabel)
        Builds the graph.
        Parameters:
        graph - the wrapped GraphmlGraph
        includeSubnodes - whether or not sub-nodes should be part of the graph
        map - a map from a node id to its text and description
        description - the description of the graph, used as subtitle (can be null)
        descriptionLabel - the display name of the descriptions, used as label in the collapse/expand toggles
    • Method Detail

      • dump

        public void dump​(java.io.Writer writer)
                  throws java.io.IOException
        Description copied from class: GraphStreamWrapper
        Dumps this graph through the given Writer.
        Specified by:
        dump in class GraphStreamWrapper
        Parameters:
        writer - the writer to use for dumping the graph
        Throws:
        java.io.IOException - if an I/O error occurs while writing