Package org.apache.tika.parser.enricher
Class CompositeContentEnricher
java.lang.Object
org.apache.tika.parser.enricher.CompositeContentEnricher
- All Implemented Interfaces:
Serializable
Media-type-keyed registry of content enrichers: ordinary
Parsers that a container
parser invokes on bytes it has already parsed (OCR text for an image or a
rendered PDF page), rather than being dispatched to by the composite parser. Configured
as the top-level "text-recognizers" list, mirroring "renderers"; with no
list, the loader builds one from the enrichers among the loaded parsers
(ContentEnrichers.resolve(org.apache.tika.parser.Parser)).
Members are keyed by their real media types; a legacy image/ocr-* advertisement
is keyed under the real type, with a warning, until 5.0.
- Since:
- Apache Tika 4.1
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetEnrichers(MediaType mediaType) booleanisEmpty()True when no type has an enricher: enrichment is off.booleanisLegacyClaimant(Parser member) Whether a member returned bygetEnrichers(org.apache.tika.mime.MediaType)is a pre-4.1 engine that advertises onlyimage/ocr-*; such an engine counts as a text recognizer until 5.0.
-
Constructor Details
-
CompositeContentEnricher
-
-
Method Details
-
getEnrichers
- Returns:
- the enrichers for this media type in config order, empty when none; parameters are ignored, alias normalization is the caller's job
-
getSupportedTypes
-
isEmpty
public boolean isEmpty()True when no type has an enricher: enrichment is off. -
isLegacyClaimant
Whether a member returned bygetEnrichers(org.apache.tika.mime.MediaType)is a pre-4.1 engine that advertises onlyimage/ocr-*; such an engine counts as a text recognizer until 5.0.
-