Location: Metabolic Component Library @ 2ac29dd97e92 / CellML-source / CellMLTools / src / tools / CellMLWriter.java

Author:
Matthias K?nig <matthias.koenig@charite.de>
Date:
2013-05-17 20:14:36+02:00
Desc:
Further work on the HTML documentation.
Permanent Source URI:
https://models.cellml.org/w/matthiaskoenig/MetabolicComponentLibrary/rawfile/2ac29dd97e9204b8c5de02fa2ddf416afdd997e4/CellML-source/CellMLTools/src/tools/CellMLWriter.java

package tools;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import cellml_api.Model;

public class CellMLWriter {
  public static void writeToFile(Model model, String outputFileName ){
    try{
      PrintWriter writer = new PrintWriter(new FileWriter(outputFileName));
      writer.println(model.getSerialisedText());
      writer.close();
    }
    catch(IOException e)
    {
      e.printStackTrace();
    }
  }
}