package at.procon.dip.processing.spi;

/**
 * Controls which generic pipeline stages should run for a document and whether
 * a structured processor should be invoked.
 */
public record DocumentProcessingPolicy(
        boolean runGenericExtraction,
        boolean persistExtractedContent,
        boolean runRepresentationBuilders,
        boolean invokeStructuredProcessor,
        boolean applyStructuredTitleIfMissing
) {

    public static DocumentProcessingPolicy genericDefault() {
        return new DocumentProcessingPolicy(true, true, true, true, true);
    }

    public static DocumentProcessingPolicy replaceGenericTextProcessing() {
        return new DocumentProcessingPolicy(false, true, true, true, true);
    }
}
