5556575859606162636465
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
4647484950515253545556
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");
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++;
8485868788899091929394
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) {
102103104105106107108109110111112
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) {
190191192193194195196197198199200
: "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) {
6970717273747576777879
sink = new RMISink(); g1.addSink(sink); source = new RMISource(); source.addSink(g2); source.bind(name); sink.register("//localhost/" + name); } catch (RemoteException e) { fail();
4849505152535455565758
"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
5051525354555657585960
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) {
115116117118119120121122123124125
// 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++) {