Search in sources :

Example 1 with Node

use of guru.nidi.graphviz.model.Node in project oozie by apache.

the class GraphvizRenderer method addNode.

@Override
public void addNode(final WorkflowActionNode node) {
    final Shape shape = getShape(node.getType());
    final Color color = getColor(node.getStatus());
    final Node graphvizNode = Factory.node(node.getName()).with(shape).with(color);
    graphvizNodes.put(node.getName(), graphvizNode);
}
Also used : Shape(guru.nidi.graphviz.attribute.Shape) Color(guru.nidi.graphviz.attribute.Color) Node(guru.nidi.graphviz.model.Node)

Example 2 with Node

use of guru.nidi.graphviz.model.Node in project oozie by apache.

the class GraphvizRenderer method addEdge.

@Override
public void addEdge(final WorkflowActionNode parent, final WorkflowActionNode child) {
    if (edges.containsEntry(parent.getName(), child.getName())) {
        return;
    }
    Node graphvizParent = createOrGetGraphvizNode(parent);
    graphvizParent = graphvizParent.link(Factory.to(createOrGetGraphvizNode(child)).with(calculateEdgeColor(child.getStatus())));
    graphvizNodes.put(parent.getName(), graphvizParent);
    edges.put(parent.getName(), child.getName());
    arcCount++;
}
Also used : Node(guru.nidi.graphviz.model.Node)

Example 3 with Node

use of guru.nidi.graphviz.model.Node in project oozie by apache.

the class GraphvizRenderer method persist.

@Override
public void persist(final WorkflowActionNode node) {
    final Node graphvizNode = graphvizNodes.get(node.getName());
    graphvizGraph = graphvizGraph.with(graphvizNode);
}
Also used : Node(guru.nidi.graphviz.model.Node)

Aggregations

Node (guru.nidi.graphviz.model.Node)3 Color (guru.nidi.graphviz.attribute.Color)1 Shape (guru.nidi.graphviz.attribute.Shape)1