// Path: src/omr/QuestionGroup.java
// public enum Orientation {
// 	VERTICAL("vertical"), HORIZONTAL("horizontal"), STUDENT_NUMBER("student-number"), CHECK_LETTER("check-letter");
//     	
// 	private String name;
// 	private Orientation(String name) {
// 		this.name = name;
// 	}
//     	
// 	@Override
//     public String toString() {
// 		return this.name;
// 	}
// };


import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import omr.QuestionGroup.Orientation;
package omr;



/**
 * Saves answers and results as comma separated value (CSV) files. 
 */
public class CsvSerializer {

    public void saveAnswers(Project project, File file) throws IOException {
        
        SheetStructure structure = project.getSheetStructure();
        
        PrintStream fout = null;
        try {
            fout = new PrintStream(new FileOutputStream (file));
            
            // Write header line
            fout.print("image,studentId");
            for (QuestionGroup group : structure.getQuestionGroups()) {
            	// Skip the studentnumber
// Path: src/omr/QuestionGroup.java
// public enum Orientation {
// 	VERTICAL("vertical"), HORIZONTAL("horizontal"), STUDENT_NUMBER("student-number"), CHECK_LETTER("check-letter");
//     	
// 	private String name;
// 	private Orientation(String name) {
// 		this.name = name;
// 	}
//     	
// 	@Override
//     public String toString() {
// 		return this.name;
// 	}
// };


// Path: src/omr/CsvSerializer.java
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import omr.QuestionGroup.Orientation;

package omr;



/**
 * Saves answers and results as comma separated value (CSV) files. 
 */
public class CsvSerializer {

    public void saveAnswers(Project project, File file) throws IOException {
        
        SheetStructure structure = project.getSheetStructure();
        
        PrintStream fout = null;
        try {
            fout = new PrintStream(new FileOutputStream (file));
            
            // Write header line
            fout.print("image,studentId");
            for (QuestionGroup group : structure.getQuestionGroups()) {
            	// Skip the studentnumber
            	if (group.getOrientation() != Orientation.VERTICAL && group.getOrientation() != Orientation.HORIZONTAL) {