// Path: noark-extraction-validator/src/main/java/com/documaster/validator/exceptions/ReportingException.java
// public class ReportingException extends RuntimeException {
// 
// 	private static final long serialVersionUID = 1L;
// 
// 	public ReportingException(String message) {
// 
// 		super(message);
// 	}
// 
// 	public ReportingException(Throwable throwable) {
// 
// 		super(throwable);
// 	}
// 
// 	public ReportingException(String message, Throwable throwable) {
// 
// 		super(message, throwable);
// 	}
// }


import java.text.MessageFormat;
import java.util.EnumSet;
import com.documaster.validator.exceptions.ReportingException;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.Font;
import org.apache.poi.ss.usermodel.Hyperlink;
import org.apache.poi.ss.usermodel.IndexedColors;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.streaming.SXSSFSheet;

		style.setAlignment(CellStyle.ALIGN_LEFT);
		style.setVerticalAlignment(CellStyle.VERTICAL_CENTER);

		return style;
	}

	public static void addBorderToStyle(EnumSet<BorderPosition> borderPositions, IndexedColors color, CellStyle style) {

		for (BorderPosition position : borderPositions) {

			switch (position) {

				case TOP:
					style.setBorderTop(CellStyle.BORDER_THIN);
					style.setTopBorderColor(color.getIndex());
					break;
				case BOTTOM:
					style.setBorderBottom(CellStyle.BORDER_THIN);
					style.setBottomBorderColor(color.getIndex());
					break;
				case LEFT:
					style.setBorderLeft(CellStyle.BORDER_THIN);
					style.setLeftBorderColor(color.getIndex());
					break;
				case RIGHT:
					style.setBorderRight(CellStyle.BORDER_THIN);
					style.setRightBorderColor(color.getIndex());
					break;
				default:
// Path: noark-extraction-validator/src/main/java/com/documaster/validator/exceptions/ReportingException.java
// public class ReportingException extends RuntimeException {
// 
// 	private static final long serialVersionUID = 1L;
// 
// 	public ReportingException(String message) {
// 
// 		super(message);
// 	}
// 
// 	public ReportingException(Throwable throwable) {
// 
// 		super(throwable);
// 	}
// 
// 	public ReportingException(String message, Throwable throwable) {
// 
// 		super(message, throwable);
// 	}
// }


// Path: noark-extraction-validator/src/main/java/com/documaster/validator/reporting/excel/ExcelUtils.java
import java.text.MessageFormat;
import java.util.EnumSet;
import com.documaster.validator.exceptions.ReportingException;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.Font;
import org.apache.poi.ss.usermodel.Hyperlink;
import org.apache.poi.ss.usermodel.IndexedColors;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.streaming.SXSSFSheet;


		style.setAlignment(CellStyle.ALIGN_LEFT);
		style.setVerticalAlignment(CellStyle.VERTICAL_CENTER);

		return style;
	}

	public static void addBorderToStyle(EnumSet<BorderPosition> borderPositions, IndexedColors color, CellStyle style) {

		for (BorderPosition position : borderPositions) {

			switch (position) {

				case TOP:
					style.setBorderTop(CellStyle.BORDER_THIN);
					style.setTopBorderColor(color.getIndex());
					break;
				case BOTTOM:
					style.setBorderBottom(CellStyle.BORDER_THIN);
					style.setBottomBorderColor(color.getIndex());
					break;
				case LEFT:
					style.setBorderLeft(CellStyle.BORDER_THIN);
					style.setLeftBorderColor(color.getIndex());
					break;
				case RIGHT:
					style.setBorderRight(CellStyle.BORDER_THIN);
					style.setRightBorderColor(color.getIndex());
					break;
				default:
					throw new ReportingException("Unknown border position: " + position);