// Path: noark-extraction-validator/src/main/java/com/documaster/validator/config/validators/DirectoryValidator.java
// public class DirectoryValidator implements IValueValidator<File> {
// 
// 	@Override
// 	public void validate(String name, File value) throws ParameterException {
// 
// 		if (!value.exists() || !value.isDirectory()) {
// 
// 			String errorMessage = MessageFormat.format(
// 					"{0}: Invalid/missing directory ({1}).", name, value.getAbsolutePath());
// 
// 			throw new ParameterException(errorMessage);
// 		}
// 	}
// }
// 
// 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/ReportType.java
// public enum ReportType {
// 
// 	EXCEL_XLS, EXCEL_XLSX, XML
// }


import java.io.File;
import java.util.ArrayList;
import java.util.List;
import com.beust.jcommander.Parameter;
import com.beust.jcommander.ParameterException;
import com.beust.jcommander.converters.FileConverter;
import com.documaster.validator.config.validators.DirectoryValidator;
import com.documaster.validator.exceptions.ReportingException;
import com.documaster.validator.reporting.ReportType;
import static com.documaster.validator.reporting.ReportType.EXCEL_XLSX;
/**
 * Noark Extraction Validator
 * Copyright (C) 2016, Documaster AS
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package com.documaster.validator.config.delegates;




public class ReportConfiguration implements Delegate {

	private static List<ReportType> defaultReportTypes;

	private static final String OUTPUT_DIR = "-output-dir";
	@Parameter(
			names = OUTPUT_DIR, description = "The validation report output directory",
// Path: noark-extraction-validator/src/main/java/com/documaster/validator/config/validators/DirectoryValidator.java
// public class DirectoryValidator implements IValueValidator<File> {
// 
// 	@Override
// 	public void validate(String name, File value) throws ParameterException {
// 
// 		if (!value.exists() || !value.isDirectory()) {
// 
// 			String errorMessage = MessageFormat.format(
// 					"{0}: Invalid/missing directory ({1}).", name, value.getAbsolutePath());
// 
// 			throw new ParameterException(errorMessage);
// 		}
// 	}
// }
// 
// 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/ReportType.java
// public enum ReportType {
// 
// 	EXCEL_XLS, EXCEL_XLSX, XML
// }


// Path: noark-extraction-validator/src/main/java/com/documaster/validator/config/delegates/ReportConfiguration.java
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import com.beust.jcommander.Parameter;
import com.beust.jcommander.ParameterException;
import com.beust.jcommander.converters.FileConverter;
import com.documaster.validator.config.validators.DirectoryValidator;
import com.documaster.validator.exceptions.ReportingException;
import com.documaster.validator.reporting.ReportType;
import static com.documaster.validator.reporting.ReportType.EXCEL_XLSX;

/**
 * Noark Extraction Validator
 * Copyright (C) 2016, Documaster AS
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package com.documaster.validator.config.delegates;




public class ReportConfiguration implements Delegate {

	private static List<ReportType> defaultReportTypes;

	private static final String OUTPUT_DIR = "-output-dir";
	@Parameter(
			names = OUTPUT_DIR, description = "The validation report output directory",
			converter = FileConverter.class, validateValueWith = DirectoryValidator.class)