Examples of addUserDatum()


Examples of edu.uci.ics.jung.graph.Edge.addUserDatum()

    /*
     * Build the actual edge & attach it to the graph.
     * */
    Edge edge = new DirectedSparseEdge(sourceNode, targetNode);
   
    edge.addUserDatum("converter_name", serviceShortPID,
        new UserDataContainer.CopyAction.Shared());
    edge.addUserDatum("service_pid", serviceCompletePID,
        new UserDataContainer.CopyAction.Shared());
   
    outputGraph.addEdge(edge);
View Full Code Here

Examples of edu.uci.ics.jung.graph.Edge.addUserDatum()

     * */
    Edge edge = new DirectedSparseEdge(sourceNode, targetNode);
   
    edge.addUserDatum("converter_name", serviceShortPID,
        new UserDataContainer.CopyAction.Shared());
    edge.addUserDatum("service_pid", serviceCompletePID,
        new UserDataContainer.CopyAction.Shared());
   
    outputGraph.addEdge(edge);
  }

View Full Code Here

Examples of edu.uci.ics.jung.graph.Vertex.addUserDatum()

  private Vertex createNode(String nodeKey) {
    nodeCount++;
   
    Vertex node = new DirectedSparseVertex();
    node.addUserDatum("strength", new Integer(1), new UserDataContainer.CopyAction.Shared());
    node.addUserDatum("label", nodeKey, new UserDataContainer.CopyAction.Shared());
   
    outputGraph.addVertex(node);
    nodeLabels.add(nodeKey);
   
View Full Code Here

Examples of edu.uci.ics.jung.graph.Vertex.addUserDatum()

  private Vertex createNode(String nodeKey) {
    nodeCount++;
   
    Vertex node = new DirectedSparseVertex();
    node.addUserDatum("strength", new Integer(1), new UserDataContainer.CopyAction.Shared());
    node.addUserDatum("label", nodeKey, new UserDataContainer.CopyAction.Shared());
   
    outputGraph.addVertex(node);
    nodeLabels.add(nodeKey);
   
    return node;
View Full Code Here

Examples of edu.uci.ics.jung.graph.Vertex.addUserDatum()

   */
  private Vertex getVertex(String dataType) {
    Vertex vertex = (SparseVertex) dataTypeToVertex.get(dataType);
    if (vertex== null) {
      vertex = new SparseVertex();
      vertex.addUserDatum("label",
          dataType,
          new UserDataContainer.CopyAction.Shared());
      graph.addVertex(vertex);
      dataTypeToVertex.put(dataType, vertex);
    }
View Full Code Here

Examples of edu.uci.ics.jung.graph.Vertex.addUserDatum()

        Vertex v = getVertex(host);
        if (v == null)
            return;
        Map <String, ServiceStatus>services = (Map<String,ServiceStatus>)v.getUserDatum("servicesstatus");
        if (services == null) {
            v.addUserDatum("servicesstatus", new HashMap<String, ServiceStatus>(), UserData.REMOVE);
            services = (Map<String,ServiceStatus>)v.getUserDatum("servicesstatus");
        }
        services.remove(status.getServiceDescription());
        services.put(status.getServiceDescription(), status);
    }
View Full Code Here

Examples of edu.uci.ics.jung.graph.Vertex.addUserDatum()

    public void setVertex_HostComment(String host, StatHostComment hostcomment) {
        Vertex v = getVertex(host);
        if (v != null) {
            Map <Long, StatHostComment> hc = (Map<Long, StatHostComment>)v.getUserDatum("hostcomment");
            if (hc == null) {
                v.addUserDatum("hostcomment", new HashMap<Long, StatHostComment>(), UserData.REMOVE);
                hc = (Map<Long, StatHostComment>)v.getUserDatum("hostcomment");
            }
            hc.put(hostcomment.getCommentId(), hostcomment);
        }
    }
View Full Code Here

Examples of edu.uci.ics.jung.graph.Vertex.addUserDatum()

    public void setVertex_ServiceComment(String host, StatServiceComment servicecomment) {
        Vertex v = getVertex(host);
            if (v != null) {
            Map <String, LinkedList<StatServiceComment>> servicescomment = (Map<String, LinkedList<StatServiceComment>>)v.getUserDatum("servicescomment");
            if (servicescomment == null) { /* initializes the userdatum key */
                v.addUserDatum("servicescomment", new HashMap<String, LinkedList<StatServiceComment>>(), UserData.REMOVE);
                servicescomment = (Map<String, LinkedList<StatServiceComment>>)v.getUserDatum("servicescomment");
            }

            /* create a new linked list for the service */
            if (!servicescomment.containsKey(servicecomment.getServiceDescription())) {
View Full Code Here

Examples of edu.uci.ics.jung.graph.Vertex.addUserDatum()

    public void setVertex_ServiceExtInfo(String host, ServiceExtInfo extinfo) {
        Vertex v = getVertex(host);
        if (v != null) {
            Map <String, ServiceExtInfo>services = (Map<String,ServiceExtInfo>)v.getUserDatum("servicesextinfo");
            if (services == null) {
                v.addUserDatum("servicesextinfo", new HashMap<String, ServiceExtInfo>(), UserData.REMOVE);
                services = (Map<String,ServiceExtInfo>)v.getUserDatum("servicesextinfo");
            }
            services.put(extinfo.getServiceDescription(), extinfo);
        }
    }
View Full Code Here

Examples of edu.uci.ics.jung.graph.Vertex.addUserDatum()

                        fireMapperActionRequested(me);
                    }
                    lparents.add(_graphManager.getVertex(verts[i].trim()));
                }
                if (v != null)
                    v.addUserDatum("parents", lparents, UserData.REMOVE);
            }
        }
        _graphManager.adjustVerticesPhysicalLevel();
    }
   
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.