All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.ferstl.depgraph.dependency.GmlGraphStyleConfigurer Maven / Gradle / Ivy

Go to download

This Maven plugin generates dependency graphs on single modules or in an aggregated form on multi-module projects. The graphs are represented by .dot files. In case that Graphviz is installed on the machine where this plugin is run, the .dot file can be directly converted into all supported image files.

There is a newer version: 4.0.3
Show newest version
package com.github.ferstl.depgraph.dependency;

import com.github.ferstl.depgraph.graph.EdgeRenderer;
import com.github.ferstl.depgraph.graph.GraphBuilder;
import com.github.ferstl.depgraph.graph.NodeRenderer;
import com.github.ferstl.depgraph.graph.gml.GmlGraphFormatter;

public class GmlGraphStyleConfigurer implements GraphStyleConfigurer {

  private boolean showGroupId;
  private boolean showArtifactId;
  private boolean showVersionsOnNodes;
  private boolean showVersionOnEdges;

  @Override
  public GraphStyleConfigurer showGroupIds(boolean showGroupId) {
    this.showGroupId = showGroupId;
    return this;
  }

  @Override
  public GraphStyleConfigurer showArtifactIds(boolean showArtifactId) {
    this.showArtifactId = showArtifactId;
    return this;
  }

  @Override
  public GraphStyleConfigurer showVersionsOnNodes(boolean showVersionsOnNodes) {
    this.showVersionsOnNodes = showVersionsOnNodes;
    return this;
  }

  @Override
  public GraphStyleConfigurer showVersionsOnEdges(boolean showVersionOnEdges) {
    this.showVersionOnEdges = showVersionOnEdges;
    return this;
  }

  @Override
  public GraphBuilder configure(GraphBuilder graphBuilder) {
    NodeRenderer nodeNameRenderer = new GmlDependencyNodeNameRenderer(this.showGroupId, this.showArtifactId, this.showVersionsOnNodes);
    EdgeRenderer edgeRenderer = new GmlDependencyEdgeRenderer(this.showVersionOnEdges);
    return graphBuilder
        .useNodeNameRenderer(nodeNameRenderer)
        .useEdgeRenderer(edgeRenderer)
        .graphFormatter(new GmlGraphFormatter());
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy