Class PagesConfig.Emit

java.lang.Object
org.apache.tika.parser.pages.PagesConfig.Emit
All Implemented Interfaces:
Serializable
Enclosing class:
PagesConfig

public static class PagesConfig.Emit extends Object implements Serializable
Whether, and for which documents, renders are emitted as RENDERING embedded documents.
See Also:
  • Constructor Details

    • Emit

      public Emit()
  • Method Details

    • defaults

      public static PagesConfig.Emit defaults()
    • over

      public PagesConfig.Emit over(PagesConfig.Emit overlay)
    • copy

      public PagesConfig.Emit copy()
    • applies

      public boolean applies(Metadata metadata, ParseContext context)
      Whether the document being parsed has its renders emitted: on, no deeper than maxDepth (the embedding depth the extractor counts: 0 for the top-level document, 1 for its attachments), and its tk:embedded-resource-type is listed when the list is not empty. A top-level document has no resource type, so a non-empty list never matches it; maxDepth: 0 is how "the top-level document only" is said.
    • withinDepth

      public boolean withinDepth(int depth)
      Whether a document at this embedding depth (0 = top-level) is within maxDepth.
    • withinBudget

      public boolean withinBudget(int page)
      Whether the 1-based page is within maxPages.
    • getEnabled

      public Boolean getEnabled()
    • setEnabled

      public void setEnabled(Boolean enabled)
    • getMaxPages

      public Integer getMaxPages()
    • setMaxPages

      public void setMaxPages(Integer maxPages)
      Pages of one document emitted, counted from the first; -1 for no limit.
    • getMaxDepth

      public Integer getMaxDepth()
    • setMaxDepth

      public void setMaxDepth(Integer maxDepth)
      Deepest document whose renders are emitted, as the embedded-document extractor counts depth: 0 for the top-level document only, 1 to include its attachments; -1 for any.
    • getResourceTypes

      public Set<String> getResourceTypes()
    • setResourceTypes

      public void setResourceTypes(Set<String> resourceTypes)
      Emit only for documents that are embedded documents of one of these tk:embedded-resource-types, e.g. ["THUMBNAIL"]; empty for every document.
    • getRender

      public RenderSettings getRender()
    • setRender

      public void setRender(RenderSettings render)
      Overlay on pages.render for emitted renders only.
    • render

      public RenderSettings render()
      The emitted-render overlay, created if unset.