Class OcrWarnings

java.lang.Object
org.apache.tika.parser.enricher.OcrWarnings

public final class OcrWarnings extends Object
Writes TikaCoreProperties.OCR_WARNINGS: each code once per document, and for an inline image also on the parent document, whose content receives the image's text.
Since:
Apache Tika 4.2
  • Method Details

    • add

      public static void add(Metadata metadata, String code)
      Adds the code to the metadata unless it is already there.
    • add

      public static void add(ParseContext context, Metadata metadata, String code)
      Adds the code to the metadata and, for an inline image, to its parent's.
    • addToInlineParent

      public static void addToInlineParent(ParseContext context, Metadata metadata, String code)
      The text of an inline image lands in the parent's content, so the doubt goes with it.