Package org.graphstream.graph

Examples of org.graphstream.graph.Node.addAttribute()


    map.put("A", "a");
    map.put("B", "b");
    map.put("C", "c");

    A.addAttribute("map", map);

    assertEquals(4, A.getAttributeCount());
    assertTrue(A.hasAttribute("map"));
    assertTrue(A.hasAttribute("map", HashMap.class));
    assertFalse(A.hasLabel("map"));
View Full Code Here


    attr.put("A", "a");
    attr.put("B", "b");
    attr.put("C", "c");

    A.addAttribute("ca", attr);

    assertEquals(5, A.getAttributeCount());
    assertTrue(A.hasAttribute("ca"));
    assertTrue(A.hasAttribute("ca", MyAttribute.class));
    assertFalse(A.hasLabel("ca"));
View Full Code Here

          g.changeAttribute("attribute", false);
          Edge e = g.addEdge("AB", "A", "B");
          e.addAttribute("attribute", "foo");
          e.changeAttribute("attribute", false);
          Node n = e.getNode0();
          n.addAttribute("attribute", "foo");
          n.changeAttribute("attribute", false);

          try {
            nsc.close();
          } catch (IOException e1) {
View Full Code Here

        }

        g.addSink(nsc);
        Node node0 = g.addNode("node0");
        Edge edge = g.addEdge("edge", "node0", "node1", true);
        node0.addAttribute("nodeAttribute", 0);
        node0.changeAttribute("nodeAttribute", 1);
        node0.removeAttribute("nodeAttribute");
        edge.addAttribute("edgeAttribute", 0);
        edge.changeAttribute("edgeAttribute", 1);
        edge.removeAttribute("edgeAttribute");
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.