/** * Utility function to create a textual node ID for an operation. * * @param operation * The operation to create the ID for * @return The created ID */ protected static String createOperationNodeId(final Operation operation) { return AbstractDependencyGraphFormatter.createNodeId(operation.getId()); }
@Override protected String formatGraph(final G graph, final boolean includeWeights, final boolean useShortLabels, final boolean plotLoops) { return this.formatDependencyGraph(graph, includeWeights, useShortLabels, plotLoops); }
AbstractDependencyGraphFormatter.createNodeId(executionContainer.getId()), executionContainer.getName(), DotFactory.DOT_SHAPE_NONE, AbstractDependencyGraphFormatter.createContainerId(executionContainer), OperationAllocationDependencyGraphFormatter.createContainerNodeLabel(executionContainer), AbstractDependencyGraphFormatter.createAllocationComponentId(allocationComponent), OperationAllocationDependencyGraphFormatter.createAllocationComponentNodeLabel(allocationComponent, useShortLabels), DotFactory.DOT_SHAPE_BOX, AbstractDependencyGraphFormatter.createNodeId(node), this.createOperationNodeLabel(operation, node), DotFactory.DOT_SHAPE_OVAL, AbstractDependencyGraphFormatter.getNodeFillColor(node), // fillcolor
builder.append(DotFactory.createNode("", AbstractDependencyGraphFormatter.createNodeId(DependencyGraphNode.ROOT_NODE_ID), builder.append(DotFactory.createCluster("", AbstractDependencyGraphFormatter.createContainerId(container), AbstractDependencyGraphFormatter.STEREOTYPE_EXECUTION_CONTAINER + "\\n" + container.getName(), DotFactory.DOT_SHAPE_BOX, // shape AbstractDependencyGraphFormatter.createNodeId(node), AbstractComponentDependencyGraphFormatter.createComponentNodeLabel(node, useShortLabels, AbstractDependencyGraphFormatter.STEREOTYPE_ALLOCATION_COMPONENT), AbstractDependencyGraphFormatter.getNodeFillColor(node), // fillcolor
AbstractDependencyGraphFormatter.createNodeId(assemblyComponent.getId()), assemblyComponent.getName(), DotFactory.DOT_SHAPE_NONE, AbstractDependencyGraphFormatter.createAssemblyComponentId(assemblyComponent), OperationAssemblyDependencyGraphFormatter.createComponentNodeLabel(assemblyComponent, useShortLabels), AbstractDependencyGraphFormatter.createNodeId(node), this.createOperationNodeLabel(operation, node), DotFactory.DOT_SHAPE_OVAL, AbstractDependencyGraphFormatter.getNodeFillColor(node), // fillcolor
this.builder.append(DotFactory.createNode("", AbstractDependencyGraphFormatter.createNodeId(vertex), component.getName(), this.builder.append(DotFactory.createNode("", AbstractDependencyGraphFormatter.createNodeId(vertex), this.createNodeLabel(vertex, component), // NOCS AbstractDependencyGraphFormatter.getNodeFillColor(vertex), // fillcolor // NOCS //NOPMD (null)
/** * Utility function to create a textual node ID for a given node. * * @param node * The node to create the ID for * @return The created ID */ protected static String createNodeId(final DependencyGraphNode<?> node) { return AbstractDependencyGraphFormatter.createNodeId(node.getId()); }
@Override public void visitEdge(final WeightedBidirectionalDependencyGraphEdge<T> edge) { final DependencyGraphNode<T> sourceNode = edge.getSource(); final DependencyGraphNode<T> destinationNode = edge.getTarget(); if ((sourceNode.equals(destinationNode)) && !this.plotLoops) { return; } final String lineStyle = (edge.isAssumed()) ? DotFactory.DOT_STYLE_DASHED : DotFactory.DOT_STYLE_SOLID; // NOCS (inline ?) final String color = AbstractGraphFormatter.getDotRepresentation(edge.getColor()); if (this.includeWeights) { this.builder.append(DotFactory.createConnection("", AbstractDependencyGraphFormatter.createNodeId(sourceNode), AbstractDependencyGraphFormatter.createNodeId(destinationNode), Integer.toString(edge.getTargetWeight().get()), lineStyle, DotFactory.DOT_ARROWHEAD_OPEN, color)); } else { this.builder.append(DotFactory.createConnection("", AbstractDependencyGraphFormatter.createNodeId(sourceNode), AbstractDependencyGraphFormatter.createNodeId(destinationNode), lineStyle, DotFactory.DOT_ARROWHEAD_OPEN, color)); } this.builder.append("\n"); } }
AbstractDependencyGraphFormatter.createNodeId(vertex), container.getName(), DotFactory.DOT_SHAPE_NONE, AbstractDependencyGraphFormatter.createNodeId(vertex), ContainerDependencyGraphFormatter.createExecutionContainerNodeLabel(container),