Class AbstractDependencyGraphFormatter<G extends AbstractDependencyGraph<?>>
java.lang.Object
kieker.tools.trace.analysis.filter.visualization.AbstractGraphFormatter<G>
kieker.visualization.trace.dependency.graph.AbstractDependencyGraphFormatter<G>
- Type Parameters:
G
- The graph type this formatter is for
- Direct Known Subclasses:
AbstractComponentDependencyGraphFormatter
,AbstractOperationDependencyGraphFormatter
,ContainerDependencyGraphFormatter
public abstract class AbstractDependencyGraphFormatter<G extends AbstractDependencyGraph<?>> extends AbstractGraphFormatter<G>
Abstract superclass for all dependency-graph formatters.
- Since:
- 1.6
- Author:
- Holger Knoche
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
STEREOTYPE_ALLOCATION_COMPONENT
The string used in the node labels for deployment components.protected static java.lang.String
STEREOTYPE_ASSEMBLY_COMPONENT
The string used in the node labels for assembly components.protected static java.lang.String
STEREOTYPE_EXECUTION_CONTAINER
The string used in the node labels for execution containers. -
Constructor Summary
Constructors Constructor Description AbstractDependencyGraphFormatter()
-
Method Summary
Modifier and Type Method Description protected void
appendGraphFooter(java.lang.StringBuilder builder)
Outputs the default graph footer to the given builder.protected void
appendGraphHeader(java.lang.StringBuilder builder)
Outputs the default graph header to the given builder.protected static java.lang.String
createAllocationComponentId(AllocationComponent component)
Utility function to create a textual container ID for an allocation component.protected static java.lang.String
createAssemblyComponentId(AssemblyComponent component)
Utility function to create a textual container ID for an assembly component.protected static java.lang.String
createContainerId(ExecutionContainer container)
Utility function to create a textual container ID for an execution container.protected static java.lang.String
createNodeId(int nodeId)
Utility function to create a textual node ID from a given numeric node ID.protected static java.lang.String
createNodeId(DependencyGraphNode<?> node)
Utility function to create a textual node ID for a given node.protected static java.lang.String
createOperationNodeId(Operation operation)
Utility function to create a textual node ID for an operation.protected abstract java.lang.String
formatDependencyGraph(G graph, boolean includeWeights, boolean useShortLabels, boolean plotLoops)
The inheriting classes should implement this method to encapsulate the concrete graph formatting.protected java.lang.String
formatGraph(G graph, boolean includeWeights, boolean useShortLabels, boolean plotLoops)
This method encapsulates the concrete graph formatting.protected static java.lang.String
getNodeFillColor(DependencyGraphNode<?> node)
Utility function to determine the fill color to use for a given node.Methods inherited from class kieker.tools.trace.analysis.filter.visualization.AbstractGraphFormatter
createFormattedRepresentation, formatDecorations, getDefaultFileName, getDotRepresentation
-
Field Details
-
STEREOTYPE_EXECUTION_CONTAINER
protected static final java.lang.String STEREOTYPE_EXECUTION_CONTAINERThe string used in the node labels for execution containers.- See Also:
- Constant Field Values
-
STEREOTYPE_ASSEMBLY_COMPONENT
protected static final java.lang.String STEREOTYPE_ASSEMBLY_COMPONENTThe string used in the node labels for assembly components.- See Also:
- Constant Field Values
-
STEREOTYPE_ALLOCATION_COMPONENT
protected static final java.lang.String STEREOTYPE_ALLOCATION_COMPONENTThe string used in the node labels for deployment components.- See Also:
- Constant Field Values
-
-
Constructor Details
-
AbstractDependencyGraphFormatter
public AbstractDependencyGraphFormatter()
-
-
Method Details
-
formatGraph
protected java.lang.String formatGraph(G graph, boolean includeWeights, boolean useShortLabels, boolean plotLoops)Description copied from class:AbstractGraphFormatter
This method encapsulates the concrete graph formatting.- Specified by:
formatGraph
in classAbstractGraphFormatter<G extends AbstractDependencyGraph<?>>
- 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
-
appendGraphHeader
protected void appendGraphHeader(java.lang.StringBuilder builder)Outputs the default graph header to the given builder.- Parameters:
builder
- The builder to use
-
appendGraphFooter
protected void appendGraphFooter(java.lang.StringBuilder builder)Outputs the default graph footer to the given builder.- Parameters:
builder
- The builder to use
-
createContainerId
Utility function to create a textual container ID for an execution container.- Parameters:
container
- The container to create the ID for- Returns:
- The created ID
-
createAllocationComponentId
Utility function to create a textual container ID for an allocation component.- Parameters:
component
- The allocation component to create the ID for- Returns:
- The created ID
-
createAssemblyComponentId
Utility function to create a textual container ID for an assembly component.- Parameters:
component
- The assembly component to create the ID for- Returns:
- The created ID
-
createOperationNodeId
Utility function to create a textual node ID for an operation.- Parameters:
operation
- The operation to create the ID for- Returns:
- The created ID
-
createNodeId
protected static java.lang.String createNodeId(int nodeId)Utility function to create a textual node ID from a given numeric node ID.- Parameters:
nodeId
- The numeric node ID- Returns:
- The created ID
-
createNodeId
Utility function to create a textual node ID for a given node.- Parameters:
node
- The node to create the ID for- Returns:
- The created ID
-
getNodeFillColor
Utility function to determine the fill color to use for a given node.- Parameters:
node
- The node to determine the color for- Returns:
- The color name to use for the given node
-
formatDependencyGraph
protected abstract java.lang.String formatDependencyGraph(G graph, boolean includeWeights, boolean useShortLabels, boolean plotLoops)The inheriting classes should implement this method to encapsulate 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
-