Class InferenceBinding

java.lang.Object
org.apache.tika.parser.inference.InferenceBinding

public final class InferenceBinding extends Object
One entry of the "inference" list: engine, input, tasks, filters, budget.
  • Field Details

    • DEFAULT_MIN_PIXELS

      public static final int DEFAULT_MIN_PIXELS
      Below this, in either dimension, an image is a spacer, not a picture.
      See Also:
  • Method Details

    • builder

      public static InferenceBinding.Builder builder(String id, String engine, InputKind input)
      The three things every binding needs; everything else has a default.
    • getId

      public String getId()
    • getEngine

      public String getEngine()
    • getInput

      public InputKind getInput()
    • getTasks

      public List<String> getTasks()
    • getMaxChunks

      public int getMaxChunks()
      Units this binding may enrich per document; -1 for no limit.
    • getMaxBytes

      public long getMaxBytes()
      Largest unit this binding accepts, in bytes; -1 for no limit.
    • isEnabled

      public boolean isEnabled()
    • getModality

      public Modality getModality()
      What the engine is shown; implied by the input kind except for MEDIA, where it is required.
    • getChunker

      public TextChunker getChunker()
      How a TEXT binding cuts a document's text; null means the whole text is one chunk.
    • getMinWidth

      public int getMinWidth()
      Narrowest image this binding takes, in pixels; images of unknown size are taken.
    • getMinHeight

      public int getMinHeight()
    • accepts

      public boolean accepts(InputKind kind, MediaType type, Metadata target)
      As accepts(InputKind, MediaType), and for an image its recorded dimensions (tiff:ImageWidth, tiff:ImageLength) must reach the minimum when known.
    • accepts

      public boolean accepts(InputKind kind, MediaType type)