<commit_before>package org.verapdf.processor;

import org.verapdf.processor.config.Config;
import org.verapdf.report.ItemDetails;

import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;

/**
 * Instance of this class contains result of
 * {@link org.verapdf.processor.ProcessorImpl#validate(InputStream, ItemDetails, Config, OutputStream)}
 * work.
 *
 * @author <NAME>
 */
public class ProcessingResult {
	private ProcessingResult.ValidationSummary validationSummary;
	private ProcessingResult.MetadataFixingSummary metadataFixerSummary;
	private ProcessingResult.FeaturesSummary featuresSummary;
	private ProcessingResult.ReportSummary reportSummary;
	private ArrayList<String> errorMessages;

	ProcessingResult(Config config) {
		this.validationSummary = config.getProcessingType().isValidating() ?
				ValidationSummary.FILE_VALID : ValidationSummary.VALIDATION_DISABLED;
		this.metadataFixerSummary = config.isFixMetadata() ?
				MetadataFixingSummary.FIXING_SUCCEED : MetadataFixingSummary.FIXING_DISABLED;
		this.featuresSummary = config.getProcessingType().isFeatures() ?
				FeaturesSummary.FEATURES_SUCCEED : FeaturesSummary.FEATURES_DISABLED;
		this.reportSummary = ReportSummary.REPORT_SECCEED;
		this.errorMessages = new ArrayList<>();
	}

	/**
	 * @return summary of validation
	 */
	public ValidationSummary getValidationSummary() {
		return validationSummary;
	}

	/**
	 * @return summary of metadata fixing
	 */
	public MetadataFixingSummary getMetadataFixerSummary() {
		return metadataFixerSummary;
	}

	/**
	 * @return summary of feature extracting
	 */
	public FeaturesSummary getFeaturesSummary() {
		return featuresSummary;
	}

	/**
	 * @return summary of report generating
	 */
	public ReportSummary getReportSummary() {
		return reportSummary;
	}

	/**
	 * @return ArrayList of messages of exceptions that occurred during
	 * {@link org.verapdf.processor.ProcessorImpl#validate(InputStream, ItemDetails, Config, OutputStream)}
	 */
	public ArrayList<String> getErrorMessages() {
		return errorMessages;
	}

	void setValidationSummary(ValidationSummary validationSummary) {
		this.validationSummary = validationSummary;
	}

	void setReportSummary(ReportSummary reportSummary) {
		this.reportSummary = reportSummary;
	}

	void setMetadataFixerSummary(MetadataFixingSummary metadataFixerSummary) {
		this.metadataFixerSummary = metadataFixerSummary;
	}

	void setFeaturesSummary(FeaturesSummary featuresSummary) {
		this.featuresSummary = featuresSummary;
	}

	void addErrorMessage(String message) {
		errorMessages.add(message);
	}

	public enum ValidationSummary {
		FILE_VALID,
		FILE_NOT_VALID,
		ERROR_IN_VALIDATION,
		VALIDATION_DISABLED
	}

	public enum MetadataFixingSummary {
		FIXING_SUCCEED,
		ERROR_IN_FIXING,
		FIXING_DISABLED
	}

	public enum FeaturesSummary {
		FEATURES_SUCCEED,
		ERROR_IN_FEATURES,
		FEATURES_DISABLED
	}

	public enum ReportSummary {
		REPORT_SECCEED,
		ERROR_IN_REPORT
	}
}<commit_msg>Typo in enum fixed, minor fix in test<commit_after>package org.verapdf.processor;

import org.verapdf.processor.config.Config;
import org.verapdf.report.ItemDetails;

import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;

/**
 * Instance of this class contains result of
 * {@link org.verapdf.processor.ProcessorImpl#validate(InputStream, ItemDetails, Config, OutputStream)}
 * work.
 *
 * @author <NAME>
 */
public class ProcessingResult {
	private ProcessingResult.ValidationSummary validationSummary;
	private ProcessingResult.MetadataFixingSummary metadataFixerSummary;
	private ProcessingResult.FeaturesSummary featuresSummary;
	private ProcessingResult.ReportSummary reportSummary;
	private ArrayList<String> errorMessages;

	ProcessingResult(Config config) {
		this.validationSummary = config.getProcessingType().isValidating() ?
				ValidationSummary.FILE_VALID : ValidationSummary.VALIDATION_DISABLED;
		this.metadataFixerSummary = config.isFixMetadata() ?
				MetadataFixingSummary.FIXING_SUCCEED : MetadataFixingSummary.FIXING_DISABLED;
		this.featuresSummary = config.getProcessingType().isFeatures() ?
				FeaturesSummary.FEATURES_SUCCEED : FeaturesSummary.FEATURES_DISABLED;
		this.reportSummary = ReportSummary.REPORT_SUCCEED;
		this.errorMessages = new ArrayList<>();
	}

	/**
	 * @return summary of validation
	 */
	public ValidationSummary getValidationSummary() {
		return validationSummary;
	}

	/**
	 * @return summary of metadata fixing
	 */
	public MetadataFixingSummary getMetadataFixerSummary() {
		return metadataFixerSummary;
	}

	/**
	 * @return summary of feature extracting
	 */
	public FeaturesSummary getFeaturesSummary() {
		return featuresSummary;
	}

	/**
	 * @return summary of report generating
	 */
	public ReportSummary getReportSummary() {
		return reportSummary;
	}

	/**
	 * @return ArrayList of messages of exceptions that occurred during
	 * {@link org.verapdf.processor.ProcessorImpl#validate(InputStream, ItemDetails, Config, OutputStream)}
	 */
	public ArrayList<String> getErrorMessages() {
		return errorMessages;
	}

	void setValidationSummary(ValidationSummary validationSummary) {
		this.validationSummary = validationSummary;
	}

	void setReportSummary(ReportSummary reportSummary) {
		this.reportSummary = reportSummary;
	}

	void setMetadataFixerSummary(MetadataFixingSummary metadataFixerSummary) {
		this.metadataFixerSummary = metadataFixerSummary;
	}

	void setFeaturesSummary(FeaturesSummary featuresSummary) {
		this.featuresSummary = featuresSummary;
	}

	void addErrorMessage(String message) {
		errorMessages.add(message);
	}

	public enum ValidationSummary {
		FILE_VALID,
		FILE_NOT_VALID,
		ERROR_IN_VALIDATION,
		VALIDATION_DISABLED
	}

	public enum MetadataFixingSummary {
		FIXING_SUCCEED,
		ERROR_IN_FIXING,
		FIXING_DISABLED
	}

	public enum FeaturesSummary {
		FEATURES_SUCCEED,
		ERROR_IN_FEATURES,
		FEATURES_DISABLED
	}

	public enum ReportSummary {
		REPORT_SUCCEED,
		ERROR_IN_REPORT
	}
}
{'fraction_non_alphanumeric': 0.08090452261306533, 'fraction_numerical': 0.0, 'mean_word_length': 5.561538461538461, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6499429', 'n_tokens_mistral': 1802, 'n_tokens_neox': 1686, 'n_words': 347}