Package org.integratedmodelling.riskwiz.io.xmlbif

Examples of org.integratedmodelling.riskwiz.io.xmlbif.XmlBifWriter


        // save the created network
        String filename = "MyNetwork.xml";

        try {
            XmlBifWriter writer = new XmlBifWriter();

            writer.saveToFile(filename, bn);
            System.out.println("file MyNetwork.xml is saved...");
        } catch (Exception e) {
            System.out.println("Unable to save file:  " + filename);
        }
View Full Code Here


     * Driver for testing this parser
     * @param args
     */
    public static void main(String[] args) {
        XmlBifReader r = new XmlBifReader();
        XmlBifWriter w = new  XmlBifWriter();

        try {
            BeliefNetwork bn = r.load(
                    new FileInputStream("examples/sprinkler.xml"));
            
            System.out.println("----------------------------------")
            w.save(System.out, bn);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
View Full Code Here

    }
 
    public static void genieToBif(String fileIn, String fileOut) {
        GenieReader r = new GenieReader();
        XmlBifWriter w = new  XmlBifWriter();

        try {
            BeliefNetwork bn = r.load(new FileInputStream(fileIn));
            
            System.out.println("----------------------------------")
            w.save(System.out, bn);
            w.saveToFile(fileOut, bn);
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
View Full Code Here

TOP

Related Classes of org.integratedmodelling.riskwiz.io.xmlbif.XmlBifWriter

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.