Package org.apache.tika.parser.enricher
Class SizeGatedEnricher
java.lang.Object
org.apache.tika.parser.ParserDecorator
org.apache.tika.parser.enricher.SizeGatedEnricher
- All Implemented Interfaces:
Serializable,SelfConfiguring,Parser
A
text-recognizers entry's _min-width/_min-height: an image whose
recorded dimensions (tiff:ImageWidth, tiff:ImageLength) fall short in either
is not handed to the engine. An image of unknown size is. The engine's own byte gates
(minFileSizeToOcr) are unchanged.- Since:
- Apache Tika 4.1
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.tika.parser.ParserDecorator
ParserDecorator.MimeFilteringDecorator -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintvoidparse(TikaInputStream tis, ContentHandler handler, Metadata metadata, ParseContext context) Delegates the method call to the decorated parser.static booleanTrue when the metadata records a width or height below the minimum.Methods inherited from class org.apache.tika.parser.ParserDecorator
getSupportedTypes, getWrappedParser, withFallbacks, withMimeFilters, withoutTypes, withTypes
-
Constructor Details
-
SizeGatedEnricher
-
-
Method Details
-
tooSmall
True when the metadata records a width or height below the minimum. -
getMinWidth
public int getMinWidth() -
getMinHeight
public int getMinHeight() -
parse
public void parse(TikaInputStream tis, ContentHandler handler, Metadata metadata, ParseContext context) throws IOException, SAXException, TikaException Description copied from class:ParserDecoratorDelegates the method call to the decorated parser. Subclasses should override this method (and usesuper.parse()to invoke the decorated parser) to implement extra decoration.- Specified by:
parsein interfaceParser- Overrides:
parsein classParserDecorator- Parameters:
handler- handler for the XHTML SAX events (output)metadata- document metadata (input and output)context- parse context- Throws:
IOException- if the document stream could not be readSAXException- if the SAX events could not be processedTikaException- if the document could not be parsed
-
getDecorationName
- Overrides:
getDecorationNamein classParserDecorator- Returns:
- A name/description of the decoration, or null if none available
-