Ejemplo n.º 1
0
  /* (non-Javadoc)
   * @see java.lang.Object#clone()
   */
  @Override
  public Object clone() throws CloneNotSupportedException {
    GraphDesc newgd = (GraphDesc) super.clone();
    newgd.allds = new ArrayList<DsDesc>(this.allds.size());
    for (DsDesc dsDesc : this.allds) {
      newgd.allds.add((DsDesc) dsDesc.clone());
    }

    return newgd;
  }
Ejemplo n.º 2
0
  private void doGraph(GraphNode gn, Renderer r, ParamsBean params, JrdsJSONWriter w)
      throws IOException, JSONException {
    jrds.Graph graph = gn.getGraph();
    params.configureGraph(graph);

    Map<String, Object> imgProps = new HashMap<String, Object>();
    r.render(graph);
    Probe<?, ?> p = gn.getProbe();
    imgProps.put("probename", p.getName());
    imgProps.put("qualifiedname", graph.getQualifiedName());

    imgProps.put("qualifiedname", graph.getQualifiedName());
    GraphDesc gd = gn.getGraphDesc();
    if (gd != null && gd.getDimension() != null) {
      imgProps.put("height", gd.getDimension().height);
      imgProps.put("width", gd.getDimension().width);
    }
    imgProps.put("graph", params.doArgsMap(graph, true));
    imgProps.put("history", params.doArgsMap(graph, false));
    imgProps.put("probe", params.doArgsMap(p, true));
    imgProps.put("graphnode", params.doArgsMap(gn, true));
    doTree(w, graph.getQualifiedName(), gn.hashCode(), "graph", null, imgProps);
  }