Record Class PagedTextExtraction

java.lang.Object
java.lang.Record
org.exoplatform.documents.storage.jcr.model.PagedTextExtraction
Record Components:
file - the cache file holding the text as UTF-16BE, null without text
totalChars - the length of the text
truncated - true when the text was cut at the most characters read
outline - the file's headings
status - DocumentTextContent.Status.EXTRACTED, else why there is no text

public record PagedTextExtraction(Path file, long totalChars, boolean truncated, List<org.exoplatform.documents.model.DocumentOutlineEntry> outline, org.exoplatform.documents.model.DocumentTextContent.Status status) extends Record
The text of one version of a file, as extracted to be read part by part.
  • Constructor Summary

    Constructors
    Constructor
    Description
    PagedTextExtraction(Path file, long totalChars, boolean truncated, List<org.exoplatform.documents.model.DocumentOutlineEntry> outline, org.exoplatform.documents.model.DocumentTextContent.Status status)
    Creates an instance of a PagedTextExtraction record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    Returns the value of the file record component.
    final int
    Returns a hash code value for this object.
    none(org.exoplatform.documents.model.DocumentTextContent.Status status)
    Builds the extraction of a file that gave no text.
    List<org.exoplatform.documents.model.DocumentOutlineEntry>
    Returns the value of the outline record component.
    org.exoplatform.documents.model.DocumentTextContent.Status
    Returns the value of the status record component.
    final String
    Returns a string representation of this record class.
    long
    Returns the value of the totalChars record component.
    boolean
    Returns the value of the truncated record component.

    Methods inherited from class java.lang.Object

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

    • PagedTextExtraction

      public PagedTextExtraction(Path file, long totalChars, boolean truncated, List<org.exoplatform.documents.model.DocumentOutlineEntry> outline, org.exoplatform.documents.model.DocumentTextContent.Status status)
      Creates an instance of a PagedTextExtraction record class.
      Parameters:
      file - the value for the file record component
      totalChars - the value for the totalChars record component
      truncated - the value for the truncated record component
      outline - the value for the outline record component
      status - the value for the status record component
  • Method Details

    • none

      public static PagedTextExtraction none(org.exoplatform.documents.model.DocumentTextContent.Status status)
      Builds the extraction of a file that gave no text.
      Parameters:
      status - why
      Returns:
      the extraction
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • file

      public Path file()
      Returns the value of the file record component.
      Returns:
      the value of the file record component
    • totalChars

      public long totalChars()
      Returns the value of the totalChars record component.
      Returns:
      the value of the totalChars record component
    • truncated

      public boolean truncated()
      Returns the value of the truncated record component.
      Returns:
      the value of the truncated record component
    • outline

      public List<org.exoplatform.documents.model.DocumentOutlineEntry> outline()
      Returns the value of the outline record component.
      Returns:
      the value of the outline record component
    • status

      public org.exoplatform.documents.model.DocumentTextContent.Status status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component