Examples of addSink()


Examples of org.graphstream.stream.file.FileSourceDGS.addSink()

  public void loadGraph() throws IOException {
    FileSourceDGS dgs = new FileSourceDGS();

    baseGraph = new AdjacencyListGraph("g");

    dgs.addSink(baseGraph);
    dgs.readAll(getClass().getResource("data/TestFilteredIterators.dgs"));
    dgs.removeSink(baseGraph);
  }

  @Test
View Full Code Here

Examples of org.graphstream.stream.file.FileSourceGEXF.addSink()

  protected Graph readRessource(String url) {
    Graph g = new AdjacencyListGraph(url);
    FileSourceGEXF gexf = new FileSourceGEXF();

    gexf.addSink(g);

    try {
      gexf.readAll(getClass().getResourceAsStream(url));
    } catch (IOException e) {
      fail("IOException occured");
View Full Code Here

Examples of org.graphstream.stream.file.FileSourceGML.addSink()

      FileSourceGML source = new FileSourceGML();
     
      graph.addAttribute("ui.quality");
      graph.addAttribute("ui.antialias");
      graph.display();
      source.addSink(graph);
      source.begin(TestSourceGML.class.getResourceAsStream("dynamic.gml"));
      int step = 0;
      while(source.nextStep()) {
        System.err.printf("Step %d%n", step);
        step++;
View Full Code Here

Examples of org.graphstream.stream.file.FileSourceGML.addSink()

      graph.addAttribute("ui.quality");
      graph.addAttribute("ui.antialias");
      graph.addAttribute("ui.stylesheet", "node { text-size:8; text-color: #0008; text-alignment: at-right; } edge { text-size:8; text-color: #0008; }");
      graph.display(false);
      source.addSink(graph);
      source.begin(TestSourceGML.class.getResourceAsStream("example2.sif.gml"));
      while(source.nextEvents()) {}
      source.end();
    }
    catch(Exception e) {
View Full Code Here

Examples of org.graphstream.stream.file.FileSourceGML.addSink()

      graph.addAttribute("ui.quality");
      graph.addAttribute("ui.antialias");
      //graph.addAttribute("ui.stylesheet", "node { text-size:8; text-color: #0008; text-alignment: at-right; } edge { text-size:8; text-color: #0008; }");
      graph.display();
      source.addSink(graph);
      source.begin(TestSourceGML.class.getResourceAsStream("SmallTest.gml"));
      while(source.nextEvents()) {}
      source.end();
    }
    catch(Exception e) {
View Full Code Here

Examples of org.graphstream.stream.file.FileSourcePajek.addSink()

                  : "stroke-mode: plain; stroke-color: #333;"));
   
    Viewer v = graph.display(entry.autoLayout);
    v.setCloseFramePolicy(CloseFramePolicy.CLOSE_VIEWER);
   
    in.addSink(graph);
    in.readAll(TestPajekParser.class
        .getResourceAsStream(entry.ressourceName));

    if (entry.addLabels) {
      for (Node node : graph) {
View Full Code Here

Examples of org.graphstream.stream.rmi.RMISource.addSink()

      sink = new RMISink();
      g1.addSink(sink);

      source = new RMISource();
      source.addSink(g2);

      source.bind(name);
      sink.register("//localhost/" + name);
    } catch (RemoteException e) {
      fail();
View Full Code Here

Examples of org.graphstream.stream.thread.ThreadProxyPipe.addSink()

    "workspace0");
  receiver.setDebug(true);
  // - received events end up in the "default" pipe
  ThreadProxyPipe pipe = receiver.getStream();
  // - plug the pipe to the sink of the graph
  pipe.addSink(g);
  // ----- The sender side (in another thread) ------
  //
  new Thread() {
      public void run() {
    // - the original graph from which events are generated
View Full Code Here

Examples of org.graphstream.stream.thread.ThreadProxyPipe.addSink()

  ThreadProxyPipe pipe = receiver.getStream();

  Graph g = new MultiGraph("workspace0", false, true);

  pipe.addSink(g);

  g.addSink(new SinkAdapter() {

      public void graphAttributeAdded(String sourceId, long timeId,
        String attribute, Object value) {
View Full Code Here

Examples of org.graphstream.stream.thread.ThreadProxyPipe.addSink()

  // receiver.setDebug(true);

  ThreadProxyPipe pipe = receiver.getStream();

  pipe.addSink(g);

  launchClient("localhost", 8080, "workspace0", "0");
  launchClient("localhost", 8080, "workspace0", "1");

  for (int i = 0; i < 10; i++) {
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.