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

Author:
Matthias K?nig <matthias.koenig@charite.de>
Date:
2013-04-18 15:56:31+02:00
Desc:
Changes in Ingegrator and file hierarchy.
Permanent Source URI:
https://staging.physiomeproject.org/w/matthiaskoenig/MetabolicComponentLibrary/rawfile/8fda0d279b7fab2b11f474e06b7b85f2d663e0eb/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();
    }
  }
}