Package org.apache.tika.config
Interface SelfConfiguring
- All Known Subinterfaces:
Detector,EncodingDetector,MetaEncodingDetector,Parser,PDDocumentRenderer,Renderer,Translator
- All Known Implementing Classes:
AbstractArchiveParser,AbstractDBParser,AbstractDWGParser,AbstractEncodingDetectorParser,AbstractExternalProcessParser,AbstractImageParser,AbstractMultipleParser,AbstractOfficeParser,AbstractParser,AbstractTranslator,AbstractVLMParser,AbstractXML2003Parser,ActiveMimeParser,AdobeFontMetricParser,AmazonTranscribe,AppleSingleFileParser,AudioParser,AutoDetectParser,BOMDetector,BPGParser,BPListDetector,CachedTranslator,CharSoupLanguageDetector,ChmParser,ClassParser,ClaudeVLMParser,CompositeDetector,CompositeEncodingDetector,CompositeParser,CompositeRenderer,CompressorParser,CryptoParser,CTAKESParser,DBFParser,DcXMLParser,DefaultDetector,DefaultEncodingDetector,DefaultParser,DefaultProbDetector,DefaultTranslator,DefaultZipContainerDetector,DelegatingParser,DeprecatedStreamingZipContainerDetector,DGN8Parser,DIFParser,DirListParser,DWGParser,DWGReadParser,EMFParser,EmptyDetector,EmptyParser,EmptyTranslator,EncodeOCRParser,EncryptedPrescriptionDetector,EncryptedPrescriptionParser,EnviHeaderParser,EpubContentParser,EpubParser,ErrorParser,ExecutableParser,ExternalParser,ExternalTranslator,FallbackParser,FeedParser,FictionBookParser,FileCommandDetector,FlacParser,FlatOpenDocumentParser,FLVParser,GDALParser,GeminiVLMParser,GeographicInformationParser,GeoParser,GeoPkgParser,GoogleTranslator,GribParser,GZipSpecializationDetector,HDFParser,HeifParser,HtmlEncodingDetector,HttpParser,HwpV5Parser,ICNSParser,Icu4jEncodingDetector,IDMLParser,ImageParser,IptcAnpaParser,ISArchiveParser,IWork13PackageParser,IWork18PackageParser,IWorkPackageParser,JackcessParser,JoshuaNetworkTranslator,JournalParser,JpegParser,JSoupParser,JunkFilterEncodingDetector,JXLParser,LanguageDetectingParser,Latin1StringsParser,LibPstParser,Lingo24Translator,MagicDetector,MagikaDetector,MarianTranslator,MatParser,MatroskaDetector,MboxParser,MetadataCharsetDetector,MicrosoftTranslator,MidiParser,MIFParser,MimeTypes,MiscOLEDetector,MojibusterEncodingDetector,MosesTranslator,Mp3Parser,MP4Parser,MSOwnerFileParser,NaiveBayesBigramEncodingDetector,NamedEntityParser,NameDetector,NetCDFParser,NetworkParser,NNExampleModelDetector,OfficeParser,OggAudioParser,OggDetector,OggParser,OldExcelParser,OneNoteParser,OOXMLParser,OpenAIImageEmbeddingParser,OpenAIVLMParser,OpenDocumentContentParser,OpenDocumentMetaParser,OpenDocumentParser,OPFParser,OpusParser,OutlookPSTParser,OverrideDetector,OverrideEncodingDetector,PackageParser,ParserDecorator,ParserDecorator.MimeFilteringDecorator,ParserPostProcessor,PDFBoxRenderer,PDFParser,PickBestTextEncodingParser,Pkcs7Parser,PListParser,POIFSContainerDetector,PopplerRenderer,PrescriptionParser,ProbabilisticMimeDetectionSelector,PRTParser,PSDParser,PSTMailItemParser,QuattroProParser,RarParser,RecursiveParserWrapper,RegexCaptureParser,RFC822Parser,RTFParser,RTGTranslator,SAS7BDATParser,SevenZParser,SiegfriedDetector,SourceCodeParser,SpeexParser,SpreadsheetMLParser,SQLite3DBParser,SQLite3Parser,StandardHtmlEncodingDetector,StatefulParser,StreamingZipContainerDetector,StringsParser,SupplementingParser,Tess4JParser,TesseractOCRParser,TextAndAttributeXMLParser,TextAndCSVParser,TextDetector,TheoraParser,TiffParser,TMXParser,TNEFParser,TrainedModelDetector,TrueTypeParser,TSDParser,TXTParser,TypeDetector,UniversalEncodingDetector,UniversalExecutableParser,UnrarParser,Utf16SpecialistEncodingDetector,VorbisParser,WACZParser,WARCParser,WebPParser,WMFParser,Word2006MLParser,WordMLParser,WordPerfectParser,XLIFF12Parser,XLZParser,XMLParser,XMLProfiler,YandexTranslator,ZeroSizeFileDetector,ZipParser
public interface SelfConfiguring
Marker interface indicating that a component reads its own configuration
from
ParseContext's jsonConfigs at runtime.
Components implementing this interface will NOT be automatically resolved by ParseContextUtils. Instead, the JSON configuration will remain in ParseContext's jsonConfigs, and the component is responsible for reading and applying its own configuration during execution.
This is typically used by parsers and other components that need fine-grained control over how their configuration is loaded and merged with defaults.
Example:
@TikaComponent
public class PDFParser implements Parser, SelfConfiguring {
private final PDFParserConfig defaultConfig;
public void parse(..., ParseContext context) {
// Component reads its own config from ParseContext
PDFParserConfig config = ParseContextConfig.getConfig(
context, "pdf-parser", PDFParserConfig.class, defaultConfig);
// use config...
}
}
Components that do NOT implement this interface will have their configuration automatically deserialized and added to ParseContext by ParseContextUtils.
- Since:
- Apache Tika 4.0
- See Also: