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.StringcreateFormattedRepresentation(AbstractGraph<?,?,?> graph, boolean includeWeights, boolean useShortLabels, boolean plotLoops)Creates a formatted representation of the given graph.static voidformatDecorations(java.lang.StringBuilder builder, AbstractVertex<?,?,?> vertex)Utility function to format the decorations attached to a vertex.protected abstract java.lang.StringformatGraph(G graph, boolean includeWeights, boolean useShortLabels, boolean plotLoops)This method encapsulates the concrete graph formatting.abstract java.lang.StringgetDefaultFileName()Returns the default file name suggested by this formatter.static java.lang.StringgetDotRepresentation(Color color)Returns the dot (graphviz) representation of the given color.
-
Constructor Details
-
AbstractGraphFormatter
public AbstractGraphFormatter()
-
-
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 formatincludeWeights- 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 formatincludeWeights- 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 tovertex- 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
Returns the dot (graphviz) representation of the given color.- Parameters:
color- The color to convert- Returns:
- The dot representation of the given color
-