package at.procon.dip.processing.spi;

import at.procon.dip.classification.spi.DetectionResult;
import at.procon.dip.extraction.spi.ExtractionResult;
import at.procon.dip.ingestion.spi.SourceDescriptor;

/**
 * Optional type-specific enrichment layer on top of the canonical DOC import.
 */
public interface StructuredDocumentProcessor {

    boolean supports(SourceDescriptor sourceDescriptor, DetectionResult detectionResult);

    default DocumentProcessingPolicy processingPolicy(SourceDescriptor sourceDescriptor, DetectionResult detectionResult) {
        return DocumentProcessingPolicy.replaceGenericTextProcessing();
    }

    ExtractionResult process(StructuredProcessingRequest request);
}
