Package org.graphstream.stream.file

Examples of org.graphstream.stream.file.FileSinkGML


    }
  }
 
  public void test() throws IOException {
    Graph graph = new MultiGraph("test GML");
    FileSinkGML out1 = new FileSinkGML();
    FileSinkDynamicGML out2 = new FileSinkDynamicGML();
 
    out1.begin("TestSinkGML.gml");
    out2.begin("TestSinkGML.dgml");
   
    graph.addSink(out1);
    graph.addSink(out2);
   
    graph.addNode("A");
    graph.getNode("A").addAttribute("s", "foo bar");
    graph.addNode("B");
    graph.stepBegins(1);
    graph.addEdge("AB", "A", "B", true);
    graph.getEdge("AB").addAttribute("n", 1);
    graph.stepBegins(2);
    graph.addAttribute("b", true);
    graph.getNode("B").addAttribute("c", 'X');
    graph.getNode("B").addAttribute("d", 'Y');
    graph.stepBegins(3);
    graph.getNode("B").removeAttribute("c");
    graph.removeAttribute("b");
    graph.removeNode("A");
    graph.removeNode("B");
   
    out1.end();
    out2.end();
  }
View Full Code Here

TOP

Related Classes of org.graphstream.stream.file.FileSinkGML

Copyright © 2018 www.massapicom. 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.