Record Class PipesParsingHelper.UnpackResult

java.lang.Object
java.lang.Record
org.apache.tika.server.core.resource.PipesParsingHelper.UnpackResult
Record Components:
zipFile - path to the zip file containing extracted embedded documents, or null if no embedded documents were found. Caller must delete after use.
metadataList - list of metadata objects from parsing
Enclosing class:
PipesParsingHelper

public static record PipesParsingHelper.UnpackResult(Path zipFile, List<Metadata> metadataList) extends Record
Result of UNPACK parsing containing the zip file path and metadata.
  • Constructor Details

    • UnpackResult

      public UnpackResult(Path zipFile, List<Metadata> metadataList)
      Creates an instance of a UnpackResult record class.
      Parameters:
      zipFile - the value for the zipFile record component
      metadataList - the value for the metadataList record component
  • Method Details

    • getZipInputStream

      public InputStream getZipInputStream() throws IOException
      Returns an InputStream for the zip file. Caller must close the stream and delete the file when done.
      Throws:
      IOException
    • cleanup

      public void cleanup()
      Deletes the zip file. Call this after streaming is complete.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • zipFile

      public Path zipFile()
      Returns the value of the zipFile record component.
      Returns:
      the value of the zipFile record component
    • metadataList

      public List<Metadata> metadataList()
      Returns the value of the metadataList record component.
      Returns:
      the value of the metadataList record component