Tabnine Logo
GraphlibWriter
Code IndexAdd Tabnine to your IDE (free)

How to use
GraphlibWriter
in
org.jboss.windup.graph.renderer.graphlib

Best Java code snippets using org.jboss.windup.graph.renderer.graphlib.GraphlibWriter (Showing top 8 results out of 315)

origin: org.jboss.windup/windup-grapher

public DagreD3JSHtmlWriter(Graph graph) {
  this.writer = new GraphlibWriter(graph, GraphvizType.DIGRAPH, GraphvizDirection.TOP_TO_BOTTOM, "g", "qualifiedName");
}
origin: org.jboss.windup/windup-grapher

@Override
public void writeGraph(OutputStream os) throws IOException {
  IOUtils.write(GraphvizConstants.METHOD_OPEN, os);
  
  final String tag = StringUtils.replaceEach(GraphvizConstants.CONSTRUCTOR_STATEMENT, new String[] {"%NAME", "%TYPE"} , new String[] {graphVariableName, type.getName()});
  IOUtils.write(tag, os);
  
  writeGraphNodes(os);
  writeGraphEdges(os);
  
  IOUtils.write(GraphvizConstants.GRAPH_RENDERER, os);
  IOUtils.write(StringUtils.replace(GraphvizConstants.GRAPH_LAYOUT, "%DIRECTION", direction.getDirection()), os);
  IOUtils.write(StringUtils.replace(GraphvizConstants.GRAPH_RENDERER_RUN, "%NAME", graphVariableName), os);
  
  IOUtils.write(GraphvizConstants.METHOD_CLOSE, os);
}
origin: org.jboss.windup/windup-grapher

private void writeGraphEdges(OutputStream os) throws IOException {
  
  for(Edge edge : graph.getEdges()) {
    String id = ""+edge.getId().hashCode();
    String source = ""+edge.getVertex(Direction.IN).getId().hashCode();
    String target = ""+edge.getVertex(Direction.OUT).getId().hashCode();
    String label = ""+edge.getLabel();
    writeGraphEdge(id, source, target, label, os);
  }
  
}
origin: org.jboss.windup/windup-grapher

  private void writeGraphNodes(OutputStream os) throws IOException {

    //iterate the nodes.
    for(Vertex vertex : graph.getVertices()) {
      String id = ""+vertex.getId().hashCode();
      String label = vertex.getProperty(vertexLabelProperty);
      
      Set<String> clzSet = new HashSet<String>();
      Boolean blacklist = (Boolean)vertex.getProperty("blacklist");
      if(blacklist != null && blacklist) {
        clzSet.add("blacklisted");
      }
      
      if(StringUtils.isBlank(label)) {
        label = vertex.toString();
      }
      writeGraphNode(id, label, clzSet, os);
    }
    
  }
}
origin: org.jboss.windup.legacy.application/grapher

@Override
public void writeGraph(OutputStream os) throws IOException {
  IOUtils.write(GraphvizConstants.METHOD_OPEN, os);
  
  final String tag = StringUtils.replaceEach(GraphvizConstants.CONSTRUCTOR_STATEMENT, new String[] {"%NAME", "%TYPE"} , new String[] {graphVariableName, type.getName()});
  IOUtils.write(tag, os);
  
  writeGraphNodes(os);
  writeGraphEdges(os);
  
  IOUtils.write(GraphvizConstants.GRAPH_RENDERER, os);
  IOUtils.write(StringUtils.replace(GraphvizConstants.GRAPH_LAYOUT, "%DIRECTION", direction.getDirection()), os);
  IOUtils.write(StringUtils.replace(GraphvizConstants.GRAPH_RENDERER_RUN, "%NAME", graphVariableName), os);
  
  IOUtils.write(GraphvizConstants.METHOD_CLOSE, os);
}
origin: org.jboss.windup.legacy.application/grapher

private void writeGraphEdges(OutputStream os) throws IOException {
  
  for(Edge edge : graph.getEdges()) {
    String id = ""+edge.getId().hashCode();
    String source = ""+edge.getVertex(Direction.IN).getId().hashCode();
    String target = ""+edge.getVertex(Direction.OUT).getId().hashCode();
    String label = ""+edge.getLabel();
    writeGraphEdge(id, source, target, label, os);
  }
  
}
origin: org.jboss.windup.legacy.application/grapher

  private void writeGraphNodes(OutputStream os) throws IOException {

    //iterate the nodes.
    for(Vertex vertex : graph.getVertices()) {
      String id = ""+vertex.getId().hashCode();
      String label = vertex.getProperty(vertexLabelProperty);
      
      Set<String> clzSet = new HashSet<String>();
      Boolean blacklist = (Boolean)vertex.getProperty("blacklist");
      if(blacklist != null && blacklist) {
        clzSet.add("blacklisted");
      }
      
      if(StringUtils.isBlank(label)) {
        label = vertex.toString();
      }
      writeGraphNode(id, label, clzSet, os);
    }
    
  }
}
origin: org.jboss.windup.legacy.application/grapher

public DagreD3JSHtmlWriter(Graph graph) {
  this.writer = new GraphlibWriter(graph, GraphvizType.DIGRAPH, GraphvizDirection.TOP_TO_BOTTOM, "g", "qualifiedName");
}
org.jboss.windup.graph.renderer.graphlibGraphlibWriter

Most used methods

  • <init>
  • writeGraphEdge
  • writeGraphEdges
  • writeGraphNode
  • writeGraphNodes

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSystemService (Context)
  • setContentView (Activity)
  • setRequestProperty (URLConnection)
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Runner (org.openjdk.jmh.runner)
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now