Codota Logo
GraphlibWriter
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
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

  • Updating database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • getApplicationContext (Context)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • ConcurrentHashMap (java.util.concurrent)
    A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updat
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now