Package prefuse.util.io

Examples of prefuse.util.io.XMLWriter.comment()


        checkGraphMLSchema(es);
       
        XMLWriter xml = new XMLWriter(new PrintWriter(os));
        xml.begin(Tokens.GRAPHML_HEADER, 2);
       
        xml.comment("prefuse GraphML Writer | "
                + new Date(System.currentTimeMillis()));
       
        // print the graph schema
        printSchema(xml, Tokens.NODE, ns, null);
        printSchema(xml, Tokens.EDGE, es, new String[] {
View Full Code Here


        // print graph contents
        xml.start(Tokens.GRAPH, Tokens.EDGEDEF,
            graph.isDirected() ? Tokens.DIRECTED : Tokens.UNDIRECTED);
       
        // print the nodes
        xml.comment("nodes");
        Iterator nodes = graph.nodes();
        while ( nodes.hasNext() ) {
            Node n = (Node)nodes.next();
           
            if ( ns.getColumnCount() > 0 ) {
View Full Code Here

       
        // print the edges
        String[] attr = new String[]{Tokens.ID, Tokens.SOURCE, Tokens.TARGET};
        String[] vals = new String[3];
       
        xml.comment("edges");
        Iterator edges = graph.edges();
        while ( edges.hasNext() ) {
            Edge e = (Edge)edges.next();
            vals[0] = String.valueOf(e.getRow());
            vals[1] = String.valueOf(e.getSourceNode().getRow());
View Full Code Here

        checkTreeMLSchema(ns);
       
        XMLWriter xml = new XMLWriter(new PrintWriter(os));
        xml.begin();
       
        xml.comment("prefuse TreeML Writer | "
                + new Date(System.currentTimeMillis()));
               
        // print the tree contents
        xml.start(Tokens.TREE);
       
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.