Class AbstractGraphFormatter<G extends AbstractGraph<?,​?,​?>>

java.lang.Object
kieker.tools.trace.analysis.filter.visualization.AbstractGraphFormatter<G>
Type Parameters:
G - The graph type this formatter is for
Direct Known Subclasses:
AbstractDependencyGraphFormatter, AbstractDependencyGraphFormatter

public abstract class AbstractGraphFormatter<G extends AbstractGraph<?,​?,​?>>
extends java.lang.Object
Abstract superclass for all graph formatters.
Since:
1.6
  • Constructor Summary

    Constructors 
    Constructor Description
    AbstractGraphFormatter()  
  • Method Summary

    Modifier and Type Method Description
    java.lang.String createFormattedRepresentation​(AbstractGraph<?,​?,​?> graph, boolean includeWeights, boolean useShortLabels, boolean plotLoops)
    Creates a formatted representation of the given graph.
    static void formatDecorations​(java.lang.StringBuilder builder, AbstractVertex<?,​?,​?> vertex)
    Utility function to format the decorations attached to a vertex.
    protected abstract java.lang.String formatGraph​(G graph, boolean includeWeights, boolean useShortLabels, boolean plotLoops)
    This method encapsulates the concrete graph formatting.
    abstract java.lang.String getDefaultFileName()
    Returns the default file name suggested by this formatter.
    static java.lang.String getDotRepresentation​(Color color)
    Returns the dot (graphviz) representation of the given color.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • createFormattedRepresentation

      public java.lang.String createFormattedRepresentation​(AbstractGraph<?,​?,​?> graph, boolean includeWeights, boolean useShortLabels, boolean plotLoops)
      Creates a formatted representation of the given graph.
      Parameters:
      graph - The graph to format
      includeWeights - Determines whether to include weights or not.
      useShortLabels - Determines whether to use short labels or not.
      plotLoops - Determines whether to plot loops or not.
      Returns:
      A formatted representation of the graph
    • formatGraph

      protected abstract java.lang.String formatGraph​(G graph, boolean includeWeights, boolean useShortLabels, boolean plotLoops)
      This method encapsulates the concrete graph formatting.
      Parameters:
      graph - The input graph to format
      includeWeights - Determines whether to include weights or not.
      useShortLabels - Determines whether to use short labels or not.
      plotLoops - Determines whether to plot loops or not.
      Returns:
      A textual specification of the input graph
    • formatDecorations

      public static void formatDecorations​(java.lang.StringBuilder builder, AbstractVertex<?,​?,​?> vertex)
      Utility function to format the decorations attached to a vertex.
      Parameters:
      builder - The builder to send the output to
      vertex - The vertex to work with
    • getDefaultFileName

      public abstract java.lang.String getDefaultFileName()
      Returns the default file name suggested by this formatter.
      Returns:
      See above
    • getDotRepresentation

      public static java.lang.String getDotRepresentation​(Color color)
      Returns the dot (graphviz) representation of the given color.
      Parameters:
      color - The color to convert
      Returns:
      The dot representation of the given color