Class FileContents


  • public final class FileContents
    extends java.lang.Object
    • Method Detail

      • getRawText

        public java.util.Optional<java.lang.String> getRawText()
        Returns:
        The raw text content of the file. Available for all file types when the rawText query parameter is set to true.
        • PDF/IMG: Concatenated raw text from all pages
        • DOCX: The document's raw text
        • CSV: Concatenated chunks or CSV text
        • EXCEL: Not included (use sheets instead)
        • TXT/XML/HTML: The file's text content
      • getPages

        public java.util.Optional<java.util.List<FileContentsPagesItem>> getPages()
        Returns:
        Page-level content for document file types.
        • PDF/IMG: Contains pageNumber, pageHeight, pageWidth, and markdown (if markdown query param is true)
        • DOCX: Contains pageNumber and html (if html query param is true)
        • Other file types: Empty array
      • getSections

        public java.util.Optional<java.util.List<FileContentsSectionsItem>> getSections()
        Returns:
        Section-level content for documents that support section-based chunking. Available for PDF and IMG file types.
      • getSheets

        public java.util.Optional<java.util.List<FileContentsSheetsItem>> getSheets()
        Returns:
        Sheet-level content for spreadsheet file types. Available for EXCEL files.
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • getAdditionalProperties

        public java.util.Map<java.lang.String,​java.lang.Object> getAdditionalProperties()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object