Class AccessChecker

java.lang.Object
org.apache.tika.parser.pdf.AccessChecker
All Implemented Interfaces:
Serializable

public class AccessChecker extends Object implements Serializable
Checks whether or not a document allows extraction generally or extraction for accessibility only.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    This constructs an AccessChecker that will not perform any checking and will always return without throwing an exception.
    AccessChecker(boolean allowExtractionForAccessibility)
    This constructs an AccessChecker that will check for whether or not content should be extracted from a document.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    check(org.apache.tika.metadata.Metadata metadata)
    Checks to see if a document's content should be extracted based on metadata values and the value of allowExtractionForAccessibility in the constructor.
    boolean
     
    int
     
    boolean
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AccessChecker

      public AccessChecker()
      This constructs an AccessChecker that will not perform any checking and will always return without throwing an exception.

      This constructor is available to allow for Tika's legacy (<= v1.7) behavior.

    • AccessChecker

      public AccessChecker(boolean allowExtractionForAccessibility)
      This constructs an AccessChecker that will check for whether or not content should be extracted from a document.
      Parameters:
      allowExtractionForAccessibility - if general extraction is not allowed, is extraction for accessibility allowed
  • Method Details

    • isAllowExtractionForAccessibility

      public boolean isAllowExtractionForAccessibility()
    • check

      public void check(org.apache.tika.metadata.Metadata metadata) throws org.apache.tika.exception.AccessPermissionException
      Checks to see if a document's content should be extracted based on metadata values and the value of allowExtractionForAccessibility in the constructor.
      Parameters:
      metadata -
      Throws:
      org.apache.tika.exception.AccessPermissionException - if access is not permitted
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object