Package com.puppetlabs.graph.elements

Examples of com.puppetlabs.graph.elements.RootGraph.addVertex()


    // and one for the root/non-modular
    for(ModuleNodeData mnd : moduleNodeData.values()) {
      cancel.assertContinue();
      if(renderAll || mnd.marked)
        if(mnd.isNode())
          g.addVertex(createVertexForPPNodeNode(mnd));
        else
          g.addVertex(createVertexForModuleNode(mnd));
    }

    // only draw the root node if it has been marked (incoming dependency), or has outgoing
View Full Code Here


      cancel.assertContinue();
      if(renderAll || mnd.marked)
        if(mnd.isNode())
          g.addVertex(createVertexForPPNodeNode(mnd));
        else
          g.addVertex(createVertexForModuleNode(mnd));
    }

    // only draw the root node if it has been marked (incoming dependency), or has outgoing
    // when not rendering all, the non modular must have incoming dependencies to show.
    if(renderAll && nonModularNode.outgoing.size() > 0 || nonModularNode.marked) {
View Full Code Here

    // only draw the root node if it has been marked (incoming dependency), or has outgoing
    // when not rendering all, the non modular must have incoming dependencies to show.
    if(renderAll && nonModularNode.outgoing.size() > 0 || nonModularNode.marked) {
      Vertex v = createVertexForRootNode(nonModularNode);
      g.addVertex(v);
    }

    // Create Vertexes for all Edges that have data
    // (very large labels on edges does not work that well as they often overlap)
    // Skip edges that are from non marked module nodes unless everything is rendered
View Full Code Here

        continue;
      if(renderAll || me.from.marked) {
        cancel.assertContinue();
        Vertex v = createVertexForEdge(me);
        if(v != null) {
          g.addVertex(v);
        }
      }
    }

    // Create Edges
View Full Code Here

      builder.append("[");
      builder.append(r.getTitle().toLowerCase());
      builder.append("]");

      Vertex v = createVertexFor(r, root);
      g.addVertex(v);
      vertexMap.put(builder.toString(), v);
      resourceVertexMap.put(r, v);
    }

    for(CatalogResource r : catalog.getResources()) {
View Full Code Here

        for(String ref : p.getValue()) {
          Vertex target = vertexMap.get(ref.toLowerCase());
          if(target == null) {
            target = createVertexForMissingResource(ref);
            vertexMap.put(ref.toLowerCase(), target); // keep it if there are more references
            g.addVertex(target);
          }
          Edge edge = new Edge(aName, style, source, target);
          g.addEdge(edge);
        }
      }
View Full Code Here

    for(String s : removedInNew) {
      Vertex v = oldVertexMap.get(s);
      v.addStyleClass(STYLE_Removed);
      v.setStyles(labelStyleForResource(catalogMap.get(v), oldRoot, null, null, new String[1]));
      resultingVertexMap.put(s, v);
      g.addVertex(v);
    }
    for(String s : addedInNew) {
      Vertex v = newVertexMap.get(s);
      v.addStyleClass(STYLE_Added);
      v.setStyles(labelStyleForResource(null, null, catalogMap.get(v), newRoot, new String[1]));
View Full Code Here

    for(String s : addedInNew) {
      Vertex v = newVertexMap.get(s);
      v.addStyleClass(STYLE_Added);
      v.setStyles(labelStyleForResource(null, null, catalogMap.get(v), newRoot, new String[1]));
      resultingVertexMap.put(s, v);
      g.addVertex(v);
    }
    for(String s : inBoth) {
      Vertex vOld = oldVertexMap.get(s);
      Vertex vNew = newVertexMap.get(s);
View Full Code Here

      String computedStyle[] = new String[1];
      v.setStyles(labelStyleForResource(
        catalogMap.get(vOld), oldRoot, catalogMap.get(vNew), newRoot, computedStyle));
      v.addStyleClass(computedStyle[0]);
      resultingVertexMap.put(s, v);
      g.addVertex(v);
    }

    // Process Edges
    Map<String, Edge> oldEdgeMap = Maps.newHashMap();
    Map<String, Edge> newEdgeMap = Maps.newHashMap();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.