Package it.unive.lisa.outputs
Class HtmlGraph
- java.lang.Object
-
- it.unive.lisa.outputs.GraphStreamWrapper
-
- it.unive.lisa.outputs.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 aGraphmlGraph
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 givenWriter
.-
Methods inherited from class it.unive.lisa.outputs.GraphStreamWrapper
edgeName, nodeName, toString
-
-
-
-
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 wrappedGraphmlGraph
includeSubnodes
- whether or not sub-nodes should be part of the graphmap
- a map from a node id to its text and descriptiondescription
- the description of the graph, used as subtitle (can benull
)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 givenWriter
.- Specified by:
dump
in classGraphStreamWrapper
- Parameters:
writer
- the writer to use for dumping the graph- Throws:
java.io.IOException
- if an I/O error occurs while writing
-
-