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

  • Running tasks concurrently on multiple threads
  • getSupportFragmentManager (FragmentActivity)
  • notifyDataSetChanged (ArrayAdapter)
  • findViewById (Activity)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • JFileChooser (javax.swing)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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